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

Pin python 3.8 and 3.9 at patch level #1024

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Pin python 3.8 and 3.9 at patch level #1024

merged 1 commit into from
Apr 16, 2024

Conversation

csmarchbanks
Copy link
Member

@csmarchbanks csmarchbanks commented Apr 15, 2024

Something around the upgrade of these images caused our pipeline to begin to fail. For example https://app.circleci.com/pipelines/github/prometheus/client_python/589/workflows/26c0f218-1bfb-40b7-99ba-b9725699da07/jobs/6025.

py3.8: internal error
Traceback (most recent call last):
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/session/cmd/run/single.py", line 45, in _evaluate
    tox_env.setup()
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/api.py", line 249, in setup
    self._setup_env()
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/runner.py", line 106, in _setup_env
    super()._setup_env()
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/api.py", line 198, in _setup_env
    self.ensure_python_env()
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/api.py", line 202, in ensure_python_env
    conf = self.python_cache()
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/virtual_env/api.py", line 77, in python_cache
    base = super().python_cache()
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/api.py", line 240, in python_cache
    "version_info": list(self.base_python.version_info),
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/api.py", line 250, in base_python
    self._base_python = self._get_python(base_pythons)
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/virtual_env/api.py", line 134, in _get_python
    interpreter = self.creator.interpreter
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/virtual_env/api.py", line 126, in creator
    return self.session.creator
  File "/home/circleci/.local/lib/python3.8/site-packages/tox/tox_env/python/virtual_env/api.py", line 107, in session
    self._virtualenv_session = session_via_cli(env_dir, options=None, setup_logging=False, env=env)
  File "/home/circleci/.local/lib/python3.8/site-packages/virtualenv/run/__init__.py", line 46, in session_via_cli
    parser, elements = build_parser(args, options, setup_logging, env)
  File "/home/circleci/.local/lib/python3.8/site-packages/virtualenv/run/__init__.py", line 72, in build_parser
    CreatorSelector(interpreter, parser),
  File "/home/circleci/.local/lib/python3.8/site-packages/virtualenv/run/plugin/creators.py", line 13, in __init__
    creators, self.key_to_meta, self.describe, self.builtin_key = self.for_interpreter(interpreter)
  File "/home/circleci/.local/lib/python3.8/site-packages/virtualenv/run/plugin/creators.py", line 20, in for_interpreter
    for key, creator_class in cls.options("virtualenv.create").items():
  File "/home/circleci/.local/lib/python3.8/site-packages/virtualenv/run/plugin/base.py", line 44, in options
    cls._OPTIONS = cls.entry_points_for(key)
  File "/home/circleci/.local/lib/python3.8/site-packages/virtualenv/run/plugin/base.py", line 23, in entry_points_for
    return OrderedDict((e.name, e.load()) for e in cls.entry_points().get(key, {}))
  File "/home/circleci/.local/lib/python3.8/site-packages/virtualenv/run/plugin/base.py", line 23, in <genexpr>
    return OrderedDict((e.name, e.load()) for e in cls.entry_points().get(key, {}))
  File "/home/circleci/.pyenv/versions/3.8.19/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 210, in load
    return functools.reduce(getattr, attrs, module)
AttributeError: module 'virtualenv.create.via_global_ref.builtin.cpython.mac_os' has no attribute 'CPython3macOsBrew'
  py3.8: FAIL code 2 (0.01 seconds)
  evaluation failed :( (0.14 seconds)

Exited with code exit status 2

In the past we had to pin a version for virtualenv, but it is already pinned. My guess is this has to do with CircleCI-Public/cimg-python#240 which is in the 3.10+ versions, but not the latest 3.8 and 3.9 images. Hopefully at the next release of circleci images we can go back to just fixing the minor version.

@csmarchbanks csmarchbanks merged commit eeec421 into master Apr 16, 2024
11 checks passed
@csmarchbanks csmarchbanks deleted the fix-virtualenv branch April 16, 2024 14:17
btimby pushed a commit to btimby/client_python that referenced this pull request Aug 2, 2024
Signed-off-by: Chris Marchbanks <[email protected]>
Signed-off-by: Ben Timby <[email protected]>
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.

2 participants