zopefoundation/Acquisition

Build breaks on Python 3.11

icemac opened this issue · 1 comments

What I did:

Run the tests for Python 3.11.0a2.

What I expect to happen:

Successful test run.

What actually happened:

$ tox -epy311
py311 create: /.../Acquisition/.tox/py311
py311 develop-inst: /.../Acquisition
ERROR: invocation failed (exit code 1), logfile: /.../Acquisition/.tox/py311/log/py311-1.log
======================================================================= log start ========================================================================
Looking in indexes: https://pypi.org/simple, https://mihowitz:****@development.verdi.de/devpi/verdi/prod/+simple/
Obtaining file:///.../Acquisition
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting ExtensionClass>=4.2.0
  Using cached https://development.verdi.de/devpi/verdi/prod/%2Bf/662/b2dc300520a7a/ExtensionClass-4.5.1.tar.gz (34 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting zope.interface
  Using cached zope.interface-5.4.0-cp311-cp311-macosx_11_0_x86_64.whl
Collecting zope.testrunner
  Using cached https://development.verdi.de/devpi/verdi/prod/%2Bf/ae7/fbeb862a36083/zope.testrunner-5.4.0-py2.py3-none-any.whl (216 kB)
Requirement already satisfied: setuptools in ./.tox/py311/lib/python3.11/site-packages (from zope.interface->Acquisition==4.10.dev0) (58.3.0)
Collecting zope.exceptions
  Using cached https://development.verdi.de/devpi/verdi/prod/%2Bf/bb9/8cc07e90ebe59/zope.exceptions-4.4-py2.py3-none-any.whl (18 kB)
Collecting six
  Using cached https://development.verdi.de/devpi/root/pypi/%2Bf/8ab/b2f1d86890a2d/six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: ExtensionClass
  Building wheel for ExtensionClass (setup.py): started
  Building wheel for ExtensionClass (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /.../Acquisition/.tox/py311/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/setup.py'"'"'; __file__='"'"'/private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-wheel-y9_17peb
       cwd: /private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/
  Complete output (53 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11.0-x86_64-3.11
  creating build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
  copying src/ComputedAttribute/__init__.py -> build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
  copying src/ComputedAttribute/tests.py -> build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
  creating build/lib.macosx-11.0-x86_64-3.11/MethodObject
  copying src/MethodObject/__init__.py -> build/lib.macosx-11.0-x86_64-3.11/MethodObject
  copying src/MethodObject/tests.py -> build/lib.macosx-11.0-x86_64-3.11/MethodObject
  creating build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
  copying src/ExtensionClass/__init__.py -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
  copying src/ExtensionClass/tests.py -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
  running egg_info
  writing src/ExtensionClass.egg-info/PKG-INFO
  writing dependency_links to src/ExtensionClass.egg-info/dependency_links.txt
  writing requirements to src/ExtensionClass.egg-info/requires.txt
  writing top-level names to src/ExtensionClass.egg-info/top_level.txt
  reading manifest file 'src/ExtensionClass.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE.txt'
  writing manifest file 'src/ExtensionClass.egg-info/SOURCES.txt'
  copying src/ComputedAttribute/_ComputedAttribute.c -> build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
  copying src/MethodObject/_MethodObject.c -> build/lib.macosx-11.0-x86_64-3.11/MethodObject
  copying src/ExtensionClass/ExtensionClass.h -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
  copying src/ExtensionClass/_ExtensionClass.c -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
  copying src/ExtensionClass/_compat.h -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
  creating build/lib.macosx-11.0-x86_64-3.11/ExtensionClass/pickle
  copying src/ExtensionClass/pickle/pickle.c -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass/pickle
  running build_ext
  building 'ExtensionClass._ExtensionClass' extension
  creating build/temp.macosx-11.0-x86_64-3.11
  creating build/temp.macosx-11.0-x86_64-3.11/src
  creating build/temp.macosx-11.0-x86_64-3.11/src/ExtensionClass
  /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -Isrc -I/.../Acquisition/.tox/py311/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/ExtensionClass/_ExtensionClass.c -o build/temp.macosx-11.0-x86_64-3.11/src/ExtensionClass/_ExtensionClass.o
  src/ExtensionClass/_ExtensionClass.c:840:16: error: expression is not assignable
    Py_TYPE(typ) = ECExtensionClassType;
    ~~~~~~~~~~~~ ^
  src/ExtensionClass/_ExtensionClass.c:800:33: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
            if (typ->tp_basicsize <= sizeof(_emptyobject))
                ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~
  src/ExtensionClass/_ExtensionClass.c:985:32: error: expression is not assignable
    Py_TYPE(&ExtensionClassType) = &PyType_Type;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  src/ExtensionClass/_ExtensionClass.c:995:22: error: expression is not assignable
    Py_TYPE(&BaseType) = &ExtensionClassType;
    ~~~~~~~~~~~~~~~~~~ ^
  src/ExtensionClass/_ExtensionClass.c:1003:42: error: expression is not assignable
    Py_TYPE(&NoInstanceDictionaryBaseType) = &ExtensionClassType;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  1 warning and 4 errors generated.
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for ExtensionClass
  Running setup.py clean for ExtensionClass
Failed to build ExtensionClass
Installing collected packages: zope.interface, zope.exceptions, six, ExtensionClass, zope.testrunner, Acquisition
    Running setup.py install for ExtensionClass: started
    Running setup.py install for ExtensionClass: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /.../Acquisition/.tox/py311/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/setup.py'"'"'; __file__='"'"'/private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-record-8278nq5v/install-record.txt --single-version-externally-managed --compile --install-headers /.../Acquisition/.tox/py311/include/site/python3.11/ExtensionClass
         cwd: /private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/
    Complete output (55 lines):
    running install
    /.../Acquisition/.tox/py311/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_py
    creating build
    creating build/lib.macosx-11.0-x86_64-3.11
    creating build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
    copying src/ComputedAttribute/__init__.py -> build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
    copying src/ComputedAttribute/tests.py -> build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
    creating build/lib.macosx-11.0-x86_64-3.11/MethodObject
    copying src/MethodObject/__init__.py -> build/lib.macosx-11.0-x86_64-3.11/MethodObject
    copying src/MethodObject/tests.py -> build/lib.macosx-11.0-x86_64-3.11/MethodObject
    creating build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
    copying src/ExtensionClass/__init__.py -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
    copying src/ExtensionClass/tests.py -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
    running egg_info
    writing src/ExtensionClass.egg-info/PKG-INFO
    writing dependency_links to src/ExtensionClass.egg-info/dependency_links.txt
    writing requirements to src/ExtensionClass.egg-info/requires.txt
    writing top-level names to src/ExtensionClass.egg-info/top_level.txt
    reading manifest file 'src/ExtensionClass.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    adding license file 'LICENSE.txt'
    writing manifest file 'src/ExtensionClass.egg-info/SOURCES.txt'
    copying src/ComputedAttribute/_ComputedAttribute.c -> build/lib.macosx-11.0-x86_64-3.11/ComputedAttribute
    copying src/MethodObject/_MethodObject.c -> build/lib.macosx-11.0-x86_64-3.11/MethodObject
    copying src/ExtensionClass/ExtensionClass.h -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
    copying src/ExtensionClass/_ExtensionClass.c -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
    copying src/ExtensionClass/_compat.h -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass
    creating build/lib.macosx-11.0-x86_64-3.11/ExtensionClass/pickle
    copying src/ExtensionClass/pickle/pickle.c -> build/lib.macosx-11.0-x86_64-3.11/ExtensionClass/pickle
    running build_ext
    building 'ExtensionClass._ExtensionClass' extension
    creating build/temp.macosx-11.0-x86_64-3.11
    creating build/temp.macosx-11.0-x86_64-3.11/src
    creating build/temp.macosx-11.0-x86_64-3.11/src/ExtensionClass
    /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -Isrc -I/.../Acquisition/.tox/py311/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/ExtensionClass/_ExtensionClass.c -o build/temp.macosx-11.0-x86_64-3.11/src/ExtensionClass/_ExtensionClass.o
    src/ExtensionClass/_ExtensionClass.c:840:16: error: expression is not assignable
      Py_TYPE(typ) = ECExtensionClassType;
      ~~~~~~~~~~~~ ^
    src/ExtensionClass/_ExtensionClass.c:800:33: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
              if (typ->tp_basicsize <= sizeof(_emptyobject))
                  ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~
    src/ExtensionClass/_ExtensionClass.c:985:32: error: expression is not assignable
      Py_TYPE(&ExtensionClassType) = &PyType_Type;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    src/ExtensionClass/_ExtensionClass.c:995:22: error: expression is not assignable
      Py_TYPE(&BaseType) = &ExtensionClassType;
      ~~~~~~~~~~~~~~~~~~ ^
    src/ExtensionClass/_ExtensionClass.c:1003:42: error: expression is not assignable
      Py_TYPE(&NoInstanceDictionaryBaseType) = &ExtensionClassType;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    1 warning and 4 errors generated.
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /.../Acquisition/.tox/py311/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/setup.py'"'"'; __file__='"'"'/private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-install-ld_8nlao/extensionclass_61c21a0fe7954764a661895b303a5cd0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dn/l6fksjj91v78hz2503q68vr40000h1/T/pip-record-8278nq5v/install-record.txt --single-version-externally-managed --compile --install-headers /.../Acquisition/.tox/py311/include/site/python3.11/ExtensionClass Check the logs for full command output.

======================================================================== log end =========================================================================
________________________________________________________________________ summary _________________________________________________________________________
ERROR:   py311: InvocationError for command /.../Acquisition/.tox/py311/bin/python -m pip install --exists-action w -e '/.../Acquisition[test]' (exited with code 1)

What version of Python and Zope/Addons I am using:

Python 3.11.0a2
Acquisition: master

Seems to be caused by zopefoundation/ExtensionClass#37.