Merge lp:~wgrant/launchpad/psycopg2-2.4.4 into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Stuart Bishop
Approved revision: no longer in the source branch.
Merged at revision: 15063
Proposed branch: lp:~wgrant/launchpad/psycopg2-2.4.4
Merge into: lp:launchpad
Diff against target: 53 lines (+5/-5)
3 files modified
lib/lp/code/model/branch.py (+1/-1)
lib/lp/services/database/bulk.py (+2/-2)
versions.cfg (+2/-2)
To merge this branch: bzr merge lp:~wgrant/launchpad/psycopg2-2.4.4
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+100912@code.launchpad.net

Commit message

Upgrade to psycopg2 2.4 and a newer Storm snapshot.

Description of the change

We need to use REPEATABLE READ rather than SERIALIZABLE isolation for most things on PostgreSQL 9.1. But psycopg2 2.2 maps REPEATABLE READ to SERIALIZABLE, so we need to upgrade to at least 2.4.2. This branch takes us to 2.4.4.

But that exposes bug #959699 in Storm, so we need to upgrade Storm as well.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

The changes to Insert expressions are needed because the version of my bulk insert branch that landed on trunk is slightly different from the early one we were using.

Revision history for this message
Stuart Bishop (stub) wrote :

This looks good. There was more test failures last time I tried psycopg2 2.4, which I think are cleaned up by the Storm update.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/code/model/branch.py'
2--- lib/lp/code/model/branch.py 2012-04-03 16:06:43 +0000
3+++ lib/lp/code/model/branch.py 2012-04-05 06:25:27 +0000
4@@ -895,7 +895,7 @@
5 (a and unicode(a) or None, b and unicode(b) or None)
6 for a, b in revision_id_sequence_pairs]
7 store.execute(Insert(('revision_id', 'sequence'),
8- table=['RevidSequence'], expr=unicode_revid_sequence_pairs))
9+ table=['RevidSequence'], values=unicode_revid_sequence_pairs))
10 store.execute(
11 """
12 INSERT INTO BranchRevision (branch, revision, sequence)
13
14=== modified file 'lib/lp/services/database/bulk.py'
15--- lib/lp/services/database/bulk.py 2012-02-28 04:24:19 +0000
16+++ lib/lp/services/database/bulk.py 2012-04-05 06:25:27 +0000
17@@ -234,12 +234,12 @@
18 if get_objects or get_primary_keys:
19 result = IStore(cls).execute(
20 Returning(Insert(
21- db_cols, expr=db_values, primary_columns=primary_key)))
22+ db_cols, values=db_values, primary_columns=primary_key)))
23 keys = map(itemgetter(0), result) if len(primary_key) == 1 else result
24 if get_objects:
25 return load(cls, keys)
26 else:
27 return list(keys)
28 else:
29- IStore(cls).execute(Insert(db_cols, expr=db_values))
30+ IStore(cls).execute(Insert(db_cols, values=db_values))
31 return None
32
33=== modified file 'versions.cfg'
34--- versions.cfg 2012-04-03 22:08:39 +0000
35+++ versions.cfg 2012-04-05 06:25:27 +0000
36@@ -71,7 +71,7 @@
37 PasteDeploy = 1.3.3
38 pgbouncer = 0.0.7
39 plone.recipe.command = 1.1
40-psycopg2 = 2.2.2
41+psycopg2 = 2.4.4
42 pyasn1 = 0.0.9a
43 pycrypto = 2.0.1
44 pydkim = 0.3-mbp-r7
45@@ -105,7 +105,7 @@
46 soupmatchers = 0.1r53
47 sourcecodegen = 0.6.9
48 # lp:~launchpad-committers/storm/with-without-datetime
49-storm = 0.19.0.99-lpwithnodatetime-r404
50+storm = 0.19.0.99-lpwithnodatetime-r406
51 testresources = 0.2.4-r58
52 testtools = 0.9.14
53 timeline = 0.0.3