[issue23012] RuntimeError: settrace/setprofile function gets lost

2019-05-18 Thread Batuhan
Batuhan added the comment: I try to track down this. sys_settrace calls PyEval_SetTrace with trace_trampoline and the function given to it. The trace_trampoline is important because it checks the result and if result is NULL (for example like f() recursion in your code) it sets c_tracefunc

[issue23012] RuntimeError: settrace/setprofile function gets lost

2019-05-18 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue23012] RuntimeError: settrace/setprofile function gets lost

2019-05-18 Thread Batuhan
Change by Batuhan : -- versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes

2019-05-18 Thread Apoorv Reddy
Change by Apoorv Reddy : -- nosy: +amaury.forgeotdarc, belopolsky, benjamin.peterson, christian.heimes, duaneg, ebarry, georg.brandl, inada.naoki, larry, meador.inge, ned.deily, rhettinger, serhiy.storchaka, tehybel ___ Python tracker

[issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes

2019-05-18 Thread Apoorv Reddy
New submission from Apoorv Reddy : I'm trying to use ctypes to speed up an internal function in my project. However, I'm getting a segmentation fault on a simple dictionary lookup in my C Code, on PyDict_GetItem(dict, key). I have supplied a minimal version of the code I'm trying in C, which

[issue20410] Argument Clinic: add 'self' return converter

2019-05-18 Thread Batuhan
Batuhan added the comment: Doesn't clinic have a `self_converter` class? https://github.com/python/cpython/blame/master/Tools/clinic/clinic.py#L3465 -- nosy: +BTaskaya ___ Python tracker ___

[issue36949] WeakSet.__repr__ and __str__ do not show contents of the set

2019-05-18 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +13326 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-b

[issue36962] Cant sort ModuleInfo instances

2019-05-18 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +13325 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue36962] Cant sort ModuleInfo instances

2019-05-18 Thread Batuhan
Batuhan added the comment: I think dataclasses can be used to do it with order, frozen true parameters. Also a __getitem__ is required for doesnt break anything. -- ___ Python tracker __

[issue36919] Exception from 'compile' reports a newline char not present in input

2019-05-18 Thread Anthony Sottile
Anthony Sottile added the comment: still not able to answer the why, but at least I can answer the what here: https://github.com/python/cpython/blob/f665b96e92a6a6943e312e2c606f348db95939ab/Parser/tokenizer.c#L984-L987 cpython adds a newline during tokenization if the file does not end in a n

[issue36962] Cant sort ModuleInfo instances

2019-05-18 Thread Batuhan
New submission from Batuhan : I can't sort the result of iter_modules; >>> import random, pkgutil >>> modules = list(pkgutil.iter_modules(None)) >>> random.shuffle(modules) >>> sorted(modules) Traceback (most recent call last): File "", line 1, in TypeError: '<' not supported between instance

[issue36783] No documentation for _FromXandFold C API functions

2019-05-18 Thread miss-islington
miss-islington added the comment: New changeset 951b161857a840d4d14de0a5a6610e212d78ab68 by Miss Islington (bot) in branch '3.7': bpo-36783: Add new references for C API Documentation changes (GH-13204) https://github.com/python/cpython/commit/951b161857a840d4d14de0a5a6610e212d78ab68 --

[issue36783] No documentation for _FromXandFold C API functions

2019-05-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +13324 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36959] ISO date errors in _strptime are jumbled

2019-05-18 Thread Gordon P. Hemsley
Gordon P. Hemsley added the comment: Ah yes, to be clear, I wasn't trying to suggest that the error messages themselves were wrong—just that they weren't triggering when the tests were expecting them to. Some of the existing tests currently trigger the "unconverted data remains" ValueError f

[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-18 Thread Batuhan
Batuhan added the comment: What about adding visit_Constant to NodeVisitor for at least one relase period and call visit_Str, visit_Num etc? -- nosy: +BTaskaya ___ Python tracker ___

[issue33519] Should MutableSequence provide .copy()?

2019-05-18 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker ___

[issue33519] Should MutableSequence provide .copy()?

2019-05-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset 9892f454d11b7ea9ba394a115b3e6f48ef6f78fe by Cheryl Sabella (Jelle Zijlstra) in branch 'master': bpo-33519: clarify that .copy() is not part of the MutableSequence ABC (GH-6965) https://github.com/python/cpython/commit/9892f454d11b7ea9ba394a115b3

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: You could add a flag in the exception to tell the default handler where to write the message. It would default to stderr. This would make it possible to catch the exception before it was written out, and customize the behavior. -- nosy: +eric.smith

[issue32397] textwrap output may change if you wrap a paragraph twice

2019-05-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: @larry, it looks like this was close to being merged pending some review comments by Serhiy. Although this is considered a bug and not a new feature, it might be nice to try to get this in for 3.8. Thanks! -- nosy: +cheryl.sabella

[issue36958] IDLE should print exit message or status if one is provided

2019-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://docs.python.org/3/library/exceptions.html#SystemExit says: skip traceback, convert default None to 0, print any other non-int and convert to 1, and pass unprinted int to C exit(). I agree that IDLE should also print non-ints. The IDLE doc should men

[issue36961] ast_unparser.c doesn't handle PEP570

2019-05-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36961] ast_unparser.c doesn't handle PEP570

2019-05-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset da6129e821099c1372d511a11d18af83d6d5d128 by Pablo Galindo in branch 'master': bpo-36961: Handle positional-only arguments in uparse.c (GH-13412) https://github.com/python/cpython/commit/da6129e821099c1372d511a11d18af83d6d5d128 -

[issue35893] distutils fails to build extension on windows when it is a package.__init__

2019-05-18 Thread Evandro Coan
Evandro Coan added the comment: It is missing the import on: #START from distutils.command import build_ext def get_export_symbols(self, ext): parts = ext.name.split(".") print('parts', parts) if parts[-1] == "__init__": initfunc_name = "PyInit_" + parts[-2] else:

[issue36826] ast_unparser.c doesn't handle := expressions

2019-05-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for the patch Batuhan! -- nosy: +pablogsal resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36961] ast_unparser.c doesn't handle PEP570

2019-05-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +13323 stage: -> patch review ___ Python tracker ___ ___ Pytho

[issue36961] ast_unparser.c doesn't handle PEP570

2019-05-18 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Any line in test_annotations() containing positional-only markers in Lib/test/test_future.py will fail: eq('lambda x, /: x') Run tests sequentially 0:00:00 load avg: 0.71 [1/1] test_future test test_future failed -- Traceback (most recent cal

[issue36567] DOC: manpage directive doesn't create hyperlink

2019-05-18 Thread Berker Peksag
Berker Peksag added the comment: New changeset eab99650799699f766c2660f4cfa8ff3f9e8457f by Berker Peksag (Batuhan Taşkaya) in branch 'master': bpo-36567: Use manpages_url to create links for man pages (GH-13339) https://github.com/python/cpython/commit/eab99650799699f766c2660f4cfa8ff3f9e8457f

[issue2180] tokenize: mishandles line joining

2019-05-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for figuring this one out Anthony! :) -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker ___

[issue36959] ISO date errors in _strptime are jumbled

2019-05-18 Thread Paul Ganssle
Paul Ganssle added the comment: Hm, I was a bit confused by your wording here, because I am able to trigger all the errors just fine even before this PR, but I do think that even though this isn't necessarily fixing inaccurate error messages (all the error messages *are* accurate), you're ri

[issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year

2019-05-18 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year

2019-05-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset 56027ccd6b9dab4a090e4fef8574933fb9a36ff2 by Cheryl Sabella (Abhishek Kumar Singh) in branch 'master': bpo-19376: Added doc mentioning `datetime.strptime()` without a year fails for Feb 29. (GH-10243) https://github.com/python/cpython/commit/560

[issue36960] Make datetime docs more user-friendly

2019-05-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: See also issue8822. -- nosy: +cheryl.sabella ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36960] Make datetime docs more user-friendly

2019-05-18 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue35849] Added thousands separators to Lib/pstats.py final report

2019-05-18 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +13322 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue36960] Make datetime docs more user-friendly

2019-05-18 Thread Brad Solomon
New submission from Brad Solomon : The datetime docs are chalk full of detail. This is a positive aspect, and represents a huge amount of work by Tim Peters and A.M. Kuchling. However, it also may function as an obstacle for beginner readers and those simply seeking to answer a basic question o

[issue25988] collections.abc.Indexable

2019-05-18 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- pull_requests: +13320 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue36959] ISO date errors in _strptime are jumbled

2019-05-18 Thread Gordon P. Hemsley
Gordon P. Hemsley added the comment: I've created a PR that fixes the issue, which I discovered while evaluating the test coverage for _strptime. Certain scenarios of error messages were never being hit because the cascade was out of order, and the tests were not showing that because they we

[issue36959] ISO date errors in _strptime are jumbled

2019-05-18 Thread Gordon P. Hemsley
Change by Gordon P. Hemsley : -- keywords: +patch pull_requests: +13319 stage: -> patch review ___ Python tracker ___ ___ Python-bu

[issue36959] ISO date errors in _strptime are jumbled

2019-05-18 Thread Paul Ganssle
Paul Ganssle added the comment: @gphelmsley Can you clarify what you mean by this? Do you have a minimal reproducing example that shows what's happening and what you are expecting? -- ___ Python tracker __

[issue36959] ISO date errors in _strptime are jumbled

2019-05-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue36959] ISO date errors in _strptime are jumbled

2019-05-18 Thread Gordon P. Hemsley
New submission from Gordon P. Hemsley : This has not been apparent because the tests for this code are not testing what they think they're testing. -- components: Library (Lib), Tests messages: 342810 nosy: gphemsley priority: normal severity: normal status: open title: ISO date errors

[issue36958] IDLE should print exit message or status if one is provided

2019-05-18 Thread Random832
New submission from Random832 : IDLE currently just returns to the interactive prompt when a script exits, even if SystemExit has arguments. This can be confusing to new users if they are using sys.exit to print a message. -- assignee: terry.reedy components: IDLE files: run.py.patch

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Pierre Glaser added the comment: Just did so. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +13318 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue2180] tokenize: mishandles line joining

2019-05-18 Thread miss-islington
miss-islington added the comment: New changeset abea73bf4a320ff658c9a98fef3d948a142e61a9 by Miss Islington (bot) (Anthony Sottile) in branch 'master': bpo-2180: Treat line continuation at EOF as a `SyntaxError` (GH-13401) https://github.com/python/cpython/commit/abea73bf4a320ff658c9a98fef3d94

[issue36953] Remove collections ABCs?

2019-05-18 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Should it still raise an informative error message with ImportError: > ImportError: cannot import name 'XXX' from 'collections', please import it > from 'collections.abc'. or just the "cannot import name ''" without the "please import it from 'col

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread STINNER Victor
STINNER Victor added the comment: Would you be interested to propose a PR? Maybe raise an assertion error by default, but allow to customize it in the API? -- ___ Python tracker _

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Pierre Glaser added the comment: Lib/test/test_asyncio/utils.py defines a similar helper: def run_until(loop, pred, timeout=30): deadline = time.monotonic() + timeout while not pred(): if timeout is not None: timeout = deadline - time.monotonic() if time

[issue36546] Add quantiles() to the statistics module

2019-05-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset e917f2ed9af044fe808fc9b4ddc6c5eb99003500 by Raymond Hettinger in branch 'master': bpo-36546: Add more tests and expand docs (#13406) https://github.com/python/cpython/commit/e917f2ed9af044fe808fc9b4ddc6c5eb99003500 -- _

[issue24932] Use proper command line parsing in _testembed

2019-05-18 Thread Eric Snow
Change by Eric Snow : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue36957] Speed up math.isqrt

2019-05-18 Thread Mark Dickinson
Mark Dickinson added the comment: > Did you try the floating point implementation? The aim here was to use exactly the same algorithm, but speed it up by working with C integers where possible; that's a fairly simple change. Using floating-point would require more complex changes. Again, the

[issue36546] Add quantiles() to the statistics module

2019-05-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +13317 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue36957] Speed up math.isqrt

2019-05-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Did you try the floating point implementation? -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue36957] Speed up math.isqrt

