cms-sw / SCRAM

Software Configuration And Management - CMS internal build tool
Other
10 stars 8 forks source link

`import imp` is deprecation in Python 3.11 in favour of `importlib` and is removed in Python 3.12 #71

Closed ShamrockLee closed 3 months ago

ShamrockLee commented 3 months ago

When building SCRAMv3 with Python 3.12, setuptools complains about missing module imp:

       > Traceback (most recent call last):
       >   File "/build/source/nix_run_setup", line 8, in <module>
       >     exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
       >   File "setup.py", line 6, in <module>
       >     import imp
       > ModuleNotFoundError: No module named 'imp'

As the official documentation of imp and the StackOverflow answer point out, we need to migrate from imp to importlib to resolve this build failure.

cmsbuild commented 3 months ago

cms-bot internal usage

cmsbuild commented 3 months ago

A new Issue was created by @ShamrockLee.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

Dr15Jones commented 3 months ago

Assign core

cmsbuild commented 3 months ago

New categories assigned: core

@Dr15Jones,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks