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

12676 commits

Author SHA1 Message Date
Tzu-ping Chung
0c2574b7ef
Merge pull request #10566 from n1000/dont_warn_on_bsd 2021-10-22 16:09:04 +01: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
Pradyun Gedam
7b3c12299b
Merge pull request #10607 from pradyunsg/fix-docs-builds 2021-10-22 10:19:45 +01:00
Pradyun Gedam
14f8803bf8
Add a missing newline to fix the newfile rendering
towncrier renders with `trim_blocks=True` which trims the newline at the
start of the for loop's body. This adds an additional newline which is
not trimmed, which ensures that the code blocks don't blend into each
other.
2021-10-22 08:16:04 +01:00
Pradyun Gedam
4144d6a7f9
Bump to Sphinx 4.2 and above
This should allow newer versions of Sphinx, which contain bugfixes for
Python 3.10 support.
2021-10-22 08:04:57 +01:00
Tzu-ping Chung
98d9fdfa09
Merge pull request #10600 from nadavwe/vendoring-new-resolve-lib-version 2021-10-21 23:05:39 +08:00
Nadav Wexler
93f5bf702c news file 2021-10-21 09:22:02 +03: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
Ee Durbin
731d9fca8e
Merge pull request #10592 from pradyunsg/update-ewdurbin-name
Update Ee W. Durbin III's name
2021-10-20 15:11:58 -04:00
Ee Durbin
2ead95116f
Update .mailmap 2021-10-20 15:10:04 -04:00
Pradyun Gedam
902b9e7a1a
Merge pull request #10536 from pradyunsg/docs/fix-wordin 2021-10-18 20:27:15 +01:00
Pradyun Gedam
b576329791
Fix documentation about when setup.py clean is run
It is only run on failure to build wheels.
2021-10-18 20:22:52 +01: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
619b257ed9
Add failing tests for issue 10573 2021-10-18 14:31:11 +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
08194009e4
📰
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-10-17 15:08:08 +01:00
Pradyun Gedam
eddd6dde3b
Correct mistake in documentation on Unix configuration file paths
The order was flipped, which implied the wrong thing.
2021-10-17 15:08:08 +01: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
34a035ab11 Add trivial news entry 2021-10-16 15:26:37 -07: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
bc66bb1b3b
Update Ee W. Durbin III's name
Per https://twitter.com/EWDurbin/status/1337939281835384834 name change.
2021-10-16 09:56:33 +01: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
bf71afc143
Merge pull request #10580 from pradyunsg/better-towncrier-template
Improve our towncrier template, to do the right thing after releases
2021-10-15 18:31:10 +01:00
Pradyun Gedam
aa89947b01
Improve our towncrier template, to do the right thing after releases
This also adds a bunch of comments, which should serve as useful guides
to future humans that work on these files.
2021-10-15 15:11:43 +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
8a9eeeb298 Add news entry 2021-10-14 22:34:28 +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
Pradyun Gedam
75c11c4d7b
Add about to ISSUE_TEMPLATES/config.yml
Just in case that's the reason this option isn't shown.
2021-10-11 20:57:42 +01:00
Alex Hedges
e1f81bfa4d Fix many typos 2021-10-11 15:48:17 -04:00
Pradyun Gedam
abec8a701b
Bump for release 2021-10-11 20:37:44 +01:00