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

12642 commits

Author SHA1 Message Date
Pradyun Gedam
2e8e5ad3df
Don't duplicate output when raising out of distribution preparation 2022-01-25 01:38:23 +00:00
Pradyun Gedam
94668c6df6
Pacify unit tests 2022-01-25 01:38:23 +00:00
Pradyun Gedam
ba79b1c639
📰 2022-01-25 01:38:23 +00:00
Pradyun Gedam
40bed179c0
Sort imports 2022-01-25 01:38:23 +00:00
Pradyun Gedam
deb2d754e7
Tweak the chattymodule to not leak potentially information
I'd like to use this in screenshots, but the os.environ makes it a bit
tricky to do.
2022-01-25 01:38:23 +00:00
Pradyun Gedam
eb462744da
Raise the LegacyInstallFailure exception directly 2022-01-25 01:38:23 +00:00
Pradyun Gedam
a835e0a277
Prettify messages for discarding candidates due to issues
These are more pleasing colours and, more importantly, a clearer
presentation style of the package vs the error.
2022-01-25 01:38:23 +00:00
Pradyun Gedam
1a0193f9e4
Improve the setuptools caller script 2022-01-25 01:38:23 +00:00
Pradyun Gedam
68e0bd46c8
Add an example setuptools-based package that always fails 2022-01-25 01:38:23 +00:00
Pradyun Gedam
d527e85146
Add a dedicated exception for metadata generation failures 2022-01-25 01:38:22 +00:00
Pradyun Gedam
1ee370637f
Add diagnostics to InstallationSubprocessError
This more clearly states where the error came from, presents it in a
more approachable format with context provided for what this error is
related to.
2022-01-25 01:38:22 +00:00
Pradyun Gedam
2a617d5455
Improve presentation of LegacyInstallFailure
These errors now more clearly note where the error occurred and what
component is at fault.
2022-01-25 01:38:22 +00:00
Pradyun Gedam
543d0b3165
Clearly document that exceptions shouldn't import any internals
This file should be importable in all other modules, which means it
can't be importing any of those modules (to prevent an import loop).
2022-01-25 01:38:22 +00:00
Pradyun Gedam
57198c6688
Use logger.warning instead of warnings.warn
This is more in line with the rest of our output presentation logic.
2022-01-25 01:38:22 +00:00
Pradyun Gedam
7a13f7c213
Improve our setuptools shim
Modernise the shim, to account for the Python 3.2+ support matrix.

This also presents clearer error messages on failures, the included
comment helps inform users about why this shim exists and the traceback
now explicitly mentions `<pip-setuptools-shim>` to make it clearer to
users that this shim exists.
2022-01-25 01:38:22 +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
Pradyun Gedam
78ef0b216f
Merge pull request #10826 from pradyunsg/annotate 2022-01-25 01:37:05 +00:00
Pradyun Gedam
42075efa61
Annotate an unannotated test 2022-01-25 01:32:34 +00:00
Pradyun Gedam
997c5a742b
Merge pull request #10625 from albertosottile/ignore_yanked 2022-01-24 23:47:54 +00:00
Pradyun Gedam
79e6237aa6
Merge pull request #10759 from nateprewitt/patch_requests_2_27_0 2022-01-21 15:48:11 +00:00
Pradyun Gedam
3388ec4abc
Merge pull request #10814 from pradyunsg/misc
Deal with some warnings in development tooling
2022-01-21 15:11:01 +00:00
Pradyun Gedam
d15393de79
Disallow Sphinx 4.4.0 in documentation builds
It introduces additional warnings that we aren't ready for.
2022-01-21 14:35:19 +00:00
Pradyun Gedam
ff8b9a167e
Mark TestPipResult as not having tests
This makes pytest stop warning about it.
2022-01-21 14:10:40 +00:00
Nate Prewitt
9f3760ba14
Upgrade urllib3 to 1.26.8 2022-01-14 09:49:13 -07:00
Nate Prewitt
cc21ec2a2e
Upgrade Requests to 2.27.1 2022-01-14 09:49:09 -07:00
Pradyun Gedam
914178b5b9
Merge pull request #10776 from Molkree/update-license-year 2022-01-14 14:38:52 +00:00
Dmitry Volodin
874a2f8c39 Only specify start year in license 2022-01-14 16:22:09 +03:00
Pradyun Gedam
9e05fc1f00
Merge pull request #10796 from pradyunsg/try-fixing-test-suite 2022-01-14 12:03:49 +00:00
Pradyun Gedam
f197d3a3fa
Merge pull request #10780 from hugovk/skip-lock-threads-on-forks 2022-01-14 11:42:23 +00:00
Pradyun Gedam
764d8841fe
Use the standard library distutils for running tests
This is in line with what our unit tests are written with the assumption
of.
2022-01-14 11:29:16 +00:00
Hugo van Kemenade
fbf75b4965 CI: Only lock threads on upstream 2022-01-11 15:43:42 +02:00
Pradyun Gedam
7f8a684403
Merge pull request #10740 from pawelszramowski/explain-unquoted-pip-upgrade-cmd
Explain why using subprocess.list2cmdline is a bad idea
2021-12-22 05:26:51 +05:30
Paweł Szramowski
b8c4218e8f Explain why using subprocess.list2cmdline is a bad idea 2021-12-21 22:30:35 +01:00
Pradyun Gedam
5cf98408f4
Merge pull request #10703 from pradyunsg/rich-diagnostic-error-messages 2021-12-14 19:13:57 +00:00
Pradyun Gedam
fd45825063
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-12-12 13:30:06 +00:00
Pradyun Gedam
6b31f83187
Escape the package name, allowing rich to stylize URLs and links 2021-12-12 13:13:02 +00:00
Pradyun Gedam
961eb6f166
Stop stylizing PEP **518**
This is a slightly cleaner presentation style.
2021-12-12 13:11:36 +00:00
Pradyun Gedam
b82dfd1745
Restore colors in regular logging messages
Also, reflects that `--no-color` does not mean no-ansi-escapes but only
affects colour rules.
2021-12-12 13:11:36 +00:00
Pradyun Gedam
e857d0f532
Properly handle newlines in diagnostic error tests
This is necessary to ensure that the output can be compared directly.
2021-12-12 13:11:36 +00:00
Pradyun Gedam
6a20f5b056
Add news fragment 2021-12-12 13:11:36 +00:00
Pradyun Gedam
d517dae1b7
Clean up where Text is used to wrap diagnostic messages.
This is only necessary on messages which may contain `[`, which needs to
be escaped before printing with rich, since rich treats them as output
formats.
2021-12-12 13:11:36 +00:00
Pradyun Gedam
9f4117f2b8
Replace {attention -> note}_stmt
The new name is a closer match with what is presented to the user.
2021-12-12 13:11:36 +00:00
Pradyun Gedam
8feb24fd12
Enable the use of rich for presenting output
This makes it possible to present output with rich markup, within the
constraints of our logging infrastructure.

Further, diagnostic errors can now by presented using rich, using their
own special "[present-diagnostic]" marker string, since those need to be
handled differently from regular log messages and passed directly
through to rich's console object, after an indentation wrapper.
2021-12-12 13:11:36 +00:00
Pradyun Gedam
03a87c22de
Improve DiagnosticPipError presentation
Borrow error presentation logic from sphinx-theme-builder, and
exhaustively test both the unicode and non-unicode presentation.

Utilise rich for colours and presentation logic handling, with tests to
ensure that colour degradation happens cleanly, and that the content is
stylized exactly as expected.

Catch diagnostic errors eagerly, and present them using rich. While this
won't include the pretty presentation in user logs, those files will
contain the entire traceback upto that line.
2021-12-12 13:11:35 +00:00
Pradyun Gedam
bbc7021cde
Merge pull request #10537 from pradyunsg/fix-misbehaving-test 2021-12-05 11:55:12 +00:00
Tzu-ping Chung
ebc13b4ddf
Merge pull request #10675 from uranusjr/metadata-misc 2021-12-05 04:43:10 +08:00
Pradyun Gedam
4cdf146f5d
Fix crashes with higher verbosity levels
This was causing issues in running the test suite locally at higher
verbosity levels, since this block causes errors when passed a URL.
2021-12-04 19:01:58 +00:00
Pradyun Gedam
3002881874
Merge pull request #10484 from pradyunsg/updated-direct-references-version 2021-12-04 18:59:46 +00:00
Tzu-ping Chung
052419f21b
Merge pull request #10671 from locations-slackware-home-platlibdir 2021-12-04 20:57:31 +08:00
Tzu-ping Chung
17c02813b7
Merge pull request #10707 from uranusjr/location-warning-suppress-apple 2021-12-04 19:28:39 +08:00