Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Expected PyPy, got CPython #48

Closed
jaraco opened this issue Apr 25, 2020 · 2 comments
Closed

Expected PyPy, got CPython #48

jaraco opened this issue Apr 25, 2020 · 2 comments

Comments

@jaraco
Copy link

jaraco commented Apr 25, 2020

Attempting to run tox with PyPy ends up with CPython.

jaraco.itertools master $ tox -e pypy3                                                                                                                                    
pypy3 create: /Users/jaraco/code/main/jaraco.itertools/.tox/pypy3
pypy3: pip_version is pip
pypy3 installdeps: setuptools>=31.0.1
pypy3 develop-inst: /Users/jaraco/code/main/jaraco.itertools
pypy3 installed: appdirs==1.4.3,argcomplete==1.11.1,attrs==19.3.0,black==19.10b0,certifi==2019.11.28,click==7.1.1,coverage==5.1,docutils==0.16,entrypoints==0.3,flake8==3.7.9,importlib-metadata==1.6.0,inflect==4.1.0,-e git+gh://jaraco/jaraco.itertools@3720135f87aeb52b755c50cda9b1a43d42e7fdb7#egg=jaraco.itertools,mccabe==0.6.1,more-itertools==8.2.0,packaging==20.3,pathspec==0.8.0,pip-run==5.3,pipx==0.15.1.3,pluggy==0.13.1,py==1.8.1,pycodestyle==2.5.0,pyflakes==2.1.1,pyparsing==2.4.6,pytest==5.4.1,pytest-black==0.3.8,pytest-black-multipy==1.0.0,pytest-checkdocs==1.2.3,pytest-cov==2.8.1,pytest-flake8==1.0.5,regex==2020.4.4,six==1.14.0,toml==0.10.0,typed-ast==1.4.1,userpath==1.3.0,wcwidth==0.1.9,zipp==3.1.0
pypy3 run-test-pre: PYTHONHASHSEED='2250303190'
pypy3 run-test: commands[0] | pytest
========================================================================== test session starts ===========================================================================
platform darwin -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
...

Uninstalling tox-venv, PyPy is used.

@rpkilby
Copy link
Member

rpkilby commented Apr 27, 2020

What's the result of import sys; print(sys.real_prefix) for your pypy3 venv?

Also, I would generally no longer recommend using this package. The virtualenv 20.x rewrite solved numerous issues that had necessitated the creation of this plugin, and there isn't much benefit to using this plugin anymore, especially given all the issues it has.

Note that virtualenv now has the ability to delegate the venv module to create environments.
https://virtualenv.pypa.io/en/latest/cli_interface.html#section-creator

@jaraco
Copy link
Author

jaraco commented Apr 27, 2020

draft $ cat tox.ini
[testenv]
commands = python -c "import sys; print(sys.real_prefix)"
skip_install = True
draft $ tox -r -e pypy3
pypy3 recreate: /Users/jaraco/draft/.tox/pypy3
pypy3 installed: appdirs==1.4.3,argcomplete==1.11.1,attrs==19.3.0,black==19.10b0,certifi==2019.11.28,click==7.1.1,coverage==5.1,docutils==0.16,entrypoints==0.3,flake8==3.7.9,importlib-metadata==1.6.0,inflect==4.1.0,-e git+gh://jaraco/jaraco.itertools@94fcc97d0c144597562a829d9b81e7f62420dc9c#egg=jaraco.itertools,mccabe==0.6.1,more-itertools==8.2.0,packaging==20.3,pathspec==0.8.0,pip-run==5.3,pipx==0.15.1.3,pluggy==0.13.1,py==1.8.1,pycodestyle==2.5.0,pyflakes==2.1.1,pyparsing==2.4.6,pytest==5.4.1,pytest-black==0.3.8,pytest-black-multipy==1.0.0,pytest-checkdocs==1.2.3,pytest-cov==2.8.1,pytest-flake8==1.0.5,regex==2020.4.4,six==1.14.0,toml==0.10.0,typed-ast==1.4.1,userpath==1.3.0,wcwidth==0.1.9,zipp==3.1.0
pypy3 run-test-pre: PYTHONHASHSEED='4266869504'
pypy3 run-test: commands[0] | python -c 'import sys; print(sys.real_prefix)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'sys' has no attribute 'real_prefix'
ERROR: InvocationError for command /Users/jaraco/draft/.tox/pypy3/bin/python -c 'import sys; print(sys.real_prefix)' (exited with code 1)
________________________________________________________________________________ summary _________________________________________________________________________________
ERROR:   pypy3: commands failed

It seems that the virtualenv is created with the same Python as where tox is installed.

Also, I would generally no longer recommend using this package.

Acknowledged. I'll stop using it.

@jaraco jaraco closed this as completed Apr 27, 2020
jaraco added a commit to jaraco/skeleton that referenced this issue Apr 27, 2020
…/tox-venv#48 (comment)) and tox-pip-version was only there to support tox-venv. venv is dead; long live virtualenv.
clrpackages pushed a commit to clearlinux-pkgs/keyring that referenced this issue May 5, 2020
…21.2.1

Jason R. Coombs (16):
      Suppress warnings in pytest-flake8, pytest-black, and pytest-checkdocs.
      Prefer pytest-black to pytest-black-multipy
      Test against Windows and Mac
      Define a default pool_vm_image
      Remove tox-venv and tox-pip-version. Tox-venv is discouraged (tox-dev/tox-venv#48 (comment)) and tox-pip-version was only there to support tox-venv. venv is dead; long live virtualenv.
      Add section on disabling keyring. Ref pypa/pip#6773
      Replace use of pkg_resources in test_packaging.
      Add test capturing expectation that keyring should load degenerately if no metadata is present. Ref #426.
      Allow keyring to be imported in environments missing the metadata. Restores expectation lost in 19.3.0. Fixes #426. Alternative to #422.
      Update changelog. Ref #426.
      Add test capturing expectation that it should be possible to limit to recommended backends. Ref #423.
      Ensure ChainerBackend is excluded early to avoid recursion errors when evaluating limits on backends. Fixes #423.
      Update changelog. Ref #423.
      Rename tests to aid pytest with discovery.
      xfail the tests. Ref #436.
      Add test to trigger the undesirable behavior. Ref #355.
clrpackages pushed a commit to clearlinux-pkgs/hgtools that referenced this issue May 12, 2020
….2.0

Hugo (1):
      Fix AppVeyor typo

Hugo van Kemenade (2):
      Spelling and capitalisation (#8)
      Link badge to PyPI rather than static image

Jason R. Coombs (84):
      Disable the (broken) IPv6 in Travis. Ref travis-ci/travis-ci#8361.
      Don't match issues if preceeded by some other indicator.
      skip_upload_docs is default
      Drop the dot; http://blog.pytest.org/2016/whats-new-in-pytest-30/
      Rely on declarative config to create long_description.
      Remove workaround for pyyaml 126.
      Revert "Remove workaround for pyyaml 126."
      We're getting close, but Python 3.7 still requires a workaround
      Use xenial to include support for Python 3.7.
      Remove release, no longer needed. Use twine instead.
      Also ignore W504 in flake8, following the indication in OCA/maintainer-quality-tools that neither W503 nor W504 are worthwhile in general.
      Release of pyyaml 3.13 seems to have fixed install issues on Python 3.7.
      Block pytest 3.7.3 due to pytest-dev/pytest#3888.
      Move most package config to declarative config
      Ignore pycodestyle warning. Seems it's not going to be fixed anytime soon.
      Also ignore flake8 error
      Require setuptools 34.4 to support python_requires in declarative config.
      Add workaround for Teemu/pytest-sugar#159.
      Add black config, pre-commit including black, check code with black.
      Remove workaround for pytest-sugar 159, now fixed.
      Remove pytest-sugar plugin from standard pipelines as recommended in Teemu/pytest-sugar#159.
      Prefer pytest-checkdocs to collective.checkdocs
      Suppress deprecation warning in docutils
      Remove use of setup_requires. Builders now require pip 10 or later to build/install from sdist. Older installers will still install the packages from wheels. Ref tox-dev/tox#809.
      Revert "Remove use of setup_requires. Builders now require pip 10 or later to build/install from sdist. Older installers will still install the packages from wheels. Ref tox-dev/tox#809."
      Indicate build backend of setuptools
      Add support for cutting releases without DPL and using pep517.
      Rely on pep517 0.5
      Add documentation on the skeleton. Fixes #5.
      Add workaround for DeprecationWarning in flake8
      Use consistent encoding quoting in pyproject.toml
      Clarify purpose of local/upstream extras
      Suppress E117 as workaround for PyCQA/pycodestyle#836
      Amend skeleton documentation to expand on the value of the approach.
      Remove sudo declaration in Travis config.
      Enable tox-pip-extensions ext_venv_update if available. Fixes jaraco/skeleton#6
      Rely on tox 3.2 and pip 10 or later for all builds
      It adds no value to add a pip requirement for the tox install
      Pin to pip 19.0 for now for pypa/pip#6434.
      Revert "Pin to pip 19.0 for now for pypa/pip#6434."
      Only install and invoke pytest-black on Python 3
      Use pytest-black-multipy to enable simple support for pytest-black where available. Ref pytest-dev/pytest#5272.
      Update skeleton documentation to reflect black adoption.
      Rely on twine 1.13 or later
      Upgrade tox and virtualenv to ensure that environments get recent pips
      Define passenv in tox release section. Rely on __token__ for default username.
      Update docs to reflect changes to deployment.
      Python 3 only
      Enable coverage reporting on project
      Report the lines missing coverage
      Ensure that a late version of pip is installed without special versions of tox-venv.
      Disable tox-pip-version as it interacts badly with tox-venv causing tox to use the wrong Python version to install packages and run tests. Ref pglass/tox-pip-version#20 and tox-dev/tox-venv#40.
      Bring back tox-pip-version now that pglass/tox-pip-version#20 is fixed.
      Test/release on Python 3.8
      Apply black to docs/conf.py
      Update black version and links
      Expect flake8 3.6 or later and remove suppression of warnings from Flake8 prior to 3.6.
      Rely on pytest-checkdocs 1.2.3, eliminating workaround for docutils warning.
      Remove workaround for gitlab.com/PyCQA/flake8/issues/275, apparently no longer necessary.
      Normalize indentation
      Include keyring support from twine
      Rename 'build-docs' to simply 'docs' (matching more popular convention).
      Prefer 'path' to 'path.py'
      Cover Python 3.8 in Windows tests
      Update black in pre-commit and add blacken-docs.
      Test and release using Azure Pipelines
      Correct guidance on project creation.
      Rely on setuptools_scm 3.4 and setuptools 42. Now setup.py is optional. Remove setuptools from test environment.
      Finish dropping support for Python 2 (I hope).
      Normalize whitespace
      Revert "setup.cfg: let python-tag mirror python_requires"
      Update to bionic for Travis. Correct comment about IPv6 workaround.
      Suppress warnings in pytest-flake8, pytest-black, and pytest-checkdocs.
      Prefer pytest-black to pytest-black-multipy
      Test against Windows and Mac
      Define a default pool_vm_image
      Remove tox-venv and tox-pip-version. Tox-venv is discouraged (tox-dev/tox-venv#48 (comment)) and tox-pip-version was only there to support tox-venv. venv is dead; long live virtualenv.
      Remove more references to tox-venv
      Add workaround for warning emitted when junitxml is used. Ref pytest-dev/pytest#6178.
      Include mypy for type checking during tests.
      Fade to black
      Suppress type errors
      Add workaround for failing tests on Azure Pipelines.
      Update changelog.

Sebastian Kriems (1):
      spaces, style and formatters (#4)

Vincent Fazio (1):
      setup.cfg: let python-tag mirror python_requires

johnthagen (1):
      Line wrap LICENSE file

layday (1):
      Require toml extra for setuptools_scm (#12)
clrpackages pushed a commit to clearlinux-pkgs/tempora that referenced this issue Jul 21, 2020
….0.0

Hugo (1):
      Fix AppVeyor typo

Hugo van Kemenade (2):
      Spelling and capitalisation (#8)
      Link badge to PyPI rather than static image

Jason R. Coombs (22):
      Correct guidance on project creation.
      Rely on setuptools_scm 3.4 and setuptools 42. Now setup.py is optional. Remove setuptools from test environment.
      Finish dropping support for Python 2 (I hope).
      Normalize whitespace
      Revert "setup.cfg: let python-tag mirror python_requires"
      Update to bionic for Travis. Correct comment about IPv6 workaround.
      Suppress warnings in pytest-flake8, pytest-black, and pytest-checkdocs.
      Prefer pytest-black to pytest-black-multipy
      Test against Windows and Mac
      Define a default pool_vm_image
      Remove tox-venv and tox-pip-version. Tox-venv is discouraged (tox-dev/tox-venv#48 (comment)) and tox-pip-version was only there to support tox-venv. venv is dead; long live virtualenv.
      Remove more references to tox-venv
      Add workaround for warning emitted when junitxml is used. Ref pytest-dev/pytest#6178.
      Include mypy for type checking during tests.
      Ensure virtualenv is upgraded when installing tox. Fixes jaraco/path#188.
      Run tests on prereleases of Python on Windows. Fixes jaraco/skeleton#17.
      Add workaround for python/mypy#8627. Fixes jaraco/skeleton#18.
      Add 'refresh.svg' demonstrating an example of refreshing a project with the latest skeleton. Ref #7.
      Move workaround for python/mypy#8627 to tox.ini, as adding it to setup.cfg prevents releases to PyPI. Fixes jaraco/skeleton#19.
      Remove strptime
      Remove Python 3.1 compatibility for divide_timedelta and deprecate the functionality. Deprecate divide_timedelta_float.
      Deprecate Parser class.

Vincent Fazio (1):
      setup.cfg: let python-tag mirror python_requires

johnthagen (1):
      Line wrap LICENSE file

layday (1):
      Require toml extra for setuptools_scm (#12)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants