Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#51463 closed enhancement (fixed)

Use json endpoint for pypi livecheck

Reported by: xeron (Ivan Larionov) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: jmroot (Joshua Root), raimue (Rainer Müller)
Port:

Description

Previously used XML page is not available for some packages (it redirects to JSON page).

Attachments (2)

pypi_livecheck.patch (644 bytes) - added by xeron (Ivan Larionov) 3 years ago.
stdout.log (5.5 KB) - added by xeron (Ivan Larionov) 3 years ago.

Download all attachments as: .zip

Change History (8)

Changed 3 years ago by xeron (Ivan Larionov)

Attachment: pypi_livecheck.patch added

comment:1 Changed 3 years ago by xeron (Ivan Larionov)

Errors after with this change:

xeron@Ivans-MacBook-Pro:~/workspace/devel/macports-dports/python$ port livecheck `ls -1` > stdout.log
Error: cannot check if py-LabJackPython was updated (regex didn't match)
Error: cannot check if py-amqplib was updated (regex didn't match)
Error: cannot check if py-aniso8601 was updated (<url> malformed)
Error: cannot check if py-antlr3 was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if py-aplpy was updated (Could not resolve host: pypi)
Error: cannot check if py-appscript was updated (Could not resolve host: pypi)
Error: cannot check if py-apsw was updated (regex didn't match)
Error: cannot check if py-apycot was updated (response reading failed)
Error: cannot check if py-argparse was updated (regex didn't match)
Error: cannot check if py-aspects was updated (regex didn't match)
Error: cannot check if py-astrolibcoords was updated (regex didn't match)
Error: cannot check if py-authkit was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if py-baker was updated (Could not resolve host: pypi)
Error: cannot check if py-bitstring was updated (regex didn't match)
Error: cannot check if py-blessed was updated (Could not resolve host: pypi)
Error: cannot check if py-cdb was updated (The requested URL returned error: 403 Forbidden)
Error: livecheck failed for py-certifi: extracted version '2016.2.28' is older than livecheck.version '2016.02.28'
Error: cannot check if py-cherrypy was updated (The requested URL returned error: 403 Forbidden)
Error: cannot check if py-cherrypy3 was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if py-chm2pdf was updated (regex didn't match)
Error: cannot check if py-clientform was updated (regex didn't match)
Error: cannot check if py-codetools was updated (The requested URL returned error: 404 NOT FOUND)
Error: cannot check if py-colormath was updated (Could not resolve host: pypi)
Error: livecheck failed for py-configparser: extracted version '3.5.0' is older than livecheck.version '3.5.0b2'
Error: cannot check if py-construct was updated (Could not resolve host: pypi)
Error: cannot check if py-control was updated (Could not resolve host: pypi)
Error: cannot check if py-couchdbkit was updated (Could not resolve host: pypi)
Error: cannot check if py-country was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if py-creoleparser was updated (regex didn't match)
Error: cannot check if py-ctags was updated (The requested URL returned error: 404 Not Found)
Error: cannot check if py-cvxmod was updated (regex didn't match)
Error: cannot check if py-cx_Freeze was updated (regex didn't match)
Error: cannot check if py-daemon was updated (regex didn't match)
Error: cannot check if py-decoratortools was updated (Could not resolve host: pypi)
Error: cannot check if py-demjson was updated (regex didn't match)
Error: cannot check if py-django-debug-toolbar was updated (regex didn't match)
Error: cannot check if py-django-nose was updated (Could not resolve host: pypi)
Error: cannot check if py-djvubind was updated (regex didn't match)
Error: cannot check if py-dns was updated (regex didn't match)
Error: cannot check if py-dpkt was updated (regex didn't match)
Error: Port py-ebay not found

Verified half of these ports and it happens because they use their own livecheck (which we may mass-fix as well).

Last edited 3 years ago by xeron (Ivan Larionov) (previous) (diff)

Changed 3 years ago by xeron (Ivan Larionov)

Attachment: stdout.log added

comment:2 Changed 3 years ago by xeron (Ivan Larionov)

And attached stdout as a proof that it actually works :)

comment:3 Changed 3 years ago by raimue (Rainer Müller)

Cc: raimue@… added

comment:4 Changed 3 years ago by xeron (Ivan Larionov)

@raimue anything against applying this? Current XML endpoint is not reliable at all because it redirects to JSON endpoint for some ports.

comment:5 Changed 3 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

Not sure what I did differently in my initial testing in #51391, but it seems to work just fine.

Committed in r149160.

comment:6 Changed 3 years ago by xeron (Ivan Larionov)

Thanks!

Note: See TracTickets for help on using tickets.