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

Wrong version via pyenv #538

Closed
2 tasks done
glensc opened this issue Nov 8, 2022 · 3 comments
Closed
2 tasks done

Wrong version via pyenv #538

glensc opened this issue Nov 8, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@glensc
Copy link

glensc commented Nov 8, 2022

Description:

with this workflow file:

env:
  DEFAULT_PYTHON: 3.7

jobs:
  test:
    runs-on: ubuntu-latest
    name: Test
    steps:
      - name: Check out source repository
        uses: actions/checkout@v3
      - name: Set up Python environment
        uses: actions/setup-python@v4
        with:
          python-version: ${{ env.DEFAULT_PYTHON }}
          cache: pip
      - name: Install dependencies (pip)
        run: python -m pip install -r requirements.txt -r requirements.pipenv.txt
      - name: Install dependencies (pipenv)

The job seems to be executed with python 3.11.0 instead of 3.7, note the "pyenv/versions/3.11.0/lib/python3.11" in the paths:

Run python -m pip install -r requirements.txt -r requirements.pipenv.txt
  python -m pip install -r requirements.txt -r requirements.pipenv.txt
  shell: /usr/bin/bash -e {0}
  env:
    DEFAULT_PYTHON: 3.7
    pythonLocation: /opt/hostedtoolcache/Python/3.7.15/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.7.15/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.15/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.15/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.15/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.15/x64/lib
ERROR: Invalid requirement: "/usr/local/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/attr/_make.py:876: RuntimeWarning: Running interpreter doesn't sufficiently support code object introspection.  Some features like bare super() or accessing __class__ will not work with slotted classes." (from line 1 of requirements.txt)
Hint: It looks like a path. File '/usr/local/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/attr/_make.py:876: RuntimeWarning: Running interpreter doesn't sufficiently support code object introspection.  Some features like bare super() or accessing __class__ will not work with slotted classes.' does not exist.

Action version:

  • actions/setup-python@v4

Platform:

  • Ubuntu

Runner type:

  • Hosted
@MaksimZhukov
Copy link
Contributor

Hello @shadycuz! Thank you for reporting this!
We will investigate the issue and let you know as soon as we have updates.

@glensc
Copy link
Author

glensc commented Nov 9, 2022

Found the problem, it's @dependabot fault:

It committed this garbage to requirements.txt file:

/usr/local/.pyenv/versions/3.11.0/lib/python3.11/site-packages/pipenv/vendor/attr/_make.py:876: RuntimeWarning: Running interpreter doesn't sufficiently support code object introspection.  Some features like bare super() or accessing __class__ will not work with slotted classes.
  set_closure_cell(cell, cls)
#
# These requirements were autogenerated by pipenv

it should have not put it's warnings to output file

@glensc
Copy link
Author

glensc commented Nov 9, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants