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

Python/CPython missing? (regression in tag-only GitHub in 1.6.0 & 2.0) #63

Closed
henryiii opened this issue Oct 25, 2021 · 6 comments
Closed

Comments

@henryiii
Copy link
Contributor

We use last version in manylinux to detect the latest version of each release of Python. For some reason, it suddenly as stopped working; and if I run it manually:

$ pipx run lastversion python/cpython
No release was found

I get nothing, as well.

@henryiii
Copy link
Contributor Author

This worked in our weekly update a week ago, and was broken last night. See pypa/manylinux#1207.

@henryiii
Copy link
Contributor Author

henryiii commented Oct 25, 2021

This doesn't seem to work either: pipx run --spec "lastversion<2" lastversion python/cpython, so maybe it's a change in how these are reported from GitHub? (Or maybe it was always pulled from a different endpoint, but I don't know which one or why it's broken now).

@henryiii
Copy link
Contributor Author

I'm thinking this is not looking at the tags, but just at the GitHub Releases (which python/cpython does not have):

lastversion.lastversion - INFO - Verbose 2 level output.
lastversion.lastversion - INFO - Using cache directory: /Users/henryschreiner/Library/Caches/lastversion.
lastversion.ProjectHolder - INFO - Created instance of GitHubRepoSession
lastversion.GitHubRepoSession - INFO - Using API token.
cachecontrol.controller - DEBUG - Looking up "https://github.com/python/cpython/releases.atom" in the cache
cachecontrol.controller - DEBUG - No cache entry available
cachecontrol.controller - DEBUG - Updating cache with response from "https://github.com/python/cpython/releases.atom"
cachecontrol.controller - DEBUG - Caching due to etag
lastversion.GitHubRepoSession - INFO - Got HTTP status code 200 from https://github.com/python/cpython/releases.atom
lastversion.GitHubRepoSession - INFO - Feed has no elements. Means no tags and no releases
No release was found

@henryiii
Copy link
Contributor Author

Yes! This is a bug introduced in 1.6.0:

$ pipx run --spec lastversion==1.5.1 lastversion  python/cpython
3.10.0
$ pipx run --spec lastversion==1.6.0 lastversion  python/cpython
No release was found
$ pipx run --spec lastversion==2.0.0 lastversion  python/cpython
No release was found

An alias python -> python/cpython would be nice for performance, by the way.

@henryiii henryiii changed the title Python/CPython missing? Python/CPython missing? (regression in tag-only GitHub in 1.6.0 & 2.0) Oct 26, 2021
dvershinin added a commit that referenced this issue Oct 28, 2021
@dvershinin
Copy link
Owner

Please check with lastversion 2.0.1.

It actually seems like a change with GitHub in regards to release feeds generation. Previously, I reckon they always included "tag-only" releases even when no formal release was present. And lastversion had some optimization to reduce API usage by leveraging this.

@henryiii
Copy link
Contributor Author

Works, thanks!

$ pipx run --no-cache lastversion python
3.10.0

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