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

[WIP] Handle yanked flag #148

Closed
wants to merge 1 commit into from
Closed

Conversation

whitphx
Copy link

@whitphx whitphx commented Oct 22, 2024

Resolves #146

While this is still wip, let me create this PR to get reviews checking if it's in a right direction.

Could you check if this strategy is ok where I added yanked field to WheelInfo and use it to filter out the yanked wheels in find_wheel?

TODO:

@@ -157,13 +157,16 @@ def _compatible_wheels(
# This key is not available in the Simple API HTML response, so this field may be None
size = file.get("size")

yanked = file.get("yanked")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say you could just do:

if file.get("yanked"):
    continue

here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this wouldn't allow for

unless they are the only file that matches a version specifier that “pins” to an exact version using either == (without any modifiers that make it a range, such as .*) or ===.

So maybe handling later is better.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think that rule would be implemented in find_wheel so the yanked value should be kept in WheelInfo and handled there.

@whitphx whitphx closed this Oct 22, 2024
@whitphx whitphx deleted the yanked-flag branch October 22, 2024 15:41
@hoodmane
Copy link
Member

Why did you close this? Are you going to make another? If you add a test it looks like something we could merge.

@hoodmane
Copy link
Member

Hmm I see your comment. Well thanks for looking into it @whitphx!

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.

The yanked flag should not be ignored
2 participants