launchpadlib tests requires python 2.6

Bug #776523 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Mac Installers
Won't Fix
Critical
Unassigned
2.4
Triaged
Critical
Unassigned

Bug Description

While building the installer for 2.4b2/OSX 10.5 I encoutered the following:

byte-compiling /Users/vila/src/mac-installers/trunk/package/launchpadlib.dst/Library/Python/2.5/site-packages/launchpadlib/tests/test_credential_store.py to test_credential_store.pyc
/Library/Python/2.5/site-packages/launchpadlib/tests/test_credential_store.py:93: Warning: 'with' will become a reserved keyword in Python 2.6
  File "/Library/Python/2.5/site-packages/launchpadlib/tests/test_credential_store.py", line 93
    with fake_keyring(self.keyring):
                    ^
SyntaxError: invalid syntax

byte-compiling /Users/vila/src/mac-installers/trunk/package/launchpadlib.dst/Library/Python/2.5/site-packages/launchpadlib/tests/test_http.py to test_http.pyc
byte-compiling /Users/vila/src/mac-installers/trunk/package/launchpadlib.dst/Library/Python/2.5/site-packages/launchpadlib/tests/test_launchpad.py to test_launchpad.pyc
/Library/Python/2.5/site-packages/launchpadlib/tests/test_launchpad.py:521: Warning: 'with' will become a reserved keyword in Python 2.6
  File "/Library/Python/2.5/site-packages/launchpadlib/tests/test_launchpad.py", line 521
    with warnings.catch_warnings(record=True) as caught:
                ^
SyntaxError: invalid syntax

This is not a big deal since this only means that the installer can't run the tests for launchpadlib but it's still a bit worrying.

Possible options include:
- design and carry a patch for launchpadlib (I doubt upstream will be interested),
- drop launchpadlib from the installer (ouch, some plugins depend on it so they will probably need to be dropped as well),
- stop building the installer for 10.5,
- switch to python-2.6 for OSX 10.5 (this will requires asking users to install python from python.org)

Revision history for this message
Vincent Ladeuil (vila) wrote :

Marking Critical as a decision needs to be made for 2.4.0 final.

Changed in bzr-mac-installers:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Gordon Tyler (doxxx) wrote :

Could the patch be as simple as adding the following to the top of the files which use with statements:

  from __future__ import with_statement

As described here: http://docs.python.org/release/2.5.2/ref/future.html

Revision history for this message
Gordon Tyler (doxxx) wrote :

Although, I suppose there could be other 2.6'isms that are not immediately obvious.

Vincent Ladeuil (vila)
summary: - launcpadlib tests requires python 2.6
+ launchpadlib tests requires python 2.6
Revision history for this message
Vincent Ladeuil (vila) wrote :

> Could the patch be as simple as adding the following to the top of the files which use with statements

That's worth a try...

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

We no longer support pre-2.6.

Changed in bzr-mac-installers:
status: Confirmed → Won't Fix
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Do we really care about pre-2.6 for bzr 2.4 mac installers anymore?

Revision history for this message
Vincent Ladeuil (vila) wrote :

I don't think we build bzr-2.4 installers anymore.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.