swmm-python
swmm-python copied to clipboard
DeprecationWarnings related to SWIG types when running tests on Python 3.12
Issue Type: Bug
Description: When running unit tests for this repository on Python 3.12 (all operating systems), a series of DeprecationWarnings are displayed:
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
See: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Steps to Reproduce:
- Run the unit tests with Python 3.12 on any operating system.
Additional Notes:
- Not sure about other Python versions.
- These warnings may be related to underlying SWIG bindings.
I think should be fixed in the next release of swig. See https://github.com/swig/swig/issues/2881#issuecomment-2877988848
more info here. I think 4.4.0 will be released ahead of python 3.14....hopefully.