Upgrade hatch to fix installing extras bug#4108
Merged
hauntsaninja merged 5 commits intopsf:mainfrom Dec 14, 2023
BryceStevenWilley:4107_extra_d_deps
Merged
Upgrade hatch to fix installing extras bug#4108hauntsaninja merged 5 commits intopsf:mainfrom BryceStevenWilley:4107_extra_d_deps
hauntsaninja merged 5 commits intopsf:mainfrom
BryceStevenWilley:4107_extra_d_deps
Conversation
Fix #4107, in a fairly hacky way though. Hatch will strip out parenthesis in the extras if it thinks it doesn't need them. We can, however, add a meaningless restriction like `and python_version >= '1'` to force hatch to use our parenthesis. Definitely should have a hatch fix upstream though.
AlexWaygood
reviewed
Dec 13, 2023
Contributor
AlexWaygood
left a comment
There was a problem hiding this comment.
Thanks for fixing! Now that https://github.com/pypa/hatch/releases/tag/hatchling-v1.20.0 has been released with an upstream fix, maybe a simpler solution might be to just pin to hatchling>=1.20.0 here?
Line 28 in 35ce37d
Contributor
Author
|
Thanks! I just saw that hatchling released the patch already, which is nice. I also changed the other pinned version of hatchling, I don't have a mac machine to test that one though. |
for more information, see https://pre-commit.ci
hauntsaninja
approved these changes
Dec 14, 2023
Collaborator
hauntsaninja
left a comment
There was a problem hiding this comment.
Thanks for the report and for fixing this twice over!
We'll test the Mac build in CI (looks like the patch still applies, which is main reason for that pin)
|
Any plans for a patch release including this fix? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix #4107 by updating hatchling
in a fairly hacky way though.Hatch
willused to strip out parenthesis in the extras if it thinks it doesn't need them and wouldn't add them back in.:( We can, however, add a meaningless restriction likeand python_version >= '1'to force hatch to use our parenthesis. Extremely hacky, and I would understand if we don't want this to be merged until a cleaner hatch fix is upstream. Also happy to come up with another way of essentially just havingtruein the spec, but I couldn't find one with a quick reading of https://peps.python.org/pep-0508/.Checklist - did you ...
CHANGES.mdif necessary?I did manually test this by installing my local checkout of the project, confirming that the dependencies for the
dextra aren't installed:When run on main, this output includes
Requirement already satisfied: aiohttp>=3.7.4 in /home/brycew/Developer/.venv/lib/python3.10/site-packages (from black==0.1.dev1762+g35ce37d) (3.9.1), and all of it's dependencies.