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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > n++; // Avoid malloc(0) > grouplist = PyMem_New(gid_t, n+1); FYI PyMem_New(0) is well specified and doesn't return NULL: https://docs.python.org/dev/c-api/memory.html#c.PyMem_Malloc -- nosy: +vs

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I tried to hack _PyStaticCode_Dealloc() to free strings, but since immortal objects are half-baken today, calling Py_DECREF() does crash. Py_SETREF() should increase _Py_RefTotal if the old object is immortal and he new object is not. Maybe this change

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Stefan Behnel: > I haven't looked fully into this yet, but I *think* that Cython can get rid > of most of the direct usages of PyFrameObject by switching to the new > InterpreterFrame struct instead. It looks like the important fields have now >

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: PyUnicode_InternInPlace() in intern_strings() can convert an immortal string to a regular Python strong reference, whereas _PyStaticCode_Dealloc() doesn't bother with clearing co_names, co_consts and co_localsplusnames

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29663 pull_request: https://github.com/python/cpython/pull/31539 ___ Python tracker <https://bugs.python.org/issue45

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8a716bc62c8205bb9deeda17422b7e69204b6897 by Victor Stinner in branch 'main': bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536) https://github.com/python/cpython/commit/8a716bc62c8205bb9deeda17422b7e69204b6897

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > Sure, but "leaks" caused by deep-freezing cannot be solved by freeing up the > deep-frozen memory -- the solution must be to update the accounting somewhere. Python allocates memory (ex: with PyObject_Malloc()) which is not released at ex

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 78859e58e4e016286e648d1dc155e0f6cebfa6ff by Victor Stinner in branch 'main': bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535) https://github.com/python/cpython/commit/78859e58e4e016286e648d1dc155e0f6cebfa6ff

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > I found the uwsgi project on PyPI which uses f_lasti with PyCode_Addr2Line(). Oh, plugins/python/profiler.c uses that to define PyFrame_GetLineNumber() on Python older than 2.7, Python 3.0 and Python 3.1. In 2022, it's no longer relevant. But w

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Mark Shannon: > The only purpose of `f_lasti` is to get the line number and that can be done > directly via `PyFrame_GetLineNumber(PyFrameObject *frame)` I found the uwsgi project on PyPI which uses f_lasti with PyCode_Addr2Line(). I wrote GH

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29660 pull_request: https://github.com/python/cpython/pull/31536 ___ Python tracker <https://bugs.python.org/issue40

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Ned Batchelder: > I went ahead and changed the coverage.py code to this: (...) I proposed a coverage PR using PyObject_GetAttrString(frame, "f_lasti") which should works on all Python versions: https://github.com/nedbat/coverag

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > Presumably the leak is imaginary Well, you can check with your favorite memory debugger like Valgrind if you don't trust Python internal memory debugger :-) Not leaking memory at exit matters when Python is embedded in an application. I don't th

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > The docs for PyFrame_GetCode say it's returning an "int". Oh. I missed your comment. I created GH-31535 to fix the return type in the documentation. -- ___ Python tracker <https://bugs.pytho

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29659 pull_request: https://github.com/python/cpython/pull/31535 ___ Python tracker <https://bugs.python.org/issue40

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Petr Viktorin: > So, this will break Cython and gevent, This change doesn't break Cython and gevent: they are already broken. > but (unlike the optimization work that broke f_code/f_frame) it won't provide > any value to users? The problem is t

