← All tasks
pythongoogleapis/google-api-python-client #2151Not a task: not reproduced

`<1dev` is not a valid matcher for Python package versions in `setup.py`!

envgap__googleapis__google-api-python-client-2151

01 / FAILURE SIGNATURE

As reported upstream

distlib.version.UnsupportedVersionError: Not a valid version: 1dev
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
116c1ab3f048f7a74dde8ca57e978fa924b884a9
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

googleapis/google-api-python-client #2151 · read the original issue
On the current master branch, you have this matcher for an `install_requires` package version in [setup.py](https://github.com/googleapis/google-api-python-client/blob/110667251e8b2c8852945bfe238f399742148cda/setup.py#L36):



```python

install_requires = [

    "httplib2>=0.15.0,<1dev",

```



The `<1dev` part is ~not~ a valid version specifier (edit: it is valid, just doesn't parse correctly with distlib) in the sense of [PEP 440](https://peps.python.org/pep-0440/) and causes problems with a number of packing tools, as seen here:



```shell

$ python -c 'from distlib.version import NormalizedMatcher; NormalizedMatcher("httplib2>=0.15.0,<1dev")'

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 125, in __init__

    vn, prefix = self.version_class(s), False

  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 33, in __init__

    self._parts = parts = self.parse(s)

  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 267, in parse

    result = _normalized_key(s)

  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 188, in _pep_440_key

    raise UnsupportedVersionError('Not a valid version: %s' % s)

distlib.version.UnsupportedVersionError: Not a valid version: 1dev

```



This is just speculation, but it looks like it was either faultily auto-generated by some tool, is an incomplete copy & paste or you meant `<1.dev0`. However, development versions are not typically considered by tooling and it's considered bad practice to but an upper bound on python dependencies for no good reason. This should be corrected and ideally the artifact files of the effected versions fixed and re-uploaded on pypi.org.



















Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]