[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-16 Thread Martin Panter
Martin Panter added the comment: FWIW it looks like “strptime” in glibc, and Open and Free BSD support parsing this and even more formats (RFC 822 and RFC 3339; includes “Z”, U.S. time zones, ±HH). Also, there is Issue 24954 for adding “%:z” like Gnu “date”. --

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-16 Thread Martin Panter
Martin Panter added the comment: Sorry, I meant Net BSD not Free BSD -- ___ Python tracker ___

[issue31630] math.tan has poor accuracy near pi/2 on OpenBSD

2017-10-16 Thread Tim Peters
Tim Peters added the comment: On 16 Oct 2017, exactly the same test failures were reported on python-dev: https://mail.python.org/pipermail/python-dev/2017-October/149880.html >From the test output posted there: """ == CPython 3.6.3 (default, Oct 16 2017, 14:42:21) [GCC

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___

[issue31801] vars() manipulation encounters problems with Enum

2017-10-16 Thread Ethan Furman
New submission from Ethan Furman : The following code should work (from https://stackoverflow.com/a/46780742/208880): class BaudRate(Enum): cls = vars() regexp = r"(?:^|,)B(?P\d+)" rates = sorted(map(int, re.findall(regexp,

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-16 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +3989 stage: -> patch review ___ Python tracker ___

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-16 Thread Mario Corchero
New submission from Mario Corchero : Currently, datetime.strptime does not support parsing utc offsets that include a colon. "+" is parsed without issues whilst it fails with "+00:00". "+NN:NN" is not only ISO8601 valid but also the way the offset is presented to the

[issue28603] traceback module can't format/print unhashable exceptions

2017-10-16 Thread Zane Bitter
Zane Bitter added the comment: I also encountered this issue, and I'd like to further note that it is extraordinarily difficult to debug without access to stderr. If your logging facility uses the traceback module then it will be unable to record both the original

[issue28603] traceback module can't format/print unhashable exceptions

2017-10-16 Thread Zane Bitter
Change by Zane Bitter : -- pull_requests: +3988 ___ Python tracker ___ ___

[issue25711] Rewrite zipimport from scratch

2017-10-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I've landed here after chatting with @brett.cannon. I have a use case for this (making pex startup faster by bypassing pkg_resources) but I need to hack around the limitation of dlopen'ing .so's from zips. Our idea was to have a

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c30b55b96c0967e3a8b3b86f25eb012a97f360a5 by Łukasz Langa in branch 'master': bpo-31558: Update NEWS and ACKS (#4013) https://github.com/python/cpython/commit/c30b55b96c0967e3a8b3b86f25eb012a97f360a5 --

[issue25711] Rewrite zipimport from scratch

2017-10-16 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +3987 ___ Python tracker ___ ___

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-16 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c75edabbb65ca2bb29e51f8d1eb2c780e5890982 by Łukasz Langa (brainfvck) in branch 'master': bpo-31558: Add gc.freeze() (#3705) https://github.com/python/cpython/commit/c75edabbb65ca2bb29e51f8d1eb2c780e5890982 --

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-16 Thread Łukasz Langa
Łukasz Langa added the comment: Based on Inadasan's, Antoine's, Neil's, and Barry's review, I'm merging the change to 3.7. -- ___ Python tracker

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-16 Thread Berker Peksag
Berker Peksag added the comment: Thank you for the report, Robert and thank you for the patches, Aniket. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-16 Thread Berker Peksag
Berker Peksag added the comment: New changeset 50cef52372381a9e2f3d760497d8db76254cffef by Berker Peksag (vyas45) in branch '2.7': [2.7] bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-16 Thread Aniket Vyas
Change by Aniket Vyas : -- pull_requests: +3986 ___ Python tracker ___ ___

[issue31738] Lib/site.py: method `abs_paths` is not documented

2017-10-16 Thread Éric Araujo
Éric Araujo added the comment: Thanks for wanting to help! This function is not meant to be public, which explains why it’s not documented. Please see the devguide and the core-mentorship mailing list to find ways to contribute! -- nosy: +merwok resolution: ->

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-16 Thread Aniket Vyas
Change by Aniket Vyas : -- pull_requests: +3985 stage: backport needed -> patch review ___ Python tracker ___

[issue31773] Rewrite _PyTime_GetWinPerfCounter() for _PyTime_t

2017-10-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset bdaeb7d237462a629e6c85001317faa85f94a0c6 by Victor Stinner in branch 'master': bpo-31773: _PyTime_GetPerfCounter() uses _PyTime_t (GH-3983)

[issue28700] test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)

2017-10-16 Thread Facundo Batista
Facundo Batista added the comment: I have this failure on my machine too (Ubuntu 17.04, kernel 4.10.0-37-generic). Installing `libgdbm-dev` and running configure with `--with-dbmliborder=gdbm:bdb` didn't help. -- nosy: +facundobatista

[issue31784] Implementation of the PEP 564: Add time.time_ns()

2017-10-16 Thread STINNER Victor
STINNER Victor added the comment: > For the full rationale, see my thread on python-ideas: (...) I just created the PEP 564: "Add new time functions with nanosecond resolution". -- ___ Python tracker

[issue31784] Implementation of the PEP 564: Add time.time_ns()

2017-10-16 Thread STINNER Victor
Change by STINNER Victor : -- title: Add time.time_ns(): get time with nanosecond resolution -> Implementation of the PEP 564: Add time.time_ns() ___ Python tracker

[issue31799] Improve __spec__ discoverability

2017-10-16 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +3984 stage: -> patch review ___ Python tracker ___

[issue31799] Improve __spec__ discoverability

2017-10-16 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : __spec__ is defined in PEP 451. If you search for "__spec__" in the docs, you get a number of hits. https://docs.python.org/3/search.html?q=__spec___keywords=yes=default Click on the first link:

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-16 Thread Riccardo Coccioli
Change by Riccardo Coccioli : -- nosy: +Riccardo Coccioli ___ Python tracker ___ ___

[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

2017-10-16 Thread Riccardo Coccioli
Riccardo Coccioli added the comment: Although it's documented as -1 in Linux man page [1], from my quick tests I was not able to get any error with negative values different from -1 and it seems to wait indefinitely as expected. Looking also at its implementation in [2],

[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

2017-10-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

2017-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Shouldn't epoll_poll() be fixed too? Only -1 is documented as an infinity timeout in epoll_wait (2). -- nosy: +serhiy.storchaka ___ Python tracker

[issue31797] Python 3.6.3: JSON loop fails using elif

2017-10-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: Oops, accidentally messed up the status. Fixing now. Francesco, if you simplify your code and come back with a detailed description of what you think the bug is, then we will investigate. -- nosy: +eric.smith resolution:

[issue31797] Python 3.6.3: JSON loop fails using elif

2017-10-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: What are you claiming is the bug? I don't understand what you think the problem is. Don't dump a large script in our laps and expect us to get a Google API key to run it. Forget that, it isn't going to happen. Simplify your code

[issue31797] Python 3.6.3: JSON loop fails using elif

2017-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: Hi, Francesco. This isn't the appropriate place to ask for help with your script. I suggest trying the python-list mailing list. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed

[issue31308] forkserver process isn't re-launched if it died

2017-10-16 Thread Matthew Rocklin
Matthew Rocklin added the comment: >From a user's perspective I would definitely appreciate forkserver being >protected from SIGINT. This bug affects me in practice. If the forkserver >goes down I personally have no objection to it restarting automatically, >though I

[issue31795] Slicings documentation doesn't mention Ellipsis

2017-10-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Can we add an example of its usage in Numpy to the docs? I don't think we should. In CPython, the ellipsis has no interesting semantics. It is something that third-party modules can use however they wish. It doesn't make

[issue31798] `site.abs__file__` fails for modules where `__file__` cannot be modified

2017-10-16 Thread Alexander McFarlane
Change by Alexander McFarlane : -- title: "abs__file__" in "Lib/site.py" fails for modules where "__file__" cannot be assigned a new value -> `site.abs__file__` fails for modules where `__file__` cannot be modified ___

[issue31798] "abs__file__" in "Lib/site.py" fails for modules where "__file__" cannot be assigned a new value

2017-10-16 Thread Alexander McFarlane
Change by Alexander McFarlane : -- type: -> crash ___ Python tracker ___ ___

[issue31798] "abs__file__" in "Lib/site.py" fails for modules where "__file__" cannot be assigned a new value

2017-10-16 Thread Alexander McFarlane
New submission from Alexander McFarlane : The pythonnet module clr causes a TypeError when `abs__file__` attempts to run the following line: `m.__file__ = os.path.abspath(m.__file__)` Reproduction: ``` import clr cls.__file__ = 'example' ``` --

[issue31798] abs__file__ in "Lib/site.py"

2017-10-16 Thread Alexander McFarlane
Change by Alexander McFarlane : -- nosy: Alexander McFarlane priority: normal severity: normal status: open title: abs__file__ in "Lib/site.py" ___ Python tracker

[issue31797] Python 3.6.3: JSON loop fails using elif

2017-10-16 Thread Francesco Mantovani
New submission from Francesco Mantovani : I attach here a file with 3 different way to parse Google Places API. Please put your Google API key token into the variable [PutHereYourGoogleAPIKey] to make the script work. The script contains 3 loops: - the first

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-16 Thread Devin Bayer
Devin Bayer added the comment: That seems like it makes the most sense, though I would suggest a higher-level test, because caching of bytecode is an implementation detail. So, while mocking time.time to be constant: 1. write dummy module with x=1 2. import dummy 3. overwrite

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-16 Thread STINNER Victor
STINNER Victor added the comment: > It seems like _PyTime_ROUND_CEILING is not needed in Python currently. Oops, my pending PR 3983 uses _PyTime_ROUND_CEILING :-) Please keep it. -- ___ Python tracker

[issue31776] Missing "raise from None" in /Lib/xml/etree/ElementPath.py

2017-10-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: behavior -> enhancement versions: +Python 3.7 ___ Python tracker

[issue31776] Missing "raise from None" in /Lib/xml/etree/ElementPath.py

2017-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0df19055c92a0b0728659807978e4ca4d6c8e1bc by Serhiy Storchaka (Pablo Galindo) in branch 'master': bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978)

[issue31792] test_buffer altered the execution environment

2017-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor and Stefan for your review. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 -Python 3.8 ___ Python

[issue31792] test_buffer altered the execution environment

2017-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 06949585d292d1a9dbf2d0d0fa8fc8fe1dee3ccf by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31792: Restore os.environ in test_buffer when import numpy. (GH-4007) (#4009)

[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2017-10-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2017-10-16 Thread STINNER Victor
STINNER Victor added the comment: (Sorry, I don't work on asyncio anymore.) -- ___ Python tracker ___

[issue31774] tarfile.open ignores custom bufsize value when creating a new archive

2017-10-16 Thread Nitish
Nitish added the comment: Sorry. My bad. There *is* an argument 'copybufsize' in TarFile. -- ___ Python tracker ___

[issue31774] tarfile.open ignores custom bufsize value when creating a new archive

2017-10-16 Thread Nitish
Nitish added the comment: Seems like bufsize is used only in streaming modes. Even in the documentation bufsize is described only in the context of streaming modes. Even TarFile constructor doesn't take bufsize as an argument. Why is it so? --

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-16 Thread STINNER Victor
STINNER Victor added the comment: Ok, so it seems like we need 3 rounding modes: * _PyTime_ROUND_FLOOR: read a clock, like datetime.datetime.now(). We need to round nanoseconds since datetime.datetime only supports 1 us resolution * _PyTime_ROUND_HALF_EVEN: "round

[issue31792] test_buffer altered the execution environment

2017-10-16 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3983 ___ Python tracker ___

[issue31792] test_buffer altered the execution environment

2017-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 676db4bbf2e7c18dc7c35add17dd3bbdc2d3eeb3 by Serhiy Storchaka in branch 'master': bpo-31792: Restore os.environ in test_buffer when import numpy. (#4007)

[issue31774] tarfile.open ignores custom bufsize value when creating a new archive

2017-10-16 Thread Nitish
Change by Nitish : -- nosy: +nitishch ___ Python tracker ___ ___

[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2017-10-16 Thread twisteroid ambassador
Change by twisteroid ambassador : -- nosy: +giampaolo.rodola, haypo ___ Python tracker ___

[issue31760] Re-definition of _POSIX_C_SOURCE with Fedora 26.

2017-10-16 Thread Martin Panter
Martin Panter added the comment: Looks the same as Issue 31374 -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> expat: warning: "_POSIX_C_SOURCE" redefined ___ Python

[issue31795] Slicings documentation doesn't mention Ellipsis

2017-10-16 Thread Nitish
Nitish added the comment: The problem is that while documentation for other objects like Null object, NotImplemented object make it clear what they are used for, documentation for Ellipsis object only says that it's used in slicings and the slicings