← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:enumcol-is-deprecated into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:enumcol-is-deprecated into launchpad:master.

Commit message:
Document that EnumCol is deprecated

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/411090
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:enumcol-is-deprecated into launchpad:master.
diff --git a/lib/lp/services/database/enumcol.py b/lib/lp/services/database/enumcol.py
index 3360ebe..2ce5d24 100644
--- a/lib/lp/services/database/enumcol.py
+++ b/lib/lp/services/database/enumcol.py
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2021 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 from lazr.enum import (
@@ -12,8 +12,8 @@ from zope.security.proxy import isinstance as zope_isinstance
 
 
 __all__ = [
-'DBEnum',
-'EnumCol',
+    'DBEnum',
+    'EnumCol',
     ]
 
 
@@ -71,6 +71,8 @@ class DBEnum(SimpleProperty):
 
 
 class DBSchemaEnumCol(sqlobject.PropertyAdapter, DBEnum):
+    """Deprecated; a SQLObject property representing a DBEnumeratedType."""
+
     def __init__(self, **kw):
         try:
             enum = kw.pop('enum')
@@ -83,4 +85,5 @@ class DBSchemaEnumCol(sqlobject.PropertyAdapter, DBEnum):
         super(DBSchemaEnumCol, self).__init__(**kw)
 
 
+# Deprecated.  Use DBEnum instead.
 EnumCol = DBSchemaEnumCol

Follow ups