Repository navigation
Drop the hatchling 1.32.3 workaround - #152
Open
Thanatos9404 wants to merge 1 commit into
Open
Thanatos9404 wants to merge 1 commit into
Thanatos9404 wants to merge 1 commit into
Conversation
hatchling 1.32.4 reverted (pypa/hatch#2440) the BuildHookInterface typing change that jupyterlab#148 worked around, so the build hook can subclass BuilderConfig and BuildHookInterface[JupyterBuildConfig] directly again. With 1.32.4 the TYPE_CHECKING branch no longer type checks: mypy reports that "BuilderConfig" expects no type arguments and that "BuildHookInterface" expects one. hatchling 1.32.3 is excluded from the dependency, since the plain subclass fails to import there. 1.32.1 had the same change but is yanked, so resolvers already skip it. Closes jupyterlab#151
This branch has not been deployed
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.
Closes #151
hatchling 1.32.4 reverted (pypa/hatch#2440) the
BuildHookInterfacetyping change that #148 worked around, so this goes back to subclassingBuilderConfigandBuildHookInterface[JupyterBuildConfig]directly.plugin.pyis the same as before #148.With hatchling 1.32.4 the
TYPE_CHECKINGbranch from #148 no longer type checks. Onmain, mypy with the repo config reports:Both are gone with this change. The two other mypy errors (unused
type: ignoreinmigrate/jupyter_packaging.pyandmigrate/_migrate.py) are the same onmain.hatchling 1.32.3 is excluded from the dependency (
hatchling>=1.17,!=1.32.3), because the plain subclass fails to import there:1.32.1 had the same change but is yanked on PyPI, so resolvers already skip it.
Tests:
python -m pytestgives the same result onmainand on this branch with hatchling 1.32.4 (29 passed, 2 skipped;test_runandtest_normalize_cmdfail on my Windows machine on both, from how they build the expected path). ruff 0.2.0 (the pre-commit pin) is clean on the changed file.