[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle
Paul Ganssle added the comment: By the way, one possibly significant problem with this interface is that it would tend to encourage the use of static timezone offsets rather than rule sets as intended by `tzinfo`. The main problem is that a simple mapping between tzname

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-05 Thread stein-k
New submission from stein-k : urllib.parse.unquote(b'abc%20def') ... TypeError: a bytes-like object is required, not 'str' -- components: Library (Lib) messages: 309517 nosy: stein-k priority: normal severity: normal status: open title: urllib.parse.unquote

[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle
Paul Ganssle added the comment: This is essentially what the `tzinfos` argument to `dateutil.parser.parse` does. I do think something *like* this is the only reasonable way to handle %Z->tzinfo mappings. In `dateutil`

[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-05 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue32473] Readibility of ABCMeta._dump_registry()

2018-01-05 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle

2018-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread William Pickard
William Pickard added the comment: It hangs for me on Windows 10 Professional running on a MSI gaming laptop for debug and PGO builds (Python 3.6) -- ___ Python tracker

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Today, at least, python -m test -v test_httpservers does not hang for me on any of 3.5, 3.6, or 3.7, installed or repository debug. I don't know if the offending test was just disabled or somehow fixed. --

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: The compilation error occurs only on the master branch, issue 32143 is the enhancement that is the initial cause of this problem. This went unnoticed when issue 32143 was resolved because the AIX buildbots were already failing at that

[issue30541] Add restricted mocks to the python unittest mocking framework

2018-01-05 Thread Paul Ganssle
Change by Paul Ganssle : -- pull_requests: +4974 ___ Python tracker ___ ___

[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle
Paul Ganssle added the comment: Sorry, forgot to include the link to the dateutil implementation of the fold-resolution code: https://github.com/dateutil/dateutil/pull/517/files -- ___ Python tracker

[issue32495] Adding Timer to multiprocessing

2018-01-05 Thread Jay Crotts
Jay Crotts added the comment: I think your three reasons make sense, I've only found threading.Timer helpful in pretty trivial cases. Do you think a more flexible or efficient Timer class would be useful? -- ___ Python

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread David Edelsohn
David Edelsohn added the comment: The AIX buildbots has been exhibiting testsuite failures, but not build (compile) failures. The buildbots do not visibly distinguish between the two cases in a strong manner. We can disable / expect failure for the few, additional

[issue32458] test_asyncio failures on Windows

2018-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: After fresh update and debug rebuild on master(3.7), with Win10 patched last night, I got == FAIL: test_call_later (test.test_asyncio.test_events.ProactorEventLoopTests)

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Zachary! Can this issue be closed now? -- ___ Python tracker ___

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread Zachary Ware
Zachary Ware added the comment: I think so :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread STINNER Victor
STINNER Victor added the comment: Awesome, thanks! -- ___ Python tracker ___ ___

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-05 Thread Brett Cannon
Change by Brett Cannon : -- pull_requests: +4975 ___ Python tracker ___ ___

[issue32448] subscriptable

2018-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that a better message would be nice. But compiling 'a.b[c]' breaks the expression apart into the equivalent of 't=a.b; t[c]', where 't' is an anonymous reference, so as David notes, there is no 'name' left to display. We don't

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-05 Thread R. David Murray
R. David Murray added the comment: If you read the traceback the message is "correct" for some definition of correct: the right hand side controls the type of the expression, so it is objecting to trying to look for the string '%' in a bytes object. There are probably

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread Zachary Ware
Zachary Ware added the comment: I manually cleared `externals\tcltk64` on that bot some time ago, and it appears to be happy now. -- ___ Python tracker

[issue32486] tail optimization for 'yield from'

2018-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think this should have been first floated on python-ideas list. One objection is the same as for eliminating tail calls in general: it collapses tracebacks. def g1(): yield from g2() def g2(): yield 1/0 for i in g1(): pass

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread William Pickard
William Pickard added the comment: I have tried value 0 for "Content-Length" (along with "text/plain" for "Content-Type"), it was when I said I tried both "Content-Length" and "Content-Type", while I haven't tried directly setting "close_connection" in the handler, my

[issue17607] missed peephole optimization (unnecessary jump at end of function after yield)

2018-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This optimization already is implemented in 3.5+. Actually it is implemented as a part of code generation, not a peepholer. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open ->

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter
Martin Panter added the comment: Thanks, although the fact that “Content-Length: 0” doesn’t work kills my theory about the proxy. The “close_connection” flag is also a documented public API of Python:

[issue32499] Add dataclasses.is_dataclass(obj)

2018-01-05 Thread Eric V. Smith
New submission from Eric V. Smith : See https://mail.python.org/pipermail/python-dev/2018-January/151628.html and prior for the discussion. Add dataclasses.is_dataclass(obj) that returns True if obj is a dataclass class or instance, else returns False. --

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter
Martin Panter added the comment: Sorry William, I forgot the client was waiting to read. But I don’t understand why your Connection field (which comes after the status line) allows the Python client to read the status line. Perhaps there is some malware scanner,

[issue32500] PySequence_Length() raises TypeError on dict type

2018-01-05 Thread Michał Górny
New submission from Michał Górny : While debugging PyPy test failure on backports.lzma [1], I've noticed that PySequence_Check() on a dict type raises TypeError, e.g.: Traceback (most recent call last): File "test/test_lzma.py", line 273, in test_bad_args b"",

[issue20104] expose posix_spawn(p)

2018-01-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +4976 ___ Python tracker ___ ___

[issue20104] expose posix_spawn(p)

2018-01-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +4976, 4977 ___ Python tracker ___

[issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR'

2018-01-05 Thread Jay Crotts
Jay Crotts added the comment: I can create a documentation patch and PR if this still needs doing. -- nosy: +jcrotts ___ Python tracker

[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: Ping -- anyone up for reviewing PR 4793? https://github.com/python/cpython/pull/4793 It's pretty straightforward, and I figure better to ping now and beat the end-of-month rush :-) -- ___ Python

[issue29137] Fix fpectl-induced ABI breakage

2018-01-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: Ping -- anyone up for reviewing PR 4789? https://github.com/python/cpython/pull/4789 It's pretty straightforward, and I figure better to ping now and beat the end-of-month rush :-). Also, it has an autoconf refresh in it, so it's likely to

[issue29137] Fix fpectl-induced ABI breakage

2018-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 735ae8d139a673b30b321dc10acfd3d14f0d633b by Benjamin Peterson (Nathaniel J. Smith) in branch 'master': bpo-29137: Remove fpectl module (#4789)

[issue29137] Fix fpectl-induced ABI breakage

2018-01-05 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32450] non-descriptive variable name

2018-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: I would accept a PR to rename the variable in ast.c to "level", but I'm not sure why it should matter to you. -- ___ Python tracker

[issue32441] os.dup2 should return the new fd

2018-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: I would just make a declaration a definition with a dummy value (0?) rather than complicating the branches. -- ___ Python tracker

[issue32443] Add Linux's signalfd() to the signal module

2018-01-05 Thread Nathaniel Smith
Change by Nathaniel Smith : -- nosy: +njs ___ Python tracker ___ ___ Python-bugs-list

[issue32486] tail optimization for 'yield from'

2018-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: The original yield from implementation did something like this, but we dropped it because it caused debuggability problems. See #14230 -- nosy: +benjamin.peterson resolution: -> rejected stage: -> resolved status: open ->

[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 9f1e5f1b7f074e026843a5d70834233a95a6bf9d by Nick Coghlan (Mario Corchero) in branch 'master': bpo-32206: Pdb can now run modules (GH-4752) https://github.com/python/cpython/commit/9f1e5f1b7f074e026843a5d70834233a95a6bf9d

[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue32495] Adding Timer to multiprocessing

2018-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The threading.Timer class is in my experience little used, for two reasons: 1) it's not very flexible (no periodic calls, no restart...) 2) it's not efficient (as it creates a new thread for each timer) 3) (third optional reason) many

[issue17972] inspect module docs omits many functions

2018-01-05 Thread Paul Rudin
Paul Rudin added the comment: Documenting and generating a deprecation warning also makes them part of the documented public api. Or are you suggesting just the warning without including in the documentation? Incidentally, there are also the classes BlockFinder and

[issue31699] Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error

2018-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 94459fd7dc25ce19096f2080eb7339497d319eb0 by Antoine Pitrou (Thomas Moreau) in branch 'master': bpo-31699 Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error (#3895)

[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-01-05 Thread Eryk Sun
Eryk Sun added the comment: For extra measure, you may want to normalize `prefix` prior to calculating its length n in gotlandmark(). Then it would be reliable to truncate it via `prefix[n] = '\0'` after joining with `landmark`. Or at least add a comment there or in the

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter
Martin Panter added the comment: In the server, the send_header("Connection", "close") call sets the “close_connection” flag. This shuts down the connection once “do_GET” returns. Without the flag set, the server will wait and read another request. If you want the

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread William Pickard
William Pickard added the comment: Martin, your suggestion will never work as if you look at the trace back posted terry.reedy and my test print statements, both the client and server get stuck waiting to read data their respective socket, hence the deadlock. Adding the

[issue31699] Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error

2018-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: This non-trivial issue has been fixed now, thanks to Thomas' patch. Thank you Thomas! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python

[issue32493] UUID Module - FreeBSD build failure

2018-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Michael, does AIX have uint32_t? If so, we could happily drop the unsigned32 reference. -- ___ Python tracker

[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Arjan Keeman
Change by Arjan Keeman : -- keywords: +patch pull_requests: +4973 stage: -> patch review ___ Python tracker ___

[issue32493] UUID Module - FreeBSD build failure

2018-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The AIX-specific code was contributed by Michael Felt in issue32399. -- nosy: +Michael.Felt, pitrou ___ Python tracker

[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Arjan Keeman
New submission from Arjan Keeman : Consider the following: tz_naive_object = datetime.strptime("2018-01-05 13:10:00 CET", "%Y-%m-%d %H:%M:%S %Z") Python's standard library is not capable of converting the timezone name CET to a tzinfo object. Therefore the case made

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset 502d551c6d782963d26957a9e5ff1588946f233f by xdegaye (Michael Felt) in branch 'master': bpo-32390: Fix compilation failure on AIX after f_fsid was added to os.statvfs() (#4972)

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks Michael for your contribution in fixing this issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32441] os.dup2 should return the new fd

2018-01-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: gcc is a little bit lost and prints now the following (false) warning: gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter

[issue17972] inspect module docs omits many functions

2018-01-05 Thread R. David Murray
R. David Murray added the comment: Just warnings, no docs. We've done this before for other helper functions, but it is always a judgement call whether it is worth the churn. I defer to those people who have actually done work on the module for the answer to that

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread STINNER Victor
STINNER Victor added the comment: A compilation error is a blocking bug. It is short and short, it can be backported to 2.7 and 3.6 no? Is ALL_SOURCE defined vy default? -- ___ Python tracker

[issue32450] non-descriptive variable name

2018-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'ndots' is an internal name in the import-from branch of the import statement handler. It seems reasonable in that context. 'level' is part of the public api for the ImportFrom node class, and cannot be changed as such. It is also the