[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2017-09-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: So, while we do have a conflict between consistency and utility, I think @r.david.murry 's last comment has convinced me that raising the exception is more helpful. I think we should do that, fixing the documentation and giving up on the consistency issue.

[issue15670] PEP 3121, 384 Refactoring applied to ssl module

2017-09-07 Thread Christian Heimes
Christian Heimes added the comment: Is anybody interested to port Robin's patch to 3.7? -- assignee: christian.heimes -> keywords: +easy (C) ___ Python tracker ___

[issue27629] Cannot create ssl.SSLSocket without existing socket

2017-09-07 Thread Christian Heimes
Christian Heimes added the comment: I have created #27629 to allow customization of SSLObject and SSLSocket. I'm closing this as "won't fix" because I rather want people to move away from ssl.wrap_socket() and manual instantiation of SSLSocket. -- resolution: -> wont fix stage: patch

[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-07 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3423 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue30389] distutils._msvccompiler cannot find VS 2017

2017-09-07 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +3422 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-07 Thread Christian Heimes
Changes by Christian Heimes : -- superseder: -> Cannot create ssl.SSLSocket without existing socket ___ Python tracker ___ ___ Pytho

[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-07 Thread Christian Heimes
New submission from Christian Heimes: SSLSocket.wrap_bio() and SSLSocket.wrap_socket() hard-code SSLObject and SSLSocket as return types. In the light of future deprecation of ssl.wrap_socket() module function and direct instantiation of SSLSocket, it is desirable to make the return type of SS

[issue31385] `import as` does not work when module has same same as parent module

2017-09-07 Thread David Hagen
New submission from David Hagen: Consider the following Python project: bugtest/ __init__.py (Contents: from .foo import *) foo/ __init__.py (Contents: from .foo import *) foo.py (Contents: ) Then in a Python session, the following line executes without error (as expected): >>> im

[issue27629] Cannot create ssl.SSLSocket without existing socket

2017-09-07 Thread Christian Heimes
Christian Heimes added the comment: How about I make the actual SSLSocket and SSLObject class customizable so you can override what is returned by wrap_socket() and wrap_bio()? class MySSLSocket(ssl.SSLSocket): pass ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) ctx.sslsocket_class = MySSLS

[issue30389] distutils._msvccompiler cannot find VS 2017

2017-09-07 Thread Steve Dower
Steve Dower added the comment: New changeset 05f01d85257d0f3409c7335aaf0bf6a6da7eecb7 by Steve Dower in branch 'master': bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632) https://github.com/python/cpython/commit/05f01d85257d0f3409c7335aaf0bf6a6da7eecb7 -- ___

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: Attempting to clarify what Greg & I think the right answer will be for the async context management case: https://docs.python.org/3/library/asyncio-eventloop.html#unix-signals In practice, that would look something like: ``` >>> loop = asyncio.get_event_loop()

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nathaniel Smith
Nathaniel Smith added the comment: (tl;dr: this patch is more awesome than you realize, thanks for working on it :-)) -- ___ Python tracker ___

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nathaniel Smith
Nathaniel Smith added the comment: FWIW trio's strategy for handling this is to install a clever signal handle that routes the signal to the event loop IF the signal arrives while the event loop is running, or while particularly sensitive code like trio.Lock.__aexit__ is running. The rest of t

[issue29766] --with-lto still implied by --enable-optimizations in Python 2.7

2017-09-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: resolved -> commit review status: open -> closed ___ Python tracker ___ ___

[issue29766] --with-lto still implied by --enable-optimizations in Python 2.7

2017-09-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset abea972d2881a1a04ec265f993bb9b56bbc7b224 by Gregory P. Smith (Hanno Schlichting) in branch '2.7': [2.7] bpo-29766: Fix configure/.ac to match LTO/enable-optimizations behavior. (#2705) https://github.com/python/cpython/commit/abea972d2881a1a04e

[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset b03623227ed1264e3cac4e6bb4878d96b91aa484 by Benjamin Peterson (Miss Islington (bot)) in branch '3.6': [3.6] fixes bpo-31373: fix undefined floating-point demotions (GH-3396) (#3424) https://github.com/python/cpython/commit/b03623227ed1264e3cac4

[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[issue30096] Update examples in abc documentation to use abc.ABC

2017-09-07 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Backported to 3.6 by Miss Islington. Closing this issue. Thanks. -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker ___

[issue30096] Update examples in abc documentation to use abc.ABC

2017-09-07 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset b0d0217c0e4c1512a06ef306928b2fd8f82d046e by Mariatta (Miss Islington (bot)) in branch '3.6': [3.6] bpo-30096: Use ABC in abc reference examples (GH-1220) (GH-3408) https://github.com/python/cpython/commit/b0d0217c0e4c1512a06ef306928b2fd8f82d046e

[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-07 Thread Anselm Kiefner
Anselm Kiefner added the comment: Heh. I had a hunch it could be jupyter specific, but didn't test it. They had problems with f-strings before, it seems they over-fixed those .. Maybe you want to check their implementation and see if it's any good for a general solution? Otherwise I'd volunteer

[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-07 Thread Eric V. Smith
Eric V. Smith added the comment: That code is an error in Python 3.6: >>> f"{eval('bool(0)\ ... and True\ ... ')}" File "", line 3 SyntaxError: f-string expression part cannot include a backslash >>> I'm not sure it's a good idea that jupyter accepts code that's not valid in Python itself.

[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3421 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset a853a8ba7850381d49b284295dd6f0dc491dbe44 by Benjamin Peterson in branch 'master': bpo-31373: fix undefined floating-point demotions (#3396) https://github.com/python/cpython/commit/a853a8ba7850381d49b284295dd6f0dc491dbe44 --

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: I think you're agreeing with me - we can make synchronous context managers meaningfully more signal safe (at least for CMs implemented in C, or precompiled with Cython), but for asynchronous context managers, the only meaningful defense available is to replace t

[issue31383] Issue with _posixsubprocess when importing subprocess32

2017-09-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: The standard library in Python 2.7 does not have an associated extension module. _posixsubprocess comes from subprocess32. There isn't much point in using subprocess32 on POSIX systems without the _posixsubprocess extension module. If that import is failin

[issue30860] Consolidate stateful C globals under a single struct.

2017-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding the accidental exposure of _Py_CheckRecursionLimit, the main active usage of the stable ABI that we're aware of is Riverbank's C/C++ binding generator for PyQt: http://pyqt.sourceforge.net/Docs/sip4/directives.html#directive-%Module (see the use_limit

[issue31384] marshal: remove "current_filename" optimization

2017-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset c988ae01fec2e0510d53728e01a5e4bb06761bda by Benjamin Peterson in branch 'master': remove current_filename optimization from marshal (#3423) (closes bpo-31384) https://github.com/python/cpython/commit/c988ae01fec2e0510d53728e01a5e4bb06761bda -

[issue31384] marshal: remove "current_filename" optimization

2017-09-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- pull_requests: +3420 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31384] marshal: remove "current_filename" optimization

2017-09-07 Thread Benjamin Peterson
New submission from Benjamin Peterson: marshal current saves the the last filename it saw in a code object during deserialization, and tries to reuse it across multiple code objects to save memory. This optimization is superseded by the more general ref mechanism. -- components: Interp

[issue31370] Remove support for threads-less builds

2017-09-07 Thread STINNER Victor
STINNER Victor added the comment: PEP 11 was updated, the change was merged, this issue can now be closed. Thanks Antoine! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31370] Remove support for threads-less builds

2017-09-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 by Victor Stinner (Antoine Pitrou) in branch 'master': bpo-31370: Remove support for threads-less builds (#3385) https://github.com/python/cpython/commit/a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 -

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Thu, Sep 7, 2017, at 09:46, INADA Naoki wrote: > > INADA Naoki added the comment: > > > We end up interning each reference individually currently. > > But interning interned string is much faster. It only checks flag. > Interning normal string requires d

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread INADA Naoki
INADA Naoki added the comment: > We end up interning each reference individually currently. But interning interned string is much faster. It only checks flag. Interning normal string requires dict lookup. -- ___ Python tracker

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Thu, Sep 7, 2017, at 01:17, INADA Naoki wrote: > > INADA Naoki added the comment: > > w_ref() depends on refcnt already. > I don't think removing *_INTERN opcode makes PYC reproducible. > https://github.com/python/cpython/blob/1f06a680de465be0c24a78ea3b61

[issue30403] PEP 547: Running extension modules using -m switch

2017-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: Alright, that makes sense. Thanks for the feedback! Please give us some time for an updated proposal/implementation. I'm going on vacation, so expect about a week. -- ___ Python tracker

[issue31383] Issue with _posixsubprocess when importing subprocess32

2017-09-07 Thread paullpaulson
New submission from paullpaulson: I am trying to install subprocess32 with my python 2.7 installation via buildroot. It appeared to install correctly but when I import it on the embedded system I get an error: >>> import subprocess32 /usr/lib/python2.7/site-packages/subprocess32.py:472: Runtim

[issue31381] Unable to read the project file "pythoncore.vcxproj".

2017-09-07 Thread Denis Osipov
Denis Osipov added the comment: Thank you. Looking forward to it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue25292] ssl socket gets into broken state when client exits during handshake

2017-09-07 Thread Christian Heimes
Christian Heimes added the comment: This looks like a problem in asyncio. When the client closes the writer, the TLS and TCP connections are shut down. The server's writer still accept data although it is not written to the underlying ssl object: (Pdb) writer.transport._ssl_protocol._extra['ss

[issue31379] run_profile_task in Makefile should add $(RUNSHARED)

2017-09-07 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +3419 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30403] PEP 547: Running extension modules using -m switch

2017-09-07 Thread Stefan Behnel
Stefan Behnel added the comment: I was kinda guessing that modifying the slot list wasn't a good idea. ;) My current use case is that I implement the "create" slot because it makes it very easy to intercept the spec and its configuration. It is not passed into "exec" as such, but I need it to

[issue27391] server_hostname should only be required when checking host names

2017-09-07 Thread Christian Heimes
Christian Heimes added the comment: Jim, yes I agree. In a matter of fact, the ssl module also agrees with you and behaves like that for a while. I cannot reproduce the problem with either 2.7, 3.5, or 3.6. I have attached an demo script. check_hostname = True * server_hostname='www.python.or

[issue30403] PEP 547: Running extension modules using -m switch

2017-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: Again, what is the use case? That's a real question, I'm not saying it to dismiss your ideas or points of view. It would be very much easier to think about a concrete use case, rather than making a general system for the sake of how easy it is implementation-wi

[issue31381] Unable to read the project file "pythoncore.vcxproj".

2017-09-07 Thread Steve Dower
Steve Dower added the comment: I already have a fix in a pending PR for this. Don't have the number handy, but will link it later today. -- assignee: -> steve.dower stage: -> patch review type: -> compile error ___ Python tracker

[issue31345] Backport docstring improvements to the C version of OrderedDict

2017-09-07 Thread Sourav Singh
Sourav Singh added the comment: I am interested in working on the issue. Where do I need to make the fix? -- nosy: +Sourav Singh ___ Python tracker ___ __

[issue31382] CGI upload error when file ~< 10kb

2017-09-07 Thread Marc
New submission from Marc: An error occurs when uploading a file ~<10kb: A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /var/www/html/file-uploader/uploader.py in () 39 40 # A nested FieldStorage insta

[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2017-09-07 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ __

[issue29627] configparser.ConfigParser.read() has undocumented/unexpected behaviour when given a bytestring path.

2017-09-07 Thread Vincent Michel
Changes by Vincent Michel : -- pull_requests: +3418 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-09-07 Thread Vincent Michel
Changes by Vincent Michel : -- pull_requests: +3417 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31381] Unable to read the project file "pythoncore.vcxproj".

2017-09-07 Thread Denis Osipov
New submission from Denis Osipov: Can't load pythoncore.vcxproj in VS2017 after PR 3375 bpo-31358: Pull zlib out of the repository #3375. During pcbuild.sln loading there is error message: D:\repos\cpython\PCbuild\pythoncore.vcxproj : error : Unable to read the project file "pythoncore.vcxpr

[issue31380] test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS

2017-09-07 Thread Jack Howarth
New submission from Jack Howarth: The Python 3.x test suite produces a new regression on macOS 10.13 under the new APFS filesystem when executing the test_undecodable_filename() test from Lib/test/test_httpservers.py. The error appears as...

[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-07 Thread Anselm Kiefner
Anselm Kiefner added the comment: Hey Eric, just a heads up. In the latest jupyter notebook, this is valid code: f"{eval('bool(0)\ and True\ ')}" which returns 'False' I don't know how far you want to go, but if someone REALLY wants to use backspace in f-strings just for the sake of it - how

[issue31379] run_profile_task in Makefile should add $(RUNSHARED)

2017-09-07 Thread Xiang Zhang
New submission from Xiang Zhang: Build Python 2.7 with --enable-shared and pgo could highly possibly skip test procedure due to dynamic link fails. I suggest adding $(RUNSHARED) to bring convenience. Python 3 already gets it. -- components: Build keywords: easy messages: 301578 nosy: x

[issue31378] Missing documentation for sqlite3.OperationalError

2017-09-07 Thread Berker Peksag
Berker Peksag added the comment: Thank you for the report. I think we can add a simplified version of the OperationalError documentation in PEP 249: Exception raised for errors that are related to the database's operation and not necessarily under the control of the programmer, e.g.

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread INADA Naoki
INADA Naoki added the comment: w_ref() depends on refcnt already. I don't think removing *_INTERN opcode makes PYC reproducible. https://github.com/python/cpython/blob/1f06a680de465be0c24a78ea3b610053955daa99/Python/marshal.c#L269-L271 I think "intern one string, then share it 10 times" is faste

[issue31378] Missing documentation for sqlite3.OperationalError

2017-09-07 Thread Leonardo Taglialegne
New submission from Leonardo Taglialegne: sqlite3.OperationalError has no documentation whatsoever in docs.python.org -- assignee: docs@python components: Documentation messages: 301575 nosy: Leonardo Taglialegne, docs@python priority: normal severity: normal status: open title: Missing

[issue29396] Re-opening /dev/tty breaks readline

2017-09-07 Thread Silvio Ricardo Cordeiro
Silvio Ricardo Cordeiro added the comment: So, if I understood correctly, the `readline` module only works for an unmodified `sys.stdin`, which is implemented in terms of C `FILE*` structures. Anything created by `open` will not be implemented in terms of C `FILE*`, and so all history and comp

<    1   2