Uranium icon indicating copy to clipboard operation
Uranium copied to clipboard

UM/PluginRegistry.py:4: DeprecationWarning: the imp module is deprecated...

Open hroncok opened this issue 2 years ago • 1 comments

Just a heads up that I see the following warning on Python 3.10 when I start Cura 4.12.1:

/usr/lib/python3.10/site-packages/UM/PluginRegistry.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
  import imp

hroncok avatar Jan 03 '22 10:01 hroncok

This warning has been there since Python 3.4 in fact. Since the start of Cura 2's development, when the plug-in system was introduced. They now give a targeted version when it will be removed in stead of just "in the future".

A long time ago we did try changing to importlib but didn't have a lot of success. It may be worth another try, but for the moment it doesn't give us any trouble yet. I think this'll be one of those things that we'll cross when we get there.

Ghostkeeper avatar Jan 13 '22 10:01 Ghostkeeper

This was actually removed from Python 3.12.

hroncok avatar Jul 09 '23 07:07 hroncok

Fixed in https://github.com/Ultimaker/Uranium/pull/915

hroncok avatar Dec 05 '23 14:12 hroncok