Diff for "PythonMigrationStatus"

Not logged in - Log In / Register

Differences between revisions 179 and 180
Revision 179 as of 2010-04-22 12:39:08
Size: 5558
Editor: salgado
Comment: remove some failures that were caused by me having an old cscvs
Revision 180 as of 2010-04-22 12:40:55
Size: 6628
Editor: salgado
Comment:
Deletions are marked like this. Additions are marked like this.
Line 72: Line 72:
=== DatabaseFunctionalLayer: OK (4467 tests) === === DatabaseFunctionalLayer ===
 * lib/lp/registry/tests/../doc/gpg-signatures.txt {{{
Failed doctest test for gpg-signatures.txt
  File "lib/lp/registry/tests/../doc/gpg-signatures.txt", line 0

----------------------------------------------------------------------
File "lib/lp/registry/tests/../doc/gpg-signatures.txt", line 138, in gpg-signatures.txt
Failed example:
    master_sig = gpghandler.getVerifiedSignature(content)
Differences (ndiff with -expected +actual):
      Traceback (most recent call last):
    - ...
    - GPGVerificationError...
    + File "/home/salgado/devel/lp-sourcedeps/2.6/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/doctest/__init__.py", line 1355, in __run
    + compileflags, 1) in test.globs
    + File "<doctest gpg-signatures.txt[line 138, example 25]>", line 1, in <module>
    + File "/home/salgado/devel/launchpad/python2.6/lib/canonical/launchpad/utilities/gpghandler.py", line 173, in getVerifiedSignature
    + raise GPGVerificationError(e.message)
    + DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
}}}

Moving to newer Python versions

With Lucid fast approaching, efforts to actually migrate Launchpad to Python 2.6 are getting under way.

Relevant tagged bugs: https://bugs.launchpad.net/launchpad-foundations/+bugs?field.tag=python-upgrade

Branches

Issues that need revisiting

  • The failure when setting up the GoogleServiceLayer seems to be a consequence of the server answering with a errno.ECONNABORTED when it's not yet ready, so salgado has just changed the wait_for_service function to treat that error the same way it does for errno.ECONNREFUSED.

  • The test hang is because of the change done on bug 349316, so salgado has just commented out that addCleanup() line for now, to see if we can get a full test run.

  • A multitude of modules of modules (sha, md5, sets, ...) are deprecated in Python 2.6, and many tests would fail merely because of unexpected DeprecationWarnings, so we've had to jump through multiple hoops all over the place to suppress these. Ultimately we need a plan for removing these suppressions, because we want to know about deprecation long-term.

    • It looks like an attainable goal to get all of our dependencies fixed to not raise DeprecationWarnings. The ones needing work are: Twisted, PyCrypto, Ampoule.

