enkore / i3pystatus

A complete replacement for i3status
https://i3pystatus.readthedocs.io/
MIT License
445 stars 188 forks source link

Python 3.12 Removed the imp package which __init__.py includes #867

Closed TheMineTrooperYT closed 5 months ago

TheMineTrooperYT commented 7 months ago

As described here the imp module was removed in Python version 3.12, and i3pystatus __init__.py file includes the module on line 9:

...
5.  from i3pystatus.core.settings import SettingsBase
6.  from i3pystatus.core.util import formatp, get_module
7. 
8.  import argparse
9.  import imp  # <----
10. import logging
...

A very simple solution as proposed in the aforementioned link is to replace it with importlib:

...
5.  from i3pystatus.core.settings import SettingsBase
6.  from i3pystatus.core.util import formatp, get_module
7.
8.  import argparse
9.  import importlib # <-----
10. import logging
...

Done this on my system, rebuilt the package and it all seems to work.


P.s. this is my first time posting an issue on a public github page, so if I missed some guidelines or smth I apologize.

grazzolini commented 7 months ago

This is fixed by #865

terminalmage commented 5 months ago

Closing as the referenced PR has been merged.