Open brentvollebregt opened 9 months ago
To add more info to this, I see support for the find_module
API has been removed in Python 3.12 as noted in the changelog here:
Support for
find_loader()
andfind_module()
APIs have been removed. (Contributed by Barry Warsaw in gh-98040.)
The changelog recommends using find_spec()
instead.
After upgrading to Python 3.12, importing an extension, for example
from bottle.ext.websocket import websocket
, now gives the following error:My environment:
Reproduction:
pip install bottle==0.12.25 bottle-websocket==0.2.9
Investigation / Potential Solution:
I see this error does not occur on master but it does on the release-0.12 branch / 0.12.25 tag. Using the changes from https://github.com/bottlepy/bottle/commit/ca6762c559c5e71e0dff71dc97eb4c6b3ed9bbcd that are currently on master seems to fix this issue.