launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12469
[Merge] lp:~jcsackett/launchpad/restore-date_next_suggest_packaging into lp:launchpad
j.c.sackett has proposed merging lp:~jcsackett/launchpad/restore-date_next_suggest_packaging into lp:launchpad.
Commit message:
Restore date_next_suggest_packaging as setter/getter rather than dbcolumn for API compatability.
Requested reviews:
Curtis Hovey (sinzui)
For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/restore-date_next_suggest_packaging/+merge/126293
Summary
=======
Adds the date_next_suggest_packaging attribute back for API compatability.
It does not restore the db column.
Preimp
======
Spoke with Curtis Hovey.
Implementation
==============
An empty setter/getter pair is added so calls to the attribute return its
old default, None, and it cannot be changed. Description is updated to make it
clear that it is an obsolete attribute.
Tests
=====
bin/test -vvct xx-project-registry
QA
==
Ensure the attribute is available on 1.0 of the API.
LoC
===
This is part of a series with an LoC credit of 400+.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/registry/interfaces/product.py
lib/lp/registry/stories/webservice/xx-project-registry.txt
lib/lp/registry/model/product.py
./lib/lp/registry/model/product.py
408: redefinition of function 'date_next_suggest_packaging' from line 400
Our linter doesn't understand current python property declarations.
--
https://code.launchpad.net/~jcsackett/launchpad/restore-date_next_suggest_packaging/+merge/126293
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/product.py'
--- lib/lp/registry/interfaces/product.py 2012-09-25 15:03:30 +0000
+++ lib/lp/registry/interfaces/product.py 2012-09-25 16:57:22 +0000
@@ -675,6 +675,13 @@
sourcepackages = Attribute(_("List of packages for this product"))
+ date_next_suggest_packaging = exported(
+ Datetime(
+ title=_('Next suggest packaging date'),
+ description=_(
+ "Obsolete. The date to resume Ubuntu package suggestions."),
+ required=False))
+
distrosourcepackages = Attribute(_("List of distribution packages for "
"this product"))
=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py 2012-09-25 15:03:30 +0000
+++ lib/lp/registry/model/product.py 2012-09-25 16:57:22 +0000
@@ -398,6 +398,22 @@
name='remote_product', allow_none=True, default=None)
@property
+ def date_next_suggest_packaging(self):
+ """See `IProduct`
+
+ Returns None; exists only to maintain API compatability.
+ """
+ return None
+
+ @date_next_suggest_packaging.setter
+ def date_next_suggest_packaging(self, value):
+ """See `IProduct`
+
+ Ignores supplied value; exists only to maintain API compatability.
+ """
+ pass
+
+ @property
def information_type(self):
"""See `IProduct`
=== modified file 'lib/lp/registry/stories/webservice/xx-project-registry.txt'
--- lib/lp/registry/stories/webservice/xx-project-registry.txt 2012-09-25 16:30:05 +0000
+++ lib/lp/registry/stories/webservice/xx-project-registry.txt 2012-09-25 16:57:22 +0000
@@ -159,6 +159,7 @@
commercial_subscription_is_due: False
commercial_subscription_link: None
date_created: u'2004-09-24T20:58:02.185708+00:00'
+ date_next_suggest_packaging: None
description: u'The Mozilla Firefox web browser'
development_focus_link: u'http://.../firefox/trunk'
display_name: u'Mozilla Firefox'
Follow ups