launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24613
[Merge] ~cjwatson/launchpad:zope-interface-imports into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:zope-interface-imports into launchpad:master.
Commit message:
Import invariant and Interface from zope.interface
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/382815
zope.interface 5.0.0 adds __all__ declarations, so importpedant now complains about importing these from zope.interface.interface.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:zope-interface-imports into launchpad:master.
diff --git a/lib/lp/registry/browser/person.py b/lib/lp/registry/browser/person.py
index bb0ef69..8677ecd 100644
--- a/lib/lp/registry/browser/person.py
+++ b/lib/lp/registry/browser/person.py
@@ -83,9 +83,9 @@ from zope.interface import (
classImplements,
implementer,
Interface,
+ invariant,
)
from zope.interface.exceptions import Invalid
-from zope.interface.interface import invariant
from zope.publisher.interfaces import NotFound
from zope.schema import (
Choice,
diff --git a/lib/lp/registry/interfaces/distributionmirror.py b/lib/lp/registry/interfaces/distributionmirror.py
index 4849e7a..d258482 100644
--- a/lib/lp/registry/interfaces/distributionmirror.py
+++ b/lib/lp/registry/interfaces/distributionmirror.py
@@ -39,9 +39,9 @@ from zope.component import getUtility
from zope.interface import (
Attribute,
Interface,
+ invariant,
)
from zope.interface.exceptions import Invalid
-from zope.interface.interface import invariant
from zope.schema import (
Bool,
Choice,
diff --git a/lib/lp/registry/interfaces/person.py b/lib/lp/registry/interfaces/person.py
index 71f8509..6ce09b1 100644
--- a/lib/lp/registry/interfaces/person.py
+++ b/lib/lp/registry/interfaces/person.py
@@ -75,9 +75,9 @@ from zope.formlib.form import NoInputData
from zope.interface import (
Attribute,
Interface,
+ invariant,
)
from zope.interface.exceptions import Invalid
-from zope.interface.interface import invariant
from zope.schema import (
Bool,
Choice,
diff --git a/lib/lp/registry/interfaces/poll.py b/lib/lp/registry/interfaces/poll.py
index 8f630d6..a6dd40d 100644
--- a/lib/lp/registry/interfaces/poll.py
+++ b/lib/lp/registry/interfaces/poll.py
@@ -31,9 +31,9 @@ from zope.component import getUtility
from zope.interface import (
Attribute,
Interface,
+ invariant,
)
from zope.interface.exceptions import Invalid
-from zope.interface.interface import invariant
from zope.schema import (
Bool,
Choice,
diff --git a/lib/lp/scripts/utilities/importpedant.py b/lib/lp/scripts/utilities/importpedant.py
index fa583fe..a53a008 100644
--- a/lib/lp/scripts/utilities/importpedant.py
+++ b/lib/lp/scripts/utilities/importpedant.py
@@ -50,6 +50,9 @@ valid_imports_not_in_all = {
'provideAdapter',
'provideHandler',
]),
+ # XXX cjwatson 2020-04-12: Fixed in zope.interface 5.1.0; remove this
+ # when we upgrade to that version.
+ 'zope.interface': set(['invariant']),
}
diff --git a/lib/lp/services/signing/interfaces/signingkey.py b/lib/lp/services/signing/interfaces/signingkey.py
index 30cbb1e..587bbb0 100644
--- a/lib/lp/services/signing/interfaces/signingkey.py
+++ b/lib/lp/services/signing/interfaces/signingkey.py
@@ -13,7 +13,7 @@ __all__ = [
]
from lazr.restful.fields import Reference
-from zope.interface.interface import Interface
+from zope.interface import Interface
from zope.schema import (
Bytes,
Choice,
diff --git a/lib/lp/services/worlddata/interfaces/language.py b/lib/lp/services/worlddata/interfaces/language.py
index 182434f..31d4e0a 100644
--- a/lib/lp/services/worlddata/interfaces/language.py
+++ b/lib/lp/services/worlddata/interfaces/language.py
@@ -28,9 +28,9 @@ from lazr.restful.declarations import (
from zope.interface import (
Attribute,
Interface,
+ invariant,
)
from zope.interface.exceptions import Invalid
-from zope.interface.interface import invariant
from zope.schema import (
Bool,
Choice,