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

snactor: Fix load_module missing in Python 3.12 #869

Closed

Conversation

matejmatuska
Copy link
Member

@matejmatuska matejmatuska commented Jun 28, 2024

The solution is taken from #855.

Comment on lines +34 to +36
spec = importer.find_spec(name)
mod = importlib.util.module_from_spec(spec)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how that would work, but since both find_spec and module_from_spec were added in python 3.4 and python 3.5, should we covert both of them inside a condition to only load if that's the specific version? If that code runs on python2.7, that will probably fail. If snactor doesn't run on python 2.7 at all, it might be fine 🤔

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I will add the condition, this is still work in progress.

@matejmatuska matejmatuska force-pushed the fix-snactor-load_module branch from eae9c9a to 03c651c Compare June 28, 2024 14:11
@matejmatuska matejmatuska reopened this Jun 28, 2024
@pirat89 pirat89 added this to the 8.10/9.5 milestone Jul 2, 2024
@matejmatuska matejmatuska force-pushed the fix-snactor-load_module branch from 933f39f to 63ec949 Compare July 12, 2024 09:37
@matejmatuska
Copy link
Member Author

Closing, this will be covered in #855

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.

3 participants