Pipenv seems to double extras markers
See original GitHub issuePipenv fails to lock dependencies because of markers parsing error.
Describe your environment
- OSX
- Python version:
3.6.4
- Pipenv version:
11.1.5
, and I tried10.x
as well.
Expected result
Pipfile.lock generated successfully.
Actual result
pipenv install
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
lear)
File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 19, in resolve
return pipenv.utils.resolve_deps(packages, which, project=project, pre=pre, sources=sources, clear=clear, verbose=verbose)
File "/usr/local/lib/python3.6/site-packages/pipenv/../pipenv/utils.py", line 392, in resolve_deps
resolved_tree, resolver = actually_resolve_reps(deps, index_lookup, markers_lookup, project, sources, verbose, clear, pre)
File "/usr/local/lib/python3.6/site-packages/pipenv/../pipenv/utils.py", line 325, in actually_resolve_reps
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 310, in _iter_dependencies
yield InstallRequirement.from_line(dependency_string, constraint=ireq.constraint)
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/req/req_install.py", line 181, in from_line
markers = Marker(markers)
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/_vendor/packaging/markers.py", line 282, in __init__
raise InvalidMarker(err_str)
pip._vendor.packaging.markers.InvalidMarker: Invalid marker: 'python_version >= "3.0"; python_version >= "3.0"', parse error at '; python'
Steps to replicate
Here’s the Pipfile to reproduce the issue.
[packages]
twilio = "*"
python_version >= 3.0
is specified in twilio extras, but I’m not sure it’s actual cause for the bug.
Explicitly specifying python_version
works:
twilio = { version = "*", python_version = ">= '3.0'"}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
pipenv Documentation - Read the Docs
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the. Python...
Read more >pipenv Documentation
Clarify wording in Basic Usage example on using double quotes to ... Fixed unnecessary extras are added when translating markers #3026.
Read more >Release and Version History — pipenv 2022.12.20.dev0 ...
Can view a list of custom marks by running pipenv run pytest --markers ... Fix for pipenv lock fails for packages with extras...
Read more >What does it mean if poetry.lock contains the same package ...
markers ="python_version=='3.9.*'"}, ]. and poetry install --dry-run -vv produces both versions in the lock file. Which poetry you use?
Read more >Pipenv: A Guide to the New Python Packaging Tool
Example Usage; Pipenv's Dependency Resolution Approach; The Pipfile; The Pipfile.lock; Pipenv Extra Features. Package Distribution.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this is fixed in master
@kennethreitz how this issue could affect previous versions? I wonder why rollback to 10.x didn’t help.