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

Add support for Python 3.10 #1497

Merged
merged 3 commits into from
Oct 9, 2021
Merged

Add support for Python 3.10 #1497

merged 3 commits into from
Oct 9, 2021

Conversation

joshuadavidthomas
Copy link
Contributor

@joshuadavidthomas joshuadavidthomas commented Oct 7, 2021

  • adds Python 3.10 as a version in the testing matrix for the PyTest GitHub Action
  • removes 3.10-dev from the include section at end of testing matrix and provisionally adds 3.11-dev commented out
  • adds py310 to the envlist in tox.ini
  • updates the trove classifiers to add 3.10 as a supported option

Passing tests

Contributor checklist
  • Provided the tests for the changes.
  • Assure PR title is short, clear, and good to be included in the user-oriented changelog
Maintainer checklist
  • Assure one of these labels is present: backwards incompatible, feature, enhancement, deprecation, bug, dependency, docs or skip-changelog as they determine changelog listing.
  • Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

@joshuadavidthomas
Copy link
Contributor Author

Here is the traceback from before I commented out 3.11-dev:

Traceback (most recent call last):
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 145, in __makeattr
    modpath, attrname = self.__map__[name]
                        ~~~~~~~~~~~~^^^^^^
KeyError: '__spec__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/venv-3.11/bin/tox", line 5, in <module>
    from tox import cmdline
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/tox/__init__.py", line 32, in <module>
    from .session import cmdline  # isort:skip
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/tox/session/__init__.py", line 20, in <module>
    from tox import reporter
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/tox/reporter.py", line 127, in <module>
    _INSTANCE = Reporter()
                ^^^^^^^^^^
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/tox/reporter.py", line 32, in __init__
    self._reset(**kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/tox/reporter.py", line 38, in _reset
    self.tw = py.io.TerminalWriter()
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 152, in __makeattr
    result = importobj(modpath, attrname)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 72, in importobj
    module = __import__(modpath, None, None, ['__doc__'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1083, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1043, in _find_and_load_unlocked
  File "/home/runner/venv-3.11/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 150, in __makeattr
    raise AttributeError(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: __spec__
Error: Process completed with exit code 1.

I figured it would be outside the scope of this PR to fix this error, hence including the future version commented out.

Copy link
Member

@atugushev atugushev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks @joshuadavidthomas

@atugushev atugushev added this to the 6.4.0 milestone Oct 8, 2021
@joshuadavidthomas joshuadavidthomas merged commit 3350121 into jazzband:master Oct 9, 2021
@joshuadavidthomas joshuadavidthomas deleted the python3.10 branch October 9, 2021 02:50
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 this pull request may close these issues.

2 participants