Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imp module is deprecated in python3 #34489

Closed
sroychow opened this issue Jul 14, 2021 · 9 comments
Closed

imp module is deprecated in python3 #34489

sroychow opened this issue Jul 14, 2021 · 9 comments

Comments

@sroychow
Copy link
Contributor

While using edmConfigDump the following warning is seen.

Warning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

A fix that I tried is this :-

import importlib.machinery
loader = importlib.machinery.SourceFileLoader("pycfg", options.filename)
cfo = loader.load_module()

Other script which has this is edmConfigSplit. There are ~10 other configs where this module is used.

@cmsbuild
Copy link
Contributor

A new Issue was created by @sroychow Suvankar Roy Chowdhury.

@Dr15Jones, @perrotta, @dpiparo, @silviodonato, @smuzaffar, @makortel, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

assign core

@cmsbuild
Copy link
Contributor

New categories assigned: core

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

@smuzaffar
Copy link
Contributor

@Dr15Jones @makortel , this was fixed ... right?

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 24, 2024

cms-bot internal usage

@makortel
Copy link
Contributor

I see edmConfigDump and edmConfigSplit were addressed in #42650.

I also see the following files still having import imp








Given that none of the files above are in core managed packages, I think we can close the issue (and maybe open a new one for those files)

@makortel
Copy link
Contributor

+core

@makortel
Copy link
Contributor

@cmsbuild, please close

@cmsbuild
Copy link
Contributor

This issue is fully signed and ready to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants