peterbe / peterbe/hashin

Support "<" in package specifiers

Open
#115 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
107
Forks
31
PR merge metrics
No merged PRs in 30d

Description

For some reason there is an assertion against using < is package specifier.

$ hashin.py -r requirements_dev.txt "pytest<4.0.0"
Traceback (most recent call last):
  File "../hashin/hashin.py", line 832, in <module>
    sys.exit(main())
  File "../hashin/hashin.py", line 824, in main
    index_url=args.index_url,
  File "../hashin/hashin.py", line 135, in run
    return run_packages(specs, requirements_file, *args, **kwargs)
  File "../hashin/hashin.py", line 176, in run_packages
    package, version, restriction = _explode_package_spec(spec)
  File "../hashin/hashin.py", line 145, in _explode_package_spec
    assert ">" not in spec and "<" not in spec
AssertionError

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the command shown in the issue, then inspect hashin.py at _explode_package_spec, where the assertion rejects the package specifier. Confirm that a specifier such as pytest<4.0.0 is accepted and processed correctly without the assertion failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.