Skip to content

FIX Respect yanked flag - #208

Merged
ryanking13 merged 9 commits into
pyodide:mainfrom
ryanking13:yank-handle
Feb 25, 2025
Merged

FIX Respect yanked flag#208
ryanking13 merged 9 commits into
pyodide:mainfrom
ryanking13:yank-handle

Conversation

@ryanking13

@ryanking13 ryanking13 commented Feb 15, 2025

Copy link
Copy Markdown
Member

Resolve: #146

Updates the resolver to respect yanked flag (PEP-592).

If the version with the yanked flag set is found, it will be considered as a last resort, when all other versions are incompatible.

  • changelog

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @ryanking13! I have just a few comments, the code looks good to me. Again, thanks for the reminder on Discord.

Comment thread CHANGELOG.md Outdated
Comment thread micropip/package_index.py
Comment thread micropip/transaction.py
Comment thread micropip/transaction.py
Comment thread tests/test_transaction.py

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @ryanking13! This looks great now.

I do wonder if Codecov is helping us, as you previously mentioned a few days ago somewhere (I can't find that comment) that it misses a few lines that are actually covered, as it can't run the tests in a WASM environment. For example, it reports that YANKED_WARNING_MESSAGE in line 244 of micropip/transaction.py was not covered, but it's definitely there in the test_integration_install_yanked case you added,

Nevertheless, maybe we can find a way to run coverage.py in a WASM environment and use the HTML/Markdown reports it can generate, as I don't think sys.monitoring needs any special attention in Pyodide. (Of course, not for this PR).

@ryanking13

Copy link
Copy Markdown
Member Author

Nevertheless, maybe we can find a way to run coverage.py in a WASM environment and use the HTML/Markdown reports it can generate, as I don't think sys.monitoring needs any special attention in Pyodide. (Of course, not for this PR).

Yes, I think running coverage inside WASM is not that hard. The hard part would be merging the results of the coverage.py inside and outside Pyodide.

@ryanking13

Copy link
Copy Markdown
Member Author

Thanks for the review!

@ryanking13
ryanking13 merged commit 1b1828a into pyodide:main Feb 25, 2025
@ryanking13
ryanking13 deleted the yank-handle branch February 25, 2025 09:27
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