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

Modules imp and asynchat removed in Python 3.12 #603

Open
TinoDidriksen opened this issue Sep 3, 2024 · 1 comment
Open

Modules imp and asynchat removed in Python 3.12 #603

TinoDidriksen opened this issue Sep 3, 2024 · 1 comment
Labels
bug crucial Things that are crucial (must be fixed within a couple days)

Comments

@TinoDidriksen
Copy link
Member

TinoDidriksen commented Sep 3, 2024

I've upgraded the Torro server to latest Ubuntu 24.04 LTS, which has Python 3.12.

Phenny uses the imp module which says: "Deprecated since version 3.4, will be removed in version 3.12: The imp module is deprecated in favor of importlib."

Ditto for asynchat => asyncio

As a result, the bot doesn't currently run.

@TinoDidriksen TinoDidriksen added bug crucial Things that are crucial (must be fixed within a couple days) labels Sep 3, 2024
@TinoDidriksen TinoDidriksen changed the title Module imp removed in Python 3.12 Modules imp and asynchat removed in Python 3.12 Sep 3, 2024
mr-martian added a commit that referenced this issue Sep 3, 2024
mr-martian added a commit that referenced this issue Sep 3, 2024
Really we should port to asyncio, but that's a more complex change
than imp → importlib, so a band-aid solution will do for now.
@TinoDidriksen
Copy link
Member Author

Further errors: https://paste.debian.net/1328314/

mr-martian added a commit that referenced this issue Sep 3, 2024
- imp → importlib
- asynchat → pyasynchat (TODO: port to asyncio)
- regex flags should be at the beginning of the string
- tweak timezone scraper a bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crucial Things that are crucial (must be fixed within a couple days)
Projects
None yet
Development

No branches or pull requests

1 participant