From issues-reply at bitbucket.org Thu May 5 19:47:58 2016 From: issues-reply at bitbucket.org (Peter Bittner) Date: Thu, 05 May 2016 23:47:58 -0000 Subject: [Pytest-commit] Issue #330: Integration with `setup.py test` should not require `virtualenv` to be installed (hpk42/tox) Message-ID: <20160505234758.11468.88629@celery-worker-101.ash1.bb-inf.net> New issue 330: Integration with `setup.py test` should not require `virtualenv` to be installed https://bitbucket.org/hpk42/tox/issues/330/integration-with-setuppy-test-should-not Peter Bittner: In my Python projects I want to separate the requirements only needed for testing cleanly from the actual project. The beautiful thing of tox is I can specify all those additional requirements in the tox configuration (tox.ini), and with the [integration in setup.py](http://testrun.org/tox/latest/example/basic.html#integration-with-setuptools-distribute-test-commands) it's possible to not even have tox installed to execute tests. Actually, this is the theory, because unfortunately, running tests with `python setup.py test` still requires one dependency to be installed beforehand: `virtualenv` ## Current Behavior ``` bash $ python setup.py test running test Searching for tox Reading https://pypi.python.org/simple/tox/ Best match: tox 2.3.1 Downloading https://pypi.python.org/packages/46/39/e15a857fda1852da1485bc88ac4268dbcef037ab526e1ac21accf2a5c24c/tox-2.3.1.tar.gz#md5=9371b3d3e25c03751a0372e19602dfb9 Processing tox-2.3.1.tar.gz Writing /tmp/easy_install-2zqkvsk9/tox-2.3.1/setup.cfg Running tox-2.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2zqkvsk9/tox-2.3.1/egg-dist-tmp-f202aq90 ... Installed /home/user/repos/my-project/.eggs/tox-2.3.1-py3.4.egg Searching for pluggy<0.4.0,>=0.3.0 Reading https://pypi.python.org/simple/pluggy/ Best match: pluggy 0.3.1 Downloading https://pypi.python.org/packages/1b/a9/6f5f80b75a8d84d21a8a13486fe26a2da9f043f93b464b2e3928be256dc4/pluggy-0.3.1.tar.gz#md5=ecdd791e309f60668b66fec97c2ee7db Processing pluggy-0.3.1.tar.gz Writing /tmp/easy_install-p0d1rfyw/pluggy-0.3.1/setup.cfg Running pluggy-0.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-p0d1rfyw/pluggy-0.3.1/egg-dist-tmp-gsv46avp ... Installed /home/user/repos/my-project/.eggs/pluggy-0.3.1-py3.4.egg Searching for py>=1.4.17 Reading https://pypi.python.org/simple/py/ Best match: py 1.4.31 Downloading https://pypi.python.org/packages/f4/9a/8dfda23f36600dd701c6722316ba8a3ab4b990261f83e7d3ffc6dfedf7ef/py-1.4.31.tar.gz#md5=5d2c63c56dc3f2115ec35c066ecd582b Processing py-1.4.31.tar.gz Writing /tmp/easy_install-ax6qj5s2/py-1.4.31/setup.cfg ... Installed /home/user/repos/my-project/.eggs/py-1.4.31-py3.4.egg Searching for virtualenv>=1.11.2 Reading https://pypi.python.org/simple/virtualenv/ Best match: virtualenv 15.0.1 Downloading https://pypi.python.org/packages/c8/82/7c1eb879dea5725fae239070b48187de74a8eb06b63d9087cd0a60436353/virtualenv-15.0.1.tar.gz#md5=28d76a0d9cbd5dc42046dd14e76a6ecc Processing virtualenv-15.0.1.tar.gz Writing /tmp/easy_install-qkl88xj8/virtualenv-15.0.1/setup.cfg ... Installed /home/user/repos/my-project/.eggs/virtualenv-15.0.1-py3.4.egg running egg_info creating my_project.egg-info writing my_project.egg-info/PKG-INFO ... writing manifest file 'my_project.egg-info/SOURCES.txt' running build_ext GLOB sdist-make: /home/user/repos/my-project/setup.py flake8 create: /home/user/repos/my-project/.tox/flake8 ERROR: invocation failed (exit code 1), logfile: /home/user/repos/my-project/.tox/flake8/log/flake8-0.log ERROR: actionid: flake8 msg: getenv cmdargs: ['/home/user/.virtualenvs/my-project/bin/python', '-m', 'virtualenv', '--python', '/home/user/.virtualenvs/my-project/bin/python3.4', 'flake8'] env: {...} /home/user/.virtualenvs/my-project/bin/python: No module named virtualenv ERROR: InvocationError: /home/user/.virtualenvs/my-project/bin/python -m virtualenv --python /home/user/.virtualenvs/my-project/bin/python3.4 flake8 (see /home/user/repos/my-project/.tox/flake8/log/flake8-0.log) _____________________________________________________________________________________ summary ______________________________________________________________________________________ ERROR: flake8: InvocationError: /home/user/.virtualenvs/my-project/bin/python -m virtualenv --python /home/user/.virtualenvs/my-project/bin/python3.4 flake8 (see /home/user/repos/my-project/.tox/flake8/log/flake8-0.log) ``` When I run `pip install virtualenv` the same testrun runs like a charm. Is this a problem of tox, or and issue of setuptools? ## Expected Behavior After having set up tox with [setuptools integration](http://testrun.org/tox/latest/example/basic.html#integration-with-setuptools-distribute-test-commands) it should be possible to run `python setup.py test` to execute tests driven by tox without having had to install any requirements (such as `virtualenv` or `tox`) manually beforehand. ## References This problem is also documented in [issue #245](https://bitbucket.org/hpk42/tox/issues/245/can-not-install-sure-dependency-in-tox#comment-26884414). -------------- next part -------------- An HTML attachment was scrubbed... URL: From issues-reply at bitbucket.org Fri May 13 05:16:37 2016 From: issues-reply at bitbucket.org (Florian Bruhin) Date: Fri, 13 May 2016 09:16:37 -0000 Subject: [Pytest-commit] Issue #331: Output with missing setup.py could be nicer (hpk42/tox) Message-ID: <20160513091637.14155.62891@celery-worker-104.ash1.bb-inf.net> New issue 331: Output with missing setup.py could be nicer https://bitbucket.org/hpk42/tox/issues/331/output-with-missing-setuppy-could-be-nicer Florian Bruhin: When there's no `setup.py`, we get: ``` $ tox Traceback (most recent call last): File "./.venv/bin/tox", line 11, in sys.exit(cmdline()) File "/home/florian/tmp/.venv/lib/python3.4/site-packages/tox/session.py", line 39, in main retcode = Session(config).runcommand() File "/home/florian/tmp/.venv/lib/python3.4/site-packages/tox/session.py", line 375, in runcommand return self.subcommand_test() File "/home/florian/tmp/.venv/lib/python3.4/site-packages/tox/session.py", line 520, in subcommand_test path = self.get_installpkg_path() File "/home/florian/tmp/.venv/lib/python3.4/site-packages/tox/session.py", line 496, in get_installpkg_path path = self._makesdist() File "/home/florian/tmp/.venv/lib/python3.4/site-packages/tox/session.py", line 390, in _makesdist raise tox.exception.MissingFile(setup) tox.MissingFile: MissingFile: /home/florian/tmp/setup.py ``` instead the output could be nicer, like if the `setup.py` is broken: ``` $ tox GLOB sdist-make: /home/florian/tmp/setup.py ERROR: No dist directory found. Please check setup.py, e.g with: python setup.py sdist ``` -------------- next part -------------- An HTML attachment was scrubbed... URL: From issues-reply at bitbucket.org Fri May 13 05:24:09 2016 From: issues-reply at bitbucket.org (Florian Bruhin) Date: Fri, 13 May 2016 09:24:09 -0000 Subject: [Pytest-commit] Issue #332: tox doesn't strip line coments from dependencies (hpk42/tox) Message-ID: <20160513092409.26348.82296@celery-worker-103.ash1.bb-inf.net> New issue 332: tox doesn't strip line coments from dependencies https://bitbucket.org/hpk42/tox/issues/332/tox-doesnt-strip-line-coments-from Florian Bruhin: With an up-to-date virtualenv (which downloads an up-to-date pip), since pip 8.1.2, tox breaks when there's a tox.ini like this: ```ini [testenv] deps= pytest # comment ``` output: ``` GLOB sdist-make: /home/florian/tmp/setup.py python create: /home/florian/tmp/.tox/python python installdeps: pytest # comment ERROR: invocation failed (exit code 1), logfile: /home/florian/tmp/.tox/python/log/python-1.log ERROR: actionid: python msg: getenv cmdargs: [local('/home/florian/tmp/.tox/python/bin/pip'), 'install', 'pytest # comment'] env: {...} Invalid requirement: 'pytest # comment' Traceback (most recent call last): File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__ req = REQUIREMENT.parseString(requirement_string) File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1172, in parseString raise exc File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1162, in parseString loc, tokens = self._parse( instring, 0 ) File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1028, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 2462, in parseImpl loc, exprtokens = e._parse( instring, loc, doActions ) File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1032, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 2265, in parseImpl raise ParseException(instring, loc, self.errmsg, self) pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 7), (line:1, col:8) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/req/req_install.py", line 78, in __init__ req = Requirement(req) File "/home/florian/tmp/.tox/python/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__ requirement_string[e.loc:e.loc + 8])) pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'# commen'" ERROR: could not install deps [pytest # comment]; v = InvocationError('/home/florian/tmp/.tox/python/bin/pip install pytest # comment (see /home/florian/tmp/.tox/python/log/python-1.log)', 1) ``` This is because pip doesn't handle comments as part of a commandline argument since that version anymore: https://github.com/pypa/pip/issues/3667 They replied in that issue that it isn't really intended that it worked before, and I tend to agree. Marking as critical as this completely breaks tox unless you set `VIRTUALENV_DOWNLOAD=no` and never upgrade virtualenv. I think tox should either strip those comments (no idea how tricky that is as pip URLs can include hashes as well), or write temporary requirement.txt files and direct pip to them. -------------- next part -------------- An HTML attachment was scrubbed... URL: From issues-reply at bitbucket.org Tue May 17 09:03:40 2016 From: issues-reply at bitbucket.org (Ed Morley) Date: Tue, 17 May 2016 13:03:40 -0000 Subject: [Pytest-commit] Issue #333: Add support for capturing strings from factor variants (eg versions of deps) (hpk42/tox) Message-ID: <20160517130340.33993.81470@celery-worker-101.ash1.bb-inf.net> New issue 333: Add support for capturing strings from factor variants (eg versions of deps) https://bitbucket.org/hpk42/tox/issues/333/add-support-for-capturing-strings-from Ed Morley: For projects that use tox to test against multiple versions of deps, it's common to see this type of version repetition in `deps`: ``` [tox] envlist = py{26,27}-pip{062,063,070,071,072,080,081,082,083}, py{26,27,33,34,35}-pip{100,101,102,110,120,121,130,131,140,141,150,151,152,153,154,155,156,600,601,602,603,604,605,606,607,608,610,611,700,701,702,703,710,711,712,800,801,802,803,810,811,812} deps = nose pip062: pip==0.6.2 pip063: pip==0.6.3 pip070: pip==0.7.0 # ... pip811: pip==8.1.1 pip812: pip==8.1.2 ``` It would be great if instead the version component of the factor could be captured (almost regex group style) and re-used as part of the pip install command. ie: ``` [tox] envlist = py{26,27}-pip{0.6.2,0.6.3,0.7.0,0.7.1,0.7.2,0.8.0,0.8.1,0.8.2,0.8.3}, ... deps = nose pip{*}: pip=={0} ``` Where `{0}` denotes the first group matched on the left (though I'm fine with just allowing only one match per line if that's easier). This would also require supporting periods in the envlist strings, since tox currently strips out the non-alphanumeric characters (in the example above, `tox -l` lists `py26-pip062` rather than the expected `py26-pip0.6.2`). Apologies if this is filed already (or in fact possible with the current syntax), I've read the docs and search the tracker, but it's hard to know what search terms to use. -------------- next part -------------- An HTML attachment was scrubbed... URL: