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

Test failures with Python 3.13.0b1 #292

Closed
mgorny opened this issue May 8, 2024 · 3 comments · Fixed by #294
Closed

Test failures with Python 3.13.0b1 #292

mgorny opened this issue May 8, 2024 · 3 comments · Fixed by #294

Comments

@mgorny
Copy link

mgorny commented May 8, 2024

BUG/PROBLEM REPORT / FEATURE REQUEST

What I did:

  1. Installed Python 3.13.0b1.
  2. tox -e py313

What I expect to happen:

Tests passing :-).

What actually happened:

$ tox -e py313
py313: recreate env because python changed version_info=[3, 13, 0, 'alpha', 6]->[3, 13, 0, 'beta', 1]
py313: remove tox env folder /tmp/zope.interface/.tox/py313
py313: install_deps> python -I -m pip install --pre Sphinx --pre
.pkg-cpython313: recreate env because python changed version_info=[3, 13, 0, 'alpha', 6]->[3, 13, 0, 'beta', 1]
.pkg-cpython313: remove tox env folder /tmp/zope.interface/.tox/.pkg-cpython313
.pkg-cpython313: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg-cpython313: _optional_hooks> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg-cpython313: get_requires_for_build_editable> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg-cpython313: install_requires_for_build_editable> python -I -m pip install wheel
.pkg-cpython313: build_editable> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py313: install_package_deps> python -I -m pip install --pre Sphinx 'coverage>=5.0.3' repoze.sphinx.autointerface setuptools sphinx-rtd-theme zope.event zope.testing --pre
py313: install_package> python -I -m pip install --pre --force-reinstall --no-deps /tmp/zope.interface/.tox/.tmp/package/2/zope.interface-6.4.dev0-0.editable-cp313-cp313-linux_x86_64.whl --pre
py313: commands[0]> coverage run -p -m unittest discover -s src
E
======================================================================
ERROR: zope.interface (unittest.loader._FailedTest.zope.interface)
----------------------------------------------------------------------
ImportError: Failed to import test module: zope.interface
Traceback (most recent call last):
  File "/usr/lib/python3.13/unittest/loader.py", line 429, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.13/unittest/loader.py", line 339, in _get_module_from_name
    __import__(name)
    ~~~~~~~~~~^^^^^^
  File "/tmp/zope.interface/src/zope/interface/__init__.py", line 58, in <module>
    _wire()
    ~~~~~^^
  File "/tmp/zope.interface/src/zope/interface/interface.py", line 1117, in _wire
    from zope.interface.interfaces import IElement
  File "/tmp/zope.interface/src/zope/interface/interfaces.py", line 55, in <module>
    class IElement(Interface):
    ...<91 lines>...
            """
  File "/tmp/zope.interface/src/zope/interface/interface.py", line 774, in __init__
    self.__attrs = self.__compute_attrs(attrs)
                   ~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/tmp/zope.interface/src/zope/interface/interface.py", line 793, in __compute_attrs
    aname: update_value(aname, aval)
           ~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/tmp/zope.interface/src/zope/interface/interface.py", line 789, in update_value
    raise InvalidInterface("Concrete attribute, " + aname)
zope.interface.exceptions.InvalidInterface: Concrete attribute, __firstlineno__


----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
py313: exit 1 (0.16 seconds) /tmp/zope.interface> coverage run -p -m unittest discover -s src pid=282042
  py313: FAIL code 1 (12.37=setup[12.21]+cmd[0.16] seconds)
  evaluation failed :( (12.96 seconds)

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

Gentoo Linux amd64
CPython 3.13.0b1
zope.interface 78fdf3d

@mgorny
Copy link
Author

mgorny commented May 8, 2024

After adding:

diff --git a/src/zope/interface/interface.py b/src/zope/interface/interface.py
index 733e395..8e0d9ad 100644
--- a/src/zope/interface/interface.py
+++ b/src/zope/interface/interface.py
@@ -802,6 +802,9 @@ class InterfaceClass(_InterfaceClassBase):
                 # __static_attributes__: Python 3.13a6+
                 # https://github.com/python/cpython/pull/115913
                 '__static_attributes__',
+                # __firstlineno__: Python 3.13b1+
+                # https://github.com/python/cpython/pull/118475
+                '__firstlineno__',
             )
             and aval is not _decorator_non_return
         }

I'm getting another test failure:

======================================================================
FAIL: test_inside_function_call (zope.interface.tests.test_advice.FrameInfoTest.test_inside_function_call)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/zope.interface/src/zope/interface/tests/test_advice.py", line 57, in test_inside_function_call
    self.assertTrue(f_locals is locals()) # ???
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

@hroncok
Copy link

hroncok commented May 10, 2024

I found a regression in Python 3.13.0b1 which involves locals(). It might be related to the later failure.

python/cpython#118888

tristanlatr added a commit to twisted/pydoctor that referenced this issue May 10, 2024
@musicinmybrain
Copy link

I'm getting another test failure:

======================================================================
FAIL: test_inside_function_call (zope.interface.tests.test_advice.FrameInfoTest.test_inside_function_call)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/zope.interface/src/zope/interface/tests/test_advice.py", line 57, in test_inside_function_call
    self.assertTrue(f_locals is locals()) # ???
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true

This is probably related to PEP 667. The frame.f_locals is now a write-through proxy object of type FrameLocalsProxy.

github-merge-queue bot referenced this issue in chezmoi-sh/atlas May 16, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [zope.interface](https://github.com/zopefoundation/zope.interface) |
minor | `==6.3` -> `==6.4` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/zopefoundation/zope.interface/badge)](https://securityscorecards.dev/viewer/?uri=github.com/zopefoundation/zope.interface)
|

---

### Release Notes

<details>
<summary>zopefoundation/zope.interface (zope.interface)</summary>

###
[`v6.4`](https://github.com/zopefoundation/zope.interface/blob/HEAD/CHANGES.rst#64-2024-05-15)

[Compare
Source](https://github.com/zopefoundation/zope.interface/compare/6.3...6.4)

\================

-   Adjust for incompatible changes in Python 3.13b1.
(`#&#8203;292
<https://github.com/zopefoundation/zope.interface/issues/292>`)

-   Build windows wheels on GHA.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
tristanlatr added a commit to twisted/pydoctor that referenced this issue May 17, 2024
* Remove support for python 3.13 until zopefoundation/zope.interface#292 is fixed

* Switch to pypi OIDC publishing.

* Add meta job to handle required jobs for protected branches.

* Unpin twisted requirement for the mypy environment.

* And fix the twisted intersphinx as a drive-by change.

---------

Co-authored-by: tristanlatr <[email protected]>
Co-authored-by: Adi Roiban <[email protected]>
xunleii referenced this issue in chezmoi-sh/atlas May 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [zope.interface](https://github.com/zopefoundation/zope.interface) |
minor | `==6.3` -> `==6.4` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/zopefoundation/zope.interface/badge)](https://securityscorecards.dev/viewer/?uri=github.com/zopefoundation/zope.interface)
|

---

### Release Notes

<details>
<summary>zopefoundation/zope.interface (zope.interface)</summary>

###
[`v6.4`](https://github.com/zopefoundation/zope.interface/blob/HEAD/CHANGES.rst#64-2024-05-15)

[Compare
Source](https://github.com/zopefoundation/zope.interface/compare/6.3...6.4)

\================

-   Adjust for incompatible changes in Python 3.13b1.
(`#&#8203;292
<https://github.com/zopefoundation/zope.interface/issues/292>`)

-   Build windows wheels on GHA.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
xunleii referenced this issue in chezmoi-sh/atlas May 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [zope.interface](https://github.com/zopefoundation/zope.interface) |
minor | `==6.3` -> `==6.4` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/zopefoundation/zope.interface/badge)](https://securityscorecards.dev/viewer/?uri=github.com/zopefoundation/zope.interface)
|

---

### Release Notes

<details>
<summary>zopefoundation/zope.interface (zope.interface)</summary>

###
[`v6.4`](https://github.com/zopefoundation/zope.interface/blob/HEAD/CHANGES.rst#64-2024-05-15)

[Compare
Source](https://github.com/zopefoundation/zope.interface/compare/6.3...6.4)

\================

-   Adjust for incompatible changes in Python 3.13b1.
(`#&#8203;292
<https://github.com/zopefoundation/zope.interface/issues/292>`)

-   Build windows wheels on GHA.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
xunleii referenced this issue in chezmoi-sh/atlas May 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [zope.interface](https://github.com/zopefoundation/zope.interface) |
minor | `==6.3` -> `==6.4` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/zopefoundation/zope.interface/badge)](https://securityscorecards.dev/viewer/?uri=github.com/zopefoundation/zope.interface)
|

---

### Release Notes

<details>
<summary>zopefoundation/zope.interface (zope.interface)</summary>

###
[`v6.4`](https://github.com/zopefoundation/zope.interface/blob/HEAD/CHANGES.rst#64-2024-05-15)

[Compare
Source](https://github.com/zopefoundation/zope.interface/compare/6.3...6.4)

\================

-   Adjust for incompatible changes in Python 3.13b1.
(`#&#8203;292
<https://github.com/zopefoundation/zope.interface/issues/292>`)

-   Build windows wheels on GHA.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/nex.rpi).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants