-
-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
uncertainties imports imp via past at import time, but imp is deprecated from the standard library, which means that in the current state, uncertainties will not be compatible with Python 3.12
This is a problem for me as I want to future-proof a package I'm maintaining which depends on uncertainties, so I'd like to treat deprecation warnings as errors, and don't want to ignore the ones coming from uncertainties.
I believe the patch is trivial so I'll give it a go but I wanted to open an issue first for reference.
reproduction:
# t.py
import uncertaintiesand running on the command line
python3 -Werror t.pyyields
Traceback (most recent call last):
File "/Users/robcleme/dev/uncertainties/t.py", line 1, in <module>
import uncertainties
File "/Users/robcleme/dev/uncertainties/uncertainties/__init__.py", line 225, in <module>
from .core import *
File "/Users/robcleme/dev/uncertainties/uncertainties/core.py", line 22, in <module>
from past.builtins import basestring
File "/Users/robcleme/.pyenv/versions/uncertainties-dev/lib/python3.9/site-packages/past/builtins/__init__.py", line 54, in <module>
from past.builtins.misc import (apply, chr, cmp, execfile, intern, oct,
File "/Users/robcleme/.pyenv/versions/uncertainties-dev/lib/python3.9/site-packages/past/builtins/misc.py", line 45, in <module>
from imp import reload
File "/Users/robcleme/.pyenv/versions/3.9.7/lib/python3.9/imp.py", line 31, in <module>
warnings.warn("the imp module is deprecated in favour of importlib; "
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
sphuber
Metadata
Metadata
Assignees
Labels
No labels