[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46670: "Build Python with -Wundef: don't use undefined macros". -- ___ Python tracker <https://bugs.python.o

[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9bbdde218005f552304d9954bb97e3f9185edded by Victor Stinner in branch 'main': bpo-45412: Add _PY_SHORT_FLOAT_REPR macro (GH-31171) https://github.com/python/cpython/commit/9bbdde218005f552304d9954bb97e3f9185edded

[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: commit ccbe8045faf6e63d36229ea4e1b9298572cda126 Author: Victor Stinner Date: Tue Feb 22 22:04:07 2022 +0100 bpo-46659: Fix the MBCS codec alias on Windows (GH-31218) -- resolution: -> fixed stage: patch review -> resolved status

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: _PyStaticCode_InternStrings() error handling is based on assert(): that's really bad. It can crash Python (exit with abort()) at the first memory allocation failure. Why not returning -1 on error? -- ___ Python

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > This change introduced a memory leak at Python exit. It's regression related to bpo-1635741 which I fixed recently: https://mail.python.org/archives/list/python-...@python.org/thread/E4C6TDNVDPDNNP73HTGHN5W42LGAE

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > New changeset c0a5ebeb1239020f2ecc199053bb1a70d78841a1 by Kumar Aditya in > branch 'main': > bpo-46430: Intern strings in deep-frozen modules (GH-30683) This change introduced a memory leak at Python exit. Before: $ ./python -X showrefcount -

[issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create .

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29656 pull_request: https://github.com/python/cpython/pull/31532 ___ Python tracker <https://bugs.python.org/issue46

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker <https://bugs.python.o

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also the bpo-39947: "[C API] Make the PyThreadState structure opaque (move it to the internal C API)". Recently, I also added helper functions: * PyThreadState_GetFrame(): Python 3.9 and limited C API version 3.10 * PyThreadState_GetID():

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

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +Mark.Shannon, corona10, erlendaasland, petr.viktorin, scoder ___ Python tracker <https://bugs.python.org/issue46836> ___ ___

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I marked my PR as a draft since this change is an incompatible change. Even if PyFrameObject structure is excluded from the limited C API and not documented, it's used by a few projects. I plan to check how this change impacts these projects before merging

[issue45247] [C API] Add explicit support for Cython to the C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker <https://bugs.python.o

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45247: [C API] Add explicit support for Cython to the C API. -- ___ Python tracker <https://bugs.python.org/issue46

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-44800 "Code readability: rename InterpreterFrame to _Py_framedata". -- ___ Python tracker <https://bugs.python.o

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40421 "[C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API". I added getter functions in recent Python versions: * PyFrame_GetBack(): Python 3.9 * PyFrame_GetCode():

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker <https://bugs.python.o

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker <https://bugs.python.o

[issue44590] Create frame objects lazily when needed

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- nosy: +vstinner ___ Python tracker <https://bugs.python.o

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker <https://bugs.python.o

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

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29654 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31530 ___ Python tracker <https://bugs.python.org/issu

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

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: By the way, Include/cpython/ceval.h uses the "struct _interpreter_frame*" type whereas this type is part of the internal C API: PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _interpreter_frame *f, int exc); Maybe

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

2022-02-23 Thread STINNER Victor
New submission from STINNER Victor : I propose to move the PyFrameObject structure to the internal C API. -- Between Python 3.10 and Python 3.11, the work on optimizing ceval.c modified deeply the PyFrameObject structure. Examples: * The f_code member has been removed by in bpo-44032

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29652 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/31528 ___ Python tracker <https://bugs.python.org/issu

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > Include/object.h:109:3: warning: redefinition of typedef 'PyObject' is a C11 > feature [-Wtypedef-redefinition] Oh. I already met this error :-( That's why I proposed in GH-31201 to move all forward declarations at the top of Python.h to solve such

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29651 pull_request: https://github.com/python/cpython/pull/31527 ___ Python tracker <https://bugs.python.org/issue45

[issue45459] Limited API support for Py_buffer

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: pmp-p: > There's some side effects with "buffer.h" inclusion in Panda3D when building > againt 3.11a5, project manager concerns are here > https://github.com/python/cpython/pull/29991#issuecomment-1031731100 Thanks for the report. It has

[issue45459] Limited API support for Py_buffer

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 66b3cd7063322a9f5c922a97bbd06fdb9830 by Victor Stinner in branch 'main': bpo-45459: Rename buffer.h to pybuffer.h (#31201) https://github.com/python/cpython/commit/66b3cd7063322a9f5c922a97bbd06fdb9830

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset b899126094731bc49fecb61f2c1b7557d74ca839 by Victor Stinner in branch 'main': bpo-46659: Deprecate locale.getdefaultlocale() (GH-31206) https://github.com/python/cpython/commit/b899126094731bc49fecb61f2c1b7557d74ca839

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset ccbe8045faf6e63d36229ea4e1b9298572cda126 by Victor Stinner in branch 'main': bpo-46659: Fix the MBCS codec alias on Windows (GH-31218) https://github.com/python/cpython/commit/ccbe8045faf6e63d36229ea4e1b9298572cda126

[issue46632] test_ssl: 2 tests fail on cstratak-CentOS9-fips-x86_64

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: Same on AMD64 CentOS9 FIPS Only Blake2 Builtin Hash 3.x: https://buildbot.python.org/all/#/builders/828/builds/196 test.pythoninfo: fips.linux_crypto_fips_enabled: 1 fips.openssl_fips_mode: 1 ssl.OPENSSL_VERSION: OpenSSL 3.0.1 14 Dec 2021

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: Removing the PyFrameObject.f_code member (commit b11a951f16f0603d98de24fee5c023df83ea552c) broke by gevent project: * https://github.com/gevent/gevent/issues/1867 * https://bugs.python.org/issue40421#msg413719

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: The f_code member has been removed by in bpo-44032 by the commit b11a951f16f0603d98de24fee5c023df83ea552c. The f_frame member has been added in bpo-44590 by the commit ae0a2b756255629140efcbe57fc2e714f0267aa3. See also bpo-46355 [C API] Document

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: The gevent project is not compatible with Python 3.11: it gets and sets directly PyFrameObject.f_code member which has been removed in Python 3.11 (moved to PyFrameObject.f_frame.f_code internal C API). gevent issue: https://github.com/gevent/gevent/issues

[issue46789] Restore caching of externals on Windows buildbots

2022-02-21 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to create a download cache somewhere outside the Python source tree, so "git clean -fdx" would not remove this cache? Some CIs implement such cache. Does buildbot have helpers for that? buildbot provides for example: * LRUCa

[issue42752] multiprocessing Queue leaks a file descriptor associated with the pipe writer (#33081 still a problem)

2022-02-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker <https://bugs.python.org/issue42752> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2022-02-21 Thread STINNER Victor
STINNER Victor added the comment: > It does seem that only the Windows Popen._wait() cannot handle negative > timeout values, so the fix should be as simple as coercing the timeout values > to >= 0. Oh. This function should maybe raise an exception if the timeout is negativ

[issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup

2022-02-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker <https://bugs.python.org/issue43974> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34990] year 2038 problem in compileall.py

2022-02-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker <https://bugs.python.org/issue34990> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33601] [doc] Py_UTF8Mode is not documented

2022-02-21 Thread STINNER Victor
STINNER Victor added the comment: > [Entry level contributor seeking guidance]The PR on this issue looks closed. > I worked on this and attaching the updated html file. Hi. You should update Doc/c-api/init.rst. Not the generated HTM

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-02-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset ba5725171d9c411fc4764349205eff5cfc028797 by Erlend Egeberg Aasland in branch 'main': bpo-46355: Amend What's New in Python 3.11 C API wording (GH-31288) https://github.com/python/cpython/commit/ba5725171d9c411fc4764349205eff5cfc028797

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

2022-02-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset e0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b by Victor Stinner in branch 'main': bpo-45490: Rename static inline functions (GH-31217) https://github.com/python/cpython/commit/e0bcfd0e4db193743d4bafc48d10f15ae9ed7b2b

[issue46465] Regression caused by CALL_FUNCTION specialization for C function calls (test_urllib fails when run multiple times)

2022-02-11 Thread STINNER Victor
Change by STINNER Victor : -- title: Regression caused by CALL_FUNCTION specialization for C function calls -> Regression caused by CALL_FUNCTION specialization for C function calls (test_urllib fails when run multiple times) ___ Python trac

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

2022-02-11 Thread STINNER Victor
STINNER Victor added the comment: Oops, I forgot about my own bpo-46465. I failed to find it when I searched for "test_urllib". -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Regression caused by CALL_FUNCTIO

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread STINNER Victor
STINNER Victor added the comment: > It also adds a precondition that's not feasible public API, which this was > meant to become Do you plan to make the function public? It would be nice! -- ___ Python tracker <https://bugs.python.org/i

[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 <https://bugs.python.org/issu

[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 <https://bugs.python.org/issu

[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

[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

[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

[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

[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

[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

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

2022-02-09 Thread STINNER Victor
STINNER Victor added the comment: I failed to find the doc about alloca(0). It seems like the existing _ctypes_callproc() function *can* call alloca(0) if argtuple is empty and pIunk is 0 (pIunk is specific to Windows). -- ___ Python tracker

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread STINNER Victor
STINNER Victor added the comment: Thanks Joshua Root for the bug report and the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset bf2d44ffb06e8f49aacc6b1c140a6717df5cf897 by Joshua Root in branch 'main': bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693) https://github.com/python/cpython/commit/bf2d44ffb06e8f49aacc6b1c140a6717df5cf897

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

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: I suggest to use PyTuple_GET_ITEM(), but PySequence_Fast_ITEMS() is more effecient. It's hard to beat an array in C. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: Requiring IEEE 754 support is being discussed on python-dev: https://mail.python.org/archives/list/python-...@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/ -- ___ Python tracker <https://bugs.python.

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

2022-02-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29391 pull_request: https://github.com/python/cpython/pull/31221 ___ Python tracker <https://bugs.python.org/issue45

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

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: I will use this issue to track changes related to PEP 670. -- title: [meta][C API] Avoid C macro pitfalls and usage of static inline functions -> [C API] PEP 670: Convert macros to functions in the Python C

[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: I created GH-31218 which basically restores Python 3.10 code but enhances the test. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29388 pull_request: https://github.com/python/cpython/pull/31218 ___ Python tracker <https://bugs.python.org/issue46

[issue45490] [meta][C API] Avoid C macro pitfalls and usage of static inline functions

2022-02-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29387 pull_request: https://github.com/python/cpython/pull/31217 ___ Python tracker <https://bugs.python.org/issue45

[issue44006] symbol documentation still exists

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue for binhex. https://docs.python.org/dev/library/binhex.html is still there whereas https://github.com/python/cpython/blob/main/Doc/library/binxhex.rst is gone. -- nosy: +vstinner resolution: fixed -> status: closed ->

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: Eryk: I created GH-31214 which uses the user preferred locale if the current LC_TIME locale is "C" or "POSIX". Moreover, it no longer gets the current locale when the class is created. If locale=locale is passed, just use the current

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29384 pull_request: https://github.com/python/cpython/pull/31214 ___ Python tracker <https://bugs.python.org/issue46

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: > I think calendar.Locale*Calendar should try the LC_CTYPE locale if LC_TIME is > "C", i.e. (None, None). Otherwise, it's introducing new default behavior. For > example, with LC_ALL set to "ru_RU.utf8": (...) Oh. Serhiy asked

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "getdefaultlocale() falls back to LANG and LANGUAGE. It allows also to specify a list of looked up environment variables. How could this use case be covered with getlocale()?" What's your use case to use env vars rather than the curren

[issue43882] [security] CVE-2022-0391: urllib.parse should sanitize urls containing ASCII newline and tabs.

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: > Looks like that CVE isn't public yet. > https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0391 > Any chance I can get access (I originally reported this vuln.). Message from Gaurav Kamathe who requested the CVE: "We've sent a request t

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-07 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29377 pull_request: https://github.com/python/cpython/pull/31206 ___ Python tracker <https://bugs.python.org/issue46

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

2022-02-07 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29376 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31206 ___ Python tracker <https://bugs.python.org/issu

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7a0486eaa98083e0407ff491872db6d7a0da2635 by Victor Stinner in branch 'main': bpo-46659: calendar uses locale.getlocale() (GH-31166) https://github.com/python/cpython/commit/7a0486eaa98083e0407ff491872db6d7a0da2635

[issue46648] `test.test_urllib2.MiscTests.test_issue16464` flaky due to external connection

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: I close again the issue. The 3.8 backport is waiting for the Python 3.8 Release Manager approval. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracke

[issue45459] Limited API support for Py_buffer

2022-02-07 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29372 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/31201 ___ Python tracker <https://bugs.python.org/issu

[issue45459] Limited API support for Py_buffer

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: > There's some side effects with "buffer.h" inclusion in Panda3D when building > againt 3.11a5, project manager concerns are here > https://github.com/python/cpython/pull/29991#issuecomment-1031731100 Copy of rdb's message: ""&q

[issue46166] [C API] Get "self" args or non-null co_varnames from frame object with C-API

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset a89772c79183e3e62bf61b92077a04f6ebcc4a2b by Victor Stinner in branch 'main': bpo-46166: Fix compiler warnings in What's New in Python 3.11 (GH-31198) https://github.com/python/cpython/commit/a89772c79183e3e62bf61b92077a04f6ebcc4a2b

[issue46166] [C API] Get "self" args or non-null co_varnames from frame object with C-API

2022-02-07 Thread STINNER Victor
Change by STINNER Victor : -- title: Get "self" args or non-null co_varnames from frame object with C-API -> [C API] Get "self" args or non-null co_varnames from frame object with C-API ___ Python tracker <https://

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: I proposed GH-31198 to fix the compiler warnings in the doc. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-02-07 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31198 ___ Python tracker <https://bugs.python.org/issu

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: > Is there anyway to get the PyObject* associated with a PyFrameObject*? Ah. I see. If you pass a PyFrameObject* frame to PyObject_GetAttrString(), you get a compiler warning. You should cast it explicitly: PyObject_GetAttrString((PyObject*)fr

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: Example of C code that I added to _testcapi: --- static PyObject * get_caller_locals(PyObject *self, PyObject *Py_UNUSED(args)) { PyFrameObject *frame = PyThreadState_GetFrame(PyThreadState_Get()); if (frame == NULL) { Py_RETURN_NONE

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

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: Oh ok, thanks for the clarification :-) -- ___ Python tracker <https://bugs.python.org/issue46323> ___ ___ Python-bugs-list m

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset f20ca766fe404a20daea29230f161a0eb71bb489 by Victor Stinner in branch 'main': bpo-46670: Fix #ifdef in sha3module.c (GH-31180) https://github.com/python/cpython/commit/f20ca766fe404a20daea29230f161a0eb71bb489

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7d8b69e1d1f125454d8cec81ff0dee72f2bef957 by Victor Stinner in branch 'main': bpo-46670: Remove unused macros in the Python directory (GH-31192) https://github.com/python/cpython/commit/7d8b69e1d1f125454d8cec81ff0dee72f2bef957

<    1   2   3   4   5   6   7   8   9   10   >