Skip to content
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

[PyPI] Replace Deprecated PyPI XMLRPC Methods in DataFed Python API #1086

Open
suruihuang opened this issue Nov 12, 2024 · 3 comments · May be fixed by #1089
Open

[PyPI] Replace Deprecated PyPI XMLRPC Methods in DataFed Python API #1086

suruihuang opened this issue Nov 12, 2024 · 3 comments · May be fixed by #1089
Assignees
Labels
Type: Bug Something isn't working

Comments

@suruihuang
Copy link

Description

DataFed currently uses deprecated XMLRPC methods from PyPI, which causes runtime errors on deployed sites.

Issue Details

When attempting to connect to PyPI, the following runtime error occurs:
Unable to connect to PyPI: <Fault -32500: 'RuntimeError: PyPI no longer supports the XMLRPC package_releases method. Use JSON or Simple API instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.'>
Consider replacing deprecated XMLRPC methods with the current JSON or Simple API alternatives recommended by PyPI in python/datafed_pkg/datafed/MessageLib.py

@JoshuaSBrown JoshuaSBrown added the Type: Bug Something isn't working label Nov 14, 2024
@JoshuaSBrown
Copy link
Collaborator

Running returns this.

PYTHONPATH=. ./scripts/datafed
Unable to connect to pypi: <Fault -32500: 'RuntimeError: PyPI no longer supports the XMLRPC package_releases method. Use JSON or Simple API instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.'>
Manual authentication required.
User ID: ^C

@suruihuang does this still let you continue using the client other than throwing the error? It should catch it and continue.

@JoshuaSBrown JoshuaSBrown linked a pull request Nov 14, 2024 that will close this issue
@sourcery-ai sourcery-ai bot linked a pull request Nov 14, 2024 that will close this issue
@JoshuaSBrown
Copy link
Collaborator

Confirmed that running client now does not trigger exception.

PYTHONPATH=. ./scripts/datafed --verbosity 2
No local credentials loaded.
Manual authentication required.
User ID: ^C

@JoshuaSBrown
Copy link
Collaborator

Looks like sort order is reversed by default.

(datafed) brownjs@LAP142548:~/software/open/datafed/DataFed_Copy/python/datafed_pkg$ PYTHONPATH=. ./scripts/datafed --verbosity 2
['0.10.0', '0.11.0', '0.13.0', '0.7.19', '0.7.20', '1.1.0-0', '1.1.0-1', '1.1.0-4', '1.2.0-4', '1.4.0-0', '2.0.0', '2.0.1', '2.0.2', '2.0.3', '3.0.0']
Final release
0.10.0

@JoshuaSBrown JoshuaSBrown self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants