[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread benrg
benrg added the comment: memmem isn't a standard C function, and some libraries don't have it, notably Microsoft's. newlib's memmem seems to be the same as glibc's, but is under a BSD 3-clause license instead of LGPL. An older version of newlib's memmem (prior to 2019-01-01) has the license

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: Anoter case: https://github.com/lablup/backend.ai-manager/pull/533 https://github.com/lablup/backend.ai-agent/pull/341 When shutting down the application, I'd like to explicitly cancel the shielded tasks, while keep them shielded before shutdown. So I inserted

[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2022-02-24 Thread Stanley
Change by Stanley : -- keywords: +patch nosy: +slateny nosy_count: 6.0 -> 7.0 pull_requests: +29687 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31565 ___ Python tracker

[issue12165] [doc] clarify documentation of nonlocal

2022-02-24 Thread Eryk Sun
Eryk Sun added the comment: > Another problem with the current text is that it fails to exclude > enclosing class scopes The nonlocal statement is only disallowed in module code (i.e. "exec" compilation mode) because it can never be nested. It's allowed in a class definition that has an out

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-24 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +29686 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31564 ___ Python tracker ___

[issue46844] Implicit binding of PersistentTaskGroup (or virtual event loops)

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: Updated the title to reduce confusion. -- title: Context-based TaskGroup for legacy libraries -> Implicit binding of PersistentTaskGroup (or virtual event loops) ___ Python tracker

[issue46844] Context-based TaskGroup for legacy libraries

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: I have added more about my stories in bpo-46843. I think the suggestion of implicit taskgroup binding with the current asyncio.TaskGroup has no point but it would have more meaning with PersistentTaskGroup. So, if we treat PersistentTaskGroup as a "nested, hier

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

2022-02-24 Thread Inada Naoki
Inada Naoki added the comment: New changeset ad6c7003e38a9f8bdf8d865fb5fa0f3c03690315 by Inada Naoki in branch 'main': bpo-46606: Remove redundant +1. (GH-31561) https://github.com/python/cpython/commit/ad6c7003e38a9f8bdf8d865fb5fa0f3c03690315 -- ___

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: Here is one another story. When handling message queues in distributed applications, I use the following pattern frequently for graceful shutdown: * Use a sentinel object to signal the end of queue. * Enqueue the sentinel object when: - The server is shutting d

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: I ended up with the following conclusion: - The new abstraction should not cancel sibling tasks and itself upon unhandled execption but loudly report such errors (and the fallback error handler should be customizable). - Nesting task groups will give additional b

[issue27583] [doc ] configparser: modifying default_section at runtime

2022-02-24 Thread Stanley
Change by Stanley : -- keywords: +patch nosy: +slateny nosy_count: 5.0 -> 6.0 pull_requests: +29685 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31562 ___ Python tracker __

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: This particular experience, https://github.com/lablup/backend.ai-agent/pull/331, has actually motivated me to suggest PersistentTaskGroup. The program subscribes the event stream of Docker daemon using aiohttp as an asyncio task, and this should be kept running

[issue43364] Windows: Make UTF-8 mode more accessible

2022-02-24 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

2022-02-24 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +29684 pull_request: https://github.com/python/cpython/pull/31561 ___ Python tracker ___ _

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: @gvanrossum As you mentioned, the event loop currently plays the role of the top-level task group already, even without introducing yet another top-level task. For instance, asyncio.run() includes necessary shutdown procedures to cancel all belonging unfinished

[issue46854] Failed to compile static python3.7.12

2022-02-24 Thread aprpp
New submission from aprpp <916495...@qq.com>: I compile static version of python3.7.12, I added the static standard library that I want to compile in Modules/Setup, reference Modules/Setup.dist in python source, like this: static Modules that should always be present (non UNIX dependent): arr

[issue45991] Improve ambiguous docstrings in pkgutil

2022-02-24 Thread Stanley
Stanley added the comment: While it is ambiguous, when there's a path parameter I would default it to string unless otherwise specified. Maybe instead a note could be put in the Pathlib doc noting functions that accept path arguments might not accept Path objects? -- __

[issue12165] [doc] clarify documentation of nonlocal

2022-02-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I think this is more confusing then helpful. I concur. -- ___ Python tracker ___ ___ Python

[issue46793] expose expat XML billion laughs attack mitigation APIs

2022-02-24 Thread sping
sping added the comment: First mention at https://bugs.python.org/issue44394#msg395642 -- nosy: +sping ___ Python tracker ___ ___ P

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7d03c8be5af2f1559dbc35b775b3116dfd63cfb6 by Victor Stinner in branch 'main': bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) https://github.com/python/cpython/commit/7d03c8be5af2f1559dbc35b775b3116dfd63cfb6 ---

[issue46852] Remove the float.__setformat__() method

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7d03c8be5af2f1559dbc35b775b3116dfd63cfb6 by Victor Stinner in branch 'main': bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) https://github.com/python/cpython/commit/7d03c8be5af2f1559dbc35b775b3116dfd63cfb6 ---

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

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29683 pull_request: https://github.com/python/cpython/pull/31560 ___ Python tracker ___

[issue46853] Python interpreter can get code from memory, it is not secure.

2022-02-24 Thread i5-7200u
New submission from i5-7200u : Hi, Python Interpreter have a big security bug/error. My friend and l am. We can give virus code to Python Interpreter. we were looking for run a binary application from memory (byte array) Later we find python, but we got it is security bug/error example from

[issue46567] Add Tcl/Tk builds for ARM64

2022-02-24 Thread Steve Dower
Steve Dower added the comment: Getting this done with some help from colleagues. Tcl and Tk have been updated to support it, and I've pulled down their patches into our source repo. Hopefully I find time to get the build and setup updates done before the next alpha... adding Pablo just to sa

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-24 Thread Tin Tvrtković
Change by Tin Tvrtković : -- pull_requests: +29682 pull_request: https://github.com/python/cpython/pull/31559 ___ Python tracker ___

[issue46852] Remove the float.__setformat__() method

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: We can keep the float.__getformat__() method, it doesn't harm. I change the issue title to only propose to remove the float.__setformat__() method. -- title: Remove float.__get_format__() and float.__set_format__() -> Remove the float.__setformat__(

[issue46852] Remove float.__get_format__() and float.__set_format__()

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: I wrote GH-31558 to fix the typo in the method name. -- ___ Python tracker ___ ___ Python-bugs-li

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 10.0 -> 11.0 pull_requests: +29681 pull_request: https://github.com/python/cpython/pull/31558 ___ Python tracker ___ _

[issue46852] Remove float.__get_format__() and float.__set_format__()

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29680 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31558 ___ Python tracker ___ _

[issue46852] Remove float.__get_format__() and float.__set_format__()

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: Oh wait, I'm now confused by the method names. In Python 3.10, the correct names at: * float.__getformat__() <= 4 underscores * float.__set_format__() <= 5 underscores It's even more confusing because the "set format" is only used in one place: test_float,

[issue46852] Remove float.__get_format__() and float.__set_format__()

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46656: "Remove the Py_NO_NAN macro: require NAN to build Python 3.11". -- ___ Python tracker ___ __

[issue46656] Remove the Py_NO_NAN macro: require NAN to build Python 3.11

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- components: +Build, Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Compile fails if Py_NO_NAN is defined -> Remove the Py_NO_NAN macro: require NAN to build Python 3.11 versions: -Python 3.10, Python 3

[issue46852] Remove float.__get_format__() and float.__set_format__()

2022-02-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would not miss these methods. Unless Mark says they are needed, +1 for removal. -- nosy: +mark.dickinson, rhettinger, tim.peters ___ Python tracker __

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1b2611eb0283055835e5df632a7a735db8c894b8 by Victor Stinner in branch 'main': bpo-46656: Remove Py_NO_NAN macro (GH-31160) https://github.com/python/cpython/commit/1b2611eb0283055835e5df632a7a735db8c894b8 -- ___

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5f8b5e2f2150d2223ff9e286bd146de92ff16865 by Victor Stinner in branch 'main': bpo-46656: Building Python now requires a C11 compiler (GH-31557) https://github.com/python/cpython/commit/5f8b5e2f2150d2223ff9e286bd146de92ff16865 -- __