2019-05-18 Thread Mark Dickinson
Mark Dickinson added the comment: > introduce in GH-36887 Sorry, that should have been: introduced in GH-13244. #36887 was the corresponding b.p.o. issue. -- ___ Python tracker

[issue36957] Speed up math.isqrt

2019-05-18 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +13316 stage: needs patch -> patch review ___ Python tracker ___ ___ P

[issue36957] Speed up math.isqrt

2019-05-18 Thread Mark Dickinson
New submission from Mark Dickinson : The `math.isqrt` algorithm introduce in GH-36887 currently works entirely with Python long integers. That's unnecessarily inefficient for small inputs. For n < 2**64, `math.isqrt(n)` can be computed, via exactly the same algorithm, using entirely C integer

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thomas, I think that's a good argument, so perhaps we should do this (strive to reuse threads) after all. -- ___ Python tracker ___

[issue36956] Calling "functions" used to implement generators/comps easily cause crash

2019-05-18 Thread Dan Snider
New submission from Dan Snider : As far as I know, generators, set comprehensions, list comprehensions, and dict comprehensions, (along with their asynchronous variants) are implemented by first calling the GET_(A)ITER opcode and then building and calling a function that acepts the resulting

[issue36887] Add integer square root, math.isqrt

2019-05-18 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- nosy: +pierreglaser ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- nosy: +pierreglaser ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-18 Thread Thomas
Thomas added the comment: We ran into this issue in the context of asyncio which uses an internal ThreadPoolExecutor to provide an asynchronous getaddrinfo / getnameinfo. We observed an async application spawned more and more threads through several reconnects. With a maximum of 5 x CPUs the

[issue35933] python doc does not say that the state kwarg in Pickler.save_reduce can be a tuple (and not only a dict)

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mail

[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mail

[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-05-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also issue36845 that seems to have fixed this. -- nosy: +xtreak ___ Python tracker ___

[issue24564] shutil.copytree fails when copying NFS to NFS

2019-05-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: Nosying Hynek and Larry, as they had done the original code. -- nosy: +cheryl.sabella, hynek, larry versions: -Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue36887] Add integer square root, math.isqrt

2019-05-18 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 73934b9da07daefb203e7d26089e7486a1ce4fdf by Mark Dickinson in branch 'master': bpo-36887: add math.isqrt (GH-13244) https://github.com/python/cpython/commit/73934b9da07daefb203e7d26089e7486a1ce4fdf -- _

[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-05-18 Thread Pavel Kostyuchenko
Pavel Kostyuchenko added the comment: Also it might be viable to add some assertion to verify the take_gil is not called with uninitialized interpreter. I used the changes in the attachment (take_gil.assert.patch), but it produced errors during test_tracemalloc with f13c5c8b9401a9dc19e95d8b42

[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-05-18 Thread Pavel Kostyuchenko
Pavel Kostyuchenko added the comment: I was able to reproduce the error with version f13c5c8b9401a9dc19e95d8b420ee100ac022208 on FreeBSD 12.0 VM. The error seems to be caused not by those changes, but by lack of synchronization in the multiprocessing.managers.Server. The failure happens when

[issue36955] Python3 - mulltiprocessing

2019-05-18 Thread SilentGhost
SilentGhost added the comment: multiprocessing module that is available on PyPi is a backport of stdlib module to python 2.4 and 2.5. multiprocessing module is available in stdlib for all version after that, so you don't need to install it with pip. -- nosy: +SilentGhost resolution:

[issue36955] Python3 - mulltiprocessing

2019-05-18 Thread Frode Byrkjeland
New submission from Frode Byrkjeland : multiprocessing-2.6.2.1.tar.gz contains setup.py with python2 print statement in stead of python3 print( ). This results in an error when trying to install. Found on Ubuntu 18.04 x86_64 running python3.6.7 error seems to be ok after doing changes on the p

[issue2180] tokenize: mishandles line joining

2019-05-18 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mail

[issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c

2019-05-18 Thread Zackery Spytz
Zackery Spytz added the comment: I agree that this should be fixed. -- nosy: +ZackerySpytz versions: +Python 2.7 ___ Python tracker ___ ___