venv: Stop ignoring PYTHONDONTWRITEBYTECODE #745
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
'tox' has ignored the 'PYTHONDONTWRITEBYTECODE' environment option since 1.6.0 (commit 3a9c591f [1]). In the commit, an unknown issue with 'setuptools' was reported. However, this was incorrect: the issue at the time lay not with 'setuptools' but rather with 'virtualenv'. When using particular versions of 'virtualenv', the following message would be shown and the application would exit:
The offending message was added and later refined in virtualenv 1.7 (commits a1b8632b [2] and 32367828 [3]). However, this log was removed when support for 'setuptools' 0.7 and greater was added in 'virtualenv' 1.10 (commit cb01d9f9 [4]) There are no references to 'PYTHONDONTWRITEBYTECODE' in virtualenv 12.0 or any major release since then, suggesting the issue works as expected. Meanwhile, setuptools appears to have supported the 'PYTHONDONTWRITEBYTECODE' flag since 0.6.11 (commit 3a9c591f [5]).
All in all, it appears any release of 'virtualenv' or 'setuptools' made in the past 5+ years is more than happy to work with this option and there is therefore no reason for tox to treat it any differently. Stop special casing this option and allow people to use it if they so desire.
[1] 700c877
[2] pypa/virtualenv@a1b8632
[3] pypa/virtualenv@3236782
[4] pypa/virtualenv@cb01d9f
[5] pypa/setuptools@3a9c591
Signed-off-by: Stephen Finucane stephen@that.guru
Fixes: #744