From issues-reply at bitbucket.org Sat Jul 4 21:10:43 2015 From: issues-reply at bitbucket.org (saaj) Date: Sat, 04 Jul 2015 19:10:43 -0000 Subject: [Pytest-commit] Issue #263: A real-world problems with Tox 2+ environment variable isolation (hpk42/tox) Message-ID: <20150704191043.16950.29922@app10.ash-private.bitbucket.org> New issue 263: A real-world problems with Tox 2+ environment variable isolation https://bitbucket.org/hpk42/tox/issue/263/a-real-world-problems-with-tox-2 saaj: Another v2 problem that took me several hours of wondering *why*. Briefly, it was a CI service *drone.io* and a code coverage service *codecov.io*. Here's the relevant snippet from its client that can explain the problem without me talking much about it: ``` #!python elif os.getenv('CI') == "true" and os.getenv('DRONE') == "true": # http://docs.drone.io/env.html defaults.update(dict(branch=os.getenv('DRONE_BRANCH'), service='drone.io', build=os.getenv('DRONE_BUILD_NUMBER'), build_url=os.getenv('DRONE_BUILD_URL'), commit=os.getenv('DRONE_COMMIT'))) ``` And an QA env that may look something like this obviously no longer sends coverage data because it can't get information about the environment. ``` #!ini [testenv:qa] deps = coverage commands = coverage run --branch --source=lib setup.py test codecov ``` I bet most of much QA services and their clients work the same way to identify service, commit, branches, etc. And it's quite reasonable to do such things from within a Tox env or even have dedicated Tox envs. So there's a serious doubt that this idea of environment isolation (which already leaks because of LANG exception) turned on by default is compatible with real-world Tox usage. At very least there should be an option to restore outer environment at once. Of course one can look at the env spec of a CI service, then examine QA service's client and put bunch of `passenv` in `tox.ini`. But have doubts than many developer will be happy about it. As a side note, because it's already third v2 problem (others were missing LANG with broken py3, missing {envsitepackagesdir}) I tend to think current v2 series is not production ready and is beta at most. Reverted to v1 again. From issues-reply at bitbucket.org Sat Jul 11 16:22:49 2015 From: issues-reply at bitbucket.org (Delano Rodgers) Date: Sat, 11 Jul 2015 14:22:49 -0000 Subject: [Pytest-commit] Issue #264: Non-ascii environment variables causes tox script to fail (hpk42/tox) Message-ID: <20150711142249.31274.60935@app01.ash-private.bitbucket.org> New issue 264: Non-ascii environment variables causes tox script to fail https://bitbucket.org/hpk42/tox/issues/264/non-ascii-environment-variables-causes-tox Delano Rodgers: ----- Tox version: 2.1.1 Python version: 3.4 OS: Windows 8.1 ----- When running to tox script, I get this error: ``` Traceback (most recent call last): File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "C:\Python34\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Dev\testenv\Scripts\tox.exe\__main__.py", line 9, in File "C:\Dev\testenv\lib\site-packages\tox\session.py", line 39, in main retcode = Session(config).runcommand() File "C:\Dev\testenv\lib\site-packages\tox\session.py", line 373, in runcommand return self.subcommand_test() File "C:\Dev\testenv\lib\site-packages\tox\session.py", line 530, in subcommand_test self.installpkg(venv, path) File "C:\Dev\testenv\lib\site-packages\tox\session.py", line 473, in installpkg venv.installpkg(path, action) File "C:\Dev\testenv\lib\site-packages\tox\venv.py", line 240, in installpkg self._install([sdistpath], extraopts=extraopts, action=action) File "C:\Dev\testenv\lib\site-packages\tox\venv.py", line 304, in _install action=action) File "C:\Dev\testenv\lib\site-packages\tox\venv.py", line 277, in run_install_command self._pcall(argv, cwd=self.envconfig.config.toxinidir, action=action) File "C:\Dev\testenv\lib\site-packages\tox\venv.py", line 375, in _pcall redirect=redirect, ignore_ret=ignore_ret) File "C:\Dev\testenv\lib\site-packages\tox\session.py", line 123, in popen self.id, self.msg, args, env)) File "C:\Python34\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 2486: character maps to ``` However, when I add this code just before the last line in the _pcall function in venv.py, the script runs successfully: ``` #!python for k,v in env.items(): try: v.encode('ascii') except UnicodeEncodeError: env[k] = v.encode('ascii', errors='ignore').decode('ascii') ``` thus leading me to believe that tox isn't liking the non-ascii characters in some of my environment variables. Are there any workarounds for this? From issues-reply at bitbucket.org Tue Jul 14 19:03:19 2015 From: issues-reply at bitbucket.org (David Riddle) Date: Tue, 14 Jul 2015 17:03:19 -0000 Subject: [Pytest-commit] Issue #265: Pass through LD_LIBRARY_PATH environment variable by default (hpk42/tox) Message-ID: <20150714170319.6550.50251@app10.ash-private.bitbucket.org> New issue 265: Pass through LD_LIBRARY_PATH environment variable by default https://bitbucket.org/hpk42/tox/issues/265/pass-through-ld_library_path-environment David Riddle: I develop on RHEL6 using Python 2.7.8. I am having trouble using tox. When I run $ tox -e py27 I receive the following error message: sqlparse-0.1.14/.tox/py27/bin/python2: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory The reason for this error is because the environment variable LD_LIBRARY_PATH is not being passed. I can work around this by passing it in tox.ini which does work. The reason I bring this up is that this variable is of fundamental importance to how RedHat Software Collections work and I think this variable should be passed by default on Unix systems. In the next paragraph I will briefly describe what Software Collections are and how they work. RedHat installs alternative versions of Python, distinct from the system version, in what they call [Software Collections](https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/2/html/Software_Collections_Guide/index.html) (SCLs). These software collections are separate self-contained trees of software that are installed in /opt. There are SCLs for Python27, Python33, and Python34. The default python interpreter for RHEL6 is Python26. These alternative interpreters can be enabled by the user either individually or collectively using a command line script called scl. This script works simply by setting the users PATH and LD_LIBRARY_PATH, among other environment variables. When tox -e py27 runs it will find the python27 interpreter on the PATH but the interpreter will fail because it can not find its necessary libraries because LD_LIBRARY_PATH is not being properly set by tox. If this environment variable is not set any software on the PATH that is in an SCL will fail if it has a library dependency installed in an SCL. I would recommend that you add LD_LIBRARY_PATH as a default environment variable to be passed by tox. You may also want to consider the following which are also set by SCLs: MANPATH, PKG_CONFIG_PATH, XDG_DATA_DIRS From builds at drone.io Wed Jul 15 10:06:34 2015 From: builds at drone.io (Drone.io Build) Date: Wed, 15 Jul 2015 08:06:34 +0000 Subject: [Pytest-commit] [FAIL] pytest-pep8 - # 8 Message-ID: <20150715075623.18738.3383@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-pep8/8 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-pep8 Repository : https://bitbucket.org/pytest-dev/pytest-pep8 Version : 53:44ddb3739f0f Author : holger krekel Branch : default Message: fix issue9 pypi link and regenerate readme with current pytest version -------------- next part -------------- An HTML attachment was scrubbed... URL: From issues-reply at bitbucket.org Wed Jul 15 13:51:32 2015 From: issues-reply at bitbucket.org (Sorin Sbarnea) Date: Wed, 15 Jul 2015 11:51:32 -0000 Subject: [Pytest-commit] Issue #266: upgrade to tox 2.1.1 breaks tox: ImportError: No module named hookspecs (hpk42/tox) Message-ID: <20150715115132.29658.5019@app13.ash-private.bitbucket.org> New issue 266: upgrade to tox 2.1.1 breaks tox: ImportError: No module named hookspecs https://bitbucket.org/hpk42/tox/issues/266/upgrade-to-tox-211-breaks-tox-importerror Sorin Sbarnea: As I was trying to debug anouther issue with tox I tried to upgrade it and I discovered that the new version is broken on OS X. ``` #!python sudo pip install --upgrade tox Collecting tox Downloading tox-2.1.1-py2.py3-none-any.whl Collecting virtualenv>=1.11.2 (from tox) Downloading virtualenv-13.1.0-py2.py3-none-any.whl (1.7MB) 100% |????????????????????????????????| 1.7MB 272kB/s Collecting py>=1.4.17 (from tox) Downloading py-1.4.30-py2.py3-none-any.whl (81kB) 100% |????????????????????????????????| 86kB 3.7MB/s Collecting pluggy<0.4.0,>=0.3.0 (from tox) Downloading pluggy-0.3.0-py2.py3-none-any.whl Installing collected packages: virtualenv, py, pluggy, tox Found existing installation: virtualenv 12.0.7 Uninstalling virtualenv-12.0.7: Successfully uninstalled virtualenv-12.0.7 Found existing installation: py 1.4.26 Uninstalling py-1.4.26: Successfully uninstalled py-1.4.26 Found existing installation: tox 1.9.2 Uninstalling tox-1.9.2: Successfully uninstalled tox-1.9.2 ``` And the outcome is: ``` #!bash sorins at nibbler ~/dev/jira $ 1 which tox /usr/local/bin/toxsorins at nibbler ~/dev/jira $ toxTraceback (most recent call last): File "/usr/local/bin/tox", line 7, in from tox import cmdline File "/usr/local/lib/python2.7/site-packages/tox/__init__.py", line 4, in from .hookspecs import hookspec, hookimpl # noqa ImportError: No module named hookspecs ``` ``` sorins at nibbler ~/dev/jira $ 1 which python /usr/local/bin/python sorins at nibbler ~/dev/jira $ python -m tox /usr/local/opt/python/bin/python2.7: No module named hookspecs; 'tox' is a package and cannot be directly executed ``` From builds at drone.io Wed Jul 15 14:06:53 2015 From: builds at drone.io (Drone.io Build) Date: Wed, 15 Jul 2015 12:06:53 +0000 Subject: [Pytest-commit] [FAIL] pytest-xprocess - # 11 Message-ID: <20150715120644.23363.93047@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-xprocess/11 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-xprocess Repository : https://bitbucket.org/pytest-dev/pytest-xprocess Version : 22:ed831f114c35 Author : holger krekel Branch : default Message: Added tag 0.9.1 for changeset 2937e9008dd1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Thu Jul 16 09:43:00 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 16 Jul 2015 07:43:00 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20150716074300.23288.72845@app13.ash-private.bitbucket.org> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/efb154f85eff/ Changeset: efb154f85eff Branch: fix_issue_265 User: ddriddle Date: 2015-07-14 21:42:41+00:00 Summary: Fix issue #265 - Pass LD_LIBRARY_PATH by default This fix passes the LD_LIBRARY_PATH environment variable by default. This was done to support RedHat Software Collections. Affected #: 2 files diff -r 87a9def32696f7ada3b536621f723018ce9667ad -r efb154f85eff2fc4cd236f5603960e57d8831464 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -721,6 +721,7 @@ assert "PATH" in envconfig.passenv assert "PIP_INDEX_URL" in envconfig.passenv assert "LANG" in envconfig.passenv + assert "LD_LIBRARY_PATH" in envconfig.passenv assert "A123A" in envconfig.passenv assert "A123B" in envconfig.passenv diff -r 87a9def32696f7ada3b536621f723018ce9667ad -r efb154f85eff2fc4cd236f5603960e57d8831464 tox/config.py --- a/tox/config.py +++ b/tox/config.py @@ -386,7 +386,7 @@ itertools.chain.from_iterable( [x.split(' ') for x in value])) - passenv = set(["PATH", "PIP_INDEX_URL", "LANG"]) + passenv = set(["PATH", "PIP_INDEX_URL", "LANG", "LD_LIBRARY_PATH"]) # read in global passenv settings p = os.environ.get("TOX_TESTENV_PASSENV", None) https://bitbucket.org/hpk42/tox/commits/3ed5dc353a99/ Changeset: 3ed5dc353a99 User: hpk42 Date: 2015-07-16 07:42:57+00:00 Summary: Merged in ddriddle/tox/fix_issue_265 (pull request #168) Fix issue #265 - Pass LD_LIBRARY_PATH by default Affected #: 2 files diff -r 87a9def32696f7ada3b536621f723018ce9667ad -r 3ed5dc353a99acf57859a2dd265b5c2e973480e3 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -721,6 +721,7 @@ assert "PATH" in envconfig.passenv assert "PIP_INDEX_URL" in envconfig.passenv assert "LANG" in envconfig.passenv + assert "LD_LIBRARY_PATH" in envconfig.passenv assert "A123A" in envconfig.passenv assert "A123B" in envconfig.passenv diff -r 87a9def32696f7ada3b536621f723018ce9667ad -r 3ed5dc353a99acf57859a2dd265b5c2e973480e3 tox/config.py --- a/tox/config.py +++ b/tox/config.py @@ -386,7 +386,7 @@ itertools.chain.from_iterable( [x.split(' ') for x in value])) - passenv = set(["PATH", "PIP_INDEX_URL", "LANG"]) + passenv = set(["PATH", "PIP_INDEX_URL", "LANG", "LD_LIBRARY_PATH"]) # read in global passenv settings p = os.environ.get("TOX_TESTENV_PASSENV", None) Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Thu Jul 16 09:43:00 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 16 Jul 2015 07:43:00 -0000 Subject: [Pytest-commit] commit/tox: hpk42: Merged in ddriddle/tox/fix_issue_265 (pull request #168) Message-ID: <20150716074300.12363.59821@app02.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/3ed5dc353a99/ Changeset: 3ed5dc353a99 User: hpk42 Date: 2015-07-16 07:42:57+00:00 Summary: Merged in ddriddle/tox/fix_issue_265 (pull request #168) Fix issue #265 - Pass LD_LIBRARY_PATH by default Affected #: 2 files diff -r 87a9def32696f7ada3b536621f723018ce9667ad -r 3ed5dc353a99acf57859a2dd265b5c2e973480e3 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -721,6 +721,7 @@ assert "PATH" in envconfig.passenv assert "PIP_INDEX_URL" in envconfig.passenv assert "LANG" in envconfig.passenv + assert "LD_LIBRARY_PATH" in envconfig.passenv assert "A123A" in envconfig.passenv assert "A123B" in envconfig.passenv diff -r 87a9def32696f7ada3b536621f723018ce9667ad -r 3ed5dc353a99acf57859a2dd265b5c2e973480e3 tox/config.py --- a/tox/config.py +++ b/tox/config.py @@ -386,7 +386,7 @@ itertools.chain.from_iterable( [x.split(' ') for x in value])) - passenv = set(["PATH", "PIP_INDEX_URL", "LANG"]) + passenv = set(["PATH", "PIP_INDEX_URL", "LANG", "LD_LIBRARY_PATH"]) # read in global passenv settings p = os.environ.get("TOX_TESTENV_PASSENV", None) Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Mon Jul 27 11:44:01 2015 From: issues-reply at bitbucket.org (Omer Katz) Date: Mon, 27 Jul 2015 09:44:01 -0000 Subject: [Pytest-commit] Issue #267: Recreate test environment when contents of requirements files change (hpk42/tox) Message-ID: <20150727094401.9606.94195@app05.ash-private.bitbucket.org> New issue 267: Recreate test environment when contents of requirements files change https://bitbucket.org/hpk42/tox/issues/267/recreate-test-environment-when-contents-of Omer Katz: Tox should recreate the environment if the contents of any of the requirement files have changed since the last run. Otherwise that causes tests to fail because the dependencies are too old.