conda-forge / python-graphviz-feedstock

A conda-smithy repository for python-graphviz.
BSD 3-Clause "New" or "Revised" License
3 stars 12 forks source link

bump to python >=3.8 #56

Open jameslamb opened 4 months ago

jameslamb commented 4 months ago

As of #55, conda-forge is distributing v0.20.2 of this package.

Since https://github.com/xflr6/graphviz/pull/202, the graphviz Python package has had a floor of python >= 3.8. This proposes updating the recipe here to match.

Benefits of this change

Prevents v0.20.2 from being pulled into Python 3.7 environments.

v0.20.2 contains code that is not syntactically valid Python 3.7.

conda create \
    --name test-env \
    -c conda-forge \
    --yes \
        python=3.7 python-graphviz

source activate test-env
python -c "import graphviz"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/jlamb/miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/__init__.py", line 31, in <module>
    from .backend import (DOT_BINARY, UNFLATTEN_BINARY,
  File "/Users/jlamb/miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/backend/__init__.py", line 5, in <module>
    from .mixins import Render, Pipe, Unflatten, View
  File "/Users/jlamb/miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/backend/mixins.py", line 8, in <module>
    from . import piping
  File "/Users/jlamb/miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/backend/piping.py", line 5, in <module>
    from .. import _tools
  File "/Users/jlamb/miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/_tools.py", line 23
    def attach(object: typing.Any, /, name: str) -> typing.Callable:
                                   ^
SyntaxError: invalid syntax

Checklist

Notes for Reviewers

Noticed this in CI for lightgbm, where we are still trying to do some testing with Python 3.7 and to use conda-forge to create environments: https://github.com/microsoft/LightGBM/pull/6370.

I'm not proposing a repodata patch, as I know conda-forge is no longer supporting Python 3.7 (https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/478#pullrequestreview-1523437604). But hope this PR could be merged... I think it'd be a low-risk way to prevent others from encountering this import error.

Thanks for your time and consideration.

conda-forge-webservices[bot] commented 4 months ago

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) and found it was in an excellent condition.

jameslamb commented 4 months ago

@conda-forge-admin, please rerender

github-actions[bot] commented 4 months ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/python-graphviz-feedstock/actions/runs/8320879082.