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

fix: make rip handle pre-releases more similar to pip #140

Closed
wants to merge 3 commits into from

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Jan 9, 2024

should fix #118

Not sure about #4 but also not sure wether #4 is according to spec, either :)

@wolfv
Copy link
Member Author

wolfv commented Jan 9, 2024

Hm, while this works to some degree, it currently thinks that there are no candidates other than pre-releases too often. This is because not all "artifacts" are passed into the filter_candidates function. We need to pass in some extra information from the outside or make this filtering different I believe.

@wolfv
Copy link
Member Author

wolfv commented Jan 10, 2024

I have worked a little more this morning on the pre-release stuff and there is a little problem. Maybe you have ideas. I believe the idea for filtering pre-releases is that it depends on the requirement, for example if I do rip jupyterlab==4.1.0b0 we would only select pre-release candidates for jupyterlab, and so it should be allowed.

However, the get_candidates function only gets a NameId and doesn't know about the spec it came from.

@notatallshaw
Copy link

notatallshaw commented Jan 10, 2024

Hm, while this works to some degree, it currently thinks that there are no candidates other than pre-releases too often.

Are you basing this off what Pip does?

Because I'm fairly confident Pip is not spec compliant (e.g. pypa/pip#12469) and Pip's behavior may change quite a bit after pypa/pip#11715 finally lands.

@wolfv
Copy link
Member Author

wolfv commented Jan 10, 2024

Yeah, indeed, I was trying to see what pip does. I also thought that your interpretation from the linked issue is correct. Unfortunately that is also harder for us to implement (not because the code would be complex, but because our API interfaces don't really support this yet).

The rule we consider implemeting is to allow pre-releases if the version specifier mentions pre-releases, e.g. jupyterlab==4.1.0b0 would work. jupyterlab==4.1 would not work. But apparently that wouldn't be spec compliant ... we'll think further on this :)

@tdejager
Copy link
Contributor

Hm, while this works to some degree, it currently thinks that there are no candidates other than pre-releases too often. This is because not all "artifacts" are passed into the filter_candidates function. We need to pass in some extra information from the outside or make this filtering different I believe.

What do you mean with this, can you give an example what would and what would not be passed?

@wolfv
Copy link
Member Author

wolfv commented Jan 11, 2024

The filter candidates function gets artifacts only for a single version. To check if all versions of a given package are pre-releases I moved the function one level up (check last commit).

@tdejager tdejager closed this Jan 15, 2024
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

Successfully merging this pull request may close these issues.

rip does not follow spec for handling of pre-releases
3 participants