fedora-python / pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.
MIT License
123 stars 39 forks source link

adhere to the new pypi.org rate-limiting #242

Closed evgeni closed 3 years ago

evgeni commented 3 years ago

pypi.org has rate-limited their XML-RPC API to 1 request/second, see https://github.com/pypa/warehouse/issues/8753 for details.

Let's adhere to that limit until we migrate to the new JSON API.

evgeni commented 3 years ago

The test failures on Python2 are related, but my motivation to fix Python2 issues is ∅

gordonmessmer commented 3 years ago

It looks like the tests are failing on all python versions, not just python 2.

I'm also seeing the HTTPTooManyRequests fault in the Python 3 versions, which is odd because testing your change in isolation suggests that it should be rate limiting correctly.

I got a bug report via redhat bugzilla just before the PR was opened, and I'm working on a similar fix. I'll see if I can figure out why this isn't working as expected and take the more readable approach.

gordonmessmer commented 3 years ago

I've pushed some code to the issue_246 branch. It might be faster to switch to the JSON API than to make the XMLRPC interface work again.

gordonmessmer commented 3 years ago

This issue is resolved in v3.3.5

evgeni commented 3 years ago

Thanks!