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

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 00ffc4513df7b89a168e88da4d1e3ac367f7682f by Victor Stinner in 
branch 'main':
bpo-45440: Remove pymath.c fallbacks (GH-28977)
https://github.com/python/cpython/commit/00ffc4513df7b89a168e88da4d1e3ac367f7682f


--

___
Python tracker 
<https://bugs.python.org/issue45440>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30459] PyList_SET_ITEM could be safer

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 51f8196d05f0e271358eee0f90fe044b20449fb5 by Victor Stinner in 
branch 'main':
bpo-30459: Use (void) in macros setting variables (GH-28982)
https://github.com/python/cpython/commit/51f8196d05f0e271358eee0f90fe044b20449fb5


--

___
Python tracker 
<https://bugs.python.org/issue30459>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-45490: "[meta][C API] Avoid C macro pitfalls and usage of static 
inline functions" to discuss macros and static inline functions more generally.

--

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-15 Thread STINNER Victor


New submission from STINNER Victor :

C macros are really cool and useful, but there are a bunch of pitfalls which 
are better to avoid:
https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html

Some macros of the Python C API have been converted to static inline functions 
over the last years. It went smoothly, I am not aware of any major issue with 
these conversions.

This meta issue tracks other issues related to macros and static inline 
functions.


=== Return void ===

One issue is that some macros are treated as an expression and can be reused, 
whereas it was not intended. For example PyList_SET_ITEM() was implemented as 
(simplified code):

  #define PyList_SET_ITEM(op, i, v) (op->ob_item[i] = v)

This expression has a value! Two projects used this value by mistake, like:

  "if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0)"

PyList_SET_ITEM() was fixed by casting the expression to void:

  #define PyList_SET_ITEM(op, i, v) ((void)(op->ob_item[i] = v))

=> bpo-30459



=== Abuse macros as an l-value ===

The Py_TYPE() macro could be used to assign a value: "Py_TYPE(obj) = new_type".

The macro was defined as:

  #define Py_TYPE(ob) (ob->ob_type)

It was converted to a static inline function to disallow using it as an l-value 
and a new Py_SET_TYPE(op, new_type) function was added. These changes give more 
freedom to other Python implementations to implement "PyObject" and 
Py_SET_TYPE().

=> bpo-45476 "[C API] Disallow using PyFloat_AS_DOUBLE() as l-value"
=> bpo-39573 PyObject Py_TYPE/Py_SET_TYPE


=== C API: Macros and embedded Python ===

Sadly, only symbols exported by libpython are accessible to other programming 
languages embedding Python. Macros of the Python C API are simply not available 
to them. Projects embedding Python have to hardcode constants and copy macros 
to their own language, with the risk of being outdated when Python macros are 
updated.

Even some projects written in C cannot use macros, because they only use 
libpython symbols. The vim text editor embeds Python this way.

Also, macros are simply excluded from the Python stable ABI (PEP 384).


=== Performance of static inline functions ===

In bpo-45116, it seems like _PyEval_EvalFrameDefault() reached Visual Studio 
thresholds and some static inline functions are no longer inlined 
(Py_INCREF/Py_DECREF).

I also noticed that when Python is built in debug mode in Visual Studio, static 
inline functions are not inlined. Well, the compiler is free to not inline in 
debug mode. I guess that GCC and clang also skip inlining using -Og and/or -O0 
optimization levels. Using __forceinline and __attribute__((always_inline)) on 
static inline functions (Py_INCREF, Py_TYPE) for debug builds was discussed in 
bpo-45094, but the idea was rejected.

On the other side, sometimes it's better to *disable* inlining on purpose to 
reduce the stack memory consumption, using the Py_NO_INLINE macro. See recent 
measurements of the stack memory usage:
https://bugs.python.org/issue45439#msg403768

In GH-28893, I noticed that converting a static inline function 
(PyObject_CallOneArg) to a regular function made it faster. I am not really 
sure, more benchmarks should be run to really what's going on.


=== Advantages of static inline functions ===

* It's possible to put a breakpoint on a static inline functions.

* Debuggers and profilers are able to get the static inline function names from 
the machine line, even with inline functions.

* Parameters and the return value have well defined types.

* Variables have a local scope.

* There is no risk of evaluating an expression multiple times.

* Regular C code. No need to use "\" character to multi-line statement. No need 
for "do { ... } while (0)" and other quicks to workaround preprocessor 
pitfalls. No abuse of (((parenthesis))).

--
components: C API
messages: 404038
nosy: vstinner
priority: normal
severity: normal
status: open
title: [meta][C API] Avoid C macro pitfalls and usage of static inline functions
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30459] PyList_SET_ITEM could be safer

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27269
pull_request: https://github.com/python/cpython/pull/28982

___
Python tracker 
<https://bugs.python.org/issue30459>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC)

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
title: Performance regression 3.10b1 and later on Windows: Py_DECREF() not 
inlined in PGO build -> Performance regression 3.10b1: inlining issue in the 
big _PyEval_EvalFrameDefault() function with Visual Studio (MSC)

___
Python tracker 
<https://bugs.python.org/issue45116>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45444] test.test_concurrent_futures fail in x86_ 64 architecture

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

What is your operating system? (name/version) Did you try to build Python 
manually and run the test manually? How did you build Python? What are the 
configure flags and compiler flags?

--
nosy: +vstinner

___
Python tracker 
<https://bugs.python.org/issue45444>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

PyThreadState.cframe.use_tracing format changed again: set value set to 0 or 
255.
https://github.com/python/cpython/commit/bd627eb7ed08a891dd1356756feb1ce2600358e4

--

___
Python tracker 
<https://bugs.python.org/issue43760>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-43760: Add PyThreadState_EnterTracing() (GH-28542)

I created changes to use it:

* pythoncapi_compat: 
https://github.com/pythoncapi/pythoncapi_compat/commit/10fde24739cab4547e9c27c31c8804a25e23e8a0
* Cython: https://github.com/cython/cython/pull/4411
* greenlet: https://github.com/python-greenlet/greenlet/pull/267

--

___
Python tracker 
<https://bugs.python.org/issue43760>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 547d26aa08aa5e4ec6e4f8a5587b30b39064a5ba by Victor Stinner in 
branch 'main':
bpo-43760: Add PyThreadState_EnterTracing() (GH-28542)
https://github.com/python/cpython/commit/547d26aa08aa5e4ec6e4f8a5587b30b39064a5ba


--

___
Python tracker 
<https://bugs.python.org/issue43760>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43725] Create a release branch ABI stability regression test

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

> the dump needs to be generated in a docker container using the same compiler 
> version that is used in the CI

I'm not used to docker and I don't know how to get a docker similar than the 
one used by GitHub Action. Is there a documentation somewhere giving commands 
to get the docker image and how to run it?

--

___
Python tracker 
<https://bugs.python.org/issue43725>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27267
pull_request: https://github.com/python/cpython/pull/28979

___
Python tracker 
<https://bugs.python.org/issue45310>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like pickle tests started to crash at build 936, 4 days ago:
https://buildbot.python.org/all/#/builders/402/builds/936

This build was trigged by the change:

commit fcb3d2ff633f3e9a826888d8b29c305a3959ff54
Author: Mark Shannon 
Date:   Mon Oct 11 11:34:02 2021 +0100

Restore PEP 523 functionality. (GH-28871)


I don't know if the commit is related to the crash or not.

--

___
Python tracker 
<https://bugs.python.org/issue45484>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x

2021-10-15 Thread STINNER Victor


New submission from STINNER Victor :

s390x RHEL7 LTO 3.x:
https://buildbot.python.org/all/#/builders/402/builds/979


0:02:00 load avg: 5.14 [193/427/2] test_pickletools crashed (Exit code -11) -- 
running: test_unparse (30.6 sec), test_concurrent_futures (1 min 56 sec), 
test_multiprocessing_spawn (43.2 sec)
Fatal Python error: Segmentation fault

Current thread 0x03ffb8e77700 (most recent call first):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3304 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  (...)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  ...

Extension modules: _testcapi, _testbuffer (total: 2)


and


test_instance_dispatch_table (test.test_pickle.CDispatchTableTests) ... ok
test_appends_on_non_lists (test.test_pickle.CDumpPickle_LoadPickle) ... ok
test_attribute_name_interning (test.test_pickle.CDumpPickle_LoadPickle) ... ok
Fatal Python error: Segmentation fault

Current thread 0x03ff80377700 (most recent call first):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  (...)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py",
 line 3305 in __getattr__
  ...

Extension modules: _testcapi, _testbuffer (total: 2)


--
components: Tests
messages: 404014
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_pickle segfault on s390x RHEL7 LTO 3.x
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45484>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45482] [C API] Move _PyNamespace_New() to the internal C API

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: [C API] Add PySimpleNamespace_New() function -> [C API] Move 
_PyNamespace_New() to the internal C API

___
Python tracker 
<https://bugs.python.org/issue45482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 354c35220d25a893e502014478f6739dad6897f3 by Victor Stinner in 
branch 'main':
bpo-45482: Rename namespaceobject.h to pycore_namespace.h (GH-28975)
https://github.com/python/cpython/commit/354c35220d25a893e502014478f6739dad6897f3


--

___
Python tracker 
<https://bugs.python.org/issue45482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27265
pull_request: https://github.com/python/cpython/pull/28977

___
Python tracker 
<https://bugs.python.org/issue45440>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
title: [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static 
inline functions -> [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

> #define Py_RVALUE(expr) ((void)0, (expr))

Oh, that's a clever trick!

I wrote GH-28976 which uses it.

--

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27264
pull_request: https://github.com/python/cpython/pull/28976

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44113] [C API] Deprecate legacy API for configure Python initialization

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a7f8dfd25a167ccfde9996c499fa38a2aba60022 by Victor Stinner in 
branch 'main':
bpo-44113: Move the What's New entry to Deprecate section (GH-28974)
https://github.com/python/cpython/commit/a7f8dfd25a167ccfde9996c499fa38a2aba60022


--

___
Python tracker 
<https://bugs.python.org/issue44113>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

> The other choice is to move the function to the internal C API.

I created GH-28975 for that.

--

___
Python tracker 
<https://bugs.python.org/issue45482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27263
pull_request: https://github.com/python/cpython/pull/28975

___
Python tracker 
<https://bugs.python.org/issue45482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44113] [C API] Deprecate legacy API for configure Python initialization

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27262
pull_request: https://github.com/python/cpython/pull/28974

___
Python tracker 
<https://bugs.python.org/issue44113>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 105582e74c1817bc6a9d99bcb6540b34a3367292 by Victor Stinner in 
branch 'main':
bpo-45434: Remove Include/eval.h header file (GH-28973)
https://github.com/python/cpython/commit/105582e74c1817bc6a9d99bcb6540b34a3367292


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27261
pull_request: https://github.com/python/cpython/pull/28973

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35081] Move internal headers to Include/internal/

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 063abd931f064a4b6b478b0b6e9aa13ee38d2cff by Victor Stinner in 
branch 'main':
bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)
https://github.com/python/cpython/commit/063abd931f064a4b6b478b0b6e9aa13ee38d2cff


--

___
Python tracker 
<https://bugs.python.org/issue35081>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

For PyObject, I converted Py_REFCNT(), Py_TYPE() and Py_SIZE() to static inline 
functions to enforce the usage of Py_SET_REFCNT(), Py_SET_TYPE() and 
Py_SET_SIZE(). Only a minority of C extensions are affected by these changes. 
Also, there is more pressure from recent optimization projects to abstract 
accesses to PyObject members.

I agree that it doesn't seem that "AS" functions are abused to *set* the inner 
string:

* PyByteArray_AS_STRING()
* PyBytes_AS_STRING()
* PyFloat_AS_DOUBLE()

> If "protecting against wrong use" is the only reason to go down the slippery 
> path of starting to rely on compiler optimizations for performance critical 
> operations, the argument is not good enough.

Again, I'm not aware of any performance issue caused by short static inline 
functions like Py_TYPE() or the proposed PyFloat_AS_DOUBLE(). If there is a 
problem, it should be addressed, since Python uses more and more static inline 
functions.

static inline functions is a common feature of C language. I'm not sure where 
your doubts of bad performance come from.

Using static inline functions has other advantages. It helps debugging and 
profiling, since the function name can be retrieved by debuggers and profilers 
when analysing the machine code. It also avoids macro pitfalls (like abusing a 
macro to use it as an l-value ;-)).

--

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

Petr:
> Just note that these were *not* part of the limited API, which is defined in 
> Misc/stable_abi.txt rather than the #ifdefs: 
> https://docs.python.org/3.10/c-api/stable.html#stable
> If they were, the functions would need to remain in the stable ABI.

Thanks for double checking. I wasn't sure ;-)
https://github.com/python/cpython/pull/28956#issuecomment-943704218

--

___
Python tracker 
<https://bugs.python.org/issue45474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

I created this issue while cleaning the C API. I'm not fully convinced that 
PySimpleNamespace_New() must be made public.

The other choice is to move the function to the internal C API.

--

___
Python tracker 
<https://bugs.python.org/issue45482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +27258
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28970

___
Python tracker 
<https://bugs.python.org/issue45482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor


New submission from STINNER Victor :

Python has a types.SimpleNamespace type which is convenient to cheap a "simple 
namespace". I propose to make its C API public (but exclude it from the limited 
C API): add PySimpleNamespace_New() function.

It's currently used in:

* Modules/timemodule.c: time.get_clock_info(name)
* Python/sysmodule.c: sys.implementation

It's also used in:

* Python/import.c: _PyImport_BootstrapImp()
* Modules/_testmultiphase.c: createfunc_nonmodule() used as the Py_mod_create 
slot

--
components: C API
messages: 403984
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Add PySimpleNamespace_New() function
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8e5de40f90476249e9a2e5ef135143b5c6a0b512 by Victor Stinner in 
branch 'main':
bpo-35134: Move classobject.h to Include/cpython/ (GH-28968)
https://github.com/python/cpython/commit/8e5de40f90476249e9a2e5ef135143b5c6a0b512


--

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35081] Move internal headers to Include/internal/

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue since there is still activity on it.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue35081>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35081] Move internal headers to Include/internal/

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27257
pull_request: https://github.com/python/cpython/pull/28969

___
Python tracker 
<https://bugs.python.org/issue35081>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27256
pull_request: https://github.com/python/cpython/pull/28968

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45084] urllib.parse: remove deprecated functions (splittype, to_bytes, etc.)

2021-10-15 Thread STINNER Victor


STINNER Victor  added the comment:

pip uses deprecated functions indirectly:
https://github.com/python/cpython/pull/28115

Python 3.11 seems to be too early to *remove* functions. We can attempt again 
in the next Python release ;-)

--
resolution:  -> postponed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45084>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-15 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 77b24ba505744532d7cfd721b1c92d205e145180 by Victor Stinner in 
branch 'main':
bpo-35134: Move Include/cellobject.h to Include/cpython/ (GH-28964)
https://github.com/python/cpython/commit/77b24ba505744532d7cfd721b1c92d205e145180


--

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

I searched for "PyFloat_AS_DOUBLE.*=" regex in the PyPI top 5000 projects. I 
couldn't find any project doing that.

I only found perfectly safe comparisons:

