Hugo van Kemenade
0252c04a16
Drop support for soon-EOL Python 3.6
2021-11-08 12:02:16 +02:00
gousaiyang
71d21ccaa0
Fix 2 places where encoding is not specified
...
- In `pip/_internal/configuration.py`, explicitly use locale encoding to parse configuration file
- In `pip/_internal/build_env.py`, use UTF-8 when generating `sitecustomize.py`
Fixes #10590 .
2021-10-16 11:48:11 -07:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black
2021-08-20 13:37:49 +01:00
harupy
6d665fd065
convert type comments
2021-07-24 13:13:10 +09:00
Tzu-ping Chung
21529db516
Remove pkg_resources usage in build_env
2021-07-22 15:20:49 +08:00
Tzu-ping Chung
9b3bbee2b2
Merge pull request #9920 from zip-ignore-timestamp
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-05-22 05:10:28 +08:00
Nicholas Serra
346edd64bc
Update src/pip/_internal/build_env.py
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-05-09 11:46:47 -04:00
Arun Babu Neelicattu
8ef383bb23
Handle standalone pip creation from pip wheel
...
This change ensures that when pip is executed from a wheel/zip,
standalone pip creation for build environment reuses the source.
Resolves : #9953
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-05-09 00:19:36 +02:00
Nicholas Serra
5822e39d24
Set strict_timestamps=False when zip is called for isolated environment
2021-04-29 13:11:58 -04:00
Tzu-ping Chung
f88420319d
Fallback to self-invoke via directory on 3.6
...
This fixes a compatibility issue when a PEP 517 build requirement
itself needs to be built in an isolated environment, caused by
importlib.resources not being available.
2021-04-27 14:27:42 +08:00
Tzu-ping Chung
bba1226a03
Handle zipapp inception
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
9cab77eb17
Pass in cert path with private environ
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
40d0529ee3
Patch __init__.py instead of __main__.py
...
The standalone pip doesn't have a correct sys.path when __main__.py
is invoked, and we'd be patching the wrong certifi at that point.
The sys.path is guaranteed to be correct when __init__.py is loaded
(otherwise we wouldn't be able to import it in the first place).
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
0d183d3ee3
Better docstring
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
4bf083cde6
Monkey-patch .pem path into standalone pip instead
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
7067359751
Less diff
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
e8e5153612
Better name temp directory
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
638b562048
Pass parent certificate location to isolated pip
2021-04-03 00:29:04 +08:00
Tzu-ping Chung
4ec34b9013
Run pip in isolated env by building zip
2021-04-03 00:29:04 +08:00
Pradyun Gedam
1c46f30a3e
Merge pull request #9584 from hexagonrecursion/paren
...
Drop redundant parentheses
2021-02-28 08:40:07 +00:00
Tzu-ping Chung
edbda257c6
Abstract out get_python_lib() usages
2021-02-23 01:58:38 +08:00
Jon Dufresne
0945809afc
Remove typing.TYPE_CHECKING guards
...
The typing module has been available since Python 3.5. Guarding the
import has been unnecessary since dropping Python 2.
Some guards remain to either:
- Avoid circular imports
- Importing objects that are also guarded by typing.TYPE_CHECKING
- Avoid mypy_extensions dependency
2021-02-19 18:34:21 -08:00
Jon Dufresne
a6392bd62e
Replace pip._internal.utils.typing with stdlib typing
...
The stdlib module has been available since Python 3.5 and the
TYPE_CHECKING constant has been available since 3.5.2.
By using stdlib, this removes the need for pip to maintain its own
Python 2 typing compatibility shim.
2021-02-18 19:09:13 -08:00
Andrey Bienkowski
1c02a12585
Drop redundant parentheses
2021-02-10 11:46:25 +03: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
Pradyun Gedam
25ab172b55
Update linter: isort
2020-09-23 19:52:28 +05:30
Stéphane Bidoul
69a4cb3eed
Merge pull request #8296 from deveshks/mypy-pip-internal
...
Complete type annotations in "pip._internal.{build_env,self_outdated_check,exceptions}"
2020-05-31 18:46:31 +02:00
Devesh Kumar Singh
71c0fb0581
Update build_env.install_requirements message type to str
2020-05-23 09:15:25 +05:30
Devesh Kumar Singh
2d22608809
Type annotations for pip._internal.build_env
2020-05-22 03:00:55 +05:30
Devesh Kumar Singh
0d48186d1b
Allow --prefer-binary option in requirements file
2020-05-21 19:37:45 +05:30
Nitesh Sharma
ce1e0f470a
Move UI helpers to cli subpackage ( #6727 )
2020-02-21 14:01:13 +05:30
Chris Hunt
e800cb1604
Make BuildEnvironment._temp_dir a local variable
2020-02-04 20:32:58 -05:00
Chris Hunt
d99462a067
Remove unused BuildEnvironment.cleanup
2020-02-04 20:32:29 -05:00
Chris Hunt
39d1c51fdb
Globally-manage BuildEnvironment._temp_dir
2020-02-04 20:32:27 -05:00
Chris Hunt
bdde27bfd8
Add BuildEnvironment._temp_dir to tempdir registry
...
Similar to the InstallRequirement temp build dir, now we'll be able to
refactor this to be globally managed.
2020-02-04 20:31:34 -05:00
Pradyun Gedam
2db6f428bf
Update imports to {index -> index.package_finder}
2019-10-19 22:24:01 +05:30
Pradyun Gedam
2eafb0218b
Update all the imports as needed
2019-09-30 11:15:24 +05:30
Maxim Kurnikov
3692097cca
add per-file disallow_untyped_defs=False, and set it to True globally
2019-09-29 23:31:15 +02:00
Chris Hunt
85dcaa74bb
Unconditionally create TempDirectory.path
2019-09-22 00:02:46 -04:00
Pradyun Gedam
f377148f6d
Use mypy's inline configuration syntax for opt-outs
2019-07-30 12:39:51 +05:30
Chris Jerdonek
7d08bb37a5
Add SearchScope class.
2019-06-18 00:47:10 -07:00
Chris Jerdonek
4c1ccaec73
Store PackageFinder.trusted_hosts instead of secure_origins.
2019-06-12 02:18:23 -07:00
Maxim Kurnikov
f77b8ca051
remove #noqa: F401
2019-02-22 14:17:07 +03:00
Chris Jerdonek
d2051f14bb
Change the default of call_subprocess()'s show_stdout from True to False.
2019-02-12 05:11:51 -08:00
Pradyun Gedam
7222cb8fdb
Remove --process-dependency-links and related support code
2019-01-02 17:27:06 +05:30
Maxim Kurnikov
8fc393a2d1
Add type annotations for pip._internal.pyproject, pip._internal.build_env, pip._internal.index, pip._internal.resolve ( #6072 )
2018-12-17 16:43:23 +05:30
Benoit Pierre
744b8cf96e
improve build environment
...
- check build requirements for conflicts
- better isolation (ignore system site packages)
- support 2 prefixes: a "normal" one, and an "overlay" one
(with higher priority over "normal")
2018-10-29 23:17:51 +01:00
Pradyun Gedam
b47b2fa8e6
Merge pull request #5841 from benoit-pierre/fix_python_src/pip
...
fix support for invoking pip using `python src/pip ...`
2018-10-28 12:35:53 +00:00
Benoit Pierre
83b879b1ec
Improve PEP 518 build isolation ( #5824 )
...
Handle .pth files, so namespace packages are correctly supported under Python 3.2 and earlier, and more.
2018-10-16 12:04:28 +05:30
Benoit Pierre
464b2f30a8
fix support for invoking pip using `python src/pip ...`
...
Ensure the subprocess call to pip for installing the PEP 518
build dependencies is using the same version of pip.
2018-10-02 12:15:03 +02:00