-
Notifications
You must be signed in to change notification settings - Fork 36
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
Python3.12 support: Use importlib instead of deprecated imp module #5350
Conversation
Can one of the admins verify this patch? |
🙇 But am very puzzled by the run-time error in y fail on crab server side since at first sight the traceback indicates presence of WMCore's /cvmfs/cms.cern.ch/cc8_amd64_gcc9 environment inside cmsRun execution, which both WMCore and CRAB worked hard to separate. That still needs to be understood. I will open issues in CRABServer repo for the work on that side. |
LGTM |
thanks @belforte. I will fix cmssw FW code to not use [a]
|
thanks @smuzaffar . But I still do not like that $PYTHONPATH has WMCore's py3.8 added in when it runs the user application. It should be "CMSSW in a pristine environment". There's something which I do not understand there which may possibly cause other problems. Let's follow up on that in dmwm/CRABServer#8805 |
@smuzaffar I just deployed a new CRAB TaskWorker which fixes the PYTHONPATH conflict (cleanup PYTHONPATH before running the application e.g. cmsRun) |
thanks @belforte , this is really good. |
imp
module has been deprecated and removed inpython 3.12
. This PR proposes to usesimportlib
forpython 3.12
e.g inCMSSW_14_2_PY3_12_X
IBs. It should not break crab client for CMSSW release withpython version < 3.12
.This requires newer WMCore specially change in WMCore/Configuration.py .
Note that using this I was able to submit crab job for CMSSW_14_2_PY312_X but they fail on crab server side as due to usage of
imp
in crab server code. So in order to fully support python 3.12 crab jobs, one needs to update crab server code too