traits/ctraits.c:if (PyFloat_AS_DOUBLE(value) <= 
PyFloat_AS_DOUBLE(low)) {
traits/ctraits.c:if (PyFloat_AS_DOUBLE(value) >= 
PyFloat_AS_DOUBLE(high)) {
c/_cffi_backend.c:return PyFloat_AS_DOUBLE(ob) != 0.0;
pandas/_libs/src/klib/khash_python.h:   ( PyFloat_AS_DOUBLE(a) == 
PyFloat_AS_DOUBLE(b) );

--

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27253
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28964

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

commit 37b1d607bf0f1a9c1e89b1715349efc24dc180e0 (upstream/main, main)
Author: Victor Stinner 
Date:   Fri Oct 15 01:50:28 2021 +0200

po-35134: Move Include/funcobject.h to Include/cpython/ (GH-28958)

Remove redundant "#ifndef Py_LIMITED_API" in funcobject.h.

--

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7076bef8ba8836a19d5033f4ceb8eb9837de2301 by Victor Stinner in 
branch 'main':
bpo-45434: Remove useless space in includes (GH-28963)
https://github.com/python/cpython/commit/7076bef8ba8836a19d5033f4ceb8eb9837de2301


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41710] threading.Lock.acquire(timeout) should use sem_clockwait(CLOCK_MONOTONIC)

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 03bbc6066ff40c62edd57612be9150dcf1b123c8 by Victor Stinner in 
branch 'main':
bpo-41710: Fix What's New Entry credit (GH-28962)
https://github.com/python/cpython/commit/03bbc6066ff40c62edd57612be9150dcf1b123c8


--

___
Python tracker 
<https://bugs.python.org/issue41710>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

Raymond:
> AFAICT, no one has ever has problems with these being macros.

This issue is about the API of PyFloat_AS_DOUBLE(). Implementing it as a macro 
or a static inline function is an implementation detail which doesn't matter. 
But I don't know how to disallow "PyFloat_AS_DOUBLE(obj) = value" if it is 
defined as a macro.

Have a look at the Facebook "nogil" project which is incompatible with 
accessing directly the PyObject.ob_refcnt member:
"Extensions must use Py_REFCNT and Py_SET_REFCNT instead of directly accessing 
reference count fields"
https://docs.google.com/document/d/18CXhDb1ygxg-YXNBJNzfzZsDFosB5e6BfnXLlejd9l0/edit

Raymond:
> You could simply document, "don't do that".

Documentation doesn't work. Developers easily fall into traps when it's 
possible to fall. See bpo-30459 for such trap with PyList_SET_ITEM() and 
PyCell_SET() macros. They were misused by two Python projects.


Raymond:
> We really don't have to go on thin ice converting to functions that might or 
> might not be inlined depending on compiler specific nuances.

Do you have a concrete example where a static inline function is not inlined, 
whereas it was inlined when it was a macro? So far, I'm not aware of any 
performance issue like that.

There were attempts to use __attribute__((always_inline)) (Py_ALWAYS_INLINE), 
but so far, using it was not a clear win.

--

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27252
pull_request: https://github.com/python/cpython/pull/28963

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41710] threading.Lock.acquire(timeout) should use sem_clockwait(CLOCK_MONOTONIC)

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27251
pull_request: https://github.com/python/cpython/pull/28962

___
Python tracker 
<https://bugs.python.org/issue41710>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +27250
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28961

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 284994762d820d8e09cc019f8f7c4bc501e37dd4 by Victor Stinner in 
branch 'main':
bpo-45434: Limited Python.h no longer includes stdio.h (GH-28960)
https://github.com/python/cpython/commit/284994762d820d8e09cc019f8f7c4bc501e37dd4


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27249
pull_request: https://github.com/python/cpython/pull/28960

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset af1083e975b9627a5c97013d3a2b9aef0e4b333c by Victor Stinner in 
branch 'main':
bpo-45474: Fix the limited C API of marshal.h (GH-28956)
https://github.com/python/cpython/commit/af1083e975b9627a5c97013d3a2b9aef0e4b333c


--

___
Python tracker 
<https://bugs.python.org/issue45474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests:  -23644

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue since there is new activity on it :-)

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27247
pull_request: https://github.com/python/cpython/pull/28958

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0a883a76cda8205023c52211968bcf87bd47fd6e by Victor Stinner in 
branch 'main':
bpo-35134: Add Include/cpython/floatobject.h (GH-28957)
https://github.com/python/cpython/commit/0a883a76cda8205023c52211968bcf87bd47fd6e


--

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-14 Thread STINNER Victor


New submission from STINNER Victor :

The Python C API provides "AS" functions to convert an object to another type, 
like PyFloat_AS_DOUBLE(). These macros can be abused to be used as l-value: 
"PyFloat_AS_DOUBLE(obj) = new_value;". It prevents to change the PyFloat 
implementation and makes life harder for Python implementations other than 
CPython.

I propose to convert these macros to static inline functions to disallow using 
them as l-value.

I made a similar change for Py_REFCNT(), Py_TYPE() and Py_SIZE(). For these 
functions, I added "SET" variants: Py_SET_REFCNT(), Py_SET_TYPE(), 
Py_SET_SIZE(). Here, I don't think that the l-value case is legit, and so I 
don't see the need to add a way to *set* a value.

For example, I don't think that PyFloat_SET_DOUBLE(obj, value) would make 
sense. A Python float object is supposed to be immutable.

--
components: C API
messages: 403950
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static 
inline functions
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27246
pull_request: https://github.com/python/cpython/pull/28957

___
Python tracker 
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +27245
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28956

___
Python tracker 
<https://bugs.python.org/issue45474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-14 Thread STINNER Victor


New submission from STINNER Victor :

Include/marshal.h defines 2 functions with FILE* argument in the limited C API, 
whereas the PEP 384 disallows that:

"In addition, functions expecting FILE* are not part of the ABI, to avoid 
depending on a specific version of the Microsoft C runtime DLL on Windows."
https://www.python.org/dev/peps/pep-0384/

PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);

I propose to exclude these functions from the limited C API.

Hopefully, they are not part of the documented stable ABI.

--
components: C API
messages: 403941
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] marshal.h must not use FILE* type in the limited C API
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

I tried to remove the  include from Python.h:

-#include// memcpy()

... but it required me to modify 100+ files. I don't know the exact number, I 
gave up after 100 files. I was near half of C extensions built by setup.py, so 
the number total may be around 150 files which should include explicitly 
.

"#include " can now be removed from Python.h, but I'm not sure if it's 
a good idea. I started by removing  and my plan is to see if it 
breaks third party C extensions. Right now, Cython is broken which prevents me 
to use my https://github.com/vstinner/pythonci tool :-(

--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

I decided to merge my PR to address https://bugs.python.org/issue45439 initial 
issue: "[C API] Move usage of **tp_vectorcall_offset** from public headers to 
the internal C API".

Last years, I added `tstate` parameters to internal C functions. The agreement 
was that only internal functions should use it, and indirectly that this 
`tstate` parameter should be hidden. I'm now sure exactly, but `tstate` started 
to pop up in `Include/cpython/abstract.h` around "call" functions. This PR fix 
this issue.

About the impact on performances: well, it's really hard to draw a clear 
conclusion. Inlining, LTO and PGO give different results on runtime performance 
and stack memory usage.

IMO the fact that public C API functions are now regular functions should not 
prevent us to continue (micro) optimizing Python. We can always add a variant 
to the internal C API using an API a little bit different (e.g. add `tstate` 
parameter) or defined as a static inline function, rather than a regular 
function.

The unclear part is if PyObject_CallOneArg() (regular function call) is faster 
than _PyObject_CallOneArg() (static inline function, inlined). The performance 
may depend if it's called in the Python executable or in a dynamic library (PLT 
indirection which may be avoided by `gcc -fno-semantic-interposition`).

Well, happy hacking and let's continue *continuous* benchmarking Python!

--

___
Python tracker 
<https://bugs.python.org/issue45439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3cc56c828d2d8f8659ea49447234bf0d2b87cd64 by Victor Stinner in 
branch 'main':
bpo-45439: Move _PyObject_VectorcallTstate() to pycore_call.h (GH-28893)
https://github.com/python/cpython/commit/3cc56c828d2d8f8659ea49447234bf0d2b87cd64


--

