-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop XMLRPC API to use PyPI Index API #1898
base: main
Are you sure you want to change the base?
Conversation
The XMLRPC is now obsolete and deprecated and even the parts that may not be deprecated no longer work. Instead, let's use the simple Index API with JSON to collect all packages and their changes. Reference: pypa#1897 Philippe Ombredanne <[email protected]>
d4b0160
to
f93e687
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1898 +/- ##
==========================================
+ Coverage 79.69% 86.43% +6.74%
==========================================
Files 31 35 +4
Lines 4324 4438 +114
Branches 780 463 -317
==========================================
+ Hits 3446 3836 +390
+ Misses 721 425 -296
- Partials 157 177 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks! This is great and much cleaner / simpler to implement that I thought.
- My only worry is to see how long PyPI caches these pages ... cc: @ewdurbin - Where do we find this setting?
- We should document that as XMLRPC had 0 caching ...
- But maybe this is low as we've not had many problems fetching packages supplied via the XMLRPC to mirror/sync ...
I'm also sad I forgot this was a stretch goal that we put into a PEP I co-authored. This was all clever additions by @dstufft <3.
Can we just fix typing, add info on the Simple API caching (if there is any) and that test name unless 1__1 means something I don't understand, but we don't have it anywhere else I think ...
@@ -5,7 +5,6 @@ packaging==24.2 | |||
requests==2.32.3 | |||
sphinx==8.2.1 | |||
MyST-Parser==4.0.1 | |||
xmlrpc2==0.3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O nice catch. I need to go through and see if we can slim down our requirements file.
Or maybe we move to uv
to auto manage this stuff. Wonder if PyPA has any policy on using uv
yet ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I just brutally looked for "rpc" and this looked unused. Does uv check for imports?
The speed increase is amazing too based on the integration tests - >10s saved : |
Add typing where missing. Remove extra underscore from method. Reference: pypa#1897 Philippe Ombredanne <[email protected]> Co-authored-by: Cooper Lees <[email protected]>
Caching for endpoints is configured in their view configurations, as "orgin_cache": For the That endpoint is one of the only ones we don't purge in response to changes, due to its poor performance on cold-cache. Most relevant endpoints are purged in more-or-less real-time on upload, such as |
The XMLRPC is now obsolete and deprecated and even the parts that may
not be deprecated no longer work. Instead, let's use the simple Index
API with JSON to collect all packages and their changes.
Reference: #1897
Signed-off-by: Philippe Ombredanne [email protected]