[issue46852] Remove float.__get_format__() and float.__set_format__()

2022-02-24 Thread STINNER Victor
New submission from STINNER Victor : It has been decided to require IEEE 754 to build Python 3.11: https://mail.python.org/archives/list/python-...@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/ At Python startup, _PyFloat_InitState() checks the IEEE 754 format at runtime. It can be chang

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29679 pull_request: https://github.com/python/cpython/pull/31557 ___ Python tracker ___ __

[issue46851] Document multiprocessing.set_forkserver_preload

2022-02-24 Thread Alex Waygood
Alex Waygood added the comment: (3.7 and 3.8 are not accepting patches unless they relate to security issues, so I am removing them from the "versions" field.) -- nosy: +AlexWaygood versions: -Python 3.7, Python 3.8 ___ Python tracker

[issue46851] Document multiprocessing.set_forkserver_preload

2022-02-24 Thread Alex Waygood
Change by Alex Waygood : -- nosy: -AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue46623] test_zlib: test_pair() and test_speech128() fail with s390x hardware accelerator

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: The Python 3.7 package on Fedora also skips these two tests using --ignore option of regrtest: %ifarch s390x --ignore test_speech128 \ --ignore test_pair \ %endif * https://src.fedoraproject.org/rpms/python3.7/pull-request/38#request_

[issue46623] test_zlib: test_pair() and test_speech128() fail with s390x hardware accelerator

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: Even if Python 3.9 and 3.10 are also affected, I prefer to not backport the change since it's not ideal. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46623] test_zlib: test_pair() and test_speech128() fail with s390x hardware accelerator

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9475dc0b8d2a0db40278bbcb88a89b1265a77ec9 by Victor Stinner in branch 'main': bpo-46623: Skip two test_zlib tests on s390x (GH-31096) https://github.com/python/cpython/commit/9475dc0b8d2a0db40278bbcb88a89b1265a77ec9 --

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

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset c9c178fdb1af01e441a6c83f3a21a67e5dd9f17d by Victor Stinner in branch 'main': bpo-1635741: test_embed cheks that Python does not leak (GH-31555) https://github.com/python/cpython/commit/c9c178fdb1af01e441a6c83f3a21a67e5dd9f17d -- _

[issue46851] Document multiprocessing.set_forkserver_preload

2022-02-24 Thread Géry
Change by Géry : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue46835] ImportError: bad magic number in ... does not indicate where is that file located

2022-02-24 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2022-02-24 Thread Christian Heimes
Christian Heimes added the comment: I have applied the patch to main branch (3.11). The workaround for Windows turned out to be more elaborate than initially anticipated. I'm not going to backport the fix to 3.10 and 3.9. -- resolution: -> fixed stage: patch review -> resolved statu

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2022-02-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset 38f331d4656394ae0f425568e26790ace778e076 by Christian Heimes in branch 'main': bpo-45898: Remove duplicate symbols from _ctypes/cfield.c (GH-29791) https://github.com/python/cpython/commit/38f331d4656394ae0f425568e26790ace778e076 --

[issue45107] Improve LOAD_METHOD specialization

2022-02-24 Thread Mark Shannon
Mark Shannon added the comment: New changeset 2a6ece572ca38f989fca66f4c053cb16550bccd4 by Mark Shannon in branch 'main': bpo-45107: Specialize `LOAD_METHOD` for instances with dict. (GH-31531) https://github.com/python/cpython/commit/2a6ece572ca38f989fca66f4c053cb16550bccd4 --

[issue46851] Document multiprocessing.set_forkserver_preload

2022-02-24 Thread Géry
New submission from Géry : I have just notice that the multiprocessing.set_forkserver_preload (which originates from multiprocessing.forkserver.set_forkserver_preload) is not documented: https://github.com/python/cpython/blob/v3.10.2/Lib/multiprocessing/context.py#L180-L185 -- messages

