Merge ~cjwatson/launchpad:refactor-pgsession-queries into launchpad:master

Proposed by Colin Watson
Status: Needs review
Proposed branch: ~cjwatson/launchpad:refactor-pgsession-queries
Merge into: launchpad:master
Diff against target: 329 lines (+116/-88)
4 files modified
lib/lp/services/session/adapters.py (+2/-1)
lib/lp/services/session/model.py (+75/-3)
lib/lp/services/webapp/pgsession.py (+38/-83)
tox.ini (+1/-1)
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+437794@code.qastaging.launchpad.net

Commit message

Refactor PGSession queries to reduce manual SQL

Description of the change

Pushing the special handling for old session pickles saved by Python 2 down to the `SessionPkgData` model and adding some named function declarations allows us to make quite effective use of Storm's query compiler, eliminating some manually-constructed SQL and giving us better type annotations.

It's possible that at least the dump compatibility with Python 2 can now be removed, but I deliberately haven't attempted that in this commit: this should be a pure refactoring with no functional change.

To post a comment you must log in.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: