distribute-0.6.35 fails on python 3.3?

Hi All, Can anyone else reproduce this? I have a Python 3.3 virtualenv and I wanted to upgrade one of the packages as follows: $ bin/pip install -U manuel Requirement already up-to-date: manuel in ./lib/python3.3/site-packages Downloading/unpacking distribute from http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz... (from manuel) Downloading distribute-0.6.35.tar.gz (644kB): 644kB downloaded Running setup.py egg_info for package distribute Traceback (most recent call last): File "<string>", line 3, in <module> File "./setuptools/__init__.py", line 2, in <module> from setuptools.extension import Extension, Library File "./setuptools/extension.py", line 5, in <module> from setuptools.dist import _get_unpatched File "./setuptools/dist.py", line 103 except ValueError, e: ^ SyntaxError: invalid syntax Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 3, in <module> File "./setuptools/__init__.py", line 2, in <module> from setuptools.extension import Extension, Library File "./setuptools/extension.py", line 5, in <module> from setuptools.dist import _get_unpatched File "./setuptools/dist.py", line 103 except ValueError, e: ^ SyntaxError: invalid syntax Can other people reproduce this? When was that Python 3 incompatible except clause introduced? cheers. Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

On Tue, Feb 26, 2013 at 9:21 AM, Chris Withers <chris@simplistix.co.uk>wrote:
File "./setuptools/dist.py", line 103
except ValueError, e:
^
SyntaxError: invalid syntax
Can other people reproduce this? When was that Python 3 incompatible except clause introduced?
hg blame setuptools/dist.py -- anatoly t.

On 26 February 2013 06:21, Chris Withers <chris@simplistix.co.uk> wrote:
File "./setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "./setuptools/dist.py", line 103
except ValueError, e:
^
SyntaxError: invalid syntax
Can other people reproduce this? When was that Python 3 incompatible except clause introduced?
I quite often see this, it's usually because something that pip is doing (building the metadata/dependency stuff, the actual code build is fine) is failing to run 2to3. I can't offer anything in the way of a fix, I'm afraid... Paul

On Tue, Feb 26, 2013 at 09:17:29AM +0000, Paul Moore wrote:
On 26 February 2013 06:21, Chris Withers <chris@simplistix.co.uk> wrote:
File "./setuptools/dist.py", line 103 except ValueError, e: ^ SyntaxError: invalid syntax
Can other people reproduce this? When was that Python 3 incompatible except clause introduced?
I quite often see this, it's usually because something that pip is doing (building the metadata/dependency stuff, the actual code build is fine) is failing to run 2to3.
I can't offer anything in the way of a fix, I'm afraid...
How hard would it be to rewrite distribute to use a common language subset instead of relying on 2to3? Marius Gedminas -- C++ is a loaded machine gun helpfully pointed at your feet with the safety off. -- ChaosDiscord on Slashdot

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/26/2013 04:20 AM, Marius Gedminas wrote:
On Tue, Feb 26, 2013 at 09:17:29AM +0000, Paul Moore wrote:
On 26 February 2013 06:21, Chris Withers <chris@simplistix.co.uk> wrote:
File "./setuptools/dist.py", line 103 except ValueError, e: ^ SyntaxError: invalid syntax
Can other people reproduce this? When was that Python 3 incompatible except clause introduced?
I quite often see this, it's usually because something that pip is doing (building the metadata/dependency stuff, the actual code build is fine) is failing to run 2to3.
I can't offer anything in the way of a fix, I'm afraid...
How hard would it be to rewrite distribute to use a common language subset instead of relying on 2to3?
The sheer number of developer hours saved by not waiting for the 2to3 run every time a Py3k virtualenv is created should dwarf whatever effort is involve. Any volunteers to "take on for the team"? Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlEs/CAACgkQ+gerLs4ltQ6oEgCcDobQyI2TbW5Ev0NDtxAOqSlJ GBwAn3F4NMJ9nzY1/xmkxcvJdW8hceYp =Bbmr -----END PGP SIGNATURE-----

You could also distribute distribute as a wheel distribution. The format is designed to let you do your 2to3 runs ahead of time in addition to the compiling-of-C-extensions that people think of first. On Tue, Feb 26, 2013 at 1:17 PM, Tres Seaver <tseaver@palladion.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 02/26/2013 04:20 AM, Marius Gedminas wrote:
On Tue, Feb 26, 2013 at 09:17:29AM +0000, Paul Moore wrote:
On 26 February 2013 06:21, Chris Withers <chris@simplistix.co.uk> wrote:
File "./setuptools/dist.py", line 103 except ValueError, e: ^ SyntaxError: invalid syntax
Can other people reproduce this? When was that Python 3 incompatible except clause introduced?
I quite often see this, it's usually because something that pip is doing (building the metadata/dependency stuff, the actual code build is fine) is failing to run 2to3.
I can't offer anything in the way of a fix, I'm afraid...
How hard would it be to rewrite distribute to use a common language subset instead of relying on 2to3?
The sheer number of developer hours saved by not waiting for the 2to3 run every time a Py3k virtualenv is created should dwarf whatever effort is involve. Any volunteers to "take on for the team"?
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iEYEARECAAYFAlEs/CAACgkQ+gerLs4ltQ6oEgCcDobQyI2TbW5Ev0NDtxAOqSlJ GBwAn3F4NMJ9nzY1/xmkxcvJdW8hceYp =Bbmr -----END PGP SIGNATURE-----
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig

Tres Seaver <tseaver <at> palladion.com> writes:
How hard would it be to rewrite distribute to use a common language subset instead of relying on 2to3?
I did this months ago, when doing PEP 405 venv development was getting old fast because of the 2to3 delay: https://bitbucket.org/vinay.sajip/distribute3 It's been mentioned on this list, but none of the distribute maintainers appear to have picked up on it. It's been a short while (10 Jan 2013) since I synchronised with the main repo, but it typically doesn't take all that long to do. All the tests pass whenever I merge upstream changes, but I'm not sure how much confidence the maintainers have about test coverage and whether all tests passing means enough for them to release into the wild. Regards, Vinay Sajip

All the tests pass whenever I merge upstream changes, but I'm not sure how much confidence the maintainers have about test coverage and whether all tests passing means enough for them to release into the wild.
if they did release it to the wild, then the decision get's passed to virtualenv, as to when it feels comfortable including the upgrade. virtualenv/pip end's up being how many user's will first encounter distribute releases (and problems if there are any). running the pip test suite against distribute RCs before releasing would be a good idea. I'm happy to work with distribute people to make that happen. Marcus

running the pip test suite against distribute RCs before releasing would be a good idea. I'm happy to work with distribute people to make that happen.
granted, it's somewhat awkward, but I did this recently, before upgrading distribute-0.6.34 into virtualenv. it involves running pip's tests using a modified .travis.yml file that installs virtualenv from a git branch that has the distribute upgrade to be tested. I did this due to previous experience in watching a distribute upgrade start failing pip tests, and having to go back and get a distribute patch, and re-release virtualenv. most of the pip tests default to using virtualenv with Setuptools, but there are enough that use Distribute to smoke out issues. Marcus

On Tue, Feb 26, 2013 at 06:52:41PM +0000, Vinay Sajip wrote:
How hard would it be to rewrite distribute to use a common language subset instead of relying on 2to3?
I did this months ago, when doing PEP 405 venv development was getting old fast because of the 2to3 delay:
https://bitbucket.org/vinay.sajip/distribute3
It's been mentioned on this list, but none of the distribute maintainers appear to have picked up on it.
I filed an upstream issue to bring it to their attention: https://bitbucket.org/tarek/distribute/issue/356/installation-of-distribute-...
It's been a short while (10 Jan 2013) since I synchronised with the main repo, but it typically doesn't take all that long to do.
All the tests pass whenever I merge upstream changes, but I'm not sure how much confidence the maintainers have about test coverage and whether all tests passing means enough for them to release into the wild.
Marius Gedminas -- C is quirky, flawed, and an enormous success. -- Dennis M. Ritchie

On Tue, Feb 26, 2013 at 7:21 AM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,
Can anyone else reproduce this?
Essentially pip can not upgrade distribute or setuptools on Python 3. This is annoying, and it seems the easiest way to solve it is to stop using 2to3 for distribute. This is a massive change though, and since the test coverage is dismal its' going to create loads of bugs. But perhaps we simply need to accept that. //Lennart

On Wed, Mar 6, 2013 at 7:24 AM, Lennart Regebro <regebro@gmail.com> wrote:
On Tue, Feb 26, 2013 at 7:21 AM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,
Can anyone else reproduce this?
Essentially pip can not upgrade distribute or setuptools on Python 3.
This is annoying, and it seems the easiest way to solve it is to stop using 2to3 for distribute. This is a massive change though, and since the test coverage is dismal its' going to create loads of bugs. But perhaps we simply need to accept that.
It has always been problematic to upgrade distribute (a pip dependency) with pip. Under certain circumstances pip can uninstall distribute before trying to install it again, which fails because at that point distribute isn't installed. On Windows and on Python 3 the issue is worse due to 2to3 and file locking issues. Virtualenv is a more reliable way to upgrade distribute.
participants (9)
-
anatoly techtonik
-
Chris Withers
-
Daniel Holth
-
Lennart Regebro
-
Marcus Smith
-
Marius Gedminas
-
Paul Moore
-
Tres Seaver
-
Vinay Sajip