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

13660 commits

Author SHA1 Message Date
Daniil Konovalenko 254bdf8789 fallback to a placeholder in case dist.location is None 2023-01-14 12:27:51 +01:00
Pradyun Gedam bc96473b9a
Ignore optional (extra) dependencies in pip check
This preserves the current behaviour and avoids failures due to optional
dependencies in the graph.
2023-01-09 16:15:37 +00:00
Joonatan Partanen 07a360dfe8
Mention build-backend in regular/editable install differences (#11691)
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2023-01-09 12:42:52 +00:00
Pradyun Gedam 1de6cf0445
Merge pull request #11713 from uranusjr/fix-link-hashes-tests
Test and news for wheel cache restoration
2023-01-09 12:23:00 +00:00
Pradyun Gedam c20c789072
Merge pull request #11714 from uranusjr/strict-optional-free
Enable strict optional checking in PackageFinder
2023-01-09 10:34:31 +00:00
Tzu-ping Chung dc8ac7b896 Enable strict optional checking in PackageFinder
Most should be pretty straightforward. In one place I need to use a
custom TypeGuard, available in typing_extensions, which we're vendoring
for Rich.
2023-01-09 17:27:40 +08:00
Tzu-ping Chung 9cc4e2762f
Merge pull request #11711 from Tomen/main 2023-01-09 11:11:23 +08:00
Tzu-ping Chung 24feb508d6
Remove unneeded news file 2023-01-09 10:43:29 +08:00
Tzu-ping Chung 5eda50d237 Test and news for wheel cache restoration
The fix merged in 3b60e36289 also fixed
the wheel cache; this cherry-picks the test and news from the other pull
request to validate and document the fact.
2023-01-09 10:13:19 +08:00
Pradyun Gedam 3b60e36289
Merge pull request #11696 from uranusjr/fix-link-hashes
Merge link_hash back into _hashes
2023-01-08 17:23:04 +00:00
Tommi Enenkel | AnB d1d21bbc40
add news 2023-01-08 09:33:58 +01:00
Tommi Enenkel | AnB 471cb14e88
fix grammar error in user notice 2023-01-08 09:31:44 +01:00
Tzu-ping Chung 0233bf2757 Merge link_hash back into _hashes
Commit bad03ef931 introduced the new
link_hash attribute that holds the link's hash info, but that attribute
does the same thing as _hashes, and some existing usages still populate
that old attribute. Since the plural variant covers more use cases (a
file can be hashed with multiple algorithms), we restore the old logic
that uses _hashes before the commit, and consolidate link_hash back into
that attribute.
2023-01-04 18:42:52 +08:00
Tzu-ping Chung a057c9bc99
Merge pull request #11623 from dnicolodi/debian-scheme 2023-01-04 15:22:16 +08:00
Pradyun Gedam c6783501f1
Merge pull request #11686 from pradyunsg/update-rtd-redirects 2023-01-03 01:23:21 +00:00
Tzu-ping Chung 8fe6563050 Fall back to non-localized message on Windows
Windows does not implement LC_MESSAGES, and since PEP 668 is mainly
designed for Linux distributions, we simply take the easier way out
until someone wants an equivalent on Windows.
2023-01-03 08:13:13 +08:00
Tzu-ping Chung 6750d847a7 Add PEP 668 functional tests 2023-01-03 07:57:21 +08:00
Tzu-ping Chung 3d1937f420 Add tests for EXTERNALLY-MANAGED parser 2023-01-03 07:57:21 +08:00
Tzu-ping Chung 095fd850fd Isolate EXTERNALLY-MANAGED parsing logic
This makes the parser easier to test.
2023-01-03 07:57:21 +08:00
Tzu-ping Chung e27a819883 Use ExternallyManagedEnvironment to show error
This moves most of the displaying logic into the exception class so it
can better leverage DiagnosticPipError and Rich functionalities.
2023-01-03 07:57:21 +08:00
Tzu-ping Chung 69cb3f8617 Check EXTERNALLY-MANAGED in install and uninstall
This implements the PEP 668 logic to 'pip install' and 'pip uninstall'.
Are there any other commands that may need it?

This implementation disables the check is any of --prefix, --home, or
--target is provided, since those can indicate the command does not
actually install into the environment. Note that it is still possible
the command is still modifying the environment, but we don't have a
way to stop the user *that* determined to break the environment anyway
(they can always just use those flags in a virtual environment).

Also not sure how best this can be tested.
2023-01-03 07:57:21 +08:00
Pradyun Gedam 66e8d70dc7
Update our RTD redirects to use latest for dev, stable for errors 2023-01-01 18:47:30 +00:00
Pradyun Gedam ba38c33b6b
Merge pull request #11682 from pradyunsg/fix-rtd-redirects 2023-01-01 18:42:33 +00:00
Pradyun Gedam 450b361d21
Add an environment containing the secret token
This ensures that we only expose the token to this one job on `main`.
2023-01-01 11:07:34 +00:00
Pradyun Gedam f3ed2e2089
Merge pull request #11680 from pradyunsg/fix-rtd-redirects 2023-01-01 11:02:20 +00:00
Pradyun Gedam 5427bc56b5
Fix the dependencies as installed for the RTD update script
This ensures that it is updated correctly.
2022-12-31 21:02:45 +00:00
Pradyun Gedam c987c68236
Merge pull request #11652 from pradyunsg/rtd-redirects
Enable managing RTD redirects in-tree
2022-12-30 23:05:55 +00:00
Pradyun Gedam 8328135d93
Add GitHub action for RTD redirect updates
This makes it possible for pip's documentation's redirects to be
automatically synchronised with the `main` branch.
2022-12-30 02:57:24 +00:00
Pradyun Gedam fea8ae9f9f
Enable managing RTD redirects in-tree
This is designed as a script and a data file (in YAML format), and meant
to manage the RTD redirects with a version controlled file.

This makes it possible for pull requests to this repository to update
the redirects for this project's documentation (eg: for better error
urls) and for this evolution to be tracked as a part of version control
history.
2022-12-30 02:57:24 +00:00
Pradyun Gedam 90db7b641d
Merge pull request #11654 from pradyunsg/replace-pep517-with-pyproject-hooks 2022-12-30 02:47:41 +00:00
Tzu-ping Chung fb02491129
Merge pull request #11676 from sbidoul/clarify-egg-fragment-docs-sbi 2022-12-29 12:09:08 +08:00
Stéphane Bidoul 668ea3f6f3 Clarify the role of the egg URL fragment 2022-12-28 23:24:53 +01:00
Pradyun Gedam b224c38732
Merge pull request #11675 from sbidoul/fix-vcs-support-docs 2022-12-28 20:14:42 +00:00
Pradyun Gedam 4162f28cad
Deal with dashed names in vendored modules, in pip debug 2022-12-28 20:13:57 +00:00
Pradyun Gedam fa4b2efbab
Replace pep517 with pyproject_hooks
The `pep517` package has been superseded by a new package.
2022-12-28 20:13:57 +00:00
Pradyun Gedam dca39dd682
Merge pull request #11617 from trail-of-forks/ww/restrict-egg-fragement
Restrict `#egg=` fragments to valid PEP 508 names
2022-12-28 16:59:22 +00:00
William Woodruff 64fe2235d8
Merge branch 'main' into ww/restrict-egg-fragement 2022-12-28 10:44:23 -05:00
Pradyun Gedam cecd346697
Merge pull request #11672 from pradyunsg/update-rich
Update `rich` to 12.6.0
2022-12-28 13:47:23 +00:00
Stéphane Bidoul e22003e0e1 Update VCS support documentation
Now that PEP 610 (direct_url.json) is implemented, an editable install
is not required anymore for pip freeze to work correctly.
2022-12-28 12:19:21 +01:00
Tzu-ping Chung a0c607ffbf Reorder __all__
The list is *almost* sorted alphabetically so let's make it fully so.
2022-12-28 10:46:22 +08:00
Tzu-ping Chung 28e5eb99c8 Avoid unnecessary indirection
Since there's not equivalent of get_isolated_environment_bin_path for
the distutils backend, the additional declaretion in the sysconfig
backend is unnecessary.
2022-12-28 10:42:04 +08:00
Tzu-ping Chung 77ef9f0bfd Avoid using built-in names as variable name 2022-12-28 10:41:06 +08:00
Daniele Nicolodi da478818c1 Fix isolated environment scripts path on Debian
The scripts path was looked up passing explicitly the scheme to be
used using "nt" on Windows and "posix_prefix" everywhere else.
However, when the isolated build environment is created, packages are
installed using the default scheme for the platform. On most platforms
this works because normally "nt" and "posix_prefix" are the default
schemes.

However, Debian customizes sysconfig to use a "posix_local" scheme by
default and under this scheme the scripts path does not match the one
of the "posix_prefix" scheme. This results in scripts installed as
part of the build dependencies not to be found during the build, as
reported here https://github.com/mesonbuild/meson-python/issues/109
and here https://bugs.debian.org/1019293.

The problem can be solved omitting to specify a scheme when looking up
the scripts path. To future proof the path lookup, use the "venv"
scheme if available as done in #11598. For uniformity use similar
functions as used to lookup the library paths.
2022-12-27 21:04:06 +01:00
Jakub Kuczys 8dbb8b9bbe
Don't check for wheel when only build-system.requires is present (#11674) 2022-12-27 09:36:28 +00:00
Pradyun Gedam 1b33f4b944
Stop forcing color in CI
This affects the output presented in tests that rely on checking for how
`rich` errors are presented.
2022-12-26 15:01:38 +00:00
Pradyun Gedam b7ad4ee389
Update rich to 12.6.0 2022-12-26 14:59:18 +00:00
Pradyun Gedam c4566c6c82
Merge pull request #11667 from edmorley/patch-1
Remove duplicate news entry for #11547
2022-12-20 13:29:00 +00:00
Ed Morley dd70d4a3ac
Remove duplicate news entry for #11547
#11547 was backported to pip 22.3.1, so has already been released and already has a news entry:
https://pip.pypa.io/en/latest/news/#v22-3-1

As such, one shouldn't be included for it, for the next pip release:
https://pip.pypa.io/en/latest/news/#not-yet-released-2022-12-19
2022-12-20 12:56:50 +00:00
Stéphane Bidoul 32634e5899
Merge pull request #11639 from doronz88/bugfix/pip_show_location
show: show editable location instead if package is editable (#11638)
2022-12-19 09:27:08 +01:00
doron zarhi e59ff2fc8c show: add editable location if package is editable (#11638) 2022-12-18 01:33:57 +02:00