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

Fix pypy3 tests #485

Closed
wants to merge 2 commits into from
Closed

Conversation

BeyondEvil
Copy link
Contributor

No description provided.

@BeyondEvil
Copy link
Contributor Author

No clue why pypy is failing. Opened a ticket here

@BeyondEvil BeyondEvil requested a review from a team January 17, 2022 13:52
@RonnyPfannschmidt
Copy link
Member

@BeyondEvil compount issue with tox and setuptools_scm

when tox tries to find the version, it gets warning output from setuptools_scm as well

@gaborbernat any idea what this could be ?

@BeyondEvil a workaround may be to unshallow the checkout and/or ensure its filtered instead of completely shallow

@RonnyPfannschmidt
Copy link
Member

FTR; as far as i can tell setuptools_scm warning output lands on the stdout instead of the stderr, this could indicate a pypy bug

@mattip
Copy link

mattip commented Jan 17, 2022

as far as i can tell setuptools_scm warning output lands on the stdout instead of the stderr, this could indicate a pypy bug

A small reproducer would be helpful

@mattip
Copy link

mattip commented Jan 17, 2022

There is an error when running tox deep inside pytest (this one is from the Ubuntu run). Why should that be on stdout?

python -m tox -e pypy3-cov
  shell: /bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/PyPy/3.8.12/x64/bin
.package create: /home/runner/work/pytest-html/pytest-html/.tox/.package
.package installdeps: pip >= 19.3.1, setuptools >= 42, setuptools_scm[toml] >= 3.5.0, setuptools_scm_git_archive >= 1.1, wheel >= 0.33.6
Traceback (most recent call last):
  File "/opt/hostedtoolcache/PyPy/3.8.12/x64/lib/pypy3.8/site-packages/py/_error.py", line 66, in checked_call
    return func(*args, **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/pytest-html/pytest-html/.tox/dist/  

If I run pip install of these packages it succeeds:

pypy3.8-HEAD/bin/pypy -m pip install "pip >= 19.3.1" "setuptools >= 42" "setuptools_scm[toml] >= 3.5.0" \
"setuptools_scm_git_archive >= 1.1" "wheel >= 0.33.6"
Requirement already satisfied: pip>=19.3.1 in ./pypy3.8-HEAD/lib/pypy3.8/site-packages (21.1.1)
Requirement already satisfied: setuptools>=42 in ./pypy3.8-HEAD/lib/pypy3.8/site-packages (56.0.0)
Collecting setuptools_scm[toml]>=3.5.0
  Using cached setuptools_scm-6.3.2-py3-none-any.whl (33 kB)
Collecting setuptools_scm_git_archive>=1.1
  Using cached setuptools_scm_git_archive-1.1-py2.py3-none-any.whl (3.3 kB)
Collecting wheel>=0.33.6
  Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting packaging>=20.0
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting tomli>=1.0.0
  Using cached tomli-2.0.0-py3-none-any.whl (12 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB)
Installing collected packages: pyparsing, tomli, packaging, setuptools-scm, wheel, setuptools-scm-git-archive
Successfully installed packaging-21.3 pyparsing-3.0.6 setuptools-scm-6.3.2 setuptools-scm-git-archive-1.1 tomli-2.0.0 wheel-0.37.1

@BeyondEvil
Copy link
Contributor Author

I don't know.

I'll try to create a small repro repo later.

@mattip
Copy link

mattip commented Jan 17, 2022

I tried to reproduce locally, following the commands in the runner log (from Ubuntu)

cd /tmp
wget https://downloads.python.org/pypy/pypy3.8-v7.3.7-linux64.tar.bz2
tar -xf pypy3.8-v7.3.7-linux64.tar.bz2
pypy3.8-v7.3.7-linux64/bin/python -m ensurepip
pypy3.8-v7.3.7-linux64/bin/python -m pip install --upgrade tox
git clone https://github.com/pytest-dev/pytest-html.git
cd pytest-html
../pypy3.8-v7.3.7-linux64/bin/python -m tox -e pypy3-cov

Tests run and pass.

@BeyondEvil
Copy link
Contributor Author

I tried to reproduce locally, following the commands in the runner log (from Ubuntu)

cd /tmp
wget https://downloads.python.org/pypy/pypy3.8-v7.3.7-linux64.tar.bz2
tar -xf pypy3.8-v7.3.7-linux64.tar.bz2
pypy3.8-v7.3.7-linux64/bin/python -m ensurepip
pypy3.8-v7.3.7-linux64/bin/python -m pip install --upgrade tox
git clone https://github.com/pytest-dev/pytest-html.git
cd pytest-html
../pypy3.8-v7.3.7-linux64/bin/python -m tox -e pypy3-cov

Tests run and pass.

Ok, that's good to know.

I'm working on a repro repo.

@mattip mattip mentioned this pull request Jan 17, 2022
@BeyondEvil
Copy link
Contributor Author

BeyondEvil commented Jan 17, 2022

I tried to reproduce locally, following the commands in the runner log (from Ubuntu)

cd /tmp
wget https://downloads.python.org/pypy/pypy3.8-v7.3.7-linux64.tar.bz2
tar -xf pypy3.8-v7.3.7-linux64.tar.bz2
pypy3.8-v7.3.7-linux64/bin/python -m ensurepip
pypy3.8-v7.3.7-linux64/bin/python -m pip install --upgrade tox
git clone https://github.com/pytest-dev/pytest-html.git
cd pytest-html
../pypy3.8-v7.3.7-linux64/bin/python -m tox -e pypy3-cov

Tests run and pass.

Maybe I'm just stupid and/or it's a total red herring, but if I remove pyproject.toml from the repro repo that I'm setting up I get an error that I can't figure out why I'm getting. As far as I can tell, there is no reference to it from a GHA or tox perspective.

https://github.com/BeyondEvil/pypy3-error-repro/runs/4844352587?check_suite_focus=true

So, maybe the issue is related to it somehow? Maybe something to do with setuptools?

Wait... could this be related:

[tool.setuptools_scm]
local_scheme = "no-local-version"
write_to = "src/pytest_html/__version.py"

I still don't get why it breaks if the file is missing completely...

I guess crisis averted, seems like today Tox relies on pyproject.toml being present.

@BeyondEvil
Copy link
Contributor Author

@RonnyPfannschmidt What are the potential drawbacks of switching the plugin to pyproject.toml instead?

At the very least do what we do in https://github.com/pytest-dev/pytest-selenium?

@flub flub removed the request for review from a team November 18, 2022 08:49
@BeyondEvil
Copy link
Contributor Author

Not sure how relevant this is anymore. Closing.

Feel free to reopen if I'm wrong.

@BeyondEvil BeyondEvil closed this Nov 4, 2023
@mattip
Copy link

mattip commented Nov 4, 2023

We have weekly CI runs of PyPy + pytest-html to make sure it keeps working. Since the tests are green, I think it is fine to close.

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.

3 participants