___
Python tracker 
<https://bugs.python.org/issue45439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 
<https://bugs.python.org/issue45452>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

Serhiy: I suppose that this issue can now be closed?

--

___
Python tracker 
<https://bugs.python.org/issue45467>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 
<https://bugs.python.org/issue45247>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 bytes/call => 672 bytes/call (+32 bytes)


clang with LTO:

./configure --with-lto CC=clang LD=lld LDFLAGS="-fuse-ld=lld"
make

=== ref ===

$ ./python stack_overflow-4.py
test_python_call: 9187 calls before crash, stack: 912 bytes/call
test_python_getitem: 15868 calls before crash, stack: 528 bytes/call
test_python_iterator: 11901 calls before crash, stack: 704 bytes/call
test_callonearg: 12468 calls before crash, stack: 672 bytes/call
test_callnoargs: 13091 calls before crash, stack: 640 bytes/call
test_callnoargs_inline: 13092 calls before crash, stack: 640 bytes/call

=> total: 75607 calls, 4096 bytes

=== PR ===

$ ./python stack_overflow-4.py
test_python_call: 9186 calls before crash, stack: 912 bytes/call
test_python_getitem: 15400 calls before crash, stack: 544 bytes/call
test_python_iterator: 11384 calls before crash, stack: 736 bytes/call
test_callonearg: 12177 calls before crash, stack: 688 bytes/call
test_callnoargs: 12468 calls before crash, stack: 672 bytes/call
test_callnoargs_inline: 12467 calls before crash, stack: 672 bytes/call

=> total: 73082 calls, 4224 bytes

--

___
Python tracker 
<https://bugs.python.org/issue45439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 => 528 bytes/call (-96 bytes)
PyObject_CallNoArg(): 608 bytes/call => 512 bytes/call (-96 bytes)
_PyObject_CallNoArg(): 608 bytes/call => 512 bytes/call (-96 bytes)


Python built in release mode with gcc -O3:

   ./configure && make

=== ref ===

$ ./python stack_overflow-4.py
test_python_call: 10070 calls before crash, stack: 832 bytes/call
test_python_getitem: 16894 calls before crash, stack: 496 bytes/call
test_python_iterator: 12773 calls before crash, stack: 656 bytes/call
test_callonearg: 13428 calls before crash, stack: 624 bytes/call
test_callnoargs: 13779 calls before crash, stack: 608 bytes/call
test_callnoargs_inline: 13782 calls before crash, stack: 608 bytes/call

=> total: 80726 calls, 3824 bytes


=== PR ===

$ ./python stack_overflow-4.py
test_python_call: 11901 calls before crash, stack: 704 bytes/call
test_python_getitem: 18703 calls before crash, stack: 448 bytes/call
test_python_iterator: 14961 calls before crash, stack: 560 bytes/call
test_callonearg: 15868 calls before crash, stack: 528 bytes/call
test_callnoargs: 16366 calls before crash, stack: 512 bytes/call
test_callnoargs_inline: 16365 calls before crash, stack: 512 bytes/call

=> total: 94164 calls, 3264 bytes

--
Added file: https://bugs.python.org/file50356/stack_overflow-4.py

___
Python tracker 
<https://bugs.python.org/issue45439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45440>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45440>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45410>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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;
}

--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:`errcode.h` include file distributed as part of Python if
   there was a parse error.  (Note that :file:`errcode.h` is not included by
   :file:`Python.h`, so must be included specifically if needed.)

--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45410>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45410>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 line number.

I agree with that.

--

___
Python tracker 
<https://bugs.python.org/issue45247>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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->shape = &((PyVarObject*)self)->ob_size;
}
...
return 0;
}

This code is not compatible with a fully opaque PyObject structure:
https://bugs.python.org/issue39573#msg401395

--

___
Python tracker 
<https://bugs.python.org/issue45459>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue45453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue40421>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue39947>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45247>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, but
// now is instructions, so we need to adjust it to use it as a byte index.
#if PY_VERSION_HEX >= 0x030A00A7
#define MyFrame_lasti(f)(f->f_lasti * 2)
#else
#define MyFrame_lasti(f)f->f_lasti
#endif // 3.10.0a7
---

