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

[BUG] coverage-badge-py does not work on python3.12 #160

Open
4 tasks done
ebourgeois opened this issue Mar 25, 2024 · 1 comment
Open
4 tasks done

[BUG] coverage-badge-py does not work on python3.12 #160

ebourgeois opened this issue Mar 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ebourgeois
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

When using this action in a python3.12 runner, it fails with:

Collecting coverage-badge
  Downloading coverage_badge-1.1.0-py2.py3-none-any.whl.metadata (3.2 kB)
Collecting coverage (from coverage-badge)
  Downloading coverage-7.4.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.2 kB)
Downloading coverage_badge-1.1.0-py2.py3-none-any.whl (6.4 kB)
Downloading coverage-7.4.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (238 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 238.2/238.2 kB 9.7 MB/s eta 0:00:00
Installing collected packages: coverage, coverage-badge
Successfully installed coverage-7.4.4 coverage-badge-1.1.0
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.2/x64/bin/coverage-badge", line 5, in <module>
    from coverage_badge.__main__ import main
  File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/coverage_badge/__main__.py", line 7, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

To Reproduce

  1. In a python 3.12 environment
  2. pip install -U coverage-badge

What OS are you seeing the problem on?

all

Expected behavior?

Project should use importlib and install correctly

Relevant log output

2024-03-25T15:13:08.0397921Z ##[group]Run tj-actions/coverage-badge-py@v2
2024-03-25T15:13:08.0398415Z with:
2024-03-25T15:13:08.0398785Z   output: coverage.svg
2024-03-25T15:13:08.0399160Z   overwrite: true
2024-03-25T15:13:08.0399492Z   working-directory: .
2024-03-25T15:13:08.0399852Z env:
2024-03-25T15:13:08.0400261Z   pythonLocation: /opt/hostedtoolcache/Python/3.12.2/x64
2024-03-25T15:13:08.0400842Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.2/x64/lib
2024-03-25T15:13:08.0401354Z ##[endgroup]
2024-03-25T15:13:08.0602942Z ##[group]Run pip install -U coverage-badge
2024-03-25T15:13:08.0603501Z �[36;1mpip install -U coverage-badge�[0m
2024-03-25T15:13:08.0604221Z �[36;1mEXTRA_ARGS=""�[0m
2024-03-25T15:13:08.0604592Z �[36;1m�[0m
2024-03-25T15:13:08.0605001Z �[36;1mif [[ 'true' == 'true'  ]]; then�[0m
2024-03-25T15:13:08.0605457Z �[36;1m  EXTRA_ARGS+="-f"�[0m
2024-03-25T15:13:08.0605825Z �[36;1mfi�[0m
2024-03-25T15:13:08.0606176Z �[36;1m�[0m
2024-03-25T15:13:08.0606669Z �[36;1mcoverage-badge $EXTRA_ARGS -o "coverage.svg"�[0m
2024-03-25T15:13:08.0633549Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2024-03-25T15:13:08.0634148Z env:
2024-03-25T15:13:08.0634567Z   pythonLocation: /opt/hostedtoolcache/Python/3.12.2/x64
2024-03-25T15:13:08.0635167Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.2/x64/lib
2024-03-25T15:13:08.0635722Z ##[endgroup]
2024-03-25T15:13:08.5534334Z Collecting coverage-badge
2024-03-25T15:13:08.5890490Z   Downloading coverage_badge-1.1.0-py2.py3-none-any.whl.metadata (3.2 kB)
2024-03-25T15:13:08.9152232Z Collecting coverage (from coverage-badge)
2024-03-25T15:13:08.9181250Z   Downloading coverage-7.4.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.2 kB)
2024-03-25T15:13:08.9266842Z Downloading coverage_badge-1.1.0-py2.py3-none-any.whl (6.4 kB)
2024-03-25T15:13:08.9313740Z Downloading coverage-7.4.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (238 kB)
2024-03-25T15:13:08.9580916Z    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 238.2/238.2 kB 9.7 MB/s eta 0:00:00
2024-03-25T15:13:09.1627841Z Installing collected packages: coverage, coverage-badge
2024-03-25T15:13:09.3023913Z Successfully installed coverage-7.4.4 coverage-badge-1.1.0
2024-03-25T15:13:09.4669826Z Traceback (most recent call last):
2024-03-25T15:13:09.4677994Z   File "/opt/hostedtoolcache/Python/3.12.2/x64/bin/coverage-badge", line 5, in <module>
2024-03-25T15:13:09.4678915Z     from coverage_badge.__main__ import main
2024-03-25T15:13:09.4680329Z   File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/coverage_badge/__main__.py", line 7, in <module>
2024-03-25T15:13:09.4681344Z     import pkg_resources
2024-03-25T15:13:09.4681913Z ModuleNotFoundError: No module named 'pkg_resources'
2024-03-25T15:13:09.4715261Z ##[error]Process completed with exit code 1.

Has all relevant logs been included?

  • I've included all relevant logs

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ebourgeois ebourgeois added the bug Something isn't working label Mar 25, 2024
@atchisson
Copy link

I think it's more related to this issue than the action itself.

If anyone is still bumping into this problem, adding a pip install setuptools in a step before the coverage badge did it for me.

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