[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: Other tests are also affected: - `./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testSecondInterrupt test_unittest -F` - `./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testTwoResults test_unittest -

[issue46717] Raising exception multiple times leaks memory

2022-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Did you try to print a traceback of the exception? -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: I think this might be a side effect of https://docs.python.org/3/library/signal.html#execution-of-python-signal-handlers > A Python signal handler does not get executed inside the low-level (C) signal > handler. Instead, the low-level signal handler sets a f

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: I am trying to debug this. Several intersting notes: 1. `time.sleep()` does not help 2. It always fails on `8`th turn 3. Changing `self.assertTrue(result.shouldStop)` to ``` msg = f'{type(result)} {vars(result)}' self.assertTrue(result.shouldStop, msg) ``` f

[issue45451] IDLE - modify text frame and widget borders

2022-02-10 Thread Ashlyn Woods
Ashlyn Woods added the comment: In addition, I would encourage that people in future try to get a bigger gauge of how many people actually want a feature like this, how many don't, and then make a decision about whether to put it in- considering that there have been a fair few cases where pe

[issue45451] IDLE - modify text frame and widget borders

2022-02-10 Thread Ashleigh Woods
Ashleigh Woods added the comment: At a minimum, I think that there should be a toggle for whether this should be present or not, without having to dig in and change the values in IDLE (with, I'd like to note, absolutely no clue where to do that!). This is particularly an issue for beginners.

[issue46705] Memory optimization for set.issubset

2022-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Would not testing len(self.difference(other)) == 0 > be more efficient? Yes, I think so. -- Added file: https://bugs.python.org/file50620/instrument_issubset.py ___ Python tracker

[issue46717] Raising exception multiple times leaks memory

2022-02-10 Thread Dennis Sweeney
Dennis Sweeney added the comment: I reproduced as far back as Python 3.6 with this: --- import gc exc = Exception() deltas = [] for i in range(2, 15): ref1 = len(gc.get_objects()) for j in range(2**i): try: raise exc except

[issue46717] Raising exception multiple times leaks memory

2022-02-10 Thread Ethan Furman
Change by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue46717] Raising exception multiple times leaks memory

2022-02-10 Thread George Gensure
New submission from George Gensure : Instantiating an exception and raising it multiple times causes 1 frame and 2 traceback objects to remain allocated for each raise. The attached example causes python to consume 8GB of ram after a few seconds of execution on Windows/Linux. -- comp

[issue46400] Please update bundled libexpat to 2.4.4 with security fixes (CVE-2021-45960)

2022-02-10 Thread STINNER Victor
Change by STINNER Victor : -- title: Please update bundled libexpat to 2.4.4 with security fixes -> Please update bundled libexpat to 2.4.4 with security fixes (CVE-2021-45960) ___ Python tracker ___

[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-02-10 Thread miss-islington
miss-islington added the comment: New changeset 1124ab6d1d15dc5058e03b63fd1d95e6f1009cc3 by Miss Islington (bot) in branch '3.10': bpo-46246: add missing __slots__ to importlib.metadata.DeprecatedList (GH-30452) https://github.com/python/cpython/commit/1124ab6d1d15dc5058e03b63fd1d95e6f1009cc3

[issue46716] regrtest didn't respect the timeout when running test_subprocess on AMD64 Windows11 3.x

2022-02-10 Thread Jeremy Kloth
Jeremy Kloth added the comment: The test only completed once I purposefully terminated the offending Python process. The only identifying information I noticed was the command-line of `-c "while True: pass"`, indicating it was stuck in either test_call_timeout() or test_timeout() in test_sub

[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-02-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +29433 pull_request: https://github.com/python/cpython/pull/31269 ___ Python tracker ___ __

[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-02-10 Thread miss-islington
miss-islington added the comment: New changeset dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d by Arie Bovenberg in branch 'main': bpo-46246: add missing __slots__ to importlib.metadata.DeprecatedList (GH-30452) https://github.com/python/cpython/commit/dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d ---

[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-02-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm pretty sure both EntryPoints and DeprecatedList were introduced in Python 3.10, so 3.9 and 3.8 aren't relevant. -- versions: -Python 3.8, Python 3.9 ___ Python tracker __

[issue46705] Memory optimization for set.issubset

2022-02-10 Thread Jack Nguyen
Change by Jack Nguyen : -- keywords: +patch pull_requests: +29432 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31267 ___ Python tracker ___

[issue46705] Memory optimization for set.issubset

2022-02-10 Thread Jack Nguyen
Jack Nguyen added the comment: As you say, which implementation performs better likely depends on the nature of the sets. I would suspect that using set.difference won't be substantially faster than using set.intersection in the best case, but it would be much slower if len(self) is much lar

[issue36876] [subinterpreters] Global C variables are a problem

2022-02-10 Thread Eric Snow
Eric Snow added the comment: New changeset 80e4f262aa27a39abf3fadc19a6323fea4607a8f by Eric Snow in branch 'main': bpo-36876: Make sure the c-analyzer is checking all the source files.' (gh-31264) https://github.com/python/cpython/commit/80e4f262aa27a39abf3fadc19a6323fea4607a8f --

[issue46716] regrtest didn't respect the timeout when running test_subprocess on AMD64 Windows11 3.x

2022-02-10 Thread STINNER Victor
Change by STINNER Victor : -- title: regrtest didn't respect the timeout on AMD64 Windows11 3.x -> regrtest didn't respect the timeout when running test_subprocess on AMD64 Windows11 3.x ___ Python tracker _

[issue46716] regrtest didn't respect the timeout on AMD64 Windows11 3.x

2022-02-10 Thread STINNER Victor
New submission from STINNER Victor : regrtest was run with --timeout 900 on AMD64 Windows11 3.x: timeout confirmed by "(timeout: 15 min, worker timeout: 20 min)" log. But then test_subprocss was only stopped after "4 hour 55 min". If the regrtest main process is able to display an update 2x pe

[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-10 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 035414a878a772d1d293cdecdc4470bcce5e5d7a by Dennis Sweeney in branch 'main': bpo-44953: Add newline at end of NEWS entry (GH-31265) https://github.com/python/cpython/commit/035414a878a772d1d293cdecdc4470bcce5e5d7a -- _

[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-10 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +29431 pull_request: https://github.com/python/cpython/pull/31265 ___ Python tracker ___ __

[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +rhettinger type: -> performance versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-li

[issue36876] [subinterpreters] Global C variables are a problem

2022-02-10 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +29430 pull_request: https://github.com/python/cpython/pull/31264 ___ Python tracker ___ ___

[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-10 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 0a145069e807fdafd1fa0315b9bc22da363d2d39 by Dennis Sweeney in branch 'main': bpo-44953: Add vectorcall for itemgetter and attrgetter instances (GH-27828) https://github.com/python/cpython/commit/0a145069e807fdafd1fa0315b9bc22da363d2d39 ---

[issue46715] asyncio.create_unix_server has an off-by-one error concerning the backlog parameter

2022-02-10 Thread John Snow
New submission from John Snow : Hi, asyncio.create_unix_server appears to treat the "backlog" parameter as where 0 means that *no connection will ever possibly be pending*, which (at the very least for UNIX sockets on my machine) is untrue. Consider a (non-asyncio) server: ```python import o

[issue46714] Python 3.10 - Users (except from the one who installed) not able to see python in add remove programs.

2022-02-10 Thread Steve Dower
Steve Dower added the comment: Thanks. This is being tracked in issue25166, and is waiting on a fix from our installer toolset, who have previously indicated that they're not interested in fixing it, but wouldn't rule it out in their next major version. -- resolution: -> duplicate s

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2022-02-10 Thread Géry
Change by Géry : -- nosy: +maggyero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue45670] New .mapping attribute is broken for some existing uses of dict views

