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.11 #152

Merged
merged 7 commits into from
Oct 2, 2022
Merged

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Oct 2, 2022

Resolves #63.

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Add support for Python 3.11, refactoring a tiny bit the method importing stdlib along the way, and enable tests on the CI.
cf3ada0 also slightly updates the CI to provide faster feedback to users, by removing fail-fast in order to run all tests, in case tests fail on multiple versions, and removing needs when not strictly needed.

I noticed that 3.11 was added then removed because of a random issue. We had the same issue on Poetry, but only on macOS, and had a workaround for it. Since we don't use macOS on the CI in deptry, there's some chance that the issue only happens on macOS on more recent Python 3.11 (we now are at rc2, whereas the previous failures happened on beta5), so I'd suggest that we re-add tests and see if we still notice a failure. If we do, we can apply the same fix that was made on Poetry.

Just so you know, 3.11-dev for actions/setup-python means "latest 3.11 version, including alphas/betas", as per the documentation. So once 3.11.0 final is released and available, it will automatically be selected.

@codecov-commenter
Copy link

Codecov Report

Merging #152 (d81b09e) into main (e71dc6a) will increase coverage by 0.7%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main    #152     +/-   ##
=======================================
+ Coverage   92.2%   92.9%   +0.7%     
=======================================
  Files         42      43      +1     
  Lines       1348    1357      +9     
=======================================
+ Hits        1243    1261     +18     
+ Misses       105      96      -9     
Impacted Files Coverage Δ
deptry/module.py 97.3% <100.0%> (+7.6%) ⬆️
deptry/stdlibs/py311.py 100.0% <100.0%> (ø)
tests/test_module.py 100.0% <100.0%> (ø)
deptry/stdlibs/py37.py 100.0% <0.0%> (+100.0%) ⬆️
deptry/stdlibs/py38.py 100.0% <0.0%> (+100.0%) ⬆️
deptry/stdlibs/py310.py 100.0% <0.0%> (+100.0%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mkniewallner mkniewallner marked this pull request as ready for review October 2, 2022 13:13
@fpgmaas
Copy link
Owner

fpgmaas commented Oct 2, 2022

@mkniewallner For deptry, the issue also occurred on other OS than MacOS. In this case, the issue occurred in the CI/CD pipeline on Ubuntu 20.04.

Here is the failed CI/CD pipeline, and here is the pipeline that ran successfully directly before it.

But let's see if the issue is solved with 3.11-dev. Otherwise, we'll revert again and see if we have to open an issue in another project.

@mkniewallner
Copy link
Collaborator Author

@mkniewallner For deptry, the issue also occurred on other OS than MacOS. In this case, the issue occurred in the CI/CD pipeline on Ubuntu 20.04.

Here is the failed CI/CD pipeline, and here is the pipeline that ran successfully directly before it.

But let's see if the issue is solved with 3.11-dev. Otherwise, we'll revert again and see if we have to open an issue in another project.

Maybe bumping to ubuntu-22.04 could help too. The best way to know is to merge and see 😄

@mkniewallner mkniewallner merged commit 9c886fe into fpgmaas:main Oct 2, 2022
@mkniewallner mkniewallner deleted the support-3.11 branch October 2, 2022 16:31
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.

Enable tox unit tests for Python 3.11
3 participants