[issue38693] Use f-strings instead of str.format within importlib

2021-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just have merged a change which makes many C-style formatting as fast as f-strings (issue28307) and am working on supporting more format codes (%d, %x, %f, etc). Using C-style formatting can be a good option if you want performance and backward

[issue38693] Use f-strings instead of str.format within importlib

2021-05-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2021-05-14 Thread Petr Viktorin
Petr Viktorin added the comment: METH_VARARGS and METH_KEYWORDS are part of the stable ABI. -- ___ Python tracker ___ ___

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +24764 pull_request: https://github.com/python/cpython/pull/26123 ___ Python tracker ___

[issue44123] make function parameter sentinel value true singletons

2021-05-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: This needs a good deal more discussion before sweeping through the code and change a long standing Python idiom that has stood the test of time. Until now, no one has claimed that this is broken. You "recently noticing this" doesn't mean that it is

[issue44123] make function parameter sentinel value true singletons

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: Tal: "This is also being discussed on python-dev." https://mail.python.org/archives/list/python-...@python.org/thread/ZLVPD2OISI7M4POMTR2FCQTE6TPMPTO3/ -- nosy: +vstinner ___ Python tracker

[issue44117] [C API] Remove deprecated PyEval_InitThreads()

2021-05-14 Thread Inada Naoki
Inada Naoki added the comment: It seems they are stable ABI. https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L604 https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L614 We may need to keep

[issue28146] Confusing error messages in str.format()

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: commit 4aeee0b47b3a2b604bbac37040320ffc88c291f2 Author: Irit Katriel Date: Thu May 13 21:55:55 2021 +0100 bpo-28146: Fix a confusing error message in str.format() (GH-24213) Automerge-Triggered-By: GH:pitrou --

[issue44123] make function parameter sentinel value true singletons

2021-05-14 Thread Tal Einat
Tal Einat added the comment: > This needs a good deal more discussion before sweeping through the code and > change a long standing Python idiom that has stood the test of time. I agree this should be discussed, which is why I created this issue about it, as place for that discussion to

[issue26032] Use scandir() to speed up pathlib globbing

2021-05-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2021-05-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: This issue confuses two different testing issues. First is selection of test data before the test versus generation while testing (usually 'randomly') Second is how the function is tested. All tests test some property of the inputs and function, but it

[issue32133] documentation: numbers module nitpick

2021-05-14 Thread Miguel Brito
Miguel Brito added the comment: Seen that nobody is working on this I transformed the suggestion into a PR. -- nosy: +miguendes ___ Python tracker ___

[issue44131] [C API] Add tests on Py_FrozenMain()

2021-05-14 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +24766 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26126 ___ Python tracker ___

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Sure -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2021-05-14 Thread hai shi
hai shi added the comment: > METH_VARARGS and METH_KEYWORDS are part of the stable ABI. Copy that, thanks, petr. -- ___ Python tracker ___

[issue44113] [C API] Deprecate legacy API for configure Python initialization

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: commit 7565586724692e2ad164d770af9675f7a261fe3a Author: Dong-hee Na Date: Thu May 13 10:19:46 2021 +0900 bpo-44113: Update fromzenmain not to use Py_SetProgramName (GH-26085) -- ___ Python tracker

[issue44131] [C API] Add tests on Py_FrozenMain()

2021-05-14 Thread STINNER Victor
New submission from STINNER Victor : I would like to change Py_FrozenMain() using the new PyConfig C API, but I would prefer to first write tests of its current behavior. Currently, Py_FrozenMain() has no test. Py_FrozenMain() is used by Tools/freeze/freeze.py. Old freeze.py issues: *

[issue44113] [C API] Deprecate legacy API for configure Python initialization

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the help Dong-hee ;-) I close the issue, functions are now deprecated. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24871] freeze.py doesn't work on x86_64 Linux out of the box

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: I consider that the issue is now fixed. If it's not the case, please reopen the issue (or open a new issue). -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue44130] GIL Improvement

2021-05-14 Thread Christian Heimes
Christian Heimes added the comment: Does Python's unit test suite pass? -- nosy: +christian.heimes, pitrou, vstinner ___ Python tracker ___

[issue44113] [C API] Deprecate legacy API for configure Python initialization

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: > Well, Py_FrozenMain() should be rewritten with PyConfig, I want to do that > for a long time, but I don't know how to test it. It would be nice to have a > very basic test for Py_FrozenMain(). I created bpo-44131: [C API] Add tests on Py_FrozenMain().

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Forgot to do that. I'll report back with the test suite result. -- ___ Python tracker ___ ___

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Jakub Nowak
Jakub Nowak added the comment: Thank for your interest Miguel. I have no experience with CPython codebase so I'll be glad if you work on this. I think treating ZipFile's like a separate drive would be the best. If we agree on this then probably all of the properties and methods from pathlib

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Miguel Brito
Miguel Brito added the comment: +1. The docstring says: ``` class Path: """ A pathlib-compatible interface for zip files. ``` but only a few methods are supported. It'd be nice to have at least `stem`, `parents`, `suffixes`, `parts`, which IMHO would make sense here. I'd love to

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

2021-05-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +24765 pull_request: https://github.com/python/cpython/pull/26125 ___ Python tracker

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

2021-05-14 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset f28bac428d5fff23fe5e95aa02b903ee2dd5b3de by Miss Islington (bot) in branch '3.10': bpo-44108: sqlite3 test suite now works with SQLITE_DQS=0 (GH-26032) (GH-26125) https://github.com/python/cpython/commit/f28bac428d5fff23fe5e95aa02b903ee2dd5b3de

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
New submission from Shreyan Avigyan : Today while working on an attempt to improve the GIL (either by modifying it or removing it) I noticed that in destroy_gil function first we unlock the mutex and then we set the gil->locked to -1 using _Py_atomic_store_explicit. Therefore the cycle is,

[issue44130] GIL Improvement

2021-05-14 Thread Eric V. Smith
Eric V. Smith added the comment: "there's an increase in speed by 0.22 or something like that" 0.22 what? Seconds? Percent? A factor of 0.22? What are you measuring, and how are you measuring it? -- nosy: +eric.smith ___ Python tracker

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I took the measurement like this. If it ran in 1.98 secs then the new patch would theoretically measure 1.96 (original - 0.22). The patch isn't very useful but it can sometimes be faster than the present code especially in debug mode. --

[issue44130] GIL Improvement

2021-05-14 Thread Christian Heimes
Christian Heimes added the comment: The benchmark code has multiple issues. For example it uses a bad clock sources, time.time(). Could you please rewrite the benchmark to use https://pypi.org/project/pyperf/ ? -- ___ Python tracker

[issue37891] Exceptions tutorial page does not mention raise from

2021-05-14 Thread Bonifacio
Bonifacio added the comment: Version 3.9 of the docs already cover the syntax Neils talks about in his original message. https://docs.python.org/3.9/tutorial/errors.html#exception-chaining Is there anything left to be done here? If so, I'm glad to help with them, but I would need

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-05-14 Thread Irit Katriel
Irit Katriel added the comment: tp_traverse is optional, so we should not add this assertion. -- resolution: -> rejected stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2021-05-14 Thread hai shi
Change by hai shi : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Instability is more likely. But I'll run the benchmark once more and see what is happening. -- ___ Python tracker ___

[issue44130] GIL Improvement

2021-05-14 Thread Eric V. Smith
Eric V. Smith added the comment: "If it ran in 1.98 secs then the new patch would theoretically measure 1.96 (original - 0.22)" That difference is 0.02 seconds, or about 1%, correct? I'm just trying to understand what we're measuring here. --

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Test suite passed and also I'm attaching the benchmark I used to measure. (This is the benchmark used by David Beazley in one of his famous GIL blog posts and talks.) -- Added file: https://bugs.python.org/file50040/benchmark.py

[issue44130] GIL Improvement

2021-05-14 Thread Christian Heimes
Christian Heimes added the comment: The information is not very helpful to understand what you are doing. Please provide your system specs (arch, platform, CPU spec, memory), the commands you used to compile Python and the commands you used to get the numbers --

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: > "That difference is 0.02 seconds, or about 1%, correct?" I mistook 1.98 as 1.88 in my calculation. Sorry for that. > The information is not very helpful to understand what you are doing. Please > provide your system specs (arch, platform, CPU spec,

[issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

2021-05-14 Thread Carol Willing
Carol Willing added the comment: New changeset dd4f7d96cb78b424ef8fa705aaee15a837b2d240 by Miss Islington (bot) in branch '3.10': bpo-43729: Clarify comment in tutorial example (GH-25191) (#26136) https://github.com/python/cpython/commit/dd4f7d96cb78b424ef8fa705aaee15a837b2d240 --

[issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

2021-05-14 Thread Carol Willing
Carol Willing added the comment: New changeset c90642b0d48e5ab40d05b526311ba19bb87f3233 by Miss Islington (bot) in branch '3.9': bpo-43729: Clarify comment in tutorial example (GH-25191) (GH-26137) https://github.com/python/cpython/commit/c90642b0d48e5ab40d05b526311ba19bb87f3233 --

[issue34903] strptime %d handling of single digit day of month

2021-05-14 Thread Huziy Oleksandr
Huziy Oleksandr added the comment: This is a bit unfortunate for the formats without separators, that could give wrong results silently: ``` In [26]: datetime.strptime("2020010112", "%Y%m%d%H") Out[26]: datetime.datetime(2020, 1, 1, 12, 0) In [27]: datetime.strptime("2020010112",

[issue43650] MemoryError on zip.read in shutil._unpack_zipfile

2021-05-14 Thread Igor Bolshakov
Igor Bolshakov added the comment: pls review -- resolution: -> remind ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-05-14 Thread nmatravolgyi
nmatravolgyi added the comment: I did a little research on how the `wait_for` could be improved. There are four alternate implementations you can find here: https://github.com/Traktormaster/wait-for2/blob/issue37658/wait_for2/impl.py The repository (on the linked branch) has tox set-up and

[issue38768] [feature request] Add lldb equivalent to Tools/gdb

2021-05-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: This would be useful beyond macOS. Clang/LLVM is the compiler toolchain of choice for a lot of the world these days. Including lldb. gdb cannot be assumed to be available or even work everywhere. This would be a great thing to have. --

[issue44138] multiprocessing documentation should note behavior when process with Lock dies

2021-05-14 Thread Kushal Kumaran
New submission from Kushal Kumaran : If a process holding a multiprocessing.Lock dies, other waiters on the lock will be stuck. This is mostly the same as with threads, but threads-users can usually avoid this with careful coding (dealing with errors, etc.), and significant crashes will

[issue44072] Doc: power operator (`**`) present for numbers.Complex, not added in numbers.Integral

2021-05-14 Thread miss-islington
miss-islington added the comment: New changeset 2e99869f64bbd3c6590cb5ceaf9cf59e63689d63 by Miss Islington (bot) in branch '3.10': bpo-44072: fix Complex, Integral docs for `**` (GH-25986) https://github.com/python/cpython/commit/2e99869f64bbd3c6590cb5ceaf9cf59e63689d63 --

[issue44126] Cross Compile CPython Modules

2021-05-14 Thread Jeff Moguillansky
Change by Jeff Moguillansky : -- title: Cross Compile Cython Modules -> Cross Compile CPython Modules ___ Python tracker ___ ___

[issue44126] Cross Compile CPython Modules

2021-05-14 Thread Jeff Moguillansky
Change by Jeff Moguillansky : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44072] Doc: power operator (`**`) present for numbers.Complex, not added in numbers.Integral

2021-05-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +24773 pull_request: https://github.com/python/cpython/pull/26139 ___ Python tracker

[issue44072] Doc: power operator (`**`) present for numbers.Complex, not added in numbers.Integral

2021-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +24774 pull_request: https://github.com/python/cpython/pull/26140 ___ Python tracker ___

[issue44133] "Py_FrozenMain" symbol is not exported

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: The symbol is not exported on Windows neither. My PR 26126 ("Test Py_FrozenMain()") fails on Windows with: "_testembed.obj : error LNK2001: unresolved external symbol __imp_Py_FrozenMain" ("__imp_" prefix is added by Windows DLL loader.) --

[issue44072] Doc: power operator (`**`) present for numbers.Complex, not added in numbers.Integral

2021-05-14 Thread miss-islington
miss-islington added the comment: New changeset fa9de0c383581936de3338c8dc6b58c10a6e27b8 by Miss Islington (bot) in branch '3.9': bpo-44072: fix Complex, Integral docs for `**` (GH-25986) https://github.com/python/cpython/commit/fa9de0c383581936de3338c8dc6b58c10a6e27b8 --

[issue44072] Doc: power operator (`**`) present for numbers.Complex, not added in numbers.Integral

2021-05-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the report and clean patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30274] Rename 'name' to 'fullname' argument to ExtensionFileLoader

2021-05-14 Thread Irit Katriel
Irit Katriel added the comment: The PR was reviewed but it now has merge conflicts and possibly a test failure on MacOS. -- components: +Library (Lib) -Documentation keywords: +easy nosy: +iritkatriel title: Make importlib.abc.ExtensionFileLoader.__init__() documentation match code

[issue44126] Cross Compile CPython Modules

2021-05-14 Thread Jeff Moguillansky
Jeff Moguillansky added the comment: Thanks for the info, I will forward the question to the setuptools mailing list -- status: open -> closed ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 14.0 -> 15.0 pull_requests: +24772 pull_request: https://github.com/python/cpython/pull/26138 ___ Python tracker

[issue38768] [feature request] Add lldb equivalent to Tools/gdb

2021-05-14 Thread Ned Deily
Change by Ned Deily : -- components: -macOS ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44072] Doc: power operator (`**`) present for numbers.Complex, not added in numbers.Integral

2021-05-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, complex ** complex works fine, and "TypeError: pow() 3rd argument not allowed unless all arguments are integers". -- nosy: +terry.reedy ___ Python tracker

[issue44081] ast.unparse: dont use redundant space separator for lambdas with no parameters

2021-05-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Agreed. unparse is already correct if there is a parameter. >>> ast.unparse(ast.parse("lambda x: 'hey!'")) "lambda x: 'hey!'" -- nosy: +terry.reedy ___ Python tracker

[issue44078] Output relative path when using PurePath.relative_to

2021-05-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pathlib's relative_to should behave like os.path.relpath ___ Python tracker

[issue44107] HTTPServer can't close http client completely

2021-05-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.8 only gets security fixes. Please verify issue on a current release. -- nosy: +terry.reedy ___ Python tracker ___

[issue40358] pathlib's relative_to should behave like os.path.relpath

2021-05-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: On #44078 (closed as duplicate), Mark Hammond made a similar request. -- nosy: +terry.reedy versions: +Python 3.11 -Python 3.10 ___ Python tracker

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-05-14 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44139] Unparenthesized tuple doc bug in what's new

2021-05-14 Thread Michael Cuthbert
New submission from Michael Cuthbert : The What's New in Python 3.10 docs demonstrates a richer SyntaxError for this set comprehension: >>> {x,y for x,y in range(100)} File "", line 1 {x,y for x,y in range(100)} ^ SyntaxError: did you forget parentheses around the comprehension

[issue44115] Improve conversions for fractions

2021-05-14 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

2021-05-14 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24767 pull_request: https://github.com/python/cpython/pull/26128 ___ Python tracker ___

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-14 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Is there a deterministic way to test these changes? Will something a la this be sufficient: import gc import sys gc.collect() before = sys.gettotalrefcount() import somemod del sys.modules['somemod'] del somemod gc.collect() after =

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Miguel Brito
Miguel Brito added the comment: I prototyped something by adding `suffix`, `suffixes`, and `stem`. To me these are the most obvious ones and would be useful right away. Regarding the others I'm not so sure. It seems that zipfile.Path is just a convenient class to provide basic navigational

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- resolution: -> wont fix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44126] Cross Compile Cython Modules

2021-05-14 Thread Ned Deily
Ned Deily added the comment: Ah, that makes more sense. Alas, while there has been some support for various cross-compiling scenarios added to cPython itself, including targeting for Android, for the most part they are not well-documented if at all and are not regularly tested as part of

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-05-14 Thread Stefan Behnel
Change by Stefan Behnel : -- Removed message: https://bugs.python.org/msg393667 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32133] documentation: numbers module nitpick

2021-05-14 Thread Bhaskara Aditya Sriram
Bhaskara Aditya Sriram added the comment: I would like work on this, but I'm very new to fixing bugs. Could someone please help me on how to proceed with this bug. Thank You in advance -- nosy: +adityasriram.b ___ Python tracker

[issue44132] Local import conflict with system import

2021-05-14 Thread Oscar
New submission from Oscar : Not sure if this is the right place to post this, but I stumble upon the following error. I have the following directory structure $ tree /F Folder PATH listing Volume serial number is C100 B8C8:3DC4 C:. │ requirements.txt │ run_repro.bat │ └───testdriver

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I suspected right. This was just CPU instability. In fact the patch is 1x-2x slower as reported by pyperf. Therefore I'm closing this issue. Though I'm working on another "yet to be failed attempt" to remove or rewrite the GIL to improve performance. Of

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Miguel Brito
Change by Miguel Brito : -- keywords: +patch pull_requests: +24768 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26129 ___ Python tracker ___

[issue44123] make function parameter sentinel value true singletons

2021-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not understand the problem with pickling sentinel values used as default values for function parameters. Could you please show an example? -- nosy: +serhiy.storchaka ___ Python tracker

[issue44117] [C API] Remove deprecated PyEval_InitThreads()

2021-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should not they be kept for binary compatibility, so you can link with extensions compiled for older Python versions? They can be removed from headers, so newly compiled extensions will not be able to use them. -- nosy: +serhiy.storchaka

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I attached the pyperf benchmark also. -- Added file: https://bugs.python.org/file50041/benchmark.py ___ Python tracker ___

[issue44130] GIL Improvement

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: > Mean +- std dev: 455 ms +- 13 ms A single benchmark is useless without a reference. Please run the benchmark on unpatched python, then run it again on a patched Python, and compare results. You can store benchmark results using -o option. Example: #

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-05-14 Thread Stefan Behnel
Stefan Behnel added the comment: Should we allow empty CFrame entries (with a NULL Frame pointer) that only use their "use_tracing" flag? That would make it easy for code to append and remove such an entry in order to temporarily disable tracing. --

[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2021-05-14 Thread Paul Ganssle
Paul Ganssle added the comment: @Terry > The problem with random input tests in not that they are 'flakey', but that > they are useless unless someone is going to pay attention to failures and try > to find the cause. This touches on the difference between regression testing > and

[issue44130] GIL Improvement

2021-05-14 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: pyperf results - Mean +- std dev: 455 ms +- 13 ms Looks a little bit faster than current 3.11, 3.10 and 3.9 versions. -- ___ Python tracker

[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-14 Thread Ken Jin
Ken Jin added the comment: All patches have landed. Thanks Guido! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44130] GIL Improvement

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: > I attached the pyperf benchmark also. Can you please provide pyperf_benchmark.py results? -- ___ Python tracker ___

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-05-14 Thread Stefan Behnel
Stefan Behnel added the comment: I just noticed that new C-API functions are probably useless for Cython since I think it will have to maintain the CFrame stack, so not to enable "use_tracing" for the (Python) caller but the current (Cython) function. This then means that we own The current

[issue44135] issubclass documentation doesn't explain tuple semantic

2021-05-14 Thread João Henrique Pimentel
New submission from João Henrique Pimentel : The second parameter (classinfo) of the issubclass built-in function can be a Tuple and, starting from 3.10, it can be a Union Type as well. The documentation states that in these cases "every entry in classinfo will be checked", but it doesn't

[issue44136] Remove pathlib flavours

2021-05-14 Thread Barney Gale
New submission from Barney Gale : Following bpo-39899, bpo-43757 and bpo-43012, `pathlib._Flavour` and its subclasses are looking a bit pointless. The implementations of `is_reserved()` and `make_uri()` (~`as_uri()`) can be readily moved to into `PurePosixPath` and `PureWindowsPath`, which

[issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

2021-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +24771 pull_request: https://github.com/python/cpython/pull/26137 ___ Python tracker ___

[issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

2021-05-14 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

2021-05-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +24770 pull_request: https://github.com/python/cpython/pull/26136 ___ Python tracker

[issue44137] importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager

2021-05-14 Thread Nils Kattenbeck
Change by Nils Kattenbeck : -- title: importlib.resources.path raises RuntimeError import FileNotFoundError is raise in context manager -> importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager ___ Python

[issue44137] importlib.resources.path raises RuntimeError import FileNotFoundError is raise in context manager

2021-05-14 Thread Nils Kattenbeck
New submission from Nils Kattenbeck : When a FileNotFoundError is raised inside while the importlib.resources.path context manager is active a RuntimeError is raised. Looking at the (3.8) code it seems that FileNotFound exceptions are handled specially from all other exceptions which may lead

[issue44123] make function parameter sentinel value true singletons

2021-05-14 Thread Tal Einat
Tal Einat added the comment: > I do not understand the problem with pickling sentinel values used as default > values for function parameters. Could you please show an example? A category of relevant uses I can think of is when wrapping a function and storing the parameters it was called

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

2021-05-14 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44109] missing dataclass decorator in match-statement example

2021-05-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Thoughts from others? As it stands, the Point class is weird and atypical by only using class variables. The example would be improved by adding @dataclass or inheriting from typing.NamedTuple. -- nosy: +rhettinger

[issue44133] "Py_FrozenMain" symbol is not exported

2021-05-14 Thread STINNER Victor
New submission from STINNER Victor : When Python is built without --enable-shared, the "Py_FrozenMain" is not exported. When Python is built with --enable-shared, the "Py_FrozenMain" is exported as expected. I can reproduce the issue with attached reproduce.tar.gz example: * build.sh

[issue44133] "Py_FrozenMain" symbol is not exported

2021-05-14 Thread STINNER Victor
STINNER Victor added the comment: The "python" binary exports 1610 symbols. With the attached fix, it exports 1611 symbols (+1): "Py_FrozenMain" is also exported :-) -- ___ Python tracker

[issue37891] Exceptions tutorial page does not mention raise from

2021-05-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for looking. This issue does appear to be out of date. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue44133] "Py_FrozenMain" symbol is not exported

2021-05-14 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +24769 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26130 ___ Python tracker ___

[issue32133] documentation: numbers module nitpick

2021-05-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's a minimal change: - None of the types defined in this module can be instantiated. + None of the types defined in this module are intended to be instantiated. -- nosy: +rhettinger ___ Python tracker

  1   2   >