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

3702 commits

Author SHA1 Message Date
Pradyun Gedam 12dad05180
Merge pull request #10628 from edmorley/resolutionimpossible-help-url 2021-11-12 17:47:16 +00:00
Pradyun Gedam e7c80c7b46
Merge pull request #10535 from lukasjuhrich/main 2021-11-12 09:57:11 +00:00
Hugo van Kemenade 0252c04a16 Drop support for soon-EOL Python 3.6 2021-11-08 12:02:16 +02:00
Ed Morley cfbdc48635
Update the docs URL shown for ResolutionImpossible errors
Previously the `ResolutionImpossible` error message referenced:
https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

However that section was moved in #10279, to:
https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Updating the URL not only saves a click, but also saves having to find the related
content halfway-down the dependency resolution page, since the forwarding link 
was to the top of the page rather than the specific section.
2021-11-03 09:38:27 +00:00
Pradyun Gedam c99e91224c
Merge pull request #10538 from pradyunsg/diagnostic-errors 2021-10-29 12:44:16 +01:00
Tzu-ping Chung 26eaddcfc9 Extract identifier cleanup for user_requested 2021-10-24 00:13:43 +08:00
Lukas Juhrich 03c2ea0ff5 Improve BadZipFile reporting 2021-10-23 17:42:22 +02:00
Pradyun Gedam a00e7bcd88
Implement diagnostic errors for build-system.requires issues
This demonstrates how the new diagnostic errors are to implement, and
how they get presented to users.
2021-10-22 13:47:53 +01:00
Pradyun Gedam 3a02455451
Fix a typo
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2021-10-22 13:41:48 +01:00
Pradyun Gedam 85b43482bb
Introduce DiagnosticPipError
This introduces an exception and presentation model, for providing
better errors messages. The motivating idea is that the better error
messages contain clear wording and provide additional context to users
to better understand what is happening.

The `DiagnosticPipError` class introduces a structured framework in our
exception model, for code authors to write their error messages. The
usage explicitly requires passing "context" and a "hint" (which accept
None values). This should nudge code authors to explicitly think about
what additional information can/should be presented to the user, and
to provide relevant hints to them whenever possible. It also makes it
straightforward to identify cases where we don't do this, which may
serve as clear areas for improvement in the future.

The initial implementation is intentionally basic and doesn't do much;
however we should be able to introduce better usage of terminal colors
and other features (eg: hyperlinks!) to further improve the presentation
of these errors. It does improve the presentation style by a bit, even
though there are significant presentation-related improvements to be
made.

Additionally, having a structured framework means that these would be
improvements in presentation of *all* the errors that are within this
framework -- increasing the benefits of investing in the presentation
of these errors.
2021-10-22 13:41:40 +01:00
Nadav Wexler 2c7368d91f updating resolvib version 2021-10-21 09:22:02 +03:00
Tzu-ping Chung d01dd4aba7
Merge PR #10577 from sbidoul/fix-pep660-metadata-preparation-fallback 2021-10-21 12:01:45 +08:00
Tzu-ping Chung f3a5dcc4a0
Merge pull request #10593 from gousaiyang/fix-missing-encoding-2 2021-10-18 23:07:01 +08:00
Stéphane Bidoul 106042f3df
Simplify "Preparing metadata" logging
Do not mention wheel, as this code path is also used
in legacy editable mode with isolation, where
no wheel is involved.

This also aligns with the new log entry for setup.py egg-info
which says "Preparing metadata (setup.py)".
2021-10-18 15:21:11 +02:00
Stéphane Bidoul b07a956f4b
Split _setup_isolation for readability 2021-10-18 14:34:50 +02:00
Stéphane Bidoul ae512892eb
Prepare legacy editable metadata in isolated env
When there is a pyproject.toml, metadata preparation must be
done in the isolated build environment for legacy editable installs too
(fixes a regression).

Also detect earlier if an editable install must go through the
legacy install path, to be sure to run it in an environment
with the correct build requirements.
2021-10-18 14:34:50 +02:00
Stéphane Bidoul b0eb95bab9
Upgrade pep517 to 0.12.0 2021-10-18 14:34:49 +02:00
Stéphane Bidoul ddfeaaef20
Reject projects that have neither a pyproject.toml nor a setup.py 2021-10-18 14:31:11 +02:00
Stéphane Bidoul d362431d02
Add TODO 2021-10-18 14:31:11 +02:00
Pradyun Gedam 16d16c871f
Merge pull request #10585 from pradyunsg/fix-config-paths
Rework MacOS configuration paths, to match documentation
2021-10-18 07:37:43 +01:00
Tzu-ping Chung ee9ac15c69
Merge pull request #10588 from tusharsadhwani/main 2021-10-18 08:35:16 +08:00
gousaiyang 7b6a1eddb7 Convert str.format to f-string 2021-10-17 11:56:43 -07:00
Pradyun Gedam 1b4ee832db
Rework MacOS configuration paths, to match documentation
This brings us in line with pre-platformdirs behaviours on these,
following the details of the configuration paths, as documented in pip's
own documentation.
2021-10-17 15:07:58 +01:00
Tushar Sadhwani 3c0d09e02e Fix line too long 2021-10-17 16:33:46 +05:30
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
Tushar Sadhwani 284f459f71
Update src/pip/_internal/cli/cmdoptions.py
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-10-16 08:44:43 +05:30
Pradyun Gedam fc6d7778a5
Merge pull request #10569 from aphedges/fix-typos 2021-10-15 19:25:34 +01:00
Pradyun Gedam 82cc0225c9
Merge pull request #10583 from pradyunsg/fix-vendoring 2021-10-15 14:10:00 +01:00
Tushar Sadhwani b6da93212d
Remove whitespace 2021-10-15 00:03:21 +05:30
Tushar Sadhwani 176ab1c54f Remove require-virtualenv from install page 2021-10-14 23:01:17 +05:30
Tushar Sadhwani 27d4e917d8 Remove duplicate code 2021-10-14 22:55:13 +05:30
Tushar Sadhwani bb0dda987a Add require-venv documentation for sphinx 2021-10-14 22:48:47 +05:30
Tushar Sadhwani 6c8ef89d97 Document --require-virtualenv flag 2021-10-14 22:12:33 +05:30
Pradyun Gedam 858dd34af6
Upgrade to vendoring 1.2
This enables wheel usage in vendoring's license fetching, at the cost of
requiring two more license-related fallbacks.

The additional fallbacks are due to packages which include the license
in their source distributions but not in their wheel distributions, and
the change in vendoring that prefers using wheels when possible.

This should fix the bootstrapping problem we're seeing with `flit` and
`tomli`, by allowing us to use wheels to break the loop.
2021-10-14 08:00:40 +01:00
Tzu-ping Chung 9d25d2aba5
Merge pull request #10566 from n1000/dont_warn_on_bsd 2021-10-14 06:28:18 +08:00
Nathan Houghton f231732bbd Check UID unconditionally on non-Windows platforms, if os.getuid is available
Check the uid using getuid() on platforms other than Linux and Mac OS before
warning about running pip as root.

Before this change, pip was emitting this warning even when it was run as a
non-root user.
2021-10-12 19:49:11 -07:00
Alex Hedges e1f81bfa4d Fix many typos 2021-10-11 15:48:17 -04:00
Pradyun Gedam 2bf32f5f95
Bump for development 2021-10-11 20:37:44 +01:00
Pradyun Gedam abec8a701b
Bump for release 2021-10-11 20:37:44 +01:00
Pradyun Gedam 9f18a403ca
Merge pull request #10481 from notatallshaw/prefer_failures 2021-10-10 00:06:30 +01:00
Pradyun Gedam 4fac2b90a5
Merge pull request #10550 from jbylund/joe/cache_requirement_creation 2021-10-09 14:56:09 +01:00
Pradyun Gedam 394a24eb1a
Upgrade resolvelib to 0.8.0 2021-10-09 09:41:34 +01:00
Damian Shaw 2253ed3037
Prefer backtracking on dependencies involved in the most recent conflict
This can significantly reduce the amount of backtracking required, by
avoiding backtracking on unrelated packages in the dependency graph.

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2021-10-09 09:41:34 +01:00
Pradyun Gedam ae2c9eda54
Merge pull request #10543 from pradyunsg/drop-sdist-reinstall
Un-deprecate source distribution re-installation behaviour
2021-10-09 07:37:36 +01:00
Diego Ramirez 02b4f86489
Return a better error message if a file: URL is not found (#10263)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2021-10-08 14:24:54 +01:00
Joseph Bylund 97327292c6 Set limited maxsize for requirement parsing cache 2021-10-08 07:28:45 -04:00
Pradyun Gedam 68e22aa959
Un-deprecate source distribution re-installation behaviour
This will be handled as part of a broader effort to make the reinstall
behaviours more ergonomic and easier to reason about.
2021-10-08 12:22:15 +01:00
Joseph Bylund dee6690f06 Renames, moves, docstrings, comments 2021-10-07 07:11:33 -04:00
Joseph Bylund bd87828eae (joe) black + imports 2021-10-06 12:48:48 -04:00
Joseph Bylund bb8824439e (joe) requirement creation is very expensive, and at least in my test case there were only ~200 unique requirement objects created in ~5-10 minutes of resolution time 2021-10-06 12:42:44 -04:00