[issue45991] Improve ambiguous docstrings in pkgutil

2022-02-24 Thread Kevin Hock
Kevin Hock added the comment: At best it is ambiguous, with the class being confused with Str being called Path. Looking up "AttributeError: 'PosixPath' object has no attribute 'startswith'" gives a lot of results for similar issues, so I think the wording could be improved. -- ___

[issue46833] Installer Wizard is unclear and has redundant settings

2022-02-24 Thread Steve Dower
Steve Dower added the comment: So I'm the "team" that designed it the first time (with input from others, of course, but it wasn't designed by a committee or anything), and the primary goal was to enable a single-click install for the majority of users, biased towards simplicity for users wh

[issue46430] intern strings in deepfrozen modules

2022-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: > How it should be handled? Currently PyUnicode_InternInPlace ignores any > errors and does not return it. It would be backwards-incompatible to change > that, moreover as I explained in > https://github.com/python/cpython/pull/30683#discussion_r800648477

[issue46430] intern strings in deepfrozen modules

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/31555 to make sure that Python doesn't leak at Python exit. -- ___ Python tracker ___ ___

[issue46430] intern strings in deepfrozen modules

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

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

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29677 pull_request: https://github.com/python/cpython/pull/31555 ___ Python tracker ___

[issue46844] Context-based TaskGroup for legacy libraries

2022-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: -1. Libraries that manage their own tasks should continue to do so, until they are ready to adopt TaskGroup. Trying to "own" (and wait for) tasks created by a library sounds like a recipe for disaster if the library wasn't expecting that. Do you have a spe

[issue46430] intern strings in deepfrozen modules

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4dc746310bd37ad6b381f9176acd167d445f4385 by Kumar Aditya in branch 'main': bpo-46430: Fix memory leak in interned strings of deep-frozen modules (GH-31549) https://github.com/python/cpython/commit/4dc746310bd37ad6b381f9176acd167d445f4385 -

[issue45459] Limited API support for Py_buffer

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 042f31da552c19054acd3ef7bb6cfd857bce172b by Victor Stinner in branch 'main': bpo-45459: C API uses type names rather than structure names (GH-31528) https://github.com/python/cpython/commit/042f31da552c19054acd3ef7bb6cfd857bce172b --

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: Could you just have a global task group that owns these long-running tasks? It could be embedded in a "toplevel" task that is created using asyncio.create_task() (which won't be deprecated). To shut down all long-running tasks at the end, just cancel that

[issue3539] Problem with testembed make dependencies in certain circumstances

2022-02-24 Thread Irit Katriel
Irit Katriel added the comment: Closing as suggested by Martin. -- nosy: +iritkatriel resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue45459] Limited API support for Py_buffer

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset ec091bd47e2f968b0d1631b9a8104283a7beeb1b by Victor Stinner in branch 'main': bpo-45459: Add pytypedefs.h header file (GH-31527) https://github.com/python/cpython/commit/ec091bd47e2f968b0d1631b9a8104283a7beeb1b -- _

[issue46622] Add an async variant of lru_cache for coroutines.

2022-02-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Andrew Svetlov] > A third-party library should either copy all these > implementation details or import a private function from stdlib OrderedDict provides just about everything needed to roll lru cache variants. It simply isn't true this can only be d

[issue46622] Add an async variant of lru_cache for coroutines.

2022-02-24 Thread Joongi Kim
Change by Joongi Kim : -- nosy: +achimnol ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: @yselivanov @asvetlov I think this API suggestion would require more refining and discussion in depths, and probably it may be better to undergo the PEP writing and review process. Or I might need to have a separate discussion thread somewhere else (maybe discu

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: -29656 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: > PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct > _interpreter_frame *f, int exc); I created bpo-46850 "[C API] Move _PyEval_EvalFrameDefault() to the internal C API" for this issue. -- __

[issue46850] [C API] Move _PyEval_EvalFrameDefault() to the internal C API

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker ___ ___

[issue46850] [C API] Move _PyEval_EvalFrameDefault() to the internal C API

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29676 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31532 ___ Python tracker ___ _

[issue46850] [C API] Move _PyEval_EvalFrameDefault() to the internal C API

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: typo: "I propose to move most _PyEval private functions to the internal C API to clarify that they must *NOT* be used." :-) -- ___ Python tracker __

[issue46850] [C API] Move _PyEval_EvalFrameDefault() to the internal C API

2022-02-24 Thread STINNER Victor
New submission from STINNER Victor : In Python 3.10, _PyEval_EvalFrameDefault() has the API: PyObject* _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag); In Python 3.11, bpo-44590 (commit ae0a2b756255629140efcbe57fc2e714f0267aa3 "Lazily allocate frame objects (

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-24 Thread Petr Viktorin
Petr Viktorin added the comment: OK, looking at it more carefully, it makes sense to do the change. -- ___ Python tracker ___ ___ P

[issue46823] Add LOAD_FAST__LOAD_ATTR_INSTACE_VALUE combined opcode

2022-02-24 Thread Mark Shannon
Mark Shannon added the comment: New changeset a52d2528a405c1e2bfeb6470cb3313a5338dc45f by Dennis Sweeney in branch 'main': bpo-46823: Implement LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE superinstruction (GH-31484) https://github.com/python/cpython/commit/a52d2528a405c1e2bfeb6470cb3313a5338dc45f

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks, Victor. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: Some search results from cs.github.com with the input "asyncio task weakset", which may be replaced/simplified with PersistentTaskGroup: - https://github.com/Textualize/textual/blob/38efc821737e3158a8c4c7ef8ecfa953dc7c0ba8/src/textual/message_pump.py#L43 - http

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: Example use cases: * Implement an event iteration loop to fetch events and dispatch the handlers depending on the event type (e.g., WebSocket connections, message queues, etc.) - https://github.com/aio-libs/aiohttp/pull/2885 - https://github.com/lablup/backen

[issue46849] Memory problems detected using Valgrind

2022-02-24 Thread tongxiaoge
New submission from tongxiaoge : Reproduction steps: 1. Execute command: iotop -b -n 10 & 2. Execute the command in another session: valgrind /usr/sbin/iotop -b -n 5 > iotop_test The output information is as follows: [root@openEuler ~]# valgrind /usr/sbin/iotop -b -n 5 > iotop_test ==13750== M

[issue43557] Deprecate getdefaultlocale(), getlocale() and normalize() functions

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: > Deprecating these functions is complex. I prefer to start with the least > controversial part: bpo-46659. locale.getdefaultlocale() is now deprecated in Python 3.11. -- ___ Python tracker

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: locale.getdefaultlocale() is now deprecated. calendar now uses locale.setlocale() instead of locale.getdefaultlocale(). The ANSI code page alias to MBCS now has better tests and better comments. Thanks Eryk Sun for your very useful feedback! -- reso

[issue28533] Remove asyncore, asynchat and smtpd modules

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: Follow-up: PEP 594 schedules the removal of these 4 modules in Python 3.12, but the PEP remains a draft. -- ___ Python tracker ___ _

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: I think people may ask "why in stdlib?". My reasons are: - We are adding new asyncio APIs in 3.11 such as TaskGroup, so I think it is a good time to add another one, as long as it does not break existing stuffs. - I believe that long-running task sets are equal

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4fccf910738d1442852cb900747e6dccb8fe03ef by Victor Stinner in branch 'main': bpo-46659: Enhance LocaleTextCalendar for C locale (GH-31214) https://github.com/python/cpython/commit/4fccf910738d1442852cb900747e6dccb8fe03ef -- __

[issue43333] utf8 in BytesGenerator

2022-02-24 Thread Chris
Chris added the comment: found this issue while googling the error. Also having the same problem with as_bytes() breaking on non-ascii characters. I've tried policy=policy.default.clone(utf8=True) but it gives the same error. My sample.py file attached contains a string sample email - whic

[issue46843] PersistentTaskGroup API

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: So I have more things in mind. Basically PersistentTaskGroup resemble TaskGroup in that: - It has the same "create_task()" method. - It has an explicit "cancel()" or "shutdown()" method. - Exiting of the context manager means that all tasks of it have either c

[issue46844] Context-based TaskGroup for legacy libraries

2022-02-24 Thread Joongi Kim
Joongi Kim added the comment: Ok, let me be clear: Patching asyncio.create_task() to support this opt-in contextual task group binding is not an ultimate goal of this issue. If it becomes possible to override/extend the task factory at runtime with any event loop implementation, then it's o

[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread Stefan Tatschner
Change by Stefan Tatschner : -- keywords: +patch pull_requests: +29675 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31554 ___ Python tracker ___

[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread Stefan Tatschner
Stefan Tatschner added the comment: Sorry, I mean memmem(3). :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread Stefan Tatschner
New submission from Stefan Tatschner : The mmap.find() in function uses a naive loop to search string matches. This can be optimized “for free” by using libc's memmap(3) function instead. The relevant file is Modules/mmapmodule.c, the relevant function is mmap_gfind(). -- messages: 4

[issue46748] Python.h includes stdbool.h

2022-02-24 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +29674 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31553 ___ Python tracker ___ __

[issue46841] Inline bytecode caches

2022-02-24 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29673 pull_request: https://github.com/python/cpython/pull/31552 ___ Python tracker ___

[issue46841] Inline bytecode caches

2022-02-24 Thread Mark Shannon
Mark Shannon added the comment: We need to decide what to do about dis. I don't think we should have a `show_cache` option, as the caches are meaningless junk without quickening (maybe we should drop the CACHE opcode, and just use zeroes). Instead we should have a `show_quickened` option, t

[issue46846] functools.partial objects should set __signature__ and _annotations__

2022-02-24 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46847] functools.update_wrapper doesn't understand partial objects and annotations

2022-02-24 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood, Jelle Zijlstra, sobolevn ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

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

[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2022-02-24 Thread Safihre
Safihre added the comment: Could the new PR be reviewed? Thank you! https://github.com/python/cpython/pull/31492 Documentation still needs updating, but would like feedback. PS: Why not enable the setting the GitHub Actions workflow only need to be approved for new GitHub accounts instead of

[issue46844] Context-based TaskGroup for legacy libraries

2022-02-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: I personally don't think that the described opt-in trick should be a part of asyncio. A third-party library that patches asyncio.create_task() can be a useful thing though during the transition period. We even cannot deprecate asyncio.create_task() right now:

[issue46847] functools.update_wrapper doesn't understand partial objects and annotations

2022-02-24 Thread Larry Hastings
New submission from Larry Hastings : functools.update_wrapper currently copies over every attribute listed in the "assigned" parameter, which defaults to WRAPPER_ASSIGNMENTS, which means it copies the wrapped function's __annotations__ to the wrapper. This is slightly wrong if the wrapper oc

[issue46846] functools.partial objects should set __signature__ and _annotations__

2022-02-24 Thread Larry Hastings
New submission from Larry Hastings : I ran across an interesting bug in issue #46761. If you call functools.update_wrapper on a functools.partial object, inspect.signature will return the wrong (original) signature for the partial object. We're still figuring that one out. And, of course, i

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-24 Thread Larry Hastings
Larry Hastings added the comment: Okay, so, I considered the problem for a while, and I have a reasonable theory about what follow_wrapper_chains was for in the first place. If you have a generic decorator, like functools.cache(), it usually looks like this: def my_decorator(fn): def

[issue12165] [doc] clarify documentation of nonlocal

2022-02-24 Thread Stanley
Change by Stanley : -- keywords: +patch nosy: +slateny nosy_count: 6.0 -> 7.0 pull_requests: +29672 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31551 ___ Python tracker

[issue46430] intern strings in deepfrozen modules

2022-02-24 Thread Kumar Aditya
Kumar Aditya added the comment: > Okay, let's change the error handling. @Kumar, can you handle that? How it should be handled? Currently PyUnicode_InternInPlace ignores any errors and does not return it. It would be backwards-incompatible to change that, moreover as I explained in https://

  1   2   >