-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Upgrade hatch to fix installing extras bug #4108
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"] |
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
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 havingtrue
in the spec, but I couldn't find one with a quick reading of https://peps.python.org/pep-0508/.Checklist - did you ...
CHANGES.md
if necessary?I did manually test this by installing my local checkout of the project, confirming that the dependencies for the
d
extra 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.