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

Remaining python2 in CMSSW #7031

Closed
davidlange6 opened this issue Jun 16, 2021 · 13 comments
Closed

Remaining python2 in CMSSW #7031

davidlange6 opened this issue Jun 16, 2021 · 13 comments

Comments

@davidlange6
Copy link
Contributor

davidlange6 commented Jun 16, 2021

Now that #7019 landed, I wanted to make a summary of what's left in the python2 stack of cmssw and why. These are the remaining pip packages.

backports-functools_lru_cache==1.6.1
Needed by wcwidth (others are fake)

configparser==4.0.2;python_version<‘3.0'
Needed by cmsRun tasks

cython==0.29.22
Needed by scipy (not py2-numpy? Strange), rivet, yoda, professor2, gosam, lhapdf

enum34==1.1.10;python_version<‘3.0'
Needed by cmsRun tasks

future==0.18.2
Needed by cmsRun tasks

numpy==1.16.6 ; python_version<‘3.0’
Quite a few tools in cmssw as well as scipy

prettytable==1.0.1
./CondCore/Utilities/scripts/conddb:from prettytable import PrettyTable
./DQMServices/Components/scripts/dqmiodumpindices.py:from prettytable import PrettyTable

pycurl==7.43.0.5
Needed by numerous tools in cmssw

setuptools-scm==3.5.0
Needed by functools_lru_cache

six==1.15.0
Needed by cmsRun

sqlalchemy==1.3.11
A number fo cond* tools

wcwidth==0.2.5
Needed by prettytable

wheel==0.33.6
Needed by setuptools-scm

boost-python is python2

Added back:
pyyaml
Needed by conditions tools that rely on boost-python

Recently removed
py2-scipy

@cmsbuild
Copy link
Contributor

A new Issue was created by @davidlange6 David Lange.

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

cms-bot commands are listed here

@davidlange6
Copy link
Contributor Author

believe most of these tools has to remain until the framework + scripts switch over (eg, a big bang to finish the migration) Exceptions appear to be

  • prettytable (which allows also wcwidth functools_lru_cache, wheel, setuptools-scm)
  • scipy

@davidlange6
Copy link
Contributor Author

davidlange6 commented Jun 16, 2021

PR for scipy - cms-sw/cmssw#34150

@davidlange6
Copy link
Contributor Author

PR for prettytable - cms-sw/cmssw#34151
(but I don't expect this to work)

@smuzaffar
Copy link
Contributor

except future, all of these py2 packages are not part of cmssw any more

@smuzaffar
Copy link
Contributor

@davidlange6 , any reason to keep python2 and py2-future in release any more?

@davidlange6
Copy link
Contributor Author

davidlange6 commented Oct 4, 2021 via email

@smuzaffar
Copy link
Contributor

@davidlange6 , If I under stand correctly, crab client in crab-dev version v3.210909 uses python3 ( https://github.com/dmwm/CRABClient/tree/v3.210909/bin ) and recommendations are to use it for CMSSW >=12.0 ... right @belforte ?
None of the cmssw externals should use/depend on py2-future.

@smuzaffar
Copy link
Contributor

wmagent and production system does make use of python2 and py2-future but these tools explicitly use it from release independent area /cvmfs/cms.cern.ch/COMP/slc7_amd64_gcc630/external area
FYI @amaltaro

@smuzaffar smuzaffar changed the title Remaining python2 in DEVEL Remaining python2 in CMSSW Oct 4, 2021
@belforte
Copy link
Contributor

belforte commented Oct 4, 2021

correct about CRAB. We will need to put in some trick to to make a single CRAB client code switch use py2 or py3 as appropriate, but if you remove pyhon2 in CMSW_12 and make python point to python3, much easier. @ddaina is looking into making a a single CRAB Client version for all CMSSW releases (it is 95% same code already).

@smuzaffar
Copy link
Contributor

smuzaffar commented Oct 4, 2021

Thanks @belforte for the confirmation. I am afraid making python to point to python3 might break a lot of user code. You can add something like the following in crab command

#!/bin/bash
""":"
python_cmd="python"
[ $(echo $CMSSW_VERSION | cut -d_ -f2) -gt 11 ] && python_cmd="python3"
exec ${python_cmd} $0 ${1+"$@"}
"""
#REST OF CRAB PYTHON CODE

and this should use python3 for cmssw_12 and above otherwise use python

@smuzaffar
Copy link
Contributor

smuzaffar commented Oct 5, 2021

#7359 should drop python2 for DEVEL IBs

@smuzaffar
Copy link
Contributor

python2 has been removed for 12.3.X release cycle now.

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