GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — macOS: universal package python3.12 crashes when running `pip debug` · Issue #684 · actions/setup-python

macOS: universal package python3.12 crashes when running pip debug #684

New issue
Copy link
New issue
Copy link
Closed
Closed
macOS: universal package python3.12 crashes when running pip debug#684
Copy link
Assignees
dmitry-shibanov
Labels
bugSomething isn't workingSomething isn't working

Description

@deric4
deric4
opened on Jun 16, 2023
Issue body actions

Description:

It seems the new python3.12 universal2 packages released for macOS have been shipped with a version of pip (23.1.2) which contains a vendored dep that causes pip to crash at runtime.

ref:
pypa/pip#12053

python/typing_extensions#162

#108 (comment)

Action version:

actions/setup-python@v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

3.12

Repro steps:

Full example can be seen here https://github.com/deric4/github-action-runner-reference/actions/runs/5286208770/attempts/1#summary-14311090932

action configuration

     - name: set it up
       uses: actions/setup-python@v4
       id: setup-python
       with:
         python-version: ${{ matrix.python-version }}
         allow-prereleases: true
         check-latest: true

*minimal workflow

name: setup python repro
on:
  workflow_dispatch:
permissions: {}
defaults:
  run:
    shell: bash 
jobs:
  dump-it-out:
    name: "${{ matrix.os}} python-version:${{matrix.python-version}} dump out"
    runs-on: ${{ matrix.os }} 
    strategy:
      matrix:
        os:
          #- macos-10.15
          #- macos-11
          #- macos-12
          - macos-13                   
        python-version:
          #- "3.9"
          #- "3.10"
          #- "3.11"
          - "3.12"
     - name: set it up
       uses: actions/setup-python@v4
       id: setup-python
       with:
         python-version: ${{ matrix.python-version }}
         allow-prereleases: true
         check-latest: true

     - name: do the thing
       id: do-the-thing
       run: |
         python3 --version --version

         # this will crash
         python3 -m pip debug

Expected behavior:

Running python3.12 -m pip debug runs successfully.

Actual behavior:

Job is cancelled because pip crashes.

image

output

$ python3.12 --version --version
Python 3.12.0b2 (v3.12.0b2:e6c0efa25a, Jun  6 2023, 11:36:52) [Clang 13.0.0 (clang-1300.0.29.30)]

$ python3.12 -m pip debug
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 23.1.2 from /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip (python 3.12)
sys.version: 3.12.0b2 (v3.12.0b2:e6c0efa25a, Jun  6 2023, 11:36:52) [Clang 13.0.0 (clang-1300.0.29.30)]
sys.executable: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: darwin
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  CacheControl==0.12.11
  colorama==0.4.6
  distlib==0.3.6
  distro==1.8.0
  msgpack==1.0.5
  packaging==21.3
  platformdirs==3.2.0
  pyparsing==3.0.9
  pyproject-hooks==1.0.0
  requests==2.28.2
  certifi==2022.12.07
  chardet==5.1.0
  idna==3.4
  urllib3==1.26.15
  rich==13.3.3 (Unable to locate actual module version, using vendor.txt specified version)
  pygments==2.14.0
ERROR: Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 195, in run
    show_vendor_versions()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 101, in show_vendor_versions
    show_actual_vendor_versions(vendor_txt_versions)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 81, in show_actual_vendor_versions
    actual_version = get_vendor_version_from_module(module_name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 61, in get_vendor_version_from_module
    module = get_module_from_module_name(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_internal/commands/debug.py", line 56, in get_module_from_module_name
    __import__(f"pip._vendor.{module_name}", globals(), locals(), level=0)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/typing_extensions.py", line 1174, in <module>
    class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
TypeError: type 'typing.TypeVar' is not an acceptable base type

Activity

  1. deric4
    added
    bugSomething isn't workingSomething isn't working
    needs triage
    on Jun 16, 2023
  2. dmitry-shibanov commented on Jun 16, 2023

    @dmitry-shibanov
    dmitry-shibanov
    on Jun 16, 2023
    Contributor
    More actions

    Hello @deric4. Thank you for your report. We'll take a look at this issue.

    Reacted by deric4
  3. dmitry-shibanov
    removed
    needs triage
    on Jun 16, 2023
  4. dmitry-shibanov
    self-assigned this
    on Jun 16, 2023
  5. dmitry-shibanov commented on Jun 19, 2023

    @dmitry-shibanov
    dmitry-shibanov
    on Jun 19, 2023
    Contributor
    More actions

    Hello @deric4. It looks like the issue comes from Python for macOS universal. I've tried to use python3.12b1 with different pip versions but it fails with debug option. I think for now you should specify previous python version for macOS until the new version of universal packages are released.

    For now I'm going to close the issue.

  6. dmitry-shibanov
    closed this as completedon Jun 19, 2023
  7. deric4 commented on Jun 20, 2023

    @deric4
    deric4
    on Jun 20, 2023
    Author
    More actions

    The issue is the version of pip, which can be set in the install/packaging scripts. either way, the released versions are broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dmitry-shibanov
    dmitry-shibanov

Labels

bugSomething isn't workingSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.