question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipenv seems to double extras markers

See original GitHub issue

Pipenv fails to lock dependencies because of markers parsing error.

Describe your environment
  1. OSX
  2. Python version: 3.6.4
  3. Pipenv version: 11.1.5, and I tried 10.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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kennethreitzcommented, Mar 9, 2018

this is fixed in master

0reactions
dspechnikovcommented, Mar 9, 2018

@kennethreitz how this issue could affect previous versions? I wonder why rollback to 10.x didn’t help.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found