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

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: My first attempt: Add PyThreadState_EnterTracing() and PyThreadState_LeaveTracing() https://github.com/python/cpython/pull/28542 It adds an abstraction on accesses to PyThreadState.tracing and PyThreadState.cframe.use_tracing members

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Using LTO, the PR 28893 *increases* the stack memory usage. It's the opposite :-) PyObject_CallOneArg(): 672 bytes/call => 688 bytes/call (+16 bytes) PyObject_CallNoArg(): 640 bytes/call => 672 bytes/call (+32 bytes) _PyObject_CallNoArg(): 640 byte

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: I measured the stack consumption using attached sys_call.patch and stack_overflow-4.py. Using gcc -O3, the stack consumption with PR 28893 is *way better* on the 6 benchmarks (6 ways to call functions), especially: PyObject_CallOneArg(): 624 bytes/call

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50355/sys_call.patch ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Python-bugs-list m

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: > [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() > is not defined Well, the final fix is to remove the code path when isinf() is not available and require it to build Python ;-) -- resolution: -> fixed sta

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 194a9526d8ee6abbbe58ef48520ec87a7e83f327 by Victor Stinner in branch 'main': bpo-45440: Require math.h isinf() to build (GH-28894) https://github.com/python/cpython/commit/194a9526d8ee6abbbe58ef48520ec87a7e83f327

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset aac29af6785712019d34f1a7f15b3c408a4f68ae by Victor Stinner in branch 'main': bpo-45434: pyport.h no longer includes (GH-28914) https://github.com/python/cpython/commit/aac29af6785712019d34f1a7f15b3c408a4f68ae

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45461> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 676201a59f90caace606d11d4172aa74c1cd4992 by Victor Stinner in branch 'main': bpo-45410: regrtest replaces print_warning.orig_stderr (GH-28926) https://github.com/python/cpython/commit/676201a59f90caace606d11d4172aa74c1cd4992

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: PyRun_InteractiveOneObjectEx() returns a single error code of errcode.h: E_EOF (11): if (mod == NULL) { _PyArena_Free(arena); if (errcode == E_EOF) { PyErr_Clear(); return E_EOF; } return -1

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 713bb19356bce9b8f2b95461834fe1dae505f889 by Victor Stinner in branch 'main': bpo-45434: Mark the PyTokenizer C API as private (GH-28924) https://github.com/python/cpython/commit/713bb19356bce9b8f2b95461834fe1dae505f889

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Oh, Include/errcode.h *is* used by PyRun_InteractiveOneFlags() and its variants. It's mentioned in its documentation: Returns ``0`` when the input was executed successfully, ``-1`` if there was an exception, or an error code from the :file

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27215 pull_request: https://github.com/python/cpython/pull/28926 ___ Python tracker <https://bugs.python.org/issue45

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Can you please try write a simpler (shorter) reproducer? -- ___ Python tracker <https://bugs.python.org/issue45461> ___ ___

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27214 pull_request: https://github.com/python/cpython/pull/28924 ___ Python tracker <https://bugs.python.org/issue45

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset bbe7497c5a44c2b4ec726605cf5a9086ba02daf1 by Victor Stinner in branch 'main': bpo-45434: Remove pystrhex.h header file (GH-28923) https://github.com/python/cpython/commit/bbe7497c5a44c2b4ec726605cf5a9086ba02daf1

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 97308dfcdc0696e0b116c37386e2ff4d72e6c3f4 by Victor Stinner in branch 'main': bpo-45434: Move _Py_BEGIN_SUPPRESS_IPH to pycore_fileutils.h (GH-28922) https://github.com/python/cpython/commit/97308dfcdc0696e0b116c37386e2ff4d72e6c3f4

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27213 pull_request: https://github.com/python/cpython/pull/28923 ___ Python tracker <https://bugs.python.org/issue45

[issue45434] [C API] Clean-up the Python.h header file

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27212 pull_request: https://github.com/python/cpython/pull/28922 ___ Python tracker <https://bugs.python.org/issue45

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 773330773968f211c77abc7b5b525faa7b3c35a2 by Victor Stinner in branch 'main': bpo-45410: regrtest -W leaves stdout/err FD unchanged (GH-28915) https://github.com/python/cpython/commit/773330773968f211c77abc7b5b525faa7b3c35a2

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

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: > Rather than have Cython laboriously create a Python frame with fake code > object, etc., it would make much more sense for us to offer an API to insert > a "native" frame into the stack and update the li

[issue45459] Limited API support for Py_buffer

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Py_buffer.shape requires a Py_ssize_t* pointer. It's not convenient. For example, the array module uses: static int array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags) { ... if ((flags & PyBUF_ND)==PyBUF_ND) { view-&g

[issue45453] test_embed.StdPrinterTests() crash if stdout FD is not 1 or 2

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x -> test_embed.StdPrinterTests() crash if stdout FD is not 1 or 2 versions:

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7e74d99c532f3eb55a86d10d30c068b03f2ad025 by Miss Islington (bot) in branch '3.10': bpo-45453: Fix test_embed.StdPrinterTests (GH-28916) (GH-28917) https://github.com/python/cpython/commit/7e74d99c532f3eb55a86d10d30c068b03f2ad025

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

2021-10-13 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/issue40

[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-10-13 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/issue39

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

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- title: Add explicit support for Cython to the C API. -> [C API] Add explicit support for Cython to the C API ___ Python tracker <https://bugs.python.org/issu

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

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: The coverage project has a ctrace C extension which access PyFrameObject.f_lasti which is gone in Python 3.11. It uses MyFrame_lasti() helper to handle Python 3.10 lasti change: --- // The f_lasti field changed meaning in 3.10.0a7. It had been bytes

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

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: We need to add C API to abstract access to structures used by Cython: * bpo-39947: PyThreadState * bpo-40421: PyFrameObject -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue45

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 678433f25e0d08dad7edf72be8f0cf9420e4ed2c by Victor Stinner in branch 'main': bpo-45453: Fix test_embed.StdPrinterTests (GH-28916) https://github.com/python/cpython/commit/678433f25e0d08dad7edf72be8f0cf9420e4ed2c

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27207 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28916 ___ Python tracker <https://bugs.python.org/issu

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: Ah, I reproduced a crash locally: 0:00:19 load avg: 2.00 [3/3/1] test_embed crashed (Exit code -11) Fatal Python error: Segmentation fault Current thread 0x7fef0ea9f2c0 (most recent call first): File "/home/vstinner/python/main/Lib/test/test_emb

[issue45434] [C API] Clean-up the Python.h header file

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset c63623a0a6892ce8683dbf8c769793ea897e6ba8 by Victor Stinner in branch 'main': bpo-45434: bytearrayobject.h no longer includes (GH-28913) https://github.com/python/cpython/commit/c63623a0a6892ce8683dbf8c769793ea897e6ba8

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: Oh, maybe this is no traceback on a crash because of my recent libregrtest changes in bpo-45410. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: It also crashed on the Address Sanitizer job of GitHub Action: https://github.com/python/cpython/runs/3877327574 0:09:15 load avg: 4.46 [267/413/1] test_embed crashed (Exit code -11) -- running: test_gdb (1 min 2 sec), test_peg_generator (57.4 sec) == Tests

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27205 pull_request: https://github.com/python/cpython/pull/28915 ___ Python tracker <https://bugs.python.org/issue45

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: > bpo-45410: Enhance libregrtest -W/--verbose3 option (GH-28908) Oh. Sadly, with this change, faulthandler is no longer able to dump a traceback on a crash :-( -- ___ Python tracker <https://bugs.pyth

[issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x

2021-10-12 Thread STINNER Victor
New submission from STINNER Victor : test_embed does crash randomly on AMD64 Fedora Rawhide Clang 3.x: * https://buildbot.python.org/all/#/builders/188/builds/880 * https://buildbot.python.org/all/#/builders/188/builds/879 So far, I failed to reproduce the issue. -- components: Tests

[issue45434] [C API] Clean-up the Python.h header file

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27204 pull_request: https://github.com/python/cpython/pull/28914 ___ Python tracker <https://bugs.python.org/issue45

[issue45434] [C API] Clean-up the Python.h header file

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 489176e4285314f9ea87b8bd91fe1d55d9af2c42 by Victor Stinner in branch 'main': bpo-45434: Convert Py_GETENV() macro to a function (GH-28912) https://github.com/python/cpython/commit/489176e4285314f9ea87b8bd91fe1d55d9af2c42

[issue45434] [C API] Clean-up the Python.h header file

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27203 pull_request: https://github.com/python/cpython/pull/28913 ___ Python tracker <https://bugs.python.org/issue45

[issue45434] [C API] Clean-up the Python.h header file

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27202 pull_request: https://github.com/python/cpython/pull/28912 ___ Python tracker <https://bugs.python.org/issue45

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: 5 years ago, I added _PyObject_CallArg1() (similar to PyObject_CallOneArg()) and then I removed it since it consumed more stack memory than existing function, whereas I added _PyObject_CallArg1() to reduce the stack consumption. commit

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: I should also check again the stack consumption. Old issues: * bpo-29465: Modify _PyObject_FastCall() to reduce stack consumption * bpo-29234: Disable inlining of _PyStack_AsTuple() to reduce the stack consumption * bpo-29227: Reduce C stack consumption

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2 by Victor Stinner in branch 'main': bpo-45410: Enhance libregrtest -W/--verbose3 option (GH-28908) https://github.com/python/cpython/commit/dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27199 pull_request: https://github.com/python/cpython/pull/28908 ___ Python tracker <https://bugs.python.org/issue45

[issue44359] test_ftplib.test_makeport() fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: I reproduced manually the issue. test_makeport() can trigger the "Uncaught thread exception: Exception". test_makeport (test.test_ftplib.TestTLS_FTPClassMixin) ... Warning -- Uncaught thread exception: Exception Exception in thread Thread-67:

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50351/bench2.py ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Python-bugs-list mailin

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50350/test_bench2.patch ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Python-bug

[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the fixes Vinay and Serhiy! -- stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/i

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50349/bench_no_args_public.py ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Pytho

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50347/bench_no_args.patch ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Python-bug

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50348/bench_no_args_inline.py ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Pytho

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50346/bench.py ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Python-bugs-list mailin

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50345/test_bench.patch ___ Python tracker <https://bugs.python.org/issue45439> ___ ___ Python-bug

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset d943d19172aa93ce88bade15b9f23a0ce3bc72ff by Victor Stinner in branch 'main': bpo-45439: Move _PyObject_CallNoArgs() to pycore_call.h (GH-28895) https://github.com/python/cpython/commit/d943d19172aa93ce88bade15b9f23a0ce3bc72ff

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: Calling sys.stdout doesn't help :-( Fail at commit ce3489cfdb9f0e050bdc45ce5d3902c2577ea683: https://buildbot.python.org/all/#/builders/73/builds/788 --- 0:00:10 load avg: 7.59 [306/427/1] test_ftplib failed (env changed) Warning -- Uncaught thread exception

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27190 pull_request: https://github.com/python/cpython/pull/28895 ___ Python tracker <https://bugs.python.org/issue45

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27189 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28894 ___ Python tracker <https://bugs.python.org/issu

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: The Py_FORCE_DOUBLE() macro was added in bpo-5724 by the change: commit e05e8409e1b47a2c018ad8a67016546217165c60 Author: Mark Dickinson Date: Mon May 4 13:30:43 2009 + Issue #5724: Fix cmath failures on Solaris 10

[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-11 Thread STINNER Victor
New submission from STINNER Victor : If the HAVE_DECL_ISINF macro is not defined in pyconfig.h, the Py_IS_INFINITY macro is defined as: #define Py_IS_INFINITY(X) \ ((X) && (Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X))) Problem: Py_FORCE_DOUBLE() is excluded from the limit

[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: Nicely spotted, thanks for the fix! I prefer to not backport to avoid any risk of regression. In my experience, the build system is fragile. -- components: +Build -C API resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset be21706f3760bec8bd11f85ce02ed6792b07f51f by Mike Gilbert in branch 'main': bpo-45433: Do not link libpython against libcrypt (GH-28881) https://github.com/python/cpython/commit/be21706f3760bec8bd11f85ce02ed6792b07f51f -- nosy

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27188 pull_request: https://github.com/python/cpython/pull/28893 ___ Python tracker <https://bugs.python.org/issue45

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset ce3489cfdb9f0e050bdc45ce5d3902c2577ea683 by Victor Stinner in branch 'main': bpo-45439: Rename _PyObject_CallNoArg() to _PyObject_CallNoArgs() (GH-28891) https://github.com/python/cpython/commit/ce3489cfdb9f0e050bdc45ce5d3902c2577ea683

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27186 pull_request: https://github.com/python/cpython/pull/28891 ___ Python tracker <https://bugs.python.org/issue45

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset fb8f208a4ddb38eedee71f9ecd0f22058802dab1 by Victor Stinner in branch 'main': bpo-45439: _PyObject_Call() only checks tp_vectorcall_offset once (GH-28890) https://github.com/python/cpython/commit/fb8f208a4ddb38eedee71f9ecd0f22058802dab1

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27185 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28890 ___ Python tracker <https://bugs.python.org/issu

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor
New submission from STINNER Victor : The public C API should avoid accessing directly PyTypeObject members: see bpo-40170. I propose to move static inline functions to the internal C API, and only expose opaque function calls to the public C API. -- components: C API messages

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

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: Include/pymath.h is now better, I close the issue ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 61190e092b8258ede92ac543bb39bad0f7168104 by Victor Stinner in branch 'main': bpo-45412: Move copysign() define to pycore_pymath.h (GH-28889) https://github.com/python/cpython/commit/61190e092b8258ede92ac543bb39bad0f7168104

[issue41123] Remove Py_UNICODE APIs except PEP 623

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1f316ea3b4fa319eec4f375fb683467b424c964e by Victor Stinner in branch 'main': bpo-41123: Remove Py_UNICODE_COPY() and Py_UNICODE_FILL() (GH-28887) https://github.com/python/cpython/commit/1f316ea3b4fa319eec4f375fb683467b424c964e

[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 03ea862b8a8234176761240ba122254e9eb11663 by Victor Stinner in branch 'main': bpo-45434: Python.h no longer includes (GH-2) https://github.com/python/cpython/commit/03ea862b8a8234176761240ba122254e9eb11663

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

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27184 pull_request: https://github.com/python/cpython/pull/28889 ___ Python tracker <https://bugs.python.org/issue45

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

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7103356455c8b0c2ba3523929327756413337a31 by Victor Stinner in branch 'main': bpo-45412: Move _Py_SET_53BIT_PRECISION_START to pycore_pymath.h (GH-28882) https://github.com/python/cpython/commit/7103356455c8b0c2ba3523929327756413337a31

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

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7 by Victor Stinner in branch 'main': bpo-45412: Update _Py_ADJUST_ERANGE1() comment (GH-28884) https://github.com/python/cpython/commit/a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1ebd798fddef51e1f6fd40a4860278a1851ac268 by Victor Stinner in branch 'main': bpo-45410: Add test.support.flush_std_streams() (GH-28885) https://github.com/python/cpython/commit/1ebd798fddef51e1f6fd40a4860278a1851ac268

[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27183 pull_request: https://github.com/python/cpython/pull/2 ___ Python tracker <https://bugs.python.org/issue45

[issue41123] Remove Py_UNICODE APIs except PEP 623

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 2.0 -> 3.0 pull_requests: +27182 pull_request: https://github.com/python/cpython/pull/28887 ___ Python tracker <https://bugs.python.org/issu

[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 47717d1186563695e798b40350d15b00d04a5237 by Victor Stinner in branch 'main': bpo-45434: Cleanup Python.h header file (GH-28883) https://github.com/python/cpython/commit/47717d1186563695e798b40350d15b00d04a5237

[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: > 2 tests failed:test_tk test_ttk_guionly They also failed on: * x86 Gentoo Non-Debug with X 3.9 * x86 Gentoo Non-Debug with X 3.10 -- ___ Python tracker <https://bugs.python.org/issu

[issue43139] test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45436: test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x. -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue43

[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-43139: test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- title: test_configure_type() failed on -> test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x ___ Python tracker <https://bugs.python.org/issu

[issue45436] test_configure_type() failed on

2021-10-11 Thread STINNER Victor
New submission from STINNER Victor : x86 Gentoo Non-Debug with X 3.x: https://buildbot.python.org/all/#/builders/58/builds/891 test.pythoninfo: tkinter.TCL_VERSION: 8.6 tkinter.TK_VERSION: 8.6 tkinter.info_patchlevel: 8.6.11 2 tests failed: test_tk test_ttk_guionly

[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27180 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28883 ___ Python tracker <https://bugs.python.org/issu

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27179 pull_request: https://github.com/python/cpython/pull/28885 ___ Python tracker <https://bugs.python.org/issue45

[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: Sadly, a recent build failure (at commit 560a79f94e94de66a18f2a5e4194c2fe51e2adf1) still write "Uncaught thread exception" at the top of logs: --- 0:00:11 load avg: 6.07 [315/427/1] test_ftplib failed (env changed) Warning -- Uncaught thread

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

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: > *This isn't reliable. See Py_OVERFLOWED comments. Oops, Py_OVERFLOWED() has been removed: I created PR 28884 to fix the comment. -- ___ Python tracker <https://bugs.python.org/issu

[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor
New submission from STINNER Victor : I would like to remove #include from Python.h, and make Python.h smaller. -- components: C API messages: 403675 nosy: vstinner priority: normal severity: normal status: open title: [C API] Clean-up the Python.h header file versions: Python 3.11

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

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27178 pull_request: https://github.com/python/cpython/pull/28884 ___ Python tracker <https://bugs.python.org/issue45

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

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: > +1 for the removals. (We should fix #44970 too, but as you say that's a > separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow > should be replaced, too.) Well, it's scary of use functions which are documented as:

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

2021-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27177 pull_request: https://github.com/python/cpython/pull/28882 ___ Python tracker <https://bugs.python.org/issue45

[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: Thanks Olaf van der Spek, I merged your PR and backported it to 3.9 and 3.10 branches. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 _

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

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a by Victor Stinner in branch 'main': bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820) https://github.com/python/cpython/commit/2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a

[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 659812b451aefe1f0e5f83540296519a5fb8f313 by Olaf van der Spek in branch 'main': bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828) https://github.com/python/cpython/commit/659812b451aefe1f0e5f83540296519a5fb8f313

[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-19007: "precise time.time() under Windows 8: use GetSystemTimePreciseAsFileTime". -- ___ Python tracker <https://bugs.python.o

[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: Mark Shannon: > Struct names aren't exported as symbols. Right. > So, I assume that are worried about name clashes for code that has > #include "Python.h". Right :-) > Isn't the threadstate struct supposed to be opaque? Technic

[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5aca34f17c4baf8e4882a7e8a827cff06ac6ef25 by Miss Islington (bot) in branch '3.10': bpo-45401: Change shouldRollover() methods to only rollover regular f… (GH-28822) (#28867) https://github.com/python/cpython/commit

[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset ac421c348bf422f9a0d85fe0a1de3fa3f4886650 by Miss Islington (bot) in branch '3.9': bpo-45401: Change shouldRollover() methods to only rollover regular f… (GH-28822) (#28866) https://github.com/python/cpython/commit

<    9   10   11   12   13   14   15   16   17   18   >