HEPData / hepdata_lib

Library for getting your data into HEPData
https://hepdata-lib.readthedocs.io
MIT License
15 stars 39 forks source link

Python2 support #187

Closed kpedro88 closed 2 years ago

kpedro88 commented 2 years ago

setup.py currently states that Python 2.7 is supported. However, Python3-only features are used in the code, e.g. https://github.com/HEPData/hepdata_lib/blob/7db8513073abb2e78f14604eaf817daec95d470b/hepdata_lib/__init__.py#L285.

Is Python 2.7 support still intended? If so, compatibility should be ensured. If not, setup.py should be updated accordingly.

AndreasAlbert commented 2 years ago

Our initial aim was always to also support python2, so nominally this needs to be fixed in the code. This idea stemmed from the prevalence of python2 as the default in many LHC environments. Given how things have evolved over the last 4 years since the inception of this library, I personally think that python2 support is not needed any more and should be deprecated. @clelange @GraemeWatt what do you guys think?

GraemeWatt commented 2 years ago

I'm not familiar with the current prevalence of Python2 in the software of LHC experiments, but I think you should drop Python2 support if possible. Most recent HEPData packages do not support Python2, including the latest releases of the hepdata-validator (> 0.3.0), so I think you'll need to drop Python2 support if including hepdata-validator as a dependence of hepdata_lib. Otherwise, you'd need a configuration where hepdata-validator was not included for the Python2 build.

clelange commented 2 years ago

By now, CMS (i.e. CMSSW) has also moved to Python3, probably as last LHC experiment, so we could drop Python2 support officially. It would definitely make our lives easier. We should probably do this as part of #189 since that requires Python3.

AndreasAlbert commented 2 years ago

Python2 support has now been removed with the merge of #189