[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: > * zodbpickle-2.2.0: src/zodbpickle/_pickle_33.c Technically, zodbpickle works on Python 3.11 and is not impacted by the Py_SIZE() change. _pickle_33.c redefines the Py_SIZE() macro to continue using as an l-value:

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > recordclass-0.16.3: lib/recordclass/_dataobject.c + code generated by Cython I created: https://bitbucket.org/intellimath/recordclass/pull-requests/1/python-311-support-use-py_set_size -- ___ Python tracker

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > * scipy-1.7.3: scipy/_lib/boost/boost/python/object/make_instance.hpp This is a vendored the Boost.org python module which has already been fixed in boost 1.78.0 (commit: January 2021) by:

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > * guppy3-3.1.2: src/sets/bitset.c and src/sets/nodeset.c I created: https://github.com/zhuyifei1999/guppy3/pull/40 -- ___ Python tracker

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > pickle5-0.0.12: pickle5/_pickle.c This project is a backport targeting Python 3.7 and older. I'm not sure if it makes sense to update to it to Python 3.11. It's the same for pysha3 which targets Python <= 3.5. --

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > datatable-1.0.0.tar.gz I created https://github.com/h2oai/datatable/pull/3231 -- ___ Python tracker ___

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > In the PyPI top 5000, I found two projects using PyDescr_TYPE() and > PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was > code generated by SWIG I created bpo-46538 "[C API] Make the PyDescrObject structure opaque" to handle

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-06 Thread STINNER Victor
STINNER Victor added the comment: > python-snappy-0.6.0: maybe_resize() in snappy/snappymodule.cc I proposed a fix: https://github.com/andrix/python-snappy/pull/114 -- ___ Python tracker

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-06 Thread STINNER Victor
STINNER Victor added the comment: > In the PyPI top 5000, I found two projects using PyDescr_TYPE() and > PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was > code generated by SWIG I proposed a first PR for Py_TYPE(): https://github.com/swig/swig/pull/2116

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > mypy-0.910 I proposed a fix: https://github.com/python/mypy/pull/11652 -- ___ Python tracker ___

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > Naked-0.1.31 Affected code is only code generated by Cython: the project only has to regenerated code with a recent Cython version. -- ___ Python tracker

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > pysha3-1.0.2 This module must not be used on Python 3.6 and newer which has a built-in support for SHA-3 hash functions. Example: $ python3.6 Python 3.6.15 (default, Sep 5 2021, 00:00:00) >>> import hashlib >>> h=hashlib.new('sha3_224');

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > frozendict-2.1.1 If I understand correctly, this module is compatible with the PEP 674, it only has to copy Python 3.11 header files once Python 3.11 is released, to port the project to Python 3.11. Incompatable code is not part of the "frozendict"

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > * zstd-1.5.0.2: src/python-zstd.c I proposed a fix upstream: https://github.com/sergey-dryabzhinsky/python-zstd/pull/70 -- ___ Python tracker

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-01 Thread STINNER Victor
STINNER Victor added the comment: Oops, sorry, pycurl-7.44.1 and PyGObject-3.42.0 are not affected, they only define Py_SET_TYPE() macro for backward compatibility. So right now, only 14 projects are affected. -- ___ Python tracker

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-01 Thread STINNER Victor
STINNER Victor added the comment: I updated my ./search_pypi_top_5000.py script to ignore files generated by Cython. On PyPI top 5000, I only found 16 projects impacted by the PEP 674 (16/5000 = 0.3%): * datatable-1.0.0 * frozendict-2.1.1 * guppy3-3.1.2 * M2Crypto-0.38.0 *

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor
STINNER Victor added the comment: Attached pep674_regex.py generated a regex to search for code incompatible with the PEP 674. To download PyPI top 5000, you can use my script: https://github.com/vstinner/misc/blob/main/cpython/download_pypi_top.py To grep a regex in tarball and ZIP

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor
STINNER Victor added the comment: In the PyPI top 5000 projects, I found 32 projects using "Py_SIZE(obj) = new_size": 8 of them are written manually, 24 use Cython. 8 projects using "Py_SIZE(obj) = new_size": * guppy3-3.1.2: src/sets/bitset.c and src/sets/nodeset.c * mypy-0.910:

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor
STINNER Victor added the comment: I found 4 projects using "Py_TYPE(obj) = new_type;" in the PyPI top 5000: mypy-0.910: * mypyc/lib-rt/misc_ops.c: Py_TYPE(template_) = _Type; * mypyc/lib-rt/misc_ops.c: Py_TYPE(t) = metaclass; recordclass-0.16.3: * lib/recordclass/_dataobject.c: Py_TYPE(op)

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor
STINNER Victor added the comment: In the PyPI top 5000, I found two projects using PyDescr_TYPE() and PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was code generated by SWIG: * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.2

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor
Change by STINNER Victor : -- title: [C API] Disallow using PyFloat_AS_DOUBLE() as l-value -> [C API] PEP 674: Disallow using macros as l-value ___ Python tracker ___