[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: marking as a 2.7 release blocker just to get benjamin's RM attention before the final 2.7. -- assignee: gregory.p.smith -> benjamin.peterson nosy: +benjamin.peterson priority: high -> release blocker stage: resolved -> patch review status: closed

[issue39980] importlib.resources.path() may return incorrect path when using custom loader

2020-03-17 Thread Jason R. Coombs
Jason R. Coombs added the comment: I believe this issue was addressed in the latest importlib_resources. If so, that behavior is being ported to Python 3.9 in issue39791. Would you test with `importlib_resources` 1.1 or later and see if that suits your purposes? If so, please use

[issue39957] bpo39775 not fixed - inspect.Signature.parameters still dict/mappingproxy around dict

2020-03-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset 611836a69a7a98bb106b4d315ed76a1e17266f4f by Jens Reidel in branch 'master': bpo-39957: Change Signature.parameters to OrderedDict (GH-18988) https://github.com/python/cpython/commit/611836a69a7a98bb106b4d315ed76a1e17266f4f --

[issue39957] bpo39775 not fixed - inspect.Signature.parameters still dict/mappingproxy around dict

2020-03-17 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 29356e03d4f8800b04f799efe7a10e3ce8b16f61 by Victor Stinner in branch 'master': bpo-39877: Fix take_gil() for daemon threads (GH-19054) https://github.com/python/cpython/commit/29356e03d4f8800b04f799efe7a10e3ce8b16f61 --

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 29356e03d4f8800b04f799efe7a10e3ce8b16f61 by Victor Stinner in branch 'master': bpo-39877: Fix take_gil() for daemon threads (GH-19054) https://github.com/python/cpython/commit/29356e03d4f8800b04f799efe7a10e3ce8b16f61 --

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18406 pull_request: https://github.com/python/cpython/pull/19054 ___ Python tracker ___

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18405 pull_request: https://github.com/python/cpython/pull/19054 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18404 pull_request: https://github.com/python/cpython/pull/19053 ___ Python tracker ___

[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-17 Thread Lahfa Samy
Lahfa Samy added the comment: Hi Furkan, would you mind to combine your revised PR with mine so that we can do as suggested by Zachary? -- ___ Python tracker ___

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 23ef89db7ae46d160650263cc80479c2ed6693fb by Victor Stinner in branch 'master': bpo-39984: _PyThreadState_DeleteCurrent() takes tstate (GH-19051) https://github.com/python/cpython/commit/23ef89db7ae46d160650263cc80479c2ed6693fb --

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset d7fabc116269e4650a684eb04f9ecd84421aa247 by Victor Stinner in branch 'master': bpo-39984: Pass tstate to handle_signals() (GH-19050) https://github.com/python/cpython/commit/d7fabc116269e4650a684eb04f9ecd84421aa247 --

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: While trying to move pending to PyInterpreterState, I hit in issue in _PyEval_AddPendingCall(): signal.raise_signal() can call it with tstate=NULL. See https://bugs.python.org/issue37127#msg364489 -- ___ Python

[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > In bpo-33608 I moved the pending calls to per-interpreter state. We saw > failures (sometimes sporadic) on a few buildbots (e.g. FreeBSD) during > runtime finalization. However, nearly all of the buildbots were fine, so it > may be a question of

[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: In the master branch of Python, trip_signal() calls _PyEval_AddPendingCall(tstate) and tstate is get using _PyRuntimeState_GetThreadState(runtime). trip_signal() can be called while the GIL is not held: tstate is NULL in this case. For example, it's the

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-17 Thread Matej Cepl
Change by Matej Cepl : -- pull_requests: +18403 pull_request: https://github.com/python/cpython/pull/19052 ___ Python tracker ___

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18402 pull_request: https://github.com/python/cpython/pull/19051 ___ Python tracker ___

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18401 pull_request: https://github.com/python/cpython/pull/19050 ___ Python tracker ___

[issue39998] [C API] Remove PyEval_AcquireLock() and PyEval_ReleaseLock() functions

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: What's New In Python 3.2 says: "The misleading functions PyEval_AcquireLock() and PyEval_ReleaseLock() have been officially deprecated. The thread-state aware APIs (such as PyEval_SaveThread() and PyEval_RestoreThread()) should be used instead."

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18400 pull_request: https://github.com/python/cpython/pull/19049 ___ Python tracker ___

[issue39998] [C API] Remove PyEval_AcquireLock() and PyEval_ReleaseLock() functions

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18399 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19048 ___ Python tracker ___

[issue39998] [C API] Remove PyEval_AcquireLock() and PyEval_ReleaseLock() functions

2020-03-17 Thread STINNER Victor
New submission from STINNER Victor : The PyEval_AcquireLock() and PyEval_ReleaseLock() functions are misleading and deprecated since Python 3.2. bpo-10913 deprecated them: commit 5ace8e98da6401827f607292a066da05df3ec5c1 Author: Antoine Pitrou Date: Sat Jan 15 13:11:48 2011 +

[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-17 Thread Nishant Misra
Nishant Misra added the comment: Yes Lahfa Samy, you can take it up. I did not work on the issue. -- ___ Python tracker ___ ___

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: I expect that for objects which are not commonly modified by two interpreters "at the same time", it should be fine. But None, True, small integer singletons, latin-1 str single character singletons, etc. objects are likely to be frequently accessed and so

[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-17 Thread Zachary Ware
Zachary Ware added the comment: Hi Furkan. Please note that Lahfa Samy had already submitted a PR for this issue after "claiming" it with a note here; proper "netiquette" suggests not jumping in with your own PR in such a situation. Fortuitously though, it looks like the both of you have

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38373] List overallocation strategy

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39719] tempfile.SpooledTemporaryFile still has softspace property

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker ___

[issue38373] List overallocation strategy

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2fe815edd6778fb9deef8f8044848647659c2eb8 by Serhiy Storchaka in branch 'master': bpo-38373: Change list overallocating strategy. (GH-18952) https://github.com/python/cpython/commit/2fe815edd6778fb9deef8f8044848647659c2eb8 --

[issue39719] tempfile.SpooledTemporaryFile still has softspace property

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d469d666b874ae746ca9a17bbfc9dbbf6fb2d6bc by Shantanu in branch 'master': bpo-39719: Remove softspace from tempfile.SpooledTemporaryFile (GH-18599) https://github.com/python/cpython/commit/d469d666b874ae746ca9a17bbfc9dbbf6fb2d6bc --

[issue39959] (Possible) bug on multiprocessing.shared_memory

2020-03-17 Thread Diogo Flores
Diogo Flores added the comment: Follow up - tested on Linux (The first solution). The solution presented below will fix the problem with the caveat that the base process (the one that creates the shared-memory obj) must outlive any process that use the shared-memory. The rationale is that

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6b97598fb66a08d0f36e4d73bffea5c1b17740d4 by Serhiy Storchaka in branch 'master': bpo-39988: Remove ast.AugLoad and ast.AugStore node classes. (GH-19038) https://github.com/python/cpython/commit/6b97598fb66a08d0f36e4d73bffea5c1b17740d4

[issue39979] Cannot tune scrypt with large enough parameters

2020-03-17 Thread Christian Heimes
Christian Heimes added the comment: Your parameter selection requires about 64 MB of memory (n * 2 * r * 64). As documented maxmem=0 defaults to 32 MB of maximum memory in OpenSSL 1.1.x. OpenSSL needs a bit of internal memory for book keeping and other stuff, so you need maxmem=65*1024*1024

[issue39997] "is" operator doesn't work on method returned from method descriptor

2020-03-17 Thread Yurii
Change by Yurii : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39997] "is" operator doesn't work on method returned from method descriptor

2020-03-17 Thread Yurii
Yurii added the comment: @christian.heimes thanks for the feedback -- resolution: not a bug -> status: closed -> open ___ Python tracker ___

[issue39997] "is" operator doesn't work on method returned from method descriptor

2020-03-17 Thread Christian Heimes
Christian Heimes added the comment: This is not a bug. The "is" operator works as expected. A method descriptor returns a new wrapper object on each access. CPython uses free lists to "recycle" memory locations to increase performance. id(Class.method.__get__(None, Class)) ==

[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-17 Thread Lahfa Samy
Lahfa Samy added the comment: Nishant Misra are you still working on this issue, if not could I take it from now on, as my first issue and contribution to Python? -- nosy: +AkechiShiro ___ Python tracker

[issue39717] Fix exception causes in tarfile module

2020-03-17 Thread Ram Rachum
Ram Rachum added the comment: I understand. I've closed my PR and I'll let someone else implement this ticket-- I don't want to be the reason that someone didn't get the information they wanted in an error report. Thanks anyway for your time. --

[issue39997] "is" operator doesn't work on method returned from method descriptor

2020-03-17 Thread Yurii
New submission from Yurii : I reproduced this in python 3.8 and python 3.6. The last line displays the bug itself, all other lines do the setup and pretty much explain WHY I think that is the bug. class Class: def method(self): ... instance = Class() # expected: ids match assert

[issue39717] Fix exception causes in tarfile module

2020-03-17 Thread Ethan Furman
Ethan Furman added the comment: Yes. Some of the changes are good, others should be `from None`. The `from None` raises should include the ones where the new exception includes the text of the caught exception. What is needed is text captured from the proposed changes to see if the

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that the implementation of np_bool in _struct.c [1] is incorrect because this is supposed to access a boolean of a standard size, but uses _Bool. The size of _Bool is not prescribed, and IIRC sizeof(_Bool) was 4 with the compilers used for macOS/PPC.

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-03-17 Thread Mark Shannon
Mark Shannon added the comment: Having two CPUs write to the same cache line is a well known performance problem. There's nothing special about CPython here. The proper name for it seems to be "cache line ping-pong", but a search for "false sharing" might be more informative. --

[issue39996] test_multiprocessing_fork hangs on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: On FreeBSD CURRENT worker, I reproduced the issue: "test_enter (test.test_multiprocessing_fork.WithProcessesTestPool) ..." hangs. Sadly I unblocked a process when I did a mistake in gdb while getting Python tracebacks. Process 90127: 90127 4 S+

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-03-17 Thread Larry Hastings
Larry Hastings added the comment: > The problem with having a single immortal `None`, is that it will > cause data cache thrashing as two different CPUs modify the > refcount on the shared `None` object. That's a very reasonable theory. Personally, I find modern CPU architecture bewildering

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Anthony Sottile
Anthony Sottile added the comment: oh! that's neat, yeah hadn't been following closely enough it seems, good to hear that the readonly thing is fixed! -- ___ Python tracker

[issue31895] Native hijri calendar support

2020-03-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: How to implement api in python website -> Native hijri calendar support ___ Python tracker ___

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset dab8423d220243efabbbcafafc12d90145539b50 by Victor Stinner in branch 'master': bpo-39984: Add PyInterpreterState.ceval (GH-19047) https://github.com/python/cpython/commit/dab8423d220243efabbbcafafc12d90145539b50 --

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you want the conditional cleanup, then TemporaryDirectory is obviously a wrong tool. mkdtemp looks more appropriate. If you remove directory in process of working with temporary directory, would it help if you create a subdirectory in the temporary

[issue31895] How to implement api in python website

2020-03-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- type: performance -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39996] test_multiprocessing_fork hangs on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: In the previous build 419, test_multiprocessing_fork took 4 min 12 sec. -- ___ Python tracker ___

[issue39996] test_multiprocessing_fork hangs on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread STINNER Victor
New submission from STINNER Victor : Sadly, faulthandler failed to dump the Python traceback and kill the process. Instead, the main libregrtest process had to kill the child process (process group) :-( https://buildbot.python.org/all/#/builders/152/builds/420 ... 0:56:25 load avg: 0.22

[issue26660] tempfile.TemporaryDirectory() cleanup exception if nonwriteable or non-searchable files or directories created

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39717] Fix exception causes in tarfile module

2020-03-17 Thread Ram Rachum
Ram Rachum added the comment: Ethan, got a verdict? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 514c469719f149e1722a91a9d0c63bf89dfefb2a by Dong-hee Na in branch 'master': bpo-1635741: Port itertools module to multiphase initialization (GH-19044) https://github.com/python/cpython/commit/514c469719f149e1722a91a9d0c63bf89dfefb2a

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Anthony Sottile
Anthony Sottile added the comment: one example is here: https://github.com/pre-commit/pre-commit/blob/bb6f1efe63c168d9393d520bd60e16c991a57059/pre_commit/store.py#L137-L139 where I would want cleanup in the exceptional case another (related but different) closed-source use case involves

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: Ok, the new stricter parser should now cover all cases. If not, it should be easier to fix it ;-) I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset ebf6bb9f5ef032d1646b418ebbb645ea0b217da6 by Victor Stinner in branch 'master': bpo-39991: Enhance uuid parser for MAC address (GH-19045) https://github.com/python/cpython/commit/ebf6bb9f5ef032d1646b418ebbb645ea0b217da6 --

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18398 pull_request: https://github.com/python/cpython/pull/19047 ___ Python tracker ___

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is your use case Anthony? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The current output looks like Python code. The proposed revision looks more like C, and I find the example above less readable with the prominence given to what is close to noise. The difference is part of the reason I left C for Python over 2 decades

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread hai shi
hai shi added the comment: > Use _testinternalcapi in this case. oh, forgive me. I don't atttention this extension module before :( -- ___ Python tracker ___

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: Thanks Petr and Nick for the review ;-) Pablo Galindo Salgado: > I think Cython makes use of PEP-489 so unless I am missing something all > generated extensions use PEP-489 structures. Alright. I still consider that my change is correct and will no harm

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5b1ef200d31a74a9b478d0217d73ed0a659a8a06 by Victor Stinner in branch 'master': bpo-39824: module_traverse() don't call m_traverse if md_state=NULL (GH-18738) https://github.com/python/cpython/commit/5b1ef200d31a74a9b478d0217d73ed0a659a8a06

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Mauro S. M. Rodrigues
Mauro S. M. Rodrigues added the comment: Hi Anthony, Thanks for asking, yeah I'm interested in push a new version. I'll do it later today and I'll post a link to the pr here. -- ___ Python tracker

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > _testcapi must test the public Python C API, not CPython internal C API Use _testinternalcapi in this case. -- ___ Python tracker ___

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with

2020-03-17 Thread STINNER Victor
New submission from STINNER Victor : AMD64 Ubuntu Shared 3.x: https://buildbot.python.org/all/#/builders/101/builds/532 test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ... Stdout: 15.51s Stderr: Warning -- threading_cleanup() failed to cleanup 0 threads

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- title: test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with -> test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-17 Thread Stefan Krah
Stefan Krah added the comment: > So it's clear that something has to change. IMO, preserving (2) and relaxing > (1) is the more useful choice. But not in this issue I think. GH-18969 is a minimal change that *removes* UB for the standard sizes. UB for the native type is a direct

[issue10572] Move test sub-packages to Lib/test

2020-03-17 Thread Brett Cannon
Brett Cannon added the comment: I'm also still in favour of the change. While people may have worked around this that doesn't mean we need to keep forcing them to do so. People worked around our lack of booleans but we chose to still fix that. ;) --

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread hai shi
hai shi added the comment: > Maybe we should just add a private function for test in _testcapi. Oh, there have a problem with this idea: struct _is is defined in internal/pycore_pystate.h. _testcapi must test the public Python C API, not CPython internal C API --

[issue24916] In sysconfig, don't rely on sys.version format

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > What do you think? I would prefer to see a PR to give my opinion :) -- ___ Python tracker ___

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: Mark: > The problem with having a single immortal `None`, is that it will cause data > cache thrashing as two different CPUs modify the refcount on the shared > `None` object. Yeah, I concur with Mark: having one singleton per interpreter should provide

[issue39980] importlib.resources.path() may return incorrect path when using custom loader

2020-03-17 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +barry, jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39994] Redundant code in pprint module.

2020-03-17 Thread Palak Kumar Jha
Change by Palak Kumar Jha : -- keywords: +patch pull_requests: +18397 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19046 ___ Python tracker ___

[issue26067] test_shutil fails when gid name is missing

2020-03-17 Thread Dino Viehland
Dino Viehland added the comment: New changeset 52268941f37e3e27bd01792b081877ec3bc9ce12 by Matthias Braun in branch 'master': bpo-26067: Do not fail test_shutil / chown when gid/uid cannot be resolved (#19032) https://github.com/python/cpython/commit/52268941f37e3e27bd01792b081877ec3bc9ce12

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18396 pull_request: https://github.com/python/cpython/pull/19045 ___ Python tracker ___

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread Mark Shannon
Mark Shannon added the comment: Even if `_PyRuntime` ends up as just a list of interpreters and doesn't disappear completely, it won't be used anything like as much as it is now. Many of the functions that it getting passed to will no longer need it, so why bother passing it now?

[issue39943] Meta: Clean up various issues in C internals

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 982307b9cceef36e30ac43b13032d68c3b921adc by Andy Lester in branch 'master': bpo-39943: Remove unused self from find_nfc_index() (GH-18973) https://github.com/python/cpython/commit/982307b9cceef36e30ac43b13032d68c3b921adc -- nosy:

[issue31895] How to implement api in python website

2020-03-17 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg364423 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg364424 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39994] Redundant code in pprint module.

2020-03-17 Thread Palak Kumar Jha
New submission from Palak Kumar Jha : In the PrettyPrinter._format method, since self._dispatch has dict.__repr__ [key] mapped to self._pprint_dict [value] the elif block is not needed. Its work is already being done by the if block above, which searches self._dispatch to fetch the

[issue39987] Simplify setting line numbers in the compiler

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39987] Simplify setting line numbers in the compiler

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 61cb3d02b83e746e59bb1351a0865e3b8714b2d6 by Serhiy Storchaka in branch 'master': bpo-39987: Simplify setting lineno in the compiler. (GH-19037) https://github.com/python/cpython/commit/61cb3d02b83e746e59bb1351a0865e3b8714b2d6 --

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > Instead of passing `_PyRuntimeState` around everywhere, why not just let it > disappear in time. Passing runtime (_PyRuntimeState) is a temporary move until more and more fields are moved from _PyRuntimeState into PyInterpreterState. I just created

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: My fix is incomplete: the IPv6 address "123:2:3:4:5:6:7:8" is a valid IPv6 address and uuid.py accepts it as a valid MAC address, whereas it's not a MAC address. -- ___ Python tracker

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread Steve Dower
Steve Dower added the comment: > Instead of passing `_PyRuntimeState` around everywhere, why not just let it > disappear in time. Agreed. It's valuable to pass the thread state, but the runtime state should only be needed to create a new thread state (and arguably not even then).

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-17 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18395 pull_request: https://github.com/python/cpython/pull/19044 ___ Python tracker ___

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-17 Thread Petr Viktorin
Petr Viktorin added the comment: > You are the one who wanted to *introduce* a hack by dereferencing as char and then cast to _Bool. :-) Yes, I did change my mind after reading the documentation. The docs say two contradicting things: 1. The '?' conversion code corresponds to the _Bool type

[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 0bcbfa43d55d9558cdcb256d8998366281322080 by Tal Einat (Michael > Felt) in branch 'master': > bpo-28009: Fix uuid.uuid1() and uuid.get_node() on AIX (GH-8672) This change introduced a regression: bpo-39991. I pushed the commit

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: It seems like this issue is a regression caused by the following change of bpo-28009: commit 0bcbfa43d55d9558cdcb256d8998366281322080 Author: Michael Felt Date: Thu Sep 26 20:43:15 2019 +0100 bpo-28009: Fix uuid.uuid1() and uuid.get_node() on AIX

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread Mark Shannon
Mark Shannon added the comment: Instead of passing `_PyRuntimeState` around everywhere, why not just let it disappear in time. Currently `_PyRuntimeState` manages "global" state, mainly the GIL and some config. Once the GIL has been migrated to the sub-interpreters, the config part can be

[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

2020-03-17 Thread Michael S
Michael S added the comment: Thanks Pablo, sorry, I was just stupid. > Do you think that adding these explicit parentheses would help with help > making this more clear? Maybe. I read the BNF documentation the first time today, but since it's not intended for beginners, I think it's

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset eb886db1e99a15f15a2342aa496197a5f88fa9c8 by Victor Stinner in branch 'master': bpo-39991: uuid._netstat_getnode() ignores IPv6 addresses (GH-19043) https://github.com/python/cpython/commit/eb886db1e99a15f15a2342aa496197a5f88fa9c8 --

[issue39990] help should evaluate forward reference

2020-03-17 Thread Nguyễn Gia Phong
Nguyễn Gia Phong added the comment: I traced it down to inspect.formatannotation(annotation). Before checking for isinstance(annotation, type), IMHO we should do something like import typing if isinstance(annotation, str): annotation = typing.ForwardRef(str)._evaluate(annotation)

[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

2020-03-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Did I miss something? Yep, what you are missing is that the rule is really: (defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]]) | (parameter_list_no_posonly) which means that is either defparameter ("," defparameter)*

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-03-17 Thread Mark Shannon
Mark Shannon added the comment: Consider the case where a thread that doesn't hold the GIL attempts to get a reference on `None`. The problem with having a single immortal `None`, is that it will cause data cache thrashing as two different CPUs modify the refcount on the shared `None`

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread Dong-hee Na
Dong-hee Na added the comment: Victor, frozenset is the last basic builtin collection which is not applied to this improvement yet. frozenset also show similar performance improvement by using vectorcall pyperf compare_to master.json bpo-37207.json Mean +- std dev: [master] 2.26 us +- 0.06

  1   2   >