Menu

#6 Tag 0.2.4 not supporting Python 2.7

closed
nobody
blocker
bug
2022-10-20
2021-06-28
Ruben Arts
No

Installing ruamel.yaml 0.16 or higher in python2.7 gives an error because it installs the latest version of this package which has a constraint on the python version.

The error we get:

command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-IdEpZR/ruamel-yaml-clib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-IdEpZR/ruamel-yaml-clib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rFxjk7
         cwd: /tmp/pip-install-IdEpZR/ruamel-yaml-clib/
    Complete output (1 lines):
    minimum python version(s): [(3, 5)]

We found that locking ruamel.yaml.clib on <0.2.3 works but this breaks all old systems that don't have this package locked.

Discussion

  • Anthon van der Neut

    • status: open --> wont-fix
     
  • Anthon van der Neut

    I am not sure I am going to do anything meaningful about this. Python 2 has been EOL for over a year now and I lack the facilities to generate 2.7 versions of ruamel.yaml.clib and test them.

     
  • Grygorii

    Grygorii - 2021-06-29

    I have similar issue with python2.7

    $ python -V
    Python 2.7.18
    $ pip install ruamel.yaml.clib --no-cache-dir
    Collecting ruamel.yaml.clib
      Downloading ruamel.yaml.clib-0.2.4.tar.gz (180 kB)
         |████████████████████████████████| 180 kB 2.1 MB/s
        ERROR: Command errored out with exit status 1:
      ...
        minimum python version(s): [(3, 5)]
    

    Maybe there is some problem with python classifiers in setup info?

     
    • Anthon van der Neut

      There is nothing wrong with the classifiers. I had to regenerate ruamel.yaml.clib's main C file from the .pyx to support Python 3.10. Since 2.7 has been EOL for over a year, I didn't even try to generate wheels for it, and dropped support for it as well.

      If you are using an EOL version of Python for new installations, and haven't got the versions for the packages you install fixed you are threading on very thin ice.

       
  • Anthon van der Neut

    • status: wont-fix --> resolved
     
  • Anthon van der Neut

    I uploaded 0.2.6 which has python-required set to >3.5. This makes pip on my python 2.7 virtual environment fall back to using 0.2.2 (wheel, or tar.gz if --no-binary :all: specified). I yanked 0.2.4, as I suspected pip2 to fall back to that, if I hadn't.

    Not sure what the minimum version of pip is that support this, I used 20.3.4
    (fix suggested by Henry Fredrick Schreiner @ CERN)

    Feedback if this solves your issue would be appreciated.

     
  • Anthon van der Neut

    • status: resolved --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB