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

packse not servering yanked packages as yanked in simple api #165

Open
notatallshaw opened this issue Mar 17, 2024 · 2 comments
Open

packse not servering yanked packages as yanked in simple api #165

notatallshaw opened this issue Mar 17, 2024 · 2 comments

Comments

@notatallshaw
Copy link

For example scenario "requires-package-yanked-and-unyanked-any": https://github.com/astral-sh/packse/blob/main/scenarios/yanked.json#L48

Package a 1,0,0 should be yanked in the simple api, which would present itself as having the link attribute data-yanked, but when I look at the HTML that packse serves for this package I don't see that:

<!DOCTYPE html>
    <html>
        <head>
            <title>Links for requires-package-yanked-and-unyanked-any-a-c1d7f24e</title>
        </head>
        <body>
            <h1>Links for requires-package-yanked-and-unyanked-any-a-c1d7f24e</h1>
                 <a href="[/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-0.1.0-py3-none-any.whl#sha256=2b30c598aab25b18b92d60885285df7b66f80a3390658b1a6d96c8bc36f005e8](view-source:http://127.0.0.1:3141/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-0.1.0-py3-none-any.whl#sha256=2b30c598aab25b18b92d60885285df7b66f80a3390658b1a6d96c8bc36f005e8)">requires_package_yanked_and_unyanked_any_a_c1d7f24e-0.1.0-py3-none-any.whl</a><br>
                 <a href="[/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-0.1.0.tar.gz#sha256=274de419ae486e4b19cbbdd39e97ba272943d165a028effeefcae6c9bb999dea](view-source:http://127.0.0.1:3141/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-0.1.0.tar.gz#sha256=274de419ae486e4b19cbbdd39e97ba272943d165a028effeefcae6c9bb999dea)">requires_package_yanked_and_unyanked_any_a_c1d7f24e-0.1.0.tar.gz</a><br>
                 <a href="[/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-1.0.0-py3-none-any.whl#sha256=b0a7775307307ef338c7815424f883ac29e8363ad7f0baa9404f4e5b0bb963dc](view-source:http://127.0.0.1:3141/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-1.0.0-py3-none-any.whl#sha256=b0a7775307307ef338c7815424f883ac29e8363ad7f0baa9404f4e5b0bb963dc)">requires_package_yanked_and_unyanked_any_a_c1d7f24e-1.0.0-py3-none-any.whl</a><br>
                 <a href="[/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-1.0.0.tar.gz#sha256=ffa236db1626822a9ae069cb7388afb415cb3d9a900ee06f02065aa86ce96853](view-source:http://127.0.0.1:3141/packages/requires-package-yanked-and-unyanked-any-c1d7f24e/requires_package_yanked_and_unyanked_any_a_c1d7f24e-1.0.0.tar.gz#sha256=ffa236db1626822a9ae069cb7388afb415cb3d9a900ee06f02065aa86ce96853)">requires_package_yanked_and_unyanked_any_a_c1d7f24e-1.0.0.tar.gz</a><br>
        </body>
    </html>

If we compare that to say https://pypi.org/simple/apache-airflow/, I can see the data-yanked attribute for the relevant yanked files:

<a href="[https://files.pythonhosted.org/packages/bd/99/4761af2cea96cc818e05e9cd42d794b2ba79ceeccba96ea073398a9b49bd/apache-airflow-1.10.13.tar.gz#sha256=bb637f95a2aef7b2f7d622ecda150d6a5794011bd9e8d610ab0e9a1f518325e9](view-source:https://files.pythonhosted.org/packages/bd/99/4761af2cea96cc818e05e9cd42d794b2ba79ceeccba96ea073398a9b49bd/apache-airflow-1.10.13.tar.gz#sha256=bb637f95a2aef7b2f7d622ecda150d6a5794011bd9e8d610ab0e9a1f518325e9)" data-requires-python="&gt;=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" data-yanked="Bug: https://github.com/apache/airflow/issues/12659 " >apache-airflow-1.10.13.tar.gz</a><br />
@zanieb
Copy link
Member

zanieb commented Mar 17, 2024

Yeah unfortunately there's no way to yank files in pypiserver, you can use our static index that we publish per release and commit to main instead e.g. https://astral-sh.github.io/packse/0.3.8/simple-html/

I'll probably either fork pypiserver to add support for this or change packse index up / packse serve to use a different server.

@notatallshaw
Copy link
Author

There doesn't seem to be an open feature request, or a mention of yanking in their docs. I'll at least open an issue on their side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants