GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.04k stars 230 forks source link

Dropped support for python<3.10 #209

Closed 3CHosler closed 2 years ago

3CHosler commented 2 years ago

In src/wrapt/import.py at line 161, The comment that says 3.4 introduced the split from load_module to create_module and exec_module might be wrong. According to the python documentation that schism is new in python 3.10. As a result, wrapt errors out in python versions less than 3.10.

GrahamDumpleton commented 2 years ago

Can you provide an actual error message and traceback, plus if possible a small example program that shows the problem? This isn't much to go on. Plus the code wasn't written so as to check for a specific Python version but should have been able to automatically adapt no matter the Python version, so there is probably more to it than just the Python version.

GrahamDumpleton commented 2 years ago

FWIW, the comment about Python 3.4 is because of what the Python documentation says about when the change happened. https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.create_module

3CHosler commented 2 years ago

You're right, I'm so sorry! I was getting an error because the zipimporter API lagged behind the importer API. It updates to match in 3.10 https://docs.python.org/3/library/zipimport.html Thank you for your help, sorry for the false flag!