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

import hook does not work with Python3.12 #229

Closed
aisk opened this issue Nov 25, 2023 · 1 comment · Fixed by #230
Closed

import hook does not work with Python3.12 #229

aisk opened this issue Nov 25, 2023 · 1 comment · Fixed by #230

Comments

@aisk
Copy link
Member

aisk commented Nov 25, 2023

According to sys.meta_path's document:

Changed in version 3.4: Module specs were introduced in Python 3.4, by PEP 451. Earlier versions of Python looked for a method called find_module(). This is still called as a fallback if a meta_path entry doesn’t have a find_spec() method.

thriftpy is using find_module and this is removed in python/cpython#98040, so import hook does not work in Python 3.12

@ookice
Copy link

ookice commented Nov 25, 2023

update Dependencies or review PEPs?

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 a pull request may close this issue.

2 participants