Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 on GHA compatibility issue #99

Closed
Tracked by #1123
dataflake opened this issue Apr 20, 2023 · 4 comments
Closed
Tracked by #1123

Python 3.12 on GHA compatibility issue #99

dataflake opened this issue Apr 20, 2023 · 4 comments

Comments

@dataflake
Copy link
Member

dataflake commented Apr 20, 2023

The exception shown below is thrown on Python 3.12 on the macOS and Ubuntu GitHub Actions runners. Please note:

  • I cannot reproduce it on a local Linux/x86_64 (Rocky Linux 9)
  • I cannot reproduce it on a local macOS/arm64
  • I cannot reproduce it on a local macOS/x86_64 with the same universal2-Architecture Python used by the GHA runner
  • The zope.proxy test suite runs fine on Python 3.12 on GHA, indicating zope.proxy itself is not the culprit
Error in test test___getattr___w_checker_unauthorized (zope.security.tests.test_proxy.ProxyPyTests.test___getattr___w_checker_unauthorized)
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.0-alpha.7/x64/lib/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/opt/hostedtoolcache/Python/3.12.0-alpha.7/x64/lib/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "/opt/hostedtoolcache/Python/3.12.0-alpha.7/x64/lib/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
  File "/home/runner/work/zope.security/zope.security/src/zope/security/tests/test_proxy.py", line 55, in test___getattr___w_checker_unauthorized
    self.assertRaises(Unauthorized, getattr, proxy, 'bar')
  File "/opt/hostedtoolcache/Python/3.12.0-alpha.7/x64/lib/python3.12/unittest/case.py", line 778, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/opt/hostedtoolcache/Python/3.12.0-alpha.7/x64/lib/python3.12/unittest/case.py", line 238, in handle
    callable_obj(*args, **kwargs)
  File "/home/runner/work/zope.security/zope.security/src/zope/security/proxy.py", line 156, in __getattr__
    wrapped = super().__getattribute__('_wrapped')
SystemError: <class 'super'> returned a result with an exception set
@dataflake dataflake changed the title Python 3.12 compatibility issue Python 3.12 on GHA compatibility issue Apr 20, 2023
@icemac
Copy link
Member

icemac commented Apr 24, 2023

Could it be that zopefoundation/zope.proxy#43 is the reason behind this problem? Maybe it is just not triggered by the zope.proxy tests.
See python/cpython#73734 for details about the replacement for the deprecated function.

@d-maurer
Copy link
Contributor

d-maurer commented Apr 24, 2023 via email

@dataflake
Copy link
Member Author

Click on the Actions tab at the top, select a test run and then scroll down the right-side pane. The wheels are listed underneath the warning and error messages and can be downloaded from there.

@icemac
Copy link
Member

icemac commented Jun 13, 2023

Using Python 3.12b2 the problems vanished, see #100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants