Skip to content

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

Merged
vytas7 merged 6 commits into
falconry:masterfrom
supakeen:py312-imp
Jul 1, 2023
Merged

chore: py312 compat; imp is gone, use importlib#24
vytas7 merged 6 commits into
falconry:masterfrom
supakeen:py312-imp

Conversation

@supakeen

Copy link
Copy Markdown
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

supakeen commented Jun 27, 2023

Copy link
Copy Markdown
Contributor Author

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

codecov-commenter commented Jun 27, 2023

Copy link
Copy Markdown

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

CaselIT commented Jun 27, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@CaselIT

CaselIT commented Jun 28, 2023

Copy link
Copy Markdown
Member

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

CaselIT commented Jun 28, 2023

Copy link
Copy Markdown
Member

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

@vytas7 vytas7 left a comment

Copy link
Copy Markdown
Member

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

CaselIT commented Jul 1, 2023

Copy link
Copy Markdown
Member

@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

vytas7 commented Jul 1, 2023

Copy link
Copy Markdown
Member

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