python-django 1.3-2ubuntu1.1 is incompatible with Psycopg2 2.4.2-1

Bug #905837 reported by Dave Pifke
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-django (Ubuntu)
Fix Released
Dave Walker

Bug Description

When using the default versions of python-django and python-psycopg2 that ship with Oneiric, I am unable to run any unit tests for any Django application, due to upstream issue 16250:

As discussed in the Django ticket, Django 1.3 is incompatible with Psycopg2 versions after 2.4.1 due to changes in the Psycopg2 library. The Django developers have committed a fix for this, however they have stated they will not be backporting the fix to the 1.3.x branch.

I am filing this bug against the python-django package since this seems to be a Django issue, however one resolution might be to downgrade the version of python-psycopg2 that ships with Oneiric. Alternatively, a fix for Ubuntu's shipping version of Django may need to be created. The patch from Django issue 16250 does not apply cleanly to the python-django 1.3-2ubuntu1.1 sources.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: python-django 1.3-2ubuntu1.1
ProcVersionSignature: Ubuntu 3.0.0-12.20-server 3.0.4
Uname: Linux 3.0.0-12-server x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Sun Dec 18 00:16:15 2011
InstallationMedia: Ubuntu-Server 11.10 "Oneiric Ocelot" - Release amd64 (20111011)
PackageArchitecture: all
SourcePackage: python-django
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dave Pifke (dave-thingomatic) wrote :
Revision history for this message
Dave Pifke (dave-thingomatic) wrote :

The fix for this involves two patches.

The first (attached) copies from db/backends/postgresql to db/backends/postgresql_psycopg2, derived from:

Revision history for this message
Dave Pifke (dave-thingomatic) wrote :

The second patch is the same as 16250-3.diff from the linked ticket, less a whitespace change that fails to apply.

The issue is resolved on my system and all unit tests pass after applying the patch from my previous comment followed by the attached.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch to copy from db/backends/postgresql to db/backends/postgresql_psycopg2" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-django (Ubuntu):
status: New → Confirmed
Dave Walker (davewalker)
Changed in python-django (Ubuntu):
assignee: nobody → Dave Walker (davewalker)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-django - 1.3.1-4ubuntu1

python-django (1.3.1-4ubuntu1) precise; urgency=low

  * Merge with Debian. Remaining changes:
    - 09_test_view_decorator_sleep.diff increases the sleep time to
      reduce race condition effects on build machines. (LP: #829487)
  * debian/patches/{psycopg2_creation.diff,compat-psycopg2-plus2.4.2.diff}:
    - New patches, resolve compatibility with psycopg2 > 2.4.1, patches
      based on upstream submissions, rebasing courtesy of Dave Pifke.
    - LP: #905837

python-django (1.3.1-4) unstable; urgency=medium

  * Add 08_fix_test_week_view_allow_future.diff to fix a regression test that
    only worked in 2011. Closes: #655666

python-django (1.3.1-3) unstable; urgency=low

  * Add 06_use_debian_geoip_database_as_default.diff to use the default
    location of the GeoIP database used by the Debian package
    geoip-database-contrib. Closes: #645094
    Add this package to suggests. Thanks to Tapio Rantala
    <email address hidden> for the patch.
  * Bump build-dep on python-sphinx to 1.0.8 to ensure we have a version
    where #641710 is fixed. Closes: #647134
  * Add 07_fix_for_sphinx1.1.2.diff to fix build with Sphinx 1.1.2. Thanks to
    Jakub Wilk for the advance warning. Closes: #649624

python-django (1.3.1-2) unstable; urgency=low

  * Update Build-Depends on locales to included a version requirement
    so that locales-all cannot satisfy it with its Provides: locales.
    Thanks to Jakub Wilk for the suggestion.
  * Enable 02_disable-sources-in-sphinxdoc.diff since #641710 has been
  * Add 05_fix_djangodocs_sphinx_ext.diff to support Sphinx 1.0.8.
    Closes: #643758
 -- Dave Walker (Daviey) <email address hidden> Fri, 17 Feb 2012 14:59:51 +0000

Changed in python-django (Ubuntu):
status: Confirmed → Fix Released
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.