[PR #333] [CLOSED] Change requirements to accepted comparisons operator #459

Closed
opened 2026-02-26 10:31:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nsupdate-info/nsupdate.info/pull/333
Author: @0x4A6F
Created: 4/5/2018
Status: Closed

Base: masterHead: requirements


📝 Commits (1)

  • 40f7dd9 Change requirements to accepted comparisons operator

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 requirements.d/all.txt (+1 -1)

📄 Description

Running pip install on requirements.d/all.txt (in this example invoked by prod.txt) yields following error, while using pip 1.5.6 (python 3.4).

pip install -r requirements.d/prod.txt
Exception:
Traceback (most recent call last):
  File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/commands/install.py", line 274, in run
    for req in parse_requirements(filename, finder=finder, options=options, session=session):
  File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 1570, in parse_requirements
    for item in parse_requirements(req_url, finder, comes_from=filename, options=options, session=session):
  File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 1632, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 173, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 71, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/var/www/nsupdate.info/.venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2793, in parse
    reqs = list(parse_requirements(s))
  File "/var/www/nsupdate.info/.venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/var/www/nsupdate.info/.venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2686, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', 'django~=1.11.0', 'at', '~=1.11.0')

Changing the operator ~= to the accepted operator >= [0] fixes this problem.

[0] https://docs.python.org/3/distutils/setupscript.html#relationships-between-distributions-and-packages


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nsupdate-info/nsupdate.info/pull/333 **Author:** [@0x4A6F](https://github.com/0x4A6F) **Created:** 4/5/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `requirements` --- ### 📝 Commits (1) - [`40f7dd9`](https://github.com/nsupdate-info/nsupdate.info/commit/40f7dd901539379b4e6002691e68b50d97c44cb9) Change requirements to accepted comparisons operator ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `requirements.d/all.txt` (+1 -1) </details> ### 📄 Description Running pip install on requirements.d/all.txt (in this example invoked by prod.txt) yields following error, while using `pip 1.5.6 (python 3.4)`. ``` pip install -r requirements.d/prod.txt Exception: Traceback (most recent call last): File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/commands/install.py", line 274, in run for req in parse_requirements(filename, finder=finder, options=options, session=session): File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 1570, in parse_requirements for item in parse_requirements(req_url, finder, comes_from=filename, options=options, session=session): File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 1632, in parse_requirements req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None)) File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 173, in from_line return cls(req, comes_from, url=url, prereleases=prereleases) File "/var/www/nsupdate.info/.venv/lib/python3.4/site-packages/pip/req.py", line 71, in __init__ req = pkg_resources.Requirement.parse(req) File "/var/www/nsupdate.info/.venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2793, in parse reqs = list(parse_requirements(s)) File "/var/www/nsupdate.info/.venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2721, in parse_requirements "version spec") File "/var/www/nsupdate.info/.venv/lib/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl/pkg_resources.py", line 2686, in scan_list raise ValueError(msg, line, "at", line[p:]) ValueError: ('Expected version spec in', 'django~=1.11.0', 'at', '~=1.11.0') ``` Changing the operator `~=` to the accepted operator `>=` [0] fixes this problem. [0] https://docs.python.org/3/distutils/setupscript.html#relationships-between-distributions-and-packages --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 10:31:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#459
No description provided.