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

requirements: bump attrs 21.2.0 -> 21.3.0 #1029

Merged

Conversation

Bastian-Krause
Copy link
Member

Description
twisted 22.10.0 [1] (released on 2022-10-30) uses attrs imports such as..

from attrs import something

The new import ("attrs", not "attr") is supported since attrs 21.3.0 [2]. labgrid currently pins attrs to 21.2.0. This incompatibility causes issues such as..

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.0/x64/bin/crossbar", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/crossbar/__init__.py", line 143, in run
    from autobahn.twisted import install_reactor
  File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/autobahn/twisted/__init__.py", line 40, in <module>
    from autobahn.twisted.websocket import \
  File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/autobahn/twisted/websocket.py", line 35, in <module>
    from twisted.internet import endpoints
  File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/twisted/internet/endpoints.py", line 63, in <module>
    from twisted.python.systemd import ListenFDs
  File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/twisted/python/systemd.py", line 18, in <module>
    from attrs import Factory, define
ModuleNotFoundError: No module named 'attrs'

While this should have been a dependency resolving issue (twisted requiring a newer version than labgrid pins), it manifests itself as the error above due to an incorrectly specified attrs dependency in twisted [3].

To fix this, bump attrs to 21.3.0.

[1] https://github.com/twisted/twisted/releases/tag/twisted-22.10.0
[2] https://github.com/python-attrs/attrs/blob/965972eba3db4ed1b7eca53fa19aed1f3fcd166b/CHANGELOG.rst#2130-2021-12-28
[3] twisted/twisted#11737

Checklist

  • PR has been tested (via test-suite only)

twisted 22.10.0 [1] (released on 2022-10-30) uses attrs imports such as..

  from attrs import something

The new import ("attrs", not "attr") is supported since attrs 21.3.0 [2].
labgrid currently pins attrs to 21.2.0. This incompatibility causes
issues such as..

  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.11.0/x64/bin/crossbar", line 8, in <module>
      sys.exit(run())
               ^^^^^
    File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/crossbar/__init__.py", line 143, in run
      from autobahn.twisted import install_reactor
    File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/autobahn/twisted/__init__.py", line 40, in <module>
      from autobahn.twisted.websocket import \
    File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/autobahn/twisted/websocket.py", line 35, in <module>
      from twisted.internet import endpoints
    File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/twisted/internet/endpoints.py", line 63, in <module>
      from twisted.python.systemd import ListenFDs
    File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/twisted/python/systemd.py", line 18, in <module>
      from attrs import Factory, define
  ModuleNotFoundError: No module named 'attrs'

While this should have been a dependency resolving issue
(twisted requiring a newer version than labgrid pins), it manifests
itself as the error above due to an incorrectly specified attrs
dependency in twisted [3].

To fix this, bump attrs to 21.3.0.

[1] https://github.com/twisted/twisted/releases/tag/twisted-22.10.0
[2] https://github.com/python-attrs/attrs/blob/965972eba3db4ed1b7eca53fa19aed1f3fcd166b/CHANGELOG.rst#2130-2021-12-28
[3] twisted/twisted#11737

Signed-off-by: Bastian Krause <[email protected]>
@Bastian-Krause Bastian-Krause added the dependencies Pull requests that update a dependency file label Nov 1, 2022
@Bastian-Krause Bastian-Krause merged commit ca45665 into labgrid-project:master Nov 1, 2022
@Bastian-Krause Bastian-Krause deleted the bst/bump-attrs-21.3.0 branch November 1, 2022 15:26
@Bastian-Krause
Copy link
Member Author

attrs 21.3.0 is breaking code coverage: python-attrs/attrs#895

We could either bump to attrs 21.4.0 or try to work around this by specifying coverage's source. I am not sure how the latter would work with pytest-cov, though.

@Bastian-Krause Bastian-Krause mentioned this pull request Nov 2, 2022
1 task
@jluebbe
Copy link
Member

jluebbe commented Nov 3, 2022

It seems the simplest would be to move to a newer attrs, it that doesn't conflict with other dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants