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

2806: Remove all imports of deprecated imp module #2807

Merged
merged 5 commits into from
Feb 22, 2024

Conversation

krzywon
Copy link
Contributor

@krzywon krzywon commented Feb 9, 2024

Description

This removes all references to the imp module that has been deprecated since Python v3.4 and fully removed in Python v3.12, in favor of importlib resources. The old module was still in three places, GuiUtils (unused), build_sphinx (breaking py3.12), and run_one (used occasionally).

Fixes #2806

How Has This Been Tested?

The docs build, and running a single test file with run_one succeeds.

Review Checklist (please remove items if they don't apply):

  • Code has been reviewed
  • Functionality has been tested
  • Windows installer (GH artifact) has been tested (installed and worked)
  • MacOSX installer (GH artifact) has been tested (installed and worked)

Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

Exactly what stackoverflow says should be done.
Changes look good.

There is still a reference to imp in MainWindow\PackageGatherer. Should it be removed?

@krzywon
Copy link
Contributor Author

krzywon commented Feb 10, 2024

Exactly what stackoverflow says should be done.

I feel called out...

There is still a reference to imp in MainWindow\PackageGatherer. Should it be removed?

Yes. I'll look into it.

@butlerpd
Copy link
Member

Should this also be against 6.0.0?

@butlerpd butlerpd added the Discuss At The Call Issues to be discussed at the fortnightly call label Feb 13, 2024
@butlerpd
Copy link
Member

@wpotrzebowski to check for mac compatibility

@butlerpd butlerpd removed the Discuss At The Call Issues to be discussed at the fortnightly call label Feb 13, 2024
@wpotrzebowski wpotrzebowski merged commit 1c5285b into main Feb 22, 2024
18 checks passed
@wpotrzebowski wpotrzebowski deleted the 2806-imp-module-deprecation branch February 22, 2024 06: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.

imp module is removed in python3.12
4 participants