[issue22922] asyncio: call_soon() should raise an exception if the event loop is closed

2014-11-23 Thread STINNER Victor
New submission from STINNER Victor: call_soon() call be called before the event loop starts and after run_forever(), the call will be executed by the next call to run_forever() (or run_until_complete). But calling call_soon() after close() does not make sense and the user may be surprised to

[issue22923] No prompt for display all X possibilities on completion-enabled input()

2014-11-23 Thread Yoha
New submission from Yoha: When running input() (or raw_input() for Python 2) while tab-completion has been enabled using `readline.parse_and_bind('tab: complete')`, pressing the tab key twice display the message `Display all X possibilities? (y or n)` when there are more than 100 remaining

[issue22923] No prompt for display all X possibilities on completion-enabled input()

2014-11-23 Thread Yoha
Yoha added the comment: Forgot to list the system: the bug has been tested and reproduced on Debian amd64, both wheezie and jessie. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22923

[issue22924] Use of deprecated cgi.escape

2014-11-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Deprecated cgi.escape() is used in Tools/scripts/gprof2html.py and Tools/scripts/highlight.py. It should be replaced by html.escape(). Unfortunately the html module clashes with the html parameter in highlight.py so I left this issue for Reymond.

[issue22915] sax.parser cannot get xml data from a subprocess pipe

2014-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This bug should be fixed in other place. Here is a patch. -- assignee: - serhiy.storchaka nosy: +christian.heimes, serhiy.storchaka stage: needs patch - patch review Added file: http://bugs.python.org/file37252/sax_non_str_file_name.patch

[issue1610654] cgi.py multipart/form-data

2014-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New test fail with non-modified code. Either there is a bug in current code or tests are wrong. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1610654

[issue2175] Expat sax parser silently ignores the InputSource protocol

2014-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- keywords: +needs review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2175 ___

[issue22923] No prompt for display all X possibilities on completion-enabled input()

2014-11-23 Thread Yoha
Yoha added the comment: I have found the culprit. It is actually coming from libreadline: http://git.savannah.gnu.org/cgit/readline.git/tree/complete.c#n517 where the answer is always set to yes in callback mode. According to `git blame`, this is has been so since version 6.2 at least three

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Library (Lib) stage: - needs patch type: enhancement - behavior versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22921

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: This sounds ok to me, but are there still SNI-less OpenSSLs around? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22921 ___

[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)

2014-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I was looking into a 2.7 backport but it turns out _create_stdlib_context() isn't used anywhere in 2.7 (yet?), so the backport wouldn't achieve anything. I will backport to 3.4 at least. -- versions: -Python 3.3

[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 653dfb1240d5 by Antoine Pitrou in branch '3.4': Issue #22638: SSLv3 is now disabled throughout the standard library. https://hg.python.org/cpython/rev/653dfb1240d5 -- ___ Python tracker

[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)

2014-11-23 Thread Alex Gaynor
Alex Gaynor added the comment: In a post-pep476 world, this method will be used on Python2.7, so it would be good to backport now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22638 ___

[issue22895] test failure introduced by the fix for issue #22462

2014-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: What about using “not sysconfig.is_python_build()”? I had forgotten about it, thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22895 ___

[issue22894] unittest.TestCase.subTest causes all subsequent tests to be skipped in failfast mode

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 993e8f795194 by Antoine Pitrou in branch '3.4': Issue #22894: TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures. https://hg.python.org/cpython/rev/993e8f795194 New changeset

[issue22894] unittest.TestCase.subTest causes all subsequent tests to be skipped in failfast mode

2014-11-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22894 ___

[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset f762cbb712de by Antoine Pitrou in branch '2.7': Backport disabling of SSLv3 in ssl._create_stdlib_context() (issue #22638). https://hg.python.org/cpython/rev/f762cbb712de -- ___ Python tracker

[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)

2014-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, this is done. Is there anything left in this issue? -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22638 ___

[issue22925] Backporting suppress context manager to 2.7

2014-11-23 Thread Bariša Obradović
New submission from Bariša Obradović: Backport one of the context manager in 3.4, to 2.7: supressed The patch was created by copy pasting code from 3.4 branch to 2.7 branch, and removing a single 3.4 feature: -@support.requires_docstrings -- components: Build files: suppress.patch

[issue22925] Backporting suppress context manager to 2.7

2014-11-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, but we don't backport new features to 2.7 unless they are related to PEP 434 and PEP 466. Please send your patch to https://bitbucket.org/ncoghlan/contextlib2 -- nosy: +berker.peksag resolution: - wont fix stage: - resolved

[issue22925] Backporting suppress context manager to 2.7

2014-11-23 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- components: +Library (Lib) -Build ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22925 ___ ___

[issue22780] NotImplemented doc section needs update

2014-11-23 Thread Ethan Furman
Ethan Furman added the comment: Here's the latest patch. Thoughts? -- keywords: +patch stage: resolved - patch review Added file: http://bugs.python.org/file37254/issue22780.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org

[issue22915] sax.parser cannot get xml data from a subprocess pipe

2014-11-23 Thread R. David Murray
R. David Murray added the comment: Serhiy's patch looks correct to me. Given that if the source doesn't have a name attribute it is simply not set in the existing code, this change should be safe (backward compatible). Elsewhere the possibility was raised of converting the int to a string

[issue22925] Backporting suppress context manager to 2.7

2014-11-23 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: wont fix - rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22925 ___ ___

[issue22926] asyncio:

2014-11-23 Thread STINNER Victor
New submission from STINNER Victor: The call_soon(), call_later() and call_at() methods of asyncio event loops should raise an exception in debug code when they are not called from the right thread. Currently, BaseEventLoop._assert_is_current_event_loop() does nothing if the event loop

[issue22926] asyncio: raise an exception when called from the wrong thread

2014-11-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio: - asyncio: raise an exception when called from the wrong thread ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22926 ___

[issue20467] Confusing wording about __init__

2014-11-23 Thread Ethan Furman
Ethan Furman added the comment: Thoughts? -- keywords: +patch stage: - patch review versions: +Python 3.5 Added file: http://bugs.python.org/file37255/issue20467.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org

[issue22918] Doc for __iter__ makes inexact comment about dict.__iter__

2014-11-23 Thread Éric Araujo
Éric Araujo added the comment: I think the first half of the sentence is enough: “For mappings, it should iterate over the keys of the container.” -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22918

[issue22915] sax.parser cannot get xml data from a subprocess pipe

2014-11-23 Thread Jocelyn
Jocelyn added the comment: The only explicit documentation I found on SystemId is from the java specification (it is my understanding that python sax implementation is adapted from Java one): http://www.saxproject.org/apidoc/org/xml/sax/InputSource.html#setSystemId%28java.lang.String%29 The

[issue22919] Update PCBuild for VS 2015

2014-11-23 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22919 ___ ___

[issue9003] urllib.request and http.client should allow certificate checking

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1882157b298a by Benjamin Peterson in branch '2.7': allow passing cert/ssl information to urllib2.urlopen and httplib.HTTPSConnection https://hg.python.org/cpython/rev/1882157b298a -- nosy: +python-dev

[issue22366] urllib.request.urlopen should take a context (SSLContext) argument

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1882157b298a by Benjamin Peterson in branch '2.7': allow passing cert/ssl information to urllib2.urlopen and httplib.HTTPSConnection https://hg.python.org/cpython/rev/1882157b298a -- ___ Python tracker

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Donald Stufft
Donald Stufft added the comment: I tested this patch on Python 3.5 compiled on CentOS 5.11 which does not have SNI enabled. The end result is that you can use server_hostname even when SNI isn't there to enable the SSL certificate checks. Of course the check will fail if the host your

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Christian Heimes
Christian Heimes added the comment: Thanks a lot, Donald! Back then I didn't pursue the point because I wasn't sure about possible security implications. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22921

[issue11145] '%o' % user-defined instance

2014-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is new patch. It first split string on areas: numnondigits (sign+0x if F_ALT is not set), skipped (0x if F_ALT is set), numdigits and optional L suffix, and then construct new string either in-place (if the string is not shared and result fits in

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Donald Stufft
Donald Stufft added the comment: Added docs. -- Added file: http://bugs.python.org/file37258/check-hostname-no-sni-with-docs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22921 ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anyone please make a review? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___ ___

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Donald Stufft
Donald Stufft added the comment: A new patch that achieves the same thing in a simpler way at benjamin's suggestion. -- Added file: http://bugs.python.org/file37259/check-hostname-no-sni-with-docs-2.patch ___ Python tracker rep...@bugs.python.org

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Donald Stufft
Donald Stufft added the comment: Uploaded a third patch, this is the same technique as in the -2 patch, except it fixes a missed spot in Lib/ssl.py where I needed a better error message. Additionally this goes through and unskips all of the tests that were marked as depending on HAS_SNI when

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2d4beb90a5b by Benjamin Peterson in branch '3.4': don't require OpenSSL SNI to pass hostname to ssl functions (#22921) https://hg.python.org/cpython/rev/f2d4beb90a5b New changeset 24dfe7310cc1 by Benjamin Peterson in branch 'default': merge 3.4

[issue22417] PEP 476: verify HTTPS certificates by default

2014-11-23 Thread Alex Gaynor
Alex Gaynor added the comment: Attached patch backports this to 2.7. -- Added file: http://bugs.python.org/file37261/issue22417.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22417 ___

[issue20530] Change the text signature format (again) to be more robust

2014-11-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Preparing a presentation about Python Magic methods I found something weird: (Python 3.4) help(int.__lt__) Help on wrapper_descriptor: __lt__(self, value, /) - THIS!! Return selfvalue. I am amused about the /) suffix in the signature. It happens to

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Donald Stufft
Donald Stufft added the comment: Added a patch for Python 2.7 -- Added file: http://bugs.python.org/file37262/check-hostname-no-sni-with-docs-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22921

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce4073afd992 by Benjamin Peterson in branch '2.7': allow hostname to be passed to SSLContext even if OpenSSL doesn't support SNI (closes #22921) https://hg.python.org/cpython/rev/ce4073afd992 -- resolution: - fixed stage: needs patch -

[issue22921] SSLContext's check_hostname needlessly intertwined with SNI

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 40f9e91f3626 by Benjamin Peterson in branch '2.7': add NEWS note for #22921 https://hg.python.org/cpython/rev/40f9e91f3626 New changeset 060fd5d09063 by Benjamin Peterson in branch '3.4': add NEWS note for #22921

[issue22927] Expose an SSLContext parameter on urllib APIs

2014-11-23 Thread Alex Gaynor
New submission from Alex Gaynor: With the pep476 backport, we need a way to pass a context argument to urrlib -- components: Library (Lib) messages: 231588 nosy: alex, benjamin.peterson, dstufft priority: normal severity: normal status: open title: Expose an SSLContext parameter on

[issue22927] Expose an SSLContext parameter on urllib APIs

2014-11-23 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37263/issue22927.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22927 ___

[issue22788] allow logging.handlers.HTTPHandler to take an SSLContext

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5864ec6ba484 by Benjamin Peterson in branch '3.4': add context parameter to HTTPHandler (closes #22788) https://hg.python.org/cpython/rev/5864ec6ba484 New changeset ec4d19736b15 by Benjamin Peterson in branch 'default': merge 3.4 (#22788)

[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2014-11-23 Thread Guido Vranken
New submission from Guido Vranken: Proof of concept: # Script for Python 2 import urllib2 opener = urllib2.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0' + chr(0x0A) + Location: header injection)] response = opener.open(http://localhost:;) # Data sent is: GET / HTTP/1.1

[issue22927] Expose an SSLContext parameter on urllib APIs

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c84f36a5f556 by Benjamin Peterson in branch '2.7': give urllib.urlopen a context parameter (closes #22927) https://hg.python.org/cpython/rev/c84f36a5f556 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue22417] PEP 476: verify HTTPS certificates by default

2014-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb83916c3ea1 by Benjamin Peterson in branch '2.7': pep 476: verify certificates by default (#22417) https://hg.python.org/cpython/rev/fb83916c3ea1 -- ___ Python tracker rep...@bugs.python.org

[issue22919] Update PCBuild for VS 2015

2014-11-23 Thread Steve Dower
Steve Dower added the comment: Added some fixes to the python3.dll build (and xxlimited test project) which I noticed thanks to Antoine's feedback. -- Added file: http://bugs.python.org/file37265/python3.diff ___ Python tracker

[issue22366] urllib.request.urlopen should take a context (SSLContext) argument

2014-11-23 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___ ___

[issue22417] PEP 476: verify HTTPS certificates by default

2014-11-23 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22417 ___

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-11-23 Thread Bob Chen
Bob Chen added the comment: Someone come and pick up this? It has been a long time... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231 ___

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-11-23 Thread Bob Chen
Changes by Bob Chen 175818...@qq.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231 ___ ___ Python-bugs-list