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

chore: py312 compat; imp is gone, use importlib #24

Merged
merged 6 commits into from
Jul 1, 2023
Merged

chore: py312 compat; imp is gone, use importlib #24

merged 6 commits into from
Jul 1, 2023

Conversation

supakeen
Copy link
Contributor

The long-deprecated imp module is gone in Python 3.12. Use the importlib module to provide the same functionality.

Fedora is switching to Python 3.12 in rawhide (the upcoming Fedora 39 release). The imp module has been deprecated since Python 3.4 and is removed in 3.12.

This PR changes the imp usage to instead use importlib.

The long-deprecated `imp` module is gone in Python 3.12. Use the
`importlib` module to provide the same functionality.
@supakeen
Copy link
Contributor Author

supakeen commented Jun 27, 2023

If you wish I could add py311/py312 and remove py35 from/to your GH actions here as well or perhaps that should be a separate PR?

@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2023

Codecov Report

Merging #24 (e31f6c8) into master (2f060dc) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master       #24   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines           67        67           
  Branches        13        10    -3     
=========================================
  Hits            67        67           

@CaselIT
Copy link
Member

CaselIT commented Jun 27, 2023

If you wish I could add py311/py312 and remove py35 from/to your GH actions here as well or perhaps that should be a separate PR?

if you could it would be great!

@supakeen
Copy link
Contributor Author

I've updated the CI to add py311 and drop py35 in this PR. It won't apply until it's on main I think (I'm not good at GitHub actions). I didn't add py312 yet as it's still an alpha.

@supakeen
Copy link
Contributor Author

I was wrong, it does apply them immediately here :)

@CaselIT
Copy link
Member

CaselIT commented Jun 28, 2023

I've updated the CI to add py311 and drop py35 in this PR. It won't apply until it's on main I think (I'm not good at GitHub actions). I didn't add py312 yet as it's still an alpha.

it's possible to add also 3.12 by setting the python version to "3.12.0-alpha - 3.12"

@CaselIT
Copy link
Member

CaselIT commented Jun 28, 2023

It probably makes sense to create a new release for this. cc @vytas7 @kgriffs

Copy link
Member

@vytas7 vytas7 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 for this PR!
I've just taken the liberty of bumping up python_requires (this is actually much more important nowadays than Trove classifiers).

@vytas7 vytas7 merged commit c7830f1 into falconry:master Jul 1, 2023
@CaselIT
Copy link
Member

CaselIT commented Jul 1, 2023

@vytas7 it probably makes sense to also release this to pypi.
can we fix also #23?

@supakeen supakeen deleted the py312-imp branch July 1, 2023 13:42
@vytas7
Copy link
Member

vytas7 commented Jul 1, 2023

Probably not yet re #23, I think it is better to tackle it incrementally, and I'd like to start with restructuring the project's architecture first along the lines of #10.

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.

4 participants