labscript-suite / labscript-utils

Shared modules used by the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦. Includes a graphical exception handler, debug tools, configuration management, cross platform filepath conversions, unit conversions and custom GUI widgets.
http://labscriptsuite.org
Other
2 stars 45 forks source link

Module watcher imp removal #106

Closed dihm closed 2 months ago

dihm commented 5 months ago

This removes the calls to imp.acquire_lock and imp.release_lock, which removes imp as an import dependency allowing us to side-step the deprecation in 3.12.

Apparently global import locks have been done away with since Python 3.3 in favor of module-level import locks. These locks appear to be automatically done by CPython so I don't think any replacement is necessary.

Obviously, some basic testing in a functioning experiment is necessary.

Partially addressed #100

dihm commented 5 months ago

Note that this depends on #105, so either that PR should merge first, or both get merged together.