f_lasti is used for two things in coverage/ctracer/tracer.c:

(1) get the last opcode:

/* Need to distinguish between RETURN_VALUE and YIELD_VALUE. Read
 * the current bytecode to see what it is.  In unusual circumstances
 * (Cython code), co_code can be the empty string, so range-check
 * f_lasti before reading the byte.
 */
int bytecode = RETURN_VALUE;
PyObject * pCode = MyFrame_GetCode(frame)->co_code;
int lasti = MyFrame_lasti(frame);

if (lasti < PyBytes_GET_SIZE(pCode)) {
bytecode = PyBytes_AS_STRING(pCode)[lasti];
}
if (bytecode != YIELD_VALUE) {
int first = MyFrame_GetCode(frame)->co_firstlineno;
if (CTracer_record_pair(self, self->pcur_entry->last_line, 
-first) < 0) {
goto error;
}
}


(2) get the line number, with a special case for generator which is not started 
yet (lasti < 0)
---
/* A call event is really a "start frame" event, and can happen for
 * re-entering a generator also.  f_lasti is -1 for a true call, and a
 * real byte offset for a generator re-entry.
 */
if (frame->f_lasti < 0) {
self->pcur_entry->last_line = -MyFrame_GetCode(frame)->co_firstlineno;
}
else {
self->pcur_entry->last_line = PyFrame_GetLineNumber(frame);
}
---

Since Python 3.10.0a3, PyFrame_GetLineNumber() handles the case of negative 
f_lasti, thanks to the commit 877df851c3ecdb55306840e247596e7b7805a60a related 
to the PEP 626 implementation:
---
int
PyCode_Addr2Line(PyCodeObject *co, int addrq)
{
if (addrq < 0) {
return co->co_firstlineno;
}
...
}
---


=> coverage would need an abstraction to get the last opcode: use case (1).


I recall that an old version of asyncio also had to get latest opcode, in pure 
Python, to workaround the CPython bpo-21209 bug:

+# Check for CPython issue #21209
+def has_yield_from_bug():
+class MyGen:
+def __init__(self):
+self.send_args = None
+def __iter__(self):
+return self
+def __next__(self):
+return 42
+def send(self, *what):
+self.send_args = what
+return None
+def yield_from_gen(gen):
+yield from gen
+value = (1, 2, 3)
+gen = MyGen()
+coro = yield_from_gen(gen)
+next(coro)
+coro.send(value)
+return gen.send_args != (value,)
+_YIELD_FROM_BUG = has_yield_from_bug()
+del has_yield_from_bug

(...)

+if _YIELD_FROM_BUG:
+# For for CPython issue #21209: using "yield from" and a custom
+# generator, generator.send(tuple) unpacks the tuple instead of passing
+# the tuple unchanged. Check if the caller is a generator using "yield
+# from" to decide if the parameter should be unpacked or not.
+def send(self, *value):
+frame = sys._getframe()
+caller = frame.f_back
+assert caller.f_lasti >= 0
+if caller.f_code.co_code[caller.f_lasti] != _YIELD_FROM:
+value = value[0]
+return self.gen.send(value)
+else:
+def send(self, value):
+return self.gen.send(value)

Hopefully, this code could be be removed from asyncio, since the bug was fixed 
(and asyncio is now only maintained in the Python stdlib, it's not longer a 
third party module).

--

___
Python tracker 
<https://bugs.python.org/issue40421>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45247>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_embed.py", line 1560 in 
create_printer
  File "/home/vstinner/python/main/Lib/test/test_embed.py", line 1595 in 
test_disallow_instantiation

The crash happens when sys.__stdout__.fileno() is not 1 or 2. It happens with 
my recents changes in bpo-45410.

--

___
Python tracker 
<https://bugs.python.org/issue45453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 
<https://bugs.python.org/issue45434>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue45453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >