[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: I suggest to remove the (now <= 0) check. _PyTime_t now = _PyTime_GetPerfCounter(); if (now <= 0) { Py_FatalError("_PyTime_GetPerfCounter() == 0"); } Please don't add such Py_FatalError() in the middle of a function. If thi

[issue44409] compile raises SyntaxError with undocumented lineno attribute None

2021-06-14 Thread Florian Weimer
Florian Weimer added the comment: I suppose changing the documentation to mention `None` would be possible as well, but restoring the old behavior works for me too. Thanks. -- ___ Python tracker ___

[issue44416] test_threading: test_print_exception() hangs and killed after 3h15

2021-06-14 Thread STINNER Victor
New submission from STINNER Victor : AMD64 Windows8.1 Refleaks 3.9: https://buildbot.python.org/all/#/builders/6/builds/48 4:03:35 load avg: 3.98 [425/425/1] test_threading crashed (Exit code 1) beginning 6 repetitions 123456 Timeout (3:15:00)! Thread 0x0748 (most recent call first): File

[issue44416] test_threading: test_print_exception() hangs and killed after 3h15 on AMD64 Windows8.1 Refleaks 3.9

2021-06-14 Thread STINNER Victor
Change by STINNER Victor : -- title: test_threading: test_print_exception() hangs and killed after 3h15 -> test_threading: test_print_exception() hangs and killed after 3h15 on AMD64 Windows8.1 Refleaks 3.9 ___ Python tracker

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-14 Thread Ryan Hileman
Ryan Hileman added the comment: I agree with not throwing fatal errors, but that check is unlikely to actually be hit, and you removed the startup checks covering the underlying clocks here: https://github.com/python/cpython/commit/ae6cd7cfdab0599139002c526953d907696d9eef I think if the time

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-14 Thread Ryan Hileman
Ryan Hileman added the comment: Perhaps the simplest initial fix would be to move that check down to PyThread__init_thread() in the same file. I'm not sure what the cpython convention for that kind of init error is, would it just be the same Py_FatalError block or is there a better pattern?

[issue44328] time.monotonic() should use a different clock source on Windows

2021-06-14 Thread Eryk Sun
Eryk Sun added the comment: > Seems like Windows 7 may need to be considered as well, as > per vstinner's bpo-32592 mention? Python 3.9 doesn't support Windows 7. Moreover, the interpreter DLL in 3.9 implicitly imports PathCchCanonicalizeEx, PathCchCombineEx, and PathCchSkipRoot, which were

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-14 Thread Mark Dickinson
Mark Dickinson added the comment: > Does this change need to be mentioned in What's New? Yes, I think so, given that it's a change to documented behavior. It's also something that third party packages (like NumPy) potentially need to be aware of. --

[issue44328] time.monotonic() should use a different clock source on Windows

2021-06-14 Thread Ryan Hileman
Ryan Hileman added the comment: > It shouldn't behave drastically different just because the user closed the > laptop lid for an hour I talked to someone who's been helping with the Go time APIs and it seems like that holds pretty well for interactive timeouts, but makes no sense for network

[issue44415] sys.stdout.flush and print() hanging

2021-06-14 Thread Rajeev Chaurasia
Rajeev Chaurasia added the comment: self.logger = lib.logger.Log() We have cronjob entry to call the application everyday $crontab -e 0 1 * * * /scratch/rajeev/cronjob/exachk.sh exachk.sh makes call to my python application as- python3 /opt/oracle.ahf/exachk/exachk.py Yes I am redirecting st

[issue44338] Port LOAD_GLOBAL to adaptive interpreter

2021-06-14 Thread Mark Shannon
Mark Shannon added the comment: New changeset eecbc7c3900a7f40d8498b151db543a202c72f74 by Mark Shannon in branch 'main': bpo-44338: Port LOAD_GLOBAL to PEP 659 adaptive interpreter (GH-26638) https://github.com/python/cpython/commit/eecbc7c3900a7f40d8498b151db543a202c72f74 -- _

[issue44417] bytecode<>line number mapping seems wrong in 3.10.0b2

2021-06-14 Thread Gabriele N Tornetta
New submission from Gabriele N Tornetta : I was looking at how the new co_linetable works in order to add initial support for Python 3.10 to Austin (https://github.com/P403n1x87/austin) when I stumbled upon the following interesting output from the dis module. I am using the following test ta

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-06-14 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-06-14 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 6.0 -> 7.0 pull_requests: +25305 pull_request: https://github.com/python/cpython/pull/26717 ___ Python tracker ___ __

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: I'm fine with adding _PyTime_Init() again, and maybe only implement checks on Windows. On Linux, I only saw a single failure in _PyTime_Init() once, when Python was run in a sandbox, and the time syscalls were not allowed. It was a corner case about the new

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > I mention the QueryPerformanceFrequency error case here (stack misalignment): > https://bugs.python.org/issue41299#msg395237 Do you think that pytime.c has the bug? I don't think so. > There are three places win_perf_counter_frequency() can fail: > https:

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm not working on this. Feel free to work on a PR. -- ___ Python tracker ___ ___ Python-bugs-li

[issue44417] bytecode<>line number mapping seems wrong in 3.10.0b2

2021-06-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue44337] Port LOAD_ATTR to adaptive interpreter

2021-06-14 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +25306 pull_request: https://github.com/python/cpython/pull/26718 ___ Python tracker ___

[issue38460] 3.8 Release Notes: document asyncio exception changes

2021-06-14 Thread Sebastian Rittau
Change by Sebastian Rittau : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue38460] 3.8 Release Notes: document asyncio exception changes

2021-06-14 Thread Sebastian Rittau
Sebastian Rittau added the comment: Closing per the comments by Andrew and Raymond and the fact that 3.8 has been released for quite some while now. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
New submission from Miro Hrončok : In bpo-42157, the unicodedata.ucnhash_CAPI attribute was removed without deprecation. This breaks at least https://github.com/dgrunwald/rust-cpython with: AttributeError: module 'unicodedata' has no attribute 'ucnhash_CAPI' Please revert the removal and

[issue44417] bytecode<>line number mapping and f_lasti seem wrong in 3.10.0b2

2021-06-14 Thread Gabriele N Tornetta
Change by Gabriele N Tornetta : -- title: bytecode<>line number mapping seems wrong in 3.10.0b2 -> bytecode<>line number mapping and f_lasti seem wrong in 3.10.0b2 ___ Python tracker

[issue44415] sys.stdout.flush and print() hanging

2021-06-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not know what are lib.logger.Log and lib.debugger.Tee, but I guess that lib.logger.Log() creates a logger which writes to sys.stdout, and lib.debugger.Tee() is a file-like object which writes to the specified file and to standard output. Standard out

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread Sebastian Rittau
Change by Sebastian Rittau : -- pull_requests: +25307 pull_request: https://github.com/python/cpython/pull/26719 ___ Python tracker ___

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread Sebastian Rittau
Sebastian Rittau added the comment: And I opened a second PR (for Python 3.11 only) to issue a deprecation warning when typing.io or typing.re gets imported. -- ___ Python tracker __

[issue44417] bytecode<>line number mapping and f_lasti seem wrong in 3.10.0b2

2021-06-14 Thread Mark Shannon
Mark Shannon added the comment: What does "seem wrong" mean? What exactly is the problem? -- ___ Python tracker ___ ___ Python-bugs

[issue44310] Document that lru_cache uses hard references

2021-06-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 809c3faa032d32bc45a0fa54d0400fcbc42a618f by Miss Islington (bot) in branch '3.10': bpo-44310: Note that lru_cache keep references to both arguments and results (GH-26715) (GH-26716) https://github.com/python/cpython/commit/809c3faa032d32bc4

[issue44283] Add jump table for certain safe match-case statements

2021-06-14 Thread Mark Shannon
Mark Shannon added the comment: This is going in the wrong direction. Rather than add more complex instructions for use only by pattern matching, we need to simplify the individual operations and re-use existing instructions. That way pattern matching can benefit from the general performance

[issue44419] Wrong division calculation for numbers more than 16 digits

2021-06-14 Thread Abbas Baharforoosh
New submission from Abbas Baharforoosh : Hi For big numbers (more than about 16 digits), python wrong calculate division, but calculating mod (%) is correct. I write a sample code of manual division in file. Thanks -- files: big_number.py messages: 395798 nosy: abahar1996 priority: n

[issue35089] Remove typing.io and typing.re from documentation

2021-06-14 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 8a76683cfb842e12b57f6d276839f6c68fd94e1a by Sebastian Rittau in branch 'main': bpo-38291: Remove mention of typing.io and typing.re again (GH-26113) https://github.com/python/cpython/commit/8a76683cfb842e12b57f6d276839f6c68fd94e1a --

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +25310 pull_request: https://github.com/python/cpython/pull/26721 ___ Python tracker ___ __

[issue35089] Remove typing.io and typing.re from documentation

2021-06-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +25309 pull_request: https://github.com/python/cpython/pull/26720 ___ Python tracker ___ __

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 8a76683cfb842e12b57f6d276839f6c68fd94e1a by Sebastian Rittau in branch 'main': bpo-38291: Remove mention of typing.io and typing.re again (GH-26113) https://github.com/python/cpython/commit/8a76683cfb842e12b57f6d276839f6c68fd94e1a --

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +25308 pull_request: https://github.com/python/cpython/pull/26720 ___ Python tracker _

[issue35089] Remove typing.io and typing.re from documentation

2021-06-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +25311 pull_request: https://github.com/python/cpython/pull/26721 ___ Python tracker ___ __

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: It's not removed, it's renamed (by 84f7382215b9e024a5590454726b6ae4b0ca70a0, GH-22994, bpo-42157). You can access it using the '_ucnhash_CAPI' attribute. -- nosy: +erlendaasland ___ Python tracker

[issue35089] Remove typing.io and typing.re from documentation

2021-06-14 Thread miss-islington
miss-islington added the comment: New changeset fc310cb862ce0411bb5daed37f7f31b75647495b by Miss Islington (bot) in branch '3.10': bpo-38291: Remove mention of typing.io and typing.re again (GH-26113) https://github.com/python/cpython/commit/fc310cb862ce0411bb5daed37f7f31b75647495b

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread miss-islington
miss-islington added the comment: New changeset fc310cb862ce0411bb5daed37f7f31b75647495b by Miss Islington (bot) in branch '3.10': bpo-38291: Remove mention of typing.io and typing.re again (GH-26113) https://github.com/python/cpython/commit/fc310cb862ce0411bb5daed37f7f31b75647495b

[issue35089] Remove typing.io and typing.re from documentation

2021-06-14 Thread miss-islington
miss-islington added the comment: New changeset 7f021952b2debb51306f70ec96a94ecc7fbffc19 by Miss Islington (bot) in branch '3.9': bpo-38291: Remove mention of typing.io and typing.re again (GH-26113) https://github.com/python/cpython/commit/7f021952b2debb51306f70ec96a94ecc7fbffc19 -

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread miss-islington
miss-islington added the comment: New changeset 7f021952b2debb51306f70ec96a94ecc7fbffc19 by Miss Islington (bot) in branch '3.9': bpo-38291: Remove mention of typing.io and typing.re again (GH-26113) https://github.com/python/cpython/commit/7f021952b2debb51306f70ec96a94ecc7fbffc19 -

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: Right. Nevertheless, the reaming has effectively removed the old name. -- ___ Python tracker ___ ___

[issue44419] Wrong division calculation for numbers more than 16 digits

2021-06-14 Thread Zachary Ware
Zachary Ware added the comment: The `/` operator does true division, which means the result will be a `float` rather than an `int`. When the resultant float is large enough, precision will be lost. You can use the `//` operator for floor (integer) division, where the result will remain as

[issue42387] Pdb should restore the execution environment before reexecuting the target

2021-06-14 Thread Irit Katriel
Irit Katriel added the comment: I recently fixed a bug where breakpoints were not saved properly between reruns of the program - the assumption there was that if you set a breakpoint you don't want to have to set it again and again. Similarly, how do you know that the change to sys.path was

[issue44283] Add jump table for certain safe match-case statements

2021-06-14 Thread Brandt Bucher
Brandt Bucher added the comment: Sorry, I’ve been out on vacation this weekend. I didn’t realize that there was already a PR for this… I’m honestly not sure that it’s totally ready yet. While I absolutely agree that compiling efficient decision trees lies in our future, it certainly seems to

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-14 Thread Jacob Walls
Jacob Walls added the comment: With the followup patch merged, can this be closed now? -- nosy: +jacobtylerwalls ___ Python tracker ___ ___

[issue44409] compile raises SyntaxError with undocumented lineno attribute None

2021-06-14 Thread miss-islington
Change by miss-islington : -- keywords: +patch nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25312 pull_request: https://github.com/python/cpython/pull/26722 ___ Python tracker

[issue44409] compile raises SyntaxError with undocumented lineno attribute None

2021-06-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 507ed6fa1d6661e0f8e6d3282764aa9625a99594 by Pablo Galindo in branch 'main': bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712) https://github.com/python/cpython/commit/507ed6fa1d6661e0f8e6d3282

[issue44409] compile raises SyntaxError with undocumented lineno attribute None

2021-06-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25313 pull_request: https://github.com/python/cpython/pull/26723 ___ Python tracker ___ ___

[issue25682] __package__ not set to None under pdb in Python 3

2021-06-14 Thread Irit Katriel
Irit Katriel added the comment: pdb imports the module with importlib, and populates __main__ with data from its spec, including the package. This doesn't contradict the fact that the python command line can have only one "-m". What is the actual problem here? -- nosy: +iritkatriel

[issue44283] Add jump table for certain safe match-case statements

2021-06-14 Thread Brandt Bucher
Brandt Bucher added the comment: Also (because some of the people who might be interested are nosied on this issue), I’ve been working a bit on general performance benchmarks for our pattern-matching implementation: https://github.com/brandtbucher/patmaperformance I still need something that

[issue44409] compile raises SyntaxError with undocumented lineno attribute None

2021-06-14 Thread miss-islington
miss-islington added the comment: New changeset 133cddf76e8265536c584872351c191e3afd66a2 by Miss Islington (bot) in branch '3.10': bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712) https://github.com/python/cpython/commit/133cddf76e8265536c5848723

[issue44409] compile raises SyntaxError with undocumented lineno attribute None

2021-06-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 0d0a9eaa822658679cc2b65f125ab74bfd4aedfe by Pablo Galindo in branch '3.9': [3.9] bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712). (GH-26723) https://github.com/python/cpython/commit/0d0a9eaa

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot about this issue. Let me rebuild the context. Copy of the What's New in Python 3.10 entry: "Removed the unicodedata.ucnhash_CAPI attribute which was an internal PyCapsule object. The related private _PyUnicode_Name_CAPI structure was moved to th

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > This breaks at least https://github.com/dgrunwald/rust-cpython When I search for "ucnhash_CAPI" in the GitHub search, I only find commented code: https://github.com/dgrunwald/rust-cpython/blob/b63d691addc978952380a8eb146d01a444e16e7a/src/objects/capsule.rs

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +25314 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26724 ___ Python tracker ___

[issue44417] bytecode<>line number mapping and f_lasti seem wrong in 3.10.0b2

2021-06-14 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: I think I managed to find the source of the confusion. This seems to be due to https://github.com/python/cpython/commit/fcb55c0037baab6f98f91ee38ce84b6f874f034a, with the f_lasti from the C struct now being half of the value returned by the f_lasti attr

[issue44409] compile raises SyntaxError with undocumented lineno attribute None

2021-06-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: All details I have about rust-cpython are that it fails tests with: AttributeError: module 'unicodedata' has no attribute 'ucnhash_CAPI' See the test failures in https://koschei.fedoraproject.org/package/rust-cpython e.g.: src/objects/capsule.rs - obj

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: The UCD_Check() issue was discussed in Mohamed Koubaa's PRs: * https://github.com/python/cpython/pull/22145 (closed) <= HERE * https://github.com/python/cpython/pull/22328 (merged) * https://github.com/python/cpython/pull/22490 (closed) -- __

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > (Note that there are also other failures regarding an implicit float->int > conversion, but they seem to be caused by a change that followed the > deprecation period.) Does it mean that rust-cpython was broken in Python 3.10 even if a change was prepared

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, maybe it was a mistake to expose this? Remind me what use is made of this from C code? Can we remove this from the stable API during beta? It was never exposed before. -- nosy: +Guido.van.Rossum ___ Python t

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: > Does it mean that rust-cpython was broken in Python 3.10 even if a change was > prepared with a deprecation period if Python 3.9? Does it mean that the > deprecation period was inefficient on this project? I don't see any deprecation warning when running the

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: If we decide to restore the C API to the Python 3.9 C API, *all* changes done in the unicodedata in Python 3.10 should be reverted, since early changes already changed/broke the C API, and following changes rely on that. -- _

[issue44419] Wrong division calculation for numbers more than 16 digits

2021-06-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: Also please read this: https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate -- nosy: +steven.daprano ___ Python tracker

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It could be useful for C extensions that want to support PEP 585 for their types, such as numpy's array type. -- nosy: +Jelle Zijlstra ___ Python tracker __

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, but is that what they are doing? I assume that they use stub files, since static type checkers don’t introspect the runtime API. -- ___ Python tracker

[issue44402] Python 3.9 and 3.10 fails to install in WINE

2021-06-14 Thread Steve Dower
Steve Dower added the comment: WINE is not a platform that we officially support, and for the installer, I'm willing to say that we never will. Our installer is based on the WiX Toolset, so anything that can be fixed will have to be fixed by them first. It's possible that they have already f

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: They'd still need runtime support from GenericAlias to allow users to write `numpy.ndarray[int]` at runtime. -- ___ Python tracker ___ _

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Douglas Thor
New submission from Douglas Thor : Has there been any discussion on adding CapWords class names to the datetime.py module? I searched through the bug tracker ("CapWords" and "CamelCase") and didn't find anything, but perhaps I'm not searching for the correct keywords. Eg: ``` # datetime.py

[issue34025] SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76)

2021-06-14 Thread Douglas Thor
Change by Douglas Thor : -- nosy: +dougthor42 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue34025] SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76)

2021-06-14 Thread Douglas Thor
Change by Douglas Thor : -- nosy: -Douglas Thor ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ken Jin
Ken Jin added the comment: > maybe it was a mistake to expose this I was wondering if this was accidentally added at the time too. > Remind me what use is made of this from C code It's required for a C extension type to implement the __class_getitem__ method properly. Eg. ``MyCType[int]``.

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe the docs then should contain a more-or-less complete example showing how a 3rd party type should use this? -- ___ Python tracker ___

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-14 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +25315 pull_request: https://github.com/python/cpython/pull/26725 ___ Python tracker ___ __

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ken Jin
Ken Jin added the comment: (Copied over from the PR) BTW, I also noticed the stable ABI manifest exposes the wrong return type for Py_GenericAliasType. It exposes it as a function when it's a var/type/struct. So I fixed that in the PR too otherwise the docs weren't compiling (I can split th

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: Changing versions: this could only be added to 3.11. I think the ship has sailed on this. The old names could never be removed so we'd have to support both names forever. I think it's not worth the hassle. -- nosy: +eric.smith versions: -Python 3.10,

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-14 Thread Ryan Hileman
Ryan Hileman added the comment: > Do you think that pytime.c has the bug? I don't think so. No, a misaligned stack would be an issue in the caller or compiler, not pytime.c. I have hit misaligned stack in practice, but it should be rare enough to check on init only. > In theory yes, in prac

[issue44421] random.uniform() hangs will eating up all available RAM

2021-06-14 Thread Christian Kleineidam
New submission from Christian Kleineidam : I'm writing a model that needs a lot of random numbers. The model counts up to "Year:640: Count:1339" (taking around two minutes) and then hangs on random.uniform(0, 1). While it hangs, the amount of RAM python takes grows till it eats up all availab

[issue44369] Improve syntax error for wrongly closed strings

2021-06-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: One problem with that is that the lookahead will move the error indicator to some incorrect place if the match fails. For example: PYTHON3.9 >>> "dfssdfsdfsd" fdsf sdfsdfsd {} File "", line 1 "dfssdfsdfsd" fdsf sdfsdfsd {} ^ Sy

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-14 Thread Jack DeVries
Change by Jack DeVries : -- nosy: -jack__d ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Sounds like an easy solution is to open an issue/PR against rust-cpython to update the doctest, IMO. -- ___ Python tracker ___ __

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: Updating the doctest is certainly a good solution for this particular project. However I still think this regression deserves to be resolved. This was part of the API, whether intended or not. -- ___ Python tracker

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-14 Thread Ethan Furman
Ethan Furman added the comment: Yup, just had to get back from the weekend. :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-14 Thread Jack DeVries
Change by Jack DeVries : -- pull_requests: -25270 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Petr Viktorin
Petr Viktorin added the comment: > Can we remove this from the stable API during beta? It was added (to PC/python3.def) in 3.9, so removing in 3.10 beta wouldn't be good. It can be deprecated; should it? -- ___ Python tracker

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > https://github.com/dgrunwald/rust-cpython/blob/b63d691addc978952380a8eb146d01a444e16e7a/src/objects/capsule.rs A friend explained me that it's a doctest and unicodedata.ucnhash_CAPI was picked as an example, but any other capsule could be used to test the C

[issue44421] random.uniform() hangs will eating up all available RAM

2021-06-14 Thread Jack DeVries
Jack DeVries added the comment: This doesn't look like a bug. It's hard to disentangle what your code is doing, exactly, but it's most likely that between all your nested loops and classes initializing each other, there is an exponential or greater growth in time complexity happening. As you

[issue44342] enum with inherited type won't pickle

2021-06-14 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +25316 pull_request: https://github.com/python/cpython/pull/26726 ___ Python tracker ___

[issue31289] File paths in exception traceback resolve symlinks

2021-06-14 Thread Irit Katriel
Irit Katriel added the comment: Closing as there doesn't seem to be interest in this currently. If you would like to pursue it, please bring it up for discussion on python-ideas. The semantics you request are not the only obvious option, so this needs to be agreed. -- stage: -> res

[issue31248] method wrapper type has invalid __name__/__qualname__ 'method-wrapper'

2021-06-14 Thread Irit Katriel
Irit Katriel added the comment: Closing as it's not clear what the problem is. Please reopen or create a new issue if you can explain. -- resolution: -> not a bug stage: -> resolved status: pending -> closed ___ Python tracker

[issue3014] file_dealloc() assumes errno is set when EOF is returned

2021-06-14 Thread Irit Katriel
Change by Irit Katriel : -- stage: patch review -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mai

[issue29799] Add tests for header API of 'urllib.request.Request' class

2021-06-14 Thread Irit Katriel
Irit Katriel added the comment: Closing as this seems abandoned. Please reopen or create a new issue if you would like to continue working on it. -- stage: -> resolved status: pending -> closed ___ Python tracker

[issue7089] shlex behaves unexpected if newlines are not whitespace

2021-06-14 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue7089] shlex behaves unexpected if newlines are not whitespace

2021-06-14 Thread Irit Katriel
Irit Katriel added the comment: I've reproduced on 3.11. -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > My read is that as long as we're not confident enough to remove those checks > from pytime.c, a caller should assume they're reachable. If the pytime checks > need to stay, adding a Windows only pytime init check to make sure that locks > won't deadlock so

[issue44328] time.monotonic() should use a different clock source on Windows

2021-06-14 Thread Eryk Sun
Eryk Sun added the comment: >> Try changing EnterNonRecursiveMutex() to break out of the loop in >> this case > > This does work, but unfortunately a little too well - in a single > test I saw several instances where that approach returned > _earlier_ than the timeout. It's documented that

[issue44421] random.uniform() hangs will eating up all available RAM

2021-06-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Jack. There is no evidence of a bug in Python itself and it is not reasonable to ask us the study and debug your obfuscated code. I just ran random.uniform() in a tight loop for several minutes and observed no deleterious effects. Am markin

[issue44421] random.uniform() hangs will eating up all available RAM

2021-06-14 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-14 Thread STINNER Victor
New submission from STINNER Victor : The threading.enumerate() code is simple: --- # Active thread administration _active_limbo_lock = _allocate_lock() _active = {}# maps thread id to Thread object _limbo = {} def enumerate(): with _active_limbo_lock: return list(_active.values(

  1   2   >