[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

This is now fixed in all active versions of python. No documentation changes 
required for this change.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread Senthil Kumaran


Change by Senthil Kumaran :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread miss-islington


miss-islington  added the comment:


New changeset c72b7f703eec45c1f4006bf5f65092daedaec46e by Miss Islington (bot) 
in branch '3.8':
bpo-34226: fix cgi.parse_multipart without content_length (GH-8530)
https://github.com/python/cpython/commit/c72b7f703eec45c1f4006bf5f65092daedaec46e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread miss-islington


miss-islington  added the comment:


New changeset b87453f94fd391e6700eb25dd91de2e56aeeb98f by Miss Islington (bot) 
in branch '3.9':
bpo-34226: fix cgi.parse_multipart without content_length (GH-8530)
https://github.com/python/cpython/commit/b87453f94fd391e6700eb25dd91de2e56aeeb98f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread miss-islington


miss-islington  added the comment:


New changeset aa83935a56d1fd4d72d4de5f0278a240a2d6844d by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) 
(GH-20892)
https://github.com/python/cpython/commit/aa83935a56d1fd4d72d4de5f0278a240a2d6844d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20075
pull_request: https://github.com/python/cpython/pull/20892

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread miss-islington


miss-islington  added the comment:


New changeset d8cf3514dd4682419a66f6e834bb384ee34afc95 by roger in branch 
'master':
bpo-34226: fix cgi.parse_multipart without content_length (GH-8530)
https://github.com/python/cpython/commit/d8cf3514dd4682419a66f6e834bb384ee34afc95


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20074
pull_request: https://github.com/python/cpython/pull/20891

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20073
pull_request: https://github.com/python/cpython/pull/20890

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-12 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

I will spend time on this on 12-June or 13-June, 2020.
At the very least, if no changes are required, I will document this for 3.7 and 
higher versions.

--
assignee: docs@python -> orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-12 Thread Niklas Sombert


Niklas Sombert  added the comment:

Since there's the easy workaround of just setting pdict["CONTENT-LENGTH"] I 
personally don't have a problem with this staying the way it is.

But it would be really nice if this were documented somewhere.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

I note this is marked as a 3.7regression and still open. Since the cutoff for 
the final 3.7 bugfix mode release is in a few days, I'm assuming this means 
that 3.7 users will have to live with this regression.  If you feel that is a 
problem, speak up now.

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2019-09-30 Thread Martin Panter


Martin Panter  added the comment:

Looks like the change causing this is revision cc3fa20. I would remove the 
reference to pdict['CONTENT-LENGTH'].

--
keywords: +3.7regression
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2019-09-03 Thread Niklas Sombert


Change by Niklas Sombert :


--
nosy: +ytvwld

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2019-07-12 Thread Fred L. Drake, Jr.


Change by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2018-08-30 Thread Tercio Gaudencio Filho


Change by Tercio Gaudencio Filho :


--
nosy: +Tercio Gaudencio Filho

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2018-07-28 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +8047
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2018-07-28 Thread roger


roger  added the comment:

working on this on europython

--
nosy: +rogerduran

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2018-07-25 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2018-07-25 Thread Chih-Hsuan Yen


New submission from Chih-Hsuan Yen :

In Python 3.7, cgi.parse_multipart() requires "CONTENT-LENGTH" in the second 
parameter `pdict`. This is not necesary in Python 3.6.

For example, the following code runs with 3.6:

$ python3.6
Python 3.6.6 (default, Jun 27 2018, 13:11:40) 
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cgi, io
>>> data = b'--heyDavid\r\nContent-Disposition: form-data; 
>>> name="cfield"\r\n\r\njust a string\r\n\r\n--heyDavid--\r\n'
>>> cgi.parse_multipart(io.BytesIO(data), {"boundary": b"heyDavid"})
{'cfield': [b'just a string\r\n']}

While not on 3.7:

$ python3.7
Python 3.7.0 (default, Jul 15 2018, 10:44:58) 
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cgi, io
>>> data = b'--heyDavid\r\nContent-Disposition: form-data; 
>>> name="cfield"\r\n\r\njust a string\r\n\r\n--heyDavid--\r\n'
>>> cgi.parse_multipart(io.BytesIO(data), {"boundary": b"heyDavid"})
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/cgi.py", line 220, in parse_multipart
headers['Content-Length'] = pdict['CONTENT-LENGTH']
KeyError: 'CONTENT-LENGTH'

I looked into the source code of CPython, and found CONTENT-LENGTH in nowhere 
but cgi.py and test_cgi.py. I guess it has the same meaning as the 
Content-Length header in HTTP or CONTENT_LENGTH environment variable in CGI? It 
would be great to document such a backward-incompatible behavior.

Environment: Arch Linux with Python 3.6.6 from [extra] repo and 3.7.0 from 
[staging] repo.

CC the author and the reviewer of issue29979, where relevant codes are 
introduced.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 322362
nosy: docs@python, orsenthil, quentel, yan12125
priority: normal
severity: normal
status: open
title: cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com