Setup caveats

  • The extension modules in your sourcecode directory will have been built for Python 2.5 and these will break for your 2.6 branch. The simple thing to do is to move your old sourcecode aside and run utilities/rocketfuel-get to get it again with Python 2.6. A more complex but useful thing to do to manage sourcecode directories for multiple python versions is:

    cd ~/launchpad/lp-sourcedeps
    mkdir 2.6
    cd 2.6
    ln -s ../download-cache
    ln -s ../eggs
    mkdir sourcecode
    cd sourcecode
    for i in ../../sourcecode/*; do bzr checkout --lightweight "$i"; done

    and now point utilities/link-external-sourcecode to ../../lp-sourcedeps/2.6 - if you do that you'll need to be aware that rocketfuel-get won't know about it, and your extra directories will require occasional manual updating.

Known test failures and notes thereon

These results assume you:

  • Use the lp:~launchpad-committers/launchpad/python2.6 branch
  • Have the following not-yet-landed branches merged:
    • lp:~wgrant/launchpad/emailauthentication.txt-2.6-fix
  • Do not have python-tdb installed, which otherwise causes bzr-hg and bzr-git to behave in ways the tests do not expect.

BaseLayer: OK (281 tests)

MemcachedLayer: OK (8 tests)

LibrarianLayer: OK (9 tests)

DatabaseLayer: OK (46 tests)

LaunchpadLayer: OK (24 tests)

ZopelessLayer: OK (20 tests)

LaunchpadScriptLayer: OK (85 tests)

LaunchpadZopelessLayer

  • test_invalid_signature (canonical.launchpad.mail.tests.test_incoming.TestIncoming)

    Traceback (most recent call last):
    _StringException: Text attachment: traceback
    ------------
    Traceback (most recent call last):
      File "/home/salgado/devel/lp-sourcedeps/2.6/eggs/testtools-0.9.2-py2.6.egg/testtools/runtest.py", line 128, in _run_user
        return fn(*args)
      File "/home/salgado/devel/lp-sourcedeps/2.6/eggs/testtools-0.9.2-py2.6.egg/testtools/testcase.py", line 368, in _run_test_method
        testMethod()
      File "/home/salgado/devel/launchpad/python2.6/lib/canonical/launchpad/mail/tests/test_incoming.py", line 44, in test_invalid_signature
        self.assertIs(None, current_oops)
      File "/home/salgado/devel/lp-sourcedeps/2.6/eggs/testtools-0.9.2-py2.6.egg/testtools/testcase.py", line 208, in assertIs
        expected is observed, '%r is not %r' % (expected, observed))
      File "/usr/lib/python2.6/unittest.py", line 325, in failUnless
        if not expr: raise self.failureException, msg
    AssertionError: None is not <ErrorReport OOPS-1572TEMAIL1 DeprecationWarning: BaseException.message has been deprecated as of Python 2.6>

FunctionalLayer: OK (174 tests)

LaunchpadFunctionalLayer

  • valid_absolute_url (canonical.launchpad.validators.url) -- Python 2.6's urlparse disregards the uses_netloc list when parsing urls and treats anything beginning with // as netloc based. This makes maxb and wgrant say WTF!?! The untested valid_absolute_url DB constraint is also affected!
    • This behavior is expected and is in compliance with rfc3986, so we just need to change/remove our test. -- Salgado

AppServerLayer: OK (143 tests)

DatabaseFunctionalLayer

  • lib/lp/registry/tests/../doc/gpg-signatures.txt

    Failed doctest test for gpg-signatures.txt
      File "lib/lp/registry/tests/../doc/gpg-signatures.txt", line 0
    
    ----------------------------------------------------------------------
    File "lib/lp/registry/tests/../doc/gpg-signatures.txt", line 138, in gpg-signatures.txt
    Failed example:
        master_sig = gpghandler.getVerifiedSignature(content)
    Differences (ndiff with -expected +actual):
          Traceback (most recent call last):
        - ...
        - GPGVerificationError...
        +   File "/home/salgado/devel/lp-sourcedeps/2.6/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/doctest/__init__.py", line 1355, in __run
        +     compileflags, 1) in test.globs
        +   File "<doctest gpg-signatures.txt[line 138, example 25]>", line 1, in <module>
        +   File "/home/salgado/devel/launchpad/python2.6/lib/canonical/launchpad/utilities/gpghandler.py", line 173, in getVerifiedSignature
        +     raise GPGVerificationError(e.message)
        + DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

GoogleLaunchpadFunctionalLayer: OK (72 tests)

PageTestLayer: OK (6335 tests)

TwistedLayer: OK (235 tests)

TwistedLaunchpadZopelessLayer: OK (16 tests)

TwistedAppServerLayer: OK (9 tests)

ZopelessAppServerLayer: OK

ZopelessDatabaseLayer: OK (259 tests)

BugsWindmillLayer: OK (13 tests)

CodeWindmillLayer: OK (12 tests)

ForeignBranchPluginLayer: OK (61 tests)

SSHServerLayer: OK (46 tests)

RegistryWindmillLayer: OK (17 tests)

SoyuzWindmillLayer: OK (2 tests)

TestZopeTestInSubProcessLayer: OK (1 test)

TranslationsWindmillLayer: OK (7 tests)

UnitTests: OK

=== Shipit: OK ===

MailmanLayer: OK