Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of constraints on requirements with extras #12095

Merged
merged 47 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5bebe85
take non-extra requirements into account for extra installs
sanderr Jun 20, 2023
937d8f0
partial improvement
sanderr Jun 21, 2023
5f8f40e
refinements
sanderr Jun 22, 2023
d09431f
fixes
sanderr Jun 22, 2023
49027d7
cleanup
sanderr Jun 22, 2023
cb0f97f
reverted troublesome changes
sanderr Jun 22, 2023
3160293
improvement
sanderr Jun 22, 2023
1038f15
stray todo
sanderr Jun 22, 2023
8aa1758
dropped unused attribute
sanderr Jul 13, 2023
faa3289
use regex for requirement update
sanderr Jul 13, 2023
7e8da61
clarification
sanderr Jul 13, 2023
ff9aeae
added resolver test case
sanderr Jul 25, 2023
3fa373c
added test for comes-from reporting
sanderr Jul 25, 2023
e569017
added test case for report bugfix
sanderr Jul 25, 2023
cc6a2bd
added second report test case
sanderr Jul 25, 2023
fc86308
Merge branch 'main' into issue/11924-requirements-on-extras
sanderr Jul 25, 2023
4ae829c
news entries
sanderr Jul 25, 2023
dc01a40
py38 compatibility
sanderr Jul 25, 2023
292387f
py37 compatibility
sanderr Jul 25, 2023
39e1102
fixed minor type errors
sanderr Jul 25, 2023
e6333bb
linting
sanderr Jul 26, 2023
1207389
made primary news fragment of type feature
sanderr Jul 26, 2023
6663b89
added final bugfix news entry
sanderr Jul 26, 2023
314d7c1
simplified regex
sanderr Jul 26, 2023
cc909e8
reverted unnecessary changes
sanderr Jul 26, 2023
6ed231a
added unit tests for install req manipulation
sanderr Jul 26, 2023
55e9762
windows compatibility
sanderr Jul 26, 2023
504485c
lint
sanderr Jul 26, 2023
f4a7c0c
cleaned up windows fix
sanderr Jul 26, 2023
32e95be
exclude brackets
sanderr Jul 26, 2023
ba761cd
Merge branch 'main' into issue/11924-requirements-on-extras
sanderr Jul 26, 2023
3f3ae6f
Merge branch 'main' into issue/11924-requirements-on-extras
sanderr Sep 6, 2023
21bfe40
use more stable sort key
sanderr Sep 6, 2023
0de374e
review comment: return iterator instead of list
sanderr Sep 6, 2023
5a01679
Update src/pip/_internal/req/constructors.py
sanderr Sep 6, 2023
9041602
Merge branch 'issue/11924-requirements-on-extras' of github.com:sande…
sanderr Sep 6, 2023
4e73e3e
review comment: subclass instead of constructor flag
sanderr Sep 6, 2023
50cd318
review comment: renamed and moved up ExtrasCandidate._ireq
sanderr Sep 6, 2023
ff9e15d
Merge branch 'main' into issue/11924-requirements-on-extras
sanderr Sep 6, 2023
f5602fa
added message to invariant assertions
sanderr Sep 6, 2023
449522a
minor fixes and linting
sanderr Sep 6, 2023
952ab6d
Update src/pip/_internal/resolution/resolvelib/factory.py
sanderr Sep 7, 2023
fbda0a2
Update tests/unit/resolution_resolvelib/test_requirement.py
sanderr Sep 8, 2023
ce94946
fixed argument name in docstring
sanderr Sep 13, 2023
46707a4
Merge branch 'issue/11924-requirements-on-extras' of github.com:sande…
sanderr Sep 13, 2023
89b68c6
Merge branch 'main' into issue/11924-requirements-on-extras
sanderr Sep 13, 2023
0f543e3
made assertions more robust
sanderr Sep 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/pip/_internal/resolution/resolvelib/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ def _make_requirements_from_install_req(
ireq.name,
ireq.markers,
)
yield from ()
elif not ireq.link:
if ireq.extras and ireq.req is not None and ireq.req.specifier:
yield SpecifierWithoutExtrasRequirement(ireq)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/resolution_resolvelib/test_requirement.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ def test_new_resolver_full_resolve(factory: Factory, provider: PipProvider) -> N
reqs = list(factory.make_requirements_from_spec("simplewheel", comes_from=None))
assert len(reqs) == 1
r: Resolver[Requirement, Candidate, str] = Resolver(provider, BaseReporter())
result = r.resolve([reqs[0]])
result = r.resolve(reqs)
assert set(result.mapping.keys()) == {"simplewheel"}