Damian Shaw
68529081c2
Enforce f-strings via Ruff ( #12393 )
2023-11-07 09:14:56 +00:00
Sander Van Balen
3f3ae6f24d
Merge branch 'main' into issue/11924-requirements-on-extras
2023-09-06 10:24:11 +02:00
Danny McClanahan
67ff36b838
move directory metadata test out of req install tests
2023-08-12 10:01:30 -04:00
Sander Van Balen
6ed231a52b
added unit tests for install req manipulation
2023-07-26 11:48:42 +02:00
Paul Moore
39aa7ed50e
Fix a direct creation of RequirementPreparer in the tests
2023-07-18 21:00:11 +01:00
Stéphane Bidoul
1ca4529dc0
Ignore invalid origin.json in wheel cache
2023-05-29 12:36:11 +02:00
Stéphane Bidoul
bd746e3136
Introduce ireq.cached_wheel_source_link
2023-04-14 08:03:49 +02:00
Stéphane Bidoul
a6ef6485be
Rename original_link_is_in_wheel_cache to is_wheel_from_cache
...
This more accurately reflects that it is not necessarily
related to original_link, original_link being the direct URL
link,
and the wheel cache can also be populated from sdists
URL discovered by the finder.
2023-04-14 08:03:48 +02:00
Stéphane Bidoul
93e6dd7184
Remove now unused FormatControl in WheelCache
2023-03-29 08:41:09 +02:00
Роман Донченко
44c1ccaf40
Replace deprecated setup/teardown usage
...
As explained in
<https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose >,
`setup`/`teardown` are a part of nose compatibility, which is deprecated.
You're supposed to use `setup_method` and `teardown_method` instead.
2023-01-27 22:00:50 +03:00
Tzu-ping Chung
42359a9605
Migrate tests to use pathlib.Path
...
The pip-specific Path implementation has been removed, and all its
usages replaced by pathlib.Path. The tmpdir and tmpdir_factory fixtures
are also removed, and all usages are replaced by tmp_path and
tmp_path_factory, which use pathlib.Path.
The pip() function now also accepts pathlib.Path so we don't need to put
str() everywhere. Path arguments are coerced with os.fspath() into str.
2022-06-08 19:58:46 +08:00
Stéphane Bidoul
05d2b85d4a
Add unit tests for cache origin.json... and fix a bug
2022-05-30 18:36:48 +02:00
Stéphane Bidoul
c6baa7514a
Add download_info to InstallRequirement
2022-05-22 22:46:35 +02:00
Pradyun Gedam
30af8074bf
Merge pull request #11117 from q0w/opt-check
...
Opt to check build dependencies
2022-05-14 21:55:18 +01:00
Pradyun Gedam
d673aa1428
Move RequirementSet.add_requirement
into LegacyResolver
...
This was the only call-site for this method and, realistically, it is
highly coupled with the legacy resolver's dependency resolution
strategy/approach; so it makes sense for this code to live as part of
the resolver, rather than the container object the various resolvers.
2022-05-13 18:59:53 +01:00
q0w
3166157e40
Opt to check build dependencies
2022-05-13 03:05:55 +03:00
Tzu-ping Chung
e3952f8357
Fix unit test to check against the correct backend
2022-04-12 03:26:12 +08:00
Pradyun Gedam
428e886ad6
Drop out-of-tree/in-tree build transition flags
...
These were intended to help users transition when the default behaviour
changed to no longer perform out-of-tree builds. The transition is now
considered complete.
2022-04-08 12:20:36 +01:00
Pradyun Gedam
de1c798243
Rename all {req -> build}_tracker arguments/variables
2022-03-26 12:09:32 +00:00
Pradyun Gedam
e5542dc024
Move BuildTracker
to operations.build.build_tracker
2022-03-26 12:09:32 +00:00
Pradyun Gedam
cbfcbd2d94
Rename get_{requirement -> build}_tracker
2022-03-26 12:09:32 +00:00
James Gerity
5c24a798b8
Change VCS tooling verbosity along with pip's verbosity ( #9639 )
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2022-01-25 08:54:02 +00:00
Tzu-ping Chung
ad158b03e8
Fix types in tests on Windows
2021-11-18 17:58:12 +08:00
Tzu-ping Chung
62b91dfbf1
Return abstract metadata type from ireq.get_dist()
2021-11-18 17:56:26 +08:00
Jon Dufresne
60c274be2d
Complete type annotations of tests/unit/ directory
2021-09-23 05:44:54 -07:00
Jon Dufresne
9e88e8708f
Replace assert_raises_regexp function with pytest.raises
...
These methods serve the same purpose. Can shift to using the upstream
implementation.
https://docs.pytest.org/en/latest/reference/reference.html#pytest.raises
2021-08-29 07:09:50 -07:00
Jon Dufresne
d144fd960c
Cleanup several Python 2 version_info checks/workarounds
2021-08-20 09:39:31 -06:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black
2021-08-20 13:37:49 +01:00
Pradyun Gedam
a196b3bf01
Minor formatting tweaks ( #10190 )
...
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2021-07-24 03:55:14 +08:00
David Hewitt
838988cb44
Build local directories in-place with feature flag
2021-02-22 23:31:47 +00:00
Pradyun Gedam
c2ba7c043b
Merge pull request #9606 from hexagonrecursion/fstr
2021-02-21 08:30:00 +00:00
Andrey Bienkowski
e494e3748d
Apply review suggestion
2021-02-20 20:50:18 +03:00
Tzu-ping Chung
383934eb83
Incorporate get_installed_version() logic
...
All usages of it now use Environment.get_distribution() instead.
InstallRequirement.installed_version is also removed since it is no
longer used anywhere in the code base.
2021-02-19 13:34:16 +08:00
Andrey Bienkowski
9b2cb894ba
Convert more str.format() calls to f-strings
2021-02-13 09:27:17 +03:00
Andrey Bienkowski
50db373adb
Lint
2021-02-10 13:38:21 +03:00
Andrey Bienkowski
ab35018c04
Use unittest.mock instead of mock
2021-02-10 13:28:55 +03:00
Pradyun Gedam
86afa89043
Merge pull request #9361 from jdufresne/f-strings
...
Use f-strings for simple string formatting
2020-12-26 10:24:18 +00:00
Jon Dufresne
cdcf74fb8e
Use f-strings for simple string formatting
...
Use pyupgrade to convert simple string formatting to use f-string
syntax. pyupgrade is intentionally timid and will not create an f-string
if it would make the expression longer or if the substitution parameters
are anything but simple names or dotted names.
2020-12-25 16:21:20 -08:00
Jon Dufresne
09b3d3a50b
Remove object from class definitions
...
Unnecessary since dropping Python 2 support. In Python 3, all classes
are new style classes.
2020-12-25 15:48:11 -08:00
Stéphane Bidoul
3defc24e31
Removed unused comes_from argument of parse_requirements
2020-11-08 19:07:28 +01:00
Nguyễn Gia Phong
6887b0795b
Merge usage of download_dir and wheel_download_dir
...
In every cases, at least one of them is None. By doing this,
it is also possible to simplify wrapper codes around download_dir.
2020-10-07 13:42:21 +07:00
Pradyun Gedam
4c534e65d2
Tweak message when -r is not passed on a requirements.txt
2020-09-23 19:46:36 +05:30
Nguyễn Gia Phong
b46576d933
Give batch downloader a separate class
2020-08-12 16:07:27 +07:00
Nguyễn Gia Phong
487d00295c
Define RequirementPreparer._session
2020-08-06 18:42:59 +07:00
Chris Hunt
f0d4df10eb
Propagate lazy_wheel option through RequirementPreparer
...
Reduces dependence on Candidate (and Resolver (and Factory)).
2020-08-02 18:40:11 -04:00
Stéphane Bidoul
b9a19f6be0
Rename is_direct to user_supplied
2020-05-31 18:33:51 +02:00
Devesh Kumar Singh
ac39efa537
Update parse_editable to return Set[str]
2020-05-22 04:21:14 +05:30
Stéphane Bidoul
076d1a8ed8
Fix tests that build fake InstallRequirements with source_dir
2020-04-12 11:39:09 +02:00
Tzu-ping Chung
6db0df928c
Move wheel cache out of InstallRequirment
2020-03-30 17:36:03 +08:00
Jason R. Coombs
3511d3d493
Convert the remaining '%' formatters to '.format'. Fixes #6973 .
2020-03-06 12:43:03 -05:00