2022-02-10 Thread Joshua Bronson
Joshua Bronson added the comment: Thank you for confirming that ChainMap.__iter__() would be in the same boat as bidict if a similar .mapping attribute were ever added to dict_keyiterators. The specifics of this issue are interesting, but even more interesting to me is whatever learnings we

[issue46714] Python 3.10 - Users (except from the one who installed) not able to see python in add remove programs.

2022-02-10 Thread richd
New submission from richd : Experiencing the same issue as reported in https://bugs.python.org/issue31011 When Python is deployed using an enterprise solution, Python is not displayed in Programs and Features. Examples: 1. Using PSExec as System to install Python 3.10.x, logged in users will

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2022-02-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: The tempora library implements a [portable strftime](https://tempora.readthedocs.io/en/latest/index.html#tempora.strftime). -- ___ Python tracker _

[issue46713] Provide a C implementation of collections.abc.KeysView and friends

2022-02-10 Thread Joshua Bronson
New submission from Joshua Bronson : As suggested by @rhettinger in https://bugs.python.org/msg409443, I'm creating a feature request for C implementations of collections.abc.KeysView, ValuesView, and ItemsView. Because these do not currently benefit from C speedups, they're a lot slower than

[issue33017] Special set-cookie setting will bypass Cookielib

2022-02-10 Thread Adrian Chaves
Adrian Chaves added the comment: So, PoC shows how an empty domain attribute (Domain=) is erroneously turned into a dot (.). I want to add that a dot (Domain=.) should be turned into an empty string (the specification asks to remove a leading dot if found). -- nosy: +adrian2 __

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-10 Thread hydroflask
hydroflask added the comment: Thanks again everyone, very much appreciated. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45923] Improve performance of sys.settracing based tools.

2022-02-10 Thread Mark Shannon
Mark Shannon added the comment: New changeset d7a5aca982def155a9255893cefcc1493c127c9c by Brandt Bucher in branch 'main': bpo-45923: Add `RESUME_QUICK` (GH-31244) https://github.com/python/cpython/commit/d7a5aca982def155a9255893cefcc1493c127c9c -- __

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-10 Thread Alex Waygood
Alex Waygood added the comment: @Guido, OP already has — Jelle and I have both reviewed and approved it :) -- ___ Python tracker ___ ___

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: "PR" -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2022-02-10 Thread Chris Larson
Chris Larson added the comment: Has there been any work/progress on this? Alternatively, what suggested work around/mitigations are suggested? -- nosy: +cklarson ___ Python tracker _

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: Go ahead and send a or to deprecate it.-- --Guido (mobile) -- ___ Python tracker ___ ___ Python

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-10 Thread Petr Viktorin
Petr Viktorin added the comment: Just 3.10, after all. 3.9 doesn't have the function yet. I did the backport, but I'd welcome a review by a fresh set of eyes! -- versions: -Python 3.9 ___ Python tracker __

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-10 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +29429 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/31262 ___ Python tracker ___

[issue46586] In documentation contents enum.property erroneously links to built-in property

2022-02-10 Thread Éric Araujo
Éric Araujo added the comment: Thinking about it again: The issue is that these tables (for sys.float_info and other named tuples / structseqs) use the const role, which is not meant to identify attributes but to link to them (similar to func, mod, data, etc). In other words we are fixing an

[issue46586] In documentation contents enum.property erroneously links to built-in property

2022-02-10 Thread Zachary Ware
Zachary Ware added the comment: An updated reST linting check was added between the time you created the PR and your last update. As Jelle noted on the PR, there doesn't need to be a NEWS entry for this anyway. We might have an issue there if sphinx-lint is going to have an issue with no t

[issue46586] In documentation contents enum.property erroneously links to built-in property

2022-02-10 Thread Meer Suri
Meer Suri added the comment: Can someone guide me on why I'm getting a no-new-line at end of file error for the NEWS entry when I didnt change this file in the last commit and it passed the Azure checks earlier Error: [1] ../Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFV

[issue46586] In documentation contents enum.property erroneously links to built-in property

2022-02-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: > How do I find other instances of this problem? Is there a systematic way to > look for such references? You could write a script that goes something like this, iterating over all the docs RST files: - Find all definitions in the file (e.g. `.. decorator::

[issue46586] In documentation contents enum.property erroneously links to built-in property

2022-02-10 Thread Meer Suri
Meer Suri added the comment: It took me some time to figure out how to prevent the creation of a reference/hyperlink using the ! prefix. I've made the change to remove the references to the max and min attributes of sys.float_info and pushed. How do I find other instances of this problem? Is

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-02-10 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29428 pull_request: https://github.com/python/cpython/pull/31261 ___ Python tracker ___

[issue46710] Install launcher for all users on the domain

2022-02-10 Thread Marcus Fillipe Groetares Rocha Siqueira
Marcus Fillipe Groetares Rocha Siqueira added the comment: Thanks Steve, it worked. Hava a nice day :) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue46712] Share global string identifiers in deepfreeze

2022-02-10 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch pull_requests: +29427 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31261 ___ Python tracker ___ ___

[issue46712] Share global string identifiers in deepfreeze

2022-02-10 Thread Kumar Aditya
Kumar Aditya added the comment: I have refactored generate_global_objects.py, and now instead of hard-coding every identifier manually, it now scans *.c files extracts the identifiers used in it and then generate the header file. This has multiple advantages: - No need to manually add identi

[issue46430] intern strings in deepfrozen modules

2022-02-10 Thread Christian Heimes
Christian Heimes added the comment: Please leave the ticket open until we have an agreement how to handle the missing error checks. -- resolution: fixed -> stage: resolved -> status: closed -> open type: -> behavior ___ Python tracker

[issue46712] Share global string identifiers in deepfreeze

2022-02-10 Thread Kumar Aditya
New submission from Kumar Aditya : Since bpo-46541, the global strings are statically allocated so they can now be referenced by deep-frozen modules just like any other singleton. Sharing identifiers with deepfreeze will reduce the duplicated strings hence it would save space. See https://gi

[issue46608] Exclude marshalled-frozen data if deep-freezing to save 300 KB space

2022-02-10 Thread Kumar Aditya
Change by Kumar Aditya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46430] intern strings in deepfrozen modules

2022-02-10 Thread Kumar Aditya
Kumar Aditya added the comment: I consider this done so closing it as improving the error handling of interning it out of scope of this issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46681] gzip.compress does not forward compresslevel to zlib.compress

2022-02-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue46494] Mention typing_extensions in the typing documentation

2022-02-10 Thread Meer Suri
Change by Meer Suri : -- keywords: +patch pull_requests: +29426 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31260 ___ Python tracker ___ __

[issue46690] create_autospec() doesn't respect configure_mock style kwargs

2022-02-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I guess the problem is that during the initial mock creation kwargs is passed so calling test_method immediately after mock creation raises ValueError. But as we loop through the attributes and create new child mock for the attributes the original

[issue46711] test_logging: test_post_fork_child_no_deadlock() failed with timeout on AMD64 Arch Linux Asan Debug 3.10

2022-02-10 Thread STINNER Victor
New submission from STINNER Victor : The test calls support.wait_process() which uses SHORT_TIMEOUT. wait_process() should use LONG_TIMEOUT, or the ASAN buildbot should increase its timeout (regrtest --timeout parameter). IMO using LONG_TIMEOUT is fine: it's ok if the test takes 2 minutes ins

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread STINNER Victor
STINNER Victor added the comment: With PR 31253 fix, I confirm that it fix my bug explained in msg412992. commit 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c Author: Andrew Svetlov Date: Thu Feb 10 14:57:20 2022 +0200 Fix warning: asyncio.events._event_loop_policy was modified by test_asyn

[issue46072] Unify handling of stats in the CPython VM

2022-02-10 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29425 pull_request: https://github.com/python/cpython/pull/31259 ___ Python tracker ___

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46710] Install launcher for all users on the domain

2022-02-10 Thread Steve Dower
Steve Dower added the comment: This option may be disabled if you have already installed the launcher for only the current user. In this case, we aren't able to replace it with an all-users install. Open Programs and Features and find the Python launcher, uninstall it, and then try again.

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +29424 pull_request: https://github.com/python/cpython/pull/31256 ___ Python tracker ___ __

[issue46710] Install launcher for all users on the domain

2022-02-10 Thread Marcus Fillipe Groetares Rocha Siqueira
New submission from Marcus Fillipe Groetares Rocha Siqueira : In Python 3.9.6 (64 bits) Windows Installer, the first page show a checkbox for "install launcher for all users (recommended)", but i'd like to now why the box is not currently allowed to check. In "customize installation" option,

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +29423 pull_request: https://github.com/python/cpython/pull/31255 ___ Python tracker ___ __

[issue46532] Improve efficiency of PRECALL/CALL instructions

2022-02-10 Thread Mark Shannon
Mark Shannon added the comment: New changeset 2cea8c29cf975a8ad7d8c3ff19d1e836c2d54707 by Mark Shannon in branch 'main': bpo-46532: Reduce number of memory writes to update call_shape.kwnames. (GH-31231) https://github.com/python/cpython/commit/2cea8c29cf975a8ad7d8c3ff19d1e836c2d54707

[issue46072] Unify handling of stats in the CPython VM

2022-02-10 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29422 pull_request: https://github.com/python/cpython/pull/31254 ___ Python tracker ___

[issue45490] [C API] PEP 670: Convert macros to functions in the Python C API

2022-02-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I made a list of macros that reuse their argument some time around February/March 2021. (Each macro is squashed into a single line for some reason I can't remember.) See attachment, or check out the gist version: https://gist.github.com/erlend-aasland/a7c

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +29421 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31253 ___ Python tracker ___ _

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report! Let me make a fix PR in a few minutes -- ___ Python tracker ___ ___ Python

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread STINNER Victor
New submission from STINNER Victor : test_urllib failed and then passed when re-run on s390x RHEL7 Refleaks 3.x: https://buildbot.python.org/all/#builders/129/builds/300 I can reproduce the issue on my Linux laptop: $ ./python -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.tes

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread STINNER Victor
STINNER Victor added the comment: By default, asyncio.events._event_loop_policy is None: $ ./python -i >>> import asyncio; asyncio.events._event_loop_policy is None True After running the test, it changes: vstinner@apu$ ./python -i Python 3.11.0a5+ (heads/main:46328d8ae6, Feb 9 2022, 21:25

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-10 Thread STINNER Victor
New submission from STINNER Victor : Seen on s390x RHEL7 Refleaks 3.x: https://buildbot.python.org/all/#/builders/129/builds/300 == Tests result: FAILURE == (...) 3 tests failed: test_asyncio test_importlib test_unittest (...) 0:36:44 load avg: 0.50 Re-running test_asyncio in verbose mode (

[issue46072] Unify handling of stats in the CPython VM

2022-02-10 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29420 pull_request: https://github.com/python/cpython/pull/31251 ___ Python tracker ___

[issue46072] Unify handling of stats in the CPython VM

2022-02-10 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29419 pull_request: https://github.com/python/cpython/pull/31250 ___ Python tracker ___

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-10 Thread Alex Waygood
Alex Waygood added the comment: Just so that all the discussion related to this issue can be found in one place, here's a summary: - After opening this ticket, OP opened an issue in the python/typing repository, where the idea of deprecating this syntax received many thumbs-up reactions, an

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-10 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset db052851a70fd95d047c6263fc16a75e4d47b3ed by Dong-hee Na in branch 'main': bpo-46323: Allow alloca(0) for python callback function of ctypes (GH-31249) https://github.com/python/cpython/commit/db052851a70fd95d047c6263fc16a75e4d47b3ed -- _

[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Something like: _unset = ['unset'] class CachedAwaitable: def __init__(self, awaitable): self.awaitable = awaitable self.result = _unset def __await__(self): if self.result is _unset: self.result = yield from self.

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-10 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +29418 pull_request: https://github.com/python/cpython/pull/31249 ___ Python tracker ___ _

[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: You can return a wrapper from __get__ that awaits the inner function and saves the result somewhere. -- ___ Python tracker ___ _

[issue46657] Add mimalloc memory allocator

2022-02-10 Thread Christian Heimes
Christian Heimes added the comment: ICC 2021 has full support for stdatomic.h and compiles mimalloc just fine: $ CC="icc" ./configure -C --with-pydebug $ make $ ./python Python 3.11.0a5+ (main, Feb 9 2022, 15:57:40) [GCC Intel(R) C++ gcc 7.5 mode] on linux Type "help", "copyright", "credits"

[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-10 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: > should not use asyncio directly but 'async def', 'await', and > `inspect.iscoroutine()` / `inspect.iscoroutinefunction()` instead. Hmm, this introduces some difficulties. Since a coroutine can only be awaited once, a new coroutine needs to be returned (that

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-10 Thread miss-islington
miss-islington added the comment: New changeset dee020a6f5bf29f95bec6294da9bcd577114f592 by Nikita Sobolev in branch 'main': Fix sphinx-lint after #31097 and b878b3a (GH-31248) https://github.com/python/cpython/commit/dee020a6f5bf29f95bec6294da9bcd577114f592 --

[issue46430] intern strings in deepfrozen modules

2022-02-10 Thread miss-islington
miss-islington added the comment: New changeset dee020a6f5bf29f95bec6294da9bcd577114f592 by Nikita Sobolev in branch 'main': Fix sphinx-lint after #31097 and b878b3a (GH-31248) https://github.com/python/cpython/commit/dee020a6f5bf29f95bec6294da9bcd577114f592 -- nosy: +miss-islington

[issue46430] intern strings in deepfrozen modules

2022-02-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +29417 pull_request: https://github.com/python/cpython/pull/31248 ___ Python tracker ___ ___

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 4.0 -> 5.0 pull_requests: +29416 pull_request: https://github.com/python/cpython/pull/31248 ___ Python tracker ___ ___

[issue46705] Memory optimization for set.issubset

2022-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would not testing len(self.difference(other)) == 0 be more efficient? Making a copy of a set and removing elements one by one may be faster than add elements one by one, because we only need to allocate a single chunk of memory for a set. It depends on rel

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-10 Thread Dong-hee Na
Dong-hee Na added the comment: @hydroflask @vstinner Okay let's remove if statement, I will send a patch soon. -- ___ Python tracker ___ _