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

FIX: Replace minimum required Python for hatchling v1.18.0+ #901

Merged

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Nov 8, 2024

https://github.com/conda-forge/hatchling-feedstock has broken metadata for the minimum Python version required from v1.18.0 onwards (currently v1.25.0). The last version of hatchling that was compatible with Python 3.7 was v1.17.1 as after that pypa/hatch#1386 introduced Python 3.8+ syntax that made its way into hatchling v1.23.0 onward, though hatchling v1.18.0 was the first version to require Python 3.8+ (c.f. https://github.com/pypa/hatch/releases/tag/hatchling-v1.18.0).

c.f. conda-forge/pyhf-feedstock#28 (comment)

This is getting patched for hatchling v1.25.0 (rebuild) and future versions in conda-forge/hatchling-feedstock#59, so only apply this python replacement patch for releases created prior to now (1731056098000 which in human readable metadata is on 2024-11-08.)

Checklist

  • Used a static YAML file for the patch if possible (instructions).
  • [N/A] Only wrote code directly into generate_patch_json.py if absolutely necessary.
  • Ran pre-commit run -a and ensured all files pass the linting checks.
    • version_in is split across multiple lines to pass yamllint
  • Ran python show_diff.py and posted the output as part of the PR.
$ micromamba env create --yes --file dev-env-for-patches.yaml
$ micromamba activate repodata-patches
$ cd ..
$ python recipe/show_diff.py 
================================================================================
================================================================================
linux-armv7l
================================================================================
================================================================================
win-32
================================================================================
================================================================================
osx-arm64
================================================================================
================================================================================
linux-ppc64le
================================================================================
================================================================================
linux-aarch64
================================================================================
================================================================================
noarch
noarch::hatchling-1.18.0-pyhd8ed1ab_0.conda
noarch::hatchling-1.19.0-pyhd8ed1ab_0.conda
noarch::hatchling-1.19.1-pyhd8ed1ab_0.conda
noarch::hatchling-1.20.0-pyhd8ed1ab_0.conda
noarch::hatchling-1.21.0-pyhd8ed1ab_0.conda
noarch::hatchling-1.21.1-pyhd8ed1ab_0.conda
noarch::hatchling-1.22.1-pyhd8ed1ab_0.conda
noarch::hatchling-1.22.2-pyhd8ed1ab_0.conda
noarch::hatchling-1.22.3-pyhd8ed1ab_0.conda
noarch::hatchling-1.22.4-pyhd8ed1ab_0.conda
noarch::hatchling-1.22.5-pyhd8ed1ab_0.conda
noarch::hatchling-1.23.0-pyhd8ed1ab_0.conda
noarch::hatchling-1.24.0-pyhd8ed1ab_0.conda
noarch::hatchling-1.24.1-pyhd8ed1ab_0.conda
noarch::hatchling-1.24.2-pyhd8ed1ab_0.conda
noarch::hatchling-1.25.0-pyhd8ed1ab_0.conda
-    "python >=3.7",
+    "python >=3.8",
================================================================================
================================================================================
win-64
================================================================================
================================================================================
osx-64
================================================================================
================================================================================
linux-64
$ 
  • Modifications won't affect packages built in the future.

I use

timestamp_lt: 1731056098000

to ensure that this only affects packages built in the past of today (2024-11-08).

@matthewfeickert matthewfeickert requested a review from a team as a code owner November 8, 2024 09:24
@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@matthewfeickert
Copy link
Member Author

Also tagging @conda-forge/hatchling to give notice.

https://github.com/conda-forge/hatchling-feedstock has broken metadata for
the minimum Python version required from v1.18.0 onwards (currently v1.25.0).
The last version of hatchling that was compatible with Python 3.7 was v1.17.1
as after that https://github.com/pypa/hatch/ PR 1386 introduced Python 3.8+
syntax that made its way into hatchling v1.23.0 onward, though hatchling v1.18.0
was the first version to require Python 3.8+
(c.f. https://github.com/pypa/hatch/releases/tag/hatchling-v1.18.0).

This is getting patched for hatchling v1.25.0 (rebuild) and future versions
in https://github.com/conda-forge/hatchling-feedstock/ PR 59, so only apply this
python replacement patch for releases created prior to now (1731056098000
which in human readable metadata is on 2024-11-08.)
@matthewfeickert matthewfeickert force-pushed the fix/update-hatchling-min-python branch from 9b0562f to 908b89a Compare November 11, 2024 05:48
@matthewfeickert
Copy link
Member Author

Gentle ping to @conda-forge/core for review.

Copy link

@ofek ofek left a comment

Choose a reason for hiding this comment

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

This looks good to me, thanks a lot!

@chrisburr chrisburr merged commit 70c18ee into conda-forge:main Nov 11, 2024
3 checks passed
@matthewfeickert matthewfeickert deleted the fix/update-hatchling-min-python branch November 11, 2024 20:10
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.

4 participants