kislyuk / yq

Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
https://kislyuk.github.io/yq/
Apache License 2.0
2.53k stars 81 forks source link

Python 3.6 installation from PyPI broken #165

Closed zaneb closed 1 year ago

zaneb commented 1 year ago

yq can no longer be installed from PyPI without version pinning using Python 3.6, because version 3.2.0 reports that it supports Python >=3.6, but since e507357e3aa72b1fdf0b27f1f9bbb87bf3bd1378 it depends on tomlkit >= 0.11.7 which only supports Python >=3.7.

Installation fails with this error:

(py36env) $ pip install yq
Collecting yq
  Downloading https://files.pythonhosted.org/packages/a1/02/df27a89765c3ff839324a5cb8cc7c2e020c917dd030ba9d29bd2d9998ae3/yq-3.2.0-py3-none-any.whl
Collecting tomlkit>=0.11.7 (from yq)
  Could not find a version that satisfies the requirement tomlkit>=0.11.7 (from yq) (from versions: 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.5.11, 0.6.0, 0.7.0, 0.7.1, 0.7.2, 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.11.5, 0.11.6)
No matching distribution found for tomlkit>=0.11.7 (from yq)

I believe this would have worked if 3.2.0 had reported that it only supported python >=3.7 - pip would have installed the latest version that still supported 3.6 (i.e. 3.1.1). However, now that 3.2.0 has been published, I don't think a 3.2.1 that requires Python 3.7 will help, because 3.2.0 will still be the latest one that reports being installable on 3.6. I don't think it's possible to retrospectively update the python version requirements (please do not unpublish the 3.2.0 release).

The only solution I know of is for a 3.2.1 release that either requires only tomlkit >= 0.11.6 or reverts to the old toml dependency. (This could be followed by a 3.3.0 release that requires tomlkit>=0.11.7 and only supports Python 3.7 if necessary.)

zaneb commented 1 year ago

I guess the intention was to drop 3.6 support prior to 3.0.0, judging by f47dde37a8bd93c73fa7d302950f4041cb358085.

kislyuk commented 1 year ago

Sorry about that, yes, I forgot to update python_requires.

I have no specific reason to depend on tomlkit 0.11.7 (which is the first version that requires 3.7). I will publish yq-3.2.1 that will relax the dependency version constraint to tomlkit >= 0.11.6 as you recommended.

zaneb commented 1 year ago

Great, thank you!

kislyuk commented 1 year ago

v3.2.1 released