Commit Graph

14203 Commits

Author SHA1 Message Date
Danny McClanahan 39da6e051a
use f-string in exception message 2023-08-14 07:57:37 -04:00
Danny McClanahan bfa8a5532d
clean up duplicated code 2023-08-14 07:57:37 -04:00
Danny McClanahan 957ad95c7d
add news entry 2023-08-14 07:57:37 -04:00
Danny McClanahan 22637722aa
fix #11847 for sdists 2023-08-14 07:57:37 -04:00
Danny McClanahan 50a2fb4f9f
add mock server to test that each dist is downloaded exactly once 2023-08-14 07:57:37 -04:00
Danny McClanahan 2e365bdab1
move test_download_metadata mock pypi index utilities to conftest.py 2023-08-14 07:57:37 -04:00
Tzu-ping Chung 0778c1c153
Merge pull request #12193 from cosmicexplorer/metadata-behavior-testing 2023-08-14 14:22:21 +08:00
Danny McClanahan 8704c7a5db
remove unnecessary fixture 2023-08-12 10:51:33 -04:00
Danny McClanahan e27af2c3c9
add notes on hash mismatch testing 2023-08-12 10:46:22 -04:00
Danny McClanahan 20b54de4df
add news 2023-08-12 10:01:31 -04:00
Danny McClanahan 67ff36b838
move directory metadata test out of req install tests 2023-08-12 10:01:30 -04:00
Danny McClanahan e86da734c7
add test for hash mismatch 2023-08-12 10:01:30 -04:00
Danny McClanahan 8e305f262f
add test for the *existing* `install --dry-run` functionality 2023-08-12 10:01:30 -04:00
Paul Moore 5378a6e110
Merge pull request #12194 from cosmicexplorer/build-tracker-comments
Add lots of comments on the function of BuildTracker
2023-08-11 12:05:38 +01:00
Danny McClanahan 4a853ea348
Update src/pip/_internal/operations/build/build_tracker.py
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2023-08-11 04:38:07 -04:00
Danny McClanahan b1fd3ac3e4
Update src/pip/_internal/operations/build/build_tracker.py
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2023-08-11 04:37:31 -04:00
Joshua 46754f1580 It's not a bug(fix) it's a FEATURE 2023-08-09 09:04:26 -05:00
Joshua 864139adb0 add tests 2023-08-08 14:32:59 -05:00
Joshua 38126ce5f8 HEAR YE HEAR YE 2023-08-08 13:42:11 -05:00
Joshua b2a151500b --dry-run is cool 2023-08-08 13:37:57 -05:00
Shantanu d8cd93f4fa
Fix incorrect use of re function in tests (#12213) 2023-08-08 07:37:38 -05:00
Shantanu 901db9cf8d
Use a set for TargetPython.get_tags for performance (#12204) 2023-08-06 11:08:16 -05:00
Seth Michael Larson d311e6e603
Upgrade certifi to 2023.7.22 (#12206) 2023-08-06 09:26:54 -05:00
Shantanu a19ade74a5
Use strict optional checking in req_install.py (#11379)
* Use strict optional checking in req_install.py

Suggested by pradyunsg in #11374

Since half of the API of this class depends on self.req not being None,
it seems like we should just prevent users from passing None here.
However, I wasn't able to make that change.

Rather than sprinkle asserts everywhere, I added "checked" properties.
I find this less ad hoc and easier to adapt if e.g. we're able to make
self.req never None in the future.

There are now some code paths where we have asserts that we didn't
before. I relied on other type hints in pip's code base to be accurate.
If that is not the case and we actually relied on some function being
able to accept None when not typed as such, we may hit these asserts.
But hopefully tests would catch such a thing.

* news

* black

* inline asserts

* code review

* fix up merge issue

* fix specifier bug
2023-08-05 00:07:27 +01:00
Jeff Widman d65ba2f6b6
Replace python2 deprecation with a badge of supported python versions
The python world has (mostly) moved on from Python 2. Anyone not already aware of the py2->py3 migration is probably new to the ecosystem and started on Python 3.

Additionally, it's convenient to see at a glance what versions of Python are supported by the current release. This pulls from PyPI versions, so will not immediately match `main` (we can probably change this to match `main` if preferred).

So by doing this it's both more useful going forward, and also lets us drop the explicit notice about dropping Python 2 support.
2023-08-02 13:54:12 -07:00
Paul Moore 3c0147a889
Merge pull request #12198 from jeffwidman/patch-1
Remove superfluous callout of new resolver
2023-08-02 21:23:23 +01:00
Jeff Widman e4d2e6e6b2
Remove superfluous callout of new resolver
The new resolver has been out for nearly three years now.

I don't think we need to highlight it on the Readme anymore.

Folks who are truly affected are far more likely to google their errors and then get redirected to it.

By removing the noise from the Readme, it stops distracting from other stuff.
2023-08-02 12:26:27 -07:00
Danny McClanahan 023b3d9237
add news 2023-08-01 13:59:42 -04:00
Danny McClanahan b47f77d330
add lots of comments on the function of BuildTracker 2023-08-01 13:50:40 -04:00
Tzu-ping Chung 3dc5ac5407
Merge pull request #12188 from uranusjr/cleaner-metadata-log 2023-07-31 08:18:59 +08:00
Tzu-ping Chung e4a0df1586
Merge branch 'main' into cleaner-metadata-log 2023-07-30 20:49:16 +08:00
Tzu-ping Chung b69ed811f0
Merge pull request #12187 from cosmicexplorer/fix-tempdir-cleanup 2023-07-30 20:48:58 +08:00
Tzu-ping Chung 4babc07663 Move metadata-fetching log to VERBOSE level 2023-07-28 15:32:29 +08:00
Tzu-ping Chung 6cc961ee79
Uppercase Python 2023-07-28 14:46:23 +08:00
Danny McClanahan 454e9768fb
incorporate review comments 2023-07-28 02:43:49 -04:00
Danny McClanahan eabefd4021
revert the traceback wrapping 2023-07-28 02:18:36 -04:00
Danny McClanahan 4f036be496
add news entry 2023-07-28 01:20:07 -04:00
Danny McClanahan eeb3d8fdff
synthesize a traceback to get a normal exc_info from an exception
- as per https://docs.python.org/3.12/whatsnew/3.12.html#shutil, we must expect only an exception
  and *not* the full exc_info from the new onexc function (the documentation of this is very
  misleading and still uses the label "excinfo":
  https://docs.python.org/3.12/library/shutil.html#shutil.rmtree)
2023-07-28 01:00:06 -04:00
Tzu-ping Chung d0641740d5
Merge pull request #11394 from ales-erjavec/temp-cleanup-ignore-errors 2023-07-27 15:11:40 +08:00
Sander Van Balen ba761cdda7 Merge branch 'main' into issue/11924-requirements-on-extras 2023-07-26 15:10:58 +02:00
Sander Van Balen 32e95be213 exclude brackets 2023-07-26 14:31:12 +02:00
Sander Van Balen f4a7c0c569 cleaned up windows fix 2023-07-26 14:12:38 +02:00
Sander Van Balen 504485c276 lint 2023-07-26 14:03:26 +02:00
Sander Van Balen 55e9762873 windows compatibility 2023-07-26 14:02:50 +02:00
Sander Van Balen 6ed231a52b added unit tests for install req manipulation 2023-07-26 11:48:42 +02:00
Sander Van Balen cc909e87e5 reverted unnecessary changes 2023-07-26 11:06:24 +02:00
Sander Van Balen 314d7c1254 simplified regex 2023-07-26 10:53:34 +02:00
Sander Van Balen 6663b89a4d added final bugfix news entry 2023-07-26 10:37:00 +02:00
Sander Van Balen 1207389177 made primary news fragment of type feature 2023-07-26 10:33:43 +02:00
Sander Van Balen e6333bb4d1 linting 2023-07-26 10:32:58 +02:00