10000 bpo-34866: Adding max_num_fields to cgi.FieldStorage by matthewbelisle-wf · Pull Request #9660 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-34866: Adding max_num_fields to cgi.FieldStorage #9660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing typos
  • Loading branch information
matthewbelisle-wf committed Oct 4, 2018
commit 27352e9fc243339db4ca327482d96b471da77b88
2 changes: 1 addition & 1 deletion Lib/cgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def __init__(self, fp=None, headers=None, outerboundary=b'',
for the page sending the form (content-type : meta http-equiv or
header)

max_num_fields: Integer. If set, then __init__ throws an ValueError
max_num_fields: Integer. If set, then __init__ throws a ValueError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you really want a type annotation (of which I see no precedent above), then just write "int".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed in ab0eb93.

if there are more than n fields read by parse_qsl().

"""
Expand Down
4 changes: 2 additions & 2 deletions Lib/urllib/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def parse_qs(qs, keep_blank_values=False, strict_parsing=False,
encoding and errors: specify how to decode percent-encoded sequences
into Unicode characters, as accepted by the bytes.decode() method.

max_num_fields: Integer. If set, then throws an ValueError if there
max_num_fields: Integer. If set, then throws a ValueError if there
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto about the annotation.

are more than n fields read by parse_qsl().

Returns a dictionary.
Expand Down Expand Up @@ -692,7 +692,7 @@ def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
encoding and errors: specify how to decode percent-encoded sequences
into Unicode characters, as accepted by the bytes.decode() method.

max_num_fields: Integer. If set, then throws an ValueError
max_num_fields: Integer. If set, then throws a ValueError
if there are more than n fields read by parse_qsl().

Returns a list, as G-d intended.
Expand Down
0