1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

16 commits

Author SHA1 Message Date
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
Jon Dufresne
60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01: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
Tzu-ping Chung
09a7f271c7 Only attach UUID to build dir for spec candidates
These are the only cases where backtracking can happen. This approach
also accounts for VCS requirements relying on the same ensure function
to do cloning :/
2020-06-04 23:26:19 +08:00
Chris Hunt
8197a4bbc5 Do not write delete marker file to track source_dir delete preference
Previously we were writing a delete marker file which is checked in
InstallRequirement.remove_temporary_source which is only invoked if the
user did not pass --no-clean (and a PreviousBuildDirError was not
raised). Since our TempDirectory machinery now respects these conditions
we can just wrap our source directory in that instead of using this
ad-hoc mechanism for tracking our delete preference.

This will let us clean up a lot of dead code that only existed for this
use case.
2020-02-05 20:14:44 -05:00
Pradyun Gedam
ad68984ec6
Rename {build_location -> ensure_build_location} 2019-09-15 22:09:34 +05:30
Pradyun Gedam
537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
Andy Freeland
bb14ff42b0 Fix NameError when handling InvalidRequirement in install_req_from_req_string (#6419)
Previously, an InvalidRequirement would raise a NameError while trying
to raise an InstallationError because `req` was not defined.

Discovered while working on #6402.
2019-04-19 02:37:33 -07:00
Alex Loosley
d245434c02 Fix #5889: AttributeError: 'NoneType' object has no attribute 'netloc' (#6336) 2019-03-20 16:59:24 +01:00
Pradyun Gedam
a5a07fe61c
Move InstallRequirement.from_line to constructors module 2018-08-21 20:37:40 +05:30
Donald Stufft
95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam
29bab5adbd Support forward slash on windows (#4563)
Support forward slash on windows
2017-06-26 22:07:49 +01:00
Pradyun S. Gedam
9923c1ad7e Sort imports and minor Flake8 changes (#4520)
* Run isort on the codebase

Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests

* 📰
2017-06-13 14:17:00 +02:00
Pradyun S. Gedam
1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Zvezdan Petkovic
4e2c1fa77c Use a realpath for the temporary build directory. (#3701)
Some systems have /tmp symlinked which confuses custom builds, such as
numpy. This ensures that real path is passed and that such builds
resolve their paths correctly during build and install.

Added test for the change and also for the previous related fix: #707

---

*This was migrated from pypa/pip#3079 to reparent it to the ``master``
branch. Please see original pull request for any previous discussion.*
2016-05-19 21:02:26 -04:00