Use Python 3 venvs for Python 3 tox testenvs
Project description
What is tox-venv?
tox-venv is a plugin that uses Python 3’s builtin venv module for creating test environments, instead of creating them with the virtualenv package. For Python versions that do not include venv (namely 3.2 and earlier), this package does nothing and reverts to tox’s default implementation.
Why use tox-venv?
virtualenv is historically Python 2/3 compatible, however to achieve this, it ships some files that are pinned at their Python 2.6 version, such as the site module (see: pypa/virtualenv#355). This has a few effects:
Builds using the -Werror option fail, as the deprecations are raised before the test suite can run.
Users cannot take advantage of newer features of the site module in their test environments.
Eventually, these deprecations will become exceptions in future versions of Python.
By using the builtin venv module, these issues can be avoided.
Installation & Usage
To use tox-venv, install it alongside tox in your environment. Then, run tox as normal - no configuration necessary.
$ pip install tox tox-venv
$ tox
If you have already ran tox, it’s necessary to recreate the test envs. Either run tox --recreate, or delete the .tox directory.
Compatibility
tox-venv is compatible with both Python 2 and 3, however it only creates test environments in Python 3.3 and later. Python 3.3 environments are only partially compatible, as not all options (such as --copies/--symlinks) were supported. Environments for Python 3.4 and later are fully compatible.
Release process
Update changelog
Update package version in setup.py
Create git tag for version
Upload release to PyPI
$ pip install -U twine setuptools wheel
$ rm -rf dist/ build/
# python setup.py sdist bdist_wheel
$ twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tox-venv-0.4.0.tar.gz
.
File metadata
- Download URL: tox-venv-0.4.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea29dc7b21a03951e1e2bd7f3474bbf315657c5454224a5674b2896e9bbb795c |
|
MD5 | bc3e957fcf568e9d77e559c210bb9c68 |
|
BLAKE2b-256 | f16a5eb11089894bba3876ff51bf4a93e3fed4ef7d51ae9d0a2a8de5f7e13674 |
Provenance
File details
Details for the file tox_venv-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: tox_venv-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c2aba71a991d4adf6902253fa07b3a241d28e4e901cbc9dc86ee8eeaa8d4b4 |
|
MD5 | 5d63e28f78841addccbfc78faf90d024 |
|
BLAKE2b-256 | 11923bf5efd94dcc470b15d351ba77294bb3d7faf221b1c9912c08dff7ce33a5 |