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 4a014f953d Replace distutils with sysconfig on Python 3.12+ 2023-07-04 17:03:11 +08:00
Pradyun Gedam 78ab4cf071
Bump all linters other than mypy (#11901) 2023-03-27 20:03:11 +01:00
Tzu-ping Chung 50e194f107 Selectively enable user site
The modern virtual environment structure does not allow us to enable
"fake user site" while disabling the global site, so we need to do more
fine-grained configuration to correctly set up test environments for
each test case.

With this done, we can also properly support the stdlib venv ad the test
environment backend, since it basically works identically with modern
virtualenv. The incompatible_with_test_venv is thus removed.
2022-10-28 01:51:13 +08:00
Min RK 24773bc4f5
Fix build isolation on system Pythons
use site.getsitepackages() where available
instead of just purelib/platlib,
which is often insufficient on e.g. System Pythons for Debian/macOS

handle virtualenv < 20 overwriting site.py without getsitepackages() by preserving current behavior.
2022-09-23 14:47:41 +02:00
Klaas van Schelven 5d7a1a68c7 Respect --no-index from the requirements file
See #11276

SearchScope was extended with an extra parameter to be able to pass-on the
value of no_index as we do with the other parameters. This allows us to respect
its value regardless of the order in which options are evaluated.
2022-07-20 15:55:17 +02:00
Stéphane Bidoul bb2a3d7410
Remove the html5lib deprecated feature flag. 2022-07-16 19:37:11 +02: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
Pradyun Gedam 611e9253ff
Filter out build requirements that require an extra to be used
There is no mechanism provided for build requirements to have extras.

It should be acceptable to enforce that any "optional" packages
that are supposed to be conditionally installed based on the presence of
an extra should not be installed in a build environment.
2022-05-12 01:04:11 +01:00
Tzu-ping Chung 233db7c31b Skip conditional build req without matching marker 2022-04-16 16:02:15 +08:00
Jon Dufresne bf5f4008e7
Replace vendored html5lib with stdlib
The html5lib library isn't strictly required as the same functionality
can be achieved through the stdlib html.parser module.

The html5lib is one of the largest uses of the six library. By dropping
this unnecessary dependency, the pip project is closer to dropping the
six library.

Additionally, html5lib maintenance has slowed down and the project has
rejected pull requests to drop Python 2 support.

For now, the html5lib code remains, but is gated behind a command
line option: `--use-deprecated=html5lib`. After a sufficient amount of
time has passed without any reported bugs, the vendored library and this
flag can be removed completely.
2022-01-28 06:45:57 +00:00
Pradyun Gedam 531c991ef9
Require every call_subprocess call-site to pass command_desc
This serves as additional context that can be presented in error
messages.
2022-01-25 01:38:22 +00:00
Jon Dufresne c71cf88049 Complete type annotations of tests/functional/ directory 2021-11-18 18:26:17 -08:00
Pradyun Gedam 94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
Andrey Bienkowski 9b2cb894ba Convert more str.format() calls to f-strings 2021-02-13 09:27:17 +03:00
Hugo van Kemenade 1cabd3a609 The future is now 2020-12-28 18:34:06 +02:00
Pradyun Gedam abb3d0fae3
Move build_env tests to functional
These tests use the script fixture which as a 30s setup time on my
machine. This KILLS productivity when trying to run unit tests as part
of a feedback loop during development.
2020-10-25 23:32:26 +05:30
Renamed from tests/unit/test_build_env.py (Browse further)