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

fixes removed module in Python 3.12 #984

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

Spoffy
Copy link
Contributor

@Spoffy Spoffy commented May 14, 2024

The 'imp' module was removed in Python 3.12.

This replaces it with a generic named ModuleType, which has an identical dict property.

Copy link
Member

@paulfitz paulfitz left a comment

Choose a reason for hiding this comment

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

This is a strange question for 2024 but do you know if this works in Python 2.7? Our SaaS still has some early adopter users on 2.7

@Spoffy
Copy link
Contributor Author

Spoffy commented May 17, 2024

Good question @paulfitz! The type definitely exists in 2.7, but I'll check it runs as expected.

@Spoffy
Copy link
Contributor Author

Spoffy commented May 20, 2024

This works with Python 2.7, tested in our docker container with Python 3 removed.

Copy link
Member

@paulfitz paulfitz left a comment

Choose a reason for hiding this comment

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

Thanks @Spoffy !

@Spoffy Spoffy merged commit 991e43f into main May 20, 2024
13 checks passed
@Spoffy Spoffy deleted the spoffy/python-3.12-import-fix branch May 20, 2024 13:56
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.

None yet

2 participants