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

[ci] Python 3.7 CI jobs broken by zipp release #5969

Closed
jameslamb opened this issue Jul 11, 2023 · 4 comments
Closed

[ci] Python 3.7 CI jobs broken by zipp release #5969

jameslamb opened this issue Jul 11, 2023 · 4 comments

Comments

@jameslamb
Copy link
Collaborator

Description

Python 3.7 CI jobs in this repo are failing with the following error.

* Creating venv isolated environment...

Traceback (most recent call last):
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/build/__main__.py", line 376, in main
    args.srcdir, outdir, distributions, config_settings, not args.no_isolation, args.skip_dependency_check
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/build/__main__.py", line 208, in build_package
    out = _build(isolation, builder, outdir, distribution, config_settings, skip_dependency_check)
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/build/__main__.py", line 145, in _build
    return _build_in_isolated_env(builder, outdir, distribution, config_settings)
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/build/__main__.py", line 109, in _build_in_isolated_env
    with _IsolatedEnvBuilder() as env:
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/build/env.py", line 107, in __enter__
    executable, scripts_dir = _create_isolated_env_venv(self._path)
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/build/env.py", line 263, in _create_isolated_env_venv
    import importlib_metadata as metadata
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 6, in <module>
    import zipp
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/zipp/__init__.py", line 10, in <module>
    from .py310compat import text_encoding
  File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/zipp/py310compat.py", line 5
    def _text_encoding(encoding, stacklevel=2, /):
                                               ^
SyntaxError: invalid syntax

Reproducible example

Additional Comments

Looks to me like this was caused by the following sequence of events:

  1. something installed in lightgbm's CI eventually requires zipp
  2. zipp v3.16.0 includes a commit which makes it syntactically-invalid for Python >= 3.8 (jaraco/zipp@4269d27)
  3. zipp v3.16.0 was released to PyPI
  4. once that release hit PyPI, conda-forge's automation picked it up and released it via conda-forge... without bumping up the Python floor in the conda recipe: zipp v3.16.0 conda-forge/zipp-feedstock#41
  5. Python 3.7 conda environments started getting this version of zipp, and failing because it wasn't actually compatible with Python 3.7

There are some PRs in progress right now to fix zipp's metadata on conda-forge. Once those are merged and deployed, this should automatically resolve itself.

@h-vetinari
Copy link
Contributor

Python 3.7 is end-of-life even from the point of CPython, and has been dropped by conda-forge since last October.

Trying to keep this working is a fight against windmills - we're not building much less testing 3.7, so this kind of thing will keep happening - compare the old adage that software that's not tested is broken.

You get to decide how you want to publish for your project and where you spend your energy, but it seems like a bad investment of scarce resources to me to try keeping an increasingly zombiefied 3.7 infrastructure alive.

@jameslamb
Copy link
Collaborator Author

Thanks for your perspective. We haven't yet found it prohibitively expensive to support Python 3.7 here and don't consider this particular issue sufficient to drop that support.

@jameslamb
Copy link
Collaborator Author

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants