Skip to content

Conversation

frenzymadness
Copy link
Member

No description provided.

@hroncok
Copy link
Member

hroncok commented Jun 8, 2022

Consider adding pypy3.7-devel, pypy3.8-devel and pypy3.9-devel

@frenzymadness
Copy link
Member Author

Done, thanks

@hroncok
Copy link
Member

hroncok commented Jun 8, 2022

That CI failure is weird. We test tox with pypy3.X in Fedora CI. Never mind, we can add those later not to block this.

@hroncok
Copy link
Member

hroncok commented Jun 8, 2022

OK, apparently, we don't test good enough:

[python-tox-example (master)]$ python3 -m virtualenv --no-download --python /usr/bin/pypy3.9 pypy39
PermissionError: [Errno 13] Permission denied: '/home/churchyard/Dokumenty/RedHat/python-tox-example/pypy39/lib/pypy3.9/site-packages/_virtualenv.pth'
[python-tox-example (master %)]$ python3 -m virtualenv --no-download --python /usr/bin/pypy3.8 pypy38
PermissionError: [Errno 13] Permission denied: '/home/churchyard/Dokumenty/RedHat/python-tox-example/pypy38/lib/pypy3.8/site-packages/_virtualenv.pth'
[python-tox-example (master %)]$ python3 -m virtualenv --no-download --python /usr/bin/pypy3.7 pypy37
created virtual environment PyPy3.7.13.final.0-64 in 152ms
  creator PyPy3Posix(dest=/home/churchyard/Dokumenty/RedHat/python-tox-example/pypy37, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(extra_search_dir=/usr/share/python-wheels,download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/churchyard/.local/share/virtualenv)
    added seed packages: pip==21.2.3, setuptools==57.4.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

@hroncok
Copy link
Member

hroncok commented Jun 8, 2022

Ok, this is because our CI runs as root :/

@frenzymadness
Copy link
Member Author

I don't understand what have you tried to achieve but the problem with pypy3.8 and 3.9 is somehow related to existing .tox folder. If I remove it, both serial and parallel runs are okay. There is something wrong when tox is trying to reuse the existing pypy38 environment but the problem is reproducible only if I run the container multiple times. If I run tox multiple times locally or multiple times in the running container without stopping it, everything is fine, the problem is there only if the container is started again before the second run.

@frenzymadness
Copy link
Member Author

Ok, so when everything is correct in the first round, pip is loaded from .tox/pypy38/lib/pypy3.8/site-packages/pip/__init__.py but that path contains a symlink .tox/pypy38/lib/pypy3.8 -> /usr/lib64/pypy3.8/lib/pypy3.8 which is the root cause of the problem because it seems that tox installs pip for pypy38 into /usr/lib64/pypy3.8/lib/pypy3.8/site-packages/pip and that path is not preserved when you restart the container.

When I run the same locally, the path .tox/pypy38/lib/pypy38 is not a symlink.

@frenzymadness
Copy link
Member Author

All the symlinks in .tox folder containing /lib/ in one of the paths:

# find ./.tox/ -type l -exec ls -la {} \; | awk '{print $9,$10,$11}' | grep "/lib/" | sort
./.tox/pypy38/lib/pypy3.8 -> /usr/lib64/pypy3.8/lib/pypy3.8
./.tox/pypy39/lib/.build-id -> /usr/lib/.build-id
./.tox/pypy39/lib/cpp -> /usr/lib/cpp
./.tox/pypy39/lib/debug -> /usr/lib/debug
./.tox/pypy39/lib/fedora-release -> /usr/lib/fedora-release
./.tox/pypy39/lib/fontconfig -> /usr/lib/fontconfig
./.tox/pypy39/lib/games -> /usr/lib/games
./.tox/pypy39/lib/gcc -> /usr/lib/gcc
./.tox/pypy39/lib/issue -> /usr/lib/issue
./.tox/pypy39/lib/issue.net -> /usr/lib/issue.net
./.tox/pypy39/lib/locale -> /usr/lib/locale
./.tox/pypy39/lib/modules -> /usr/lib/modules
./.tox/pypy39/lib/motd -> /usr/lib/motd
./.tox/pypy39/lib/motd.d -> /usr/lib/motd.d
./.tox/pypy39/lib/os-release -> /usr/lib/os-release
./.tox/pypy39/lib/pypy3.9 -> /usr/lib/pypy3.9
./.tox/pypy39/lib/python2.7 -> /usr/lib/python2.7
./.tox/pypy39/lib/python3.10 -> /usr/lib/python3.10
./.tox/pypy39/lib/python3.11 -> /usr/lib/python3.11
./.tox/pypy39/lib/python3.6 -> /usr/lib/python3.6
./.tox/pypy39/lib/python3.7 -> /usr/lib/python3.7
./.tox/pypy39/lib/python3.8 -> /usr/lib/python3.8
./.tox/pypy39/lib/python3.9 -> /usr/lib/python3.9
./.tox/pypy39/lib/rpm -> /usr/lib/rpm
./.tox/pypy39/lib/swidtag -> /usr/lib/swidtag
./.tox/pypy39/lib/sysctl.d -> /usr/lib/sysctl.d
./.tox/pypy39/lib/sysimage -> /usr/lib/sysimage
./.tox/pypy39/lib/system-release-cpe -> /usr/lib/system-release-cpe
./.tox/pypy39/lib/systemd -> /usr/lib/systemd
./.tox/pypy39/lib/sysusers.d -> /usr/lib/sysusers.d
./.tox/pypy39/lib/tmpfiles.d -> /usr/lib/tmpfiles.d
./.tox/pypy39/lib/udev -> /usr/lib/udev

@hroncok
Copy link
Member

hroncok commented Jun 9, 2022

Yes. I can simply reproduce by running python3 -m virtualenv --no-download --python /usr/bin/pypy3.9 pypy39 from my machine. Don't block this PR on it, let's report this to pypa/virtualenv and ask Gábor for help?

@hroncok
Copy link
Member

hroncok commented Jun 9, 2022

FTR this is fixed in virtualenv 20.13.3+ https://virtualenv.pypa.io/en/latest/changelog.html#v20-13-3-2022-03-07

@frenzymadness
Copy link
Member Author

The fixed virtualenv is now available in F35, restarting CI.

@frenzymadness
Copy link
Member Author

All green!

@frenzymadness
Copy link
Member Author

Any last thoughts?

@hroncok
Copy link
Member

hroncok commented Jun 14, 2022

Ship it, please! Thanks

@frenzymadness frenzymadness merged commit 7f9e624 into fedora-python:master Jun 14, 2022
@frenzymadness frenzymadness deleted the f35 branch June 14, 2022 18:36
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