launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28320
[Merge] ~cjwatson/launchpad:collections.abc into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:collections.abc into launchpad:master.
Commit message:
Import ABCs from collections.abc rather than collections
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/419043
These were removed from the `collections` module in Python 3.10.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:collections.abc into launchpad:master.
diff --git a/lib/lp/bugs/interfaces/bugtasksearch.py b/lib/lp/bugs/interfaces/bugtasksearch.py
index 2dd486f..fd7f88c 100644
--- a/lib/lp/bugs/interfaces/bugtasksearch.py
+++ b/lib/lp/bugs/interfaces/bugtasksearch.py
@@ -18,7 +18,7 @@ __all__ = [
'IUpstreamProductBugTaskSearch',
]
-import collections
+from collections.abc import Iterable
import http.client
from lazr.enum import (
@@ -214,7 +214,7 @@ class BugTaskSearchParams:
self.upstream_target = upstream_target
self.milestone_dateexpected_before = milestone_dateexpected_before
self.milestone_dateexpected_after = milestone_dateexpected_after
- if isinstance(information_type, collections.Iterable):
+ if isinstance(information_type, Iterable):
self.information_type = set(information_type)
elif information_type:
self.information_type = {information_type}
diff --git a/lib/lp/services/webapp/authorization.py b/lib/lp/services/webapp/authorization.py
index 2ecefe3..558e3fe 100644
--- a/lib/lp/services/webapp/authorization.py
+++ b/lib/lp/services/webapp/authorization.py
@@ -13,10 +13,8 @@ __all__ = [
'precache_permission_for_objects',
]
-from collections import (
- deque,
- Iterable,
- )
+from collections import deque
+from collections.abc import Iterable
import warnings
import weakref
diff --git a/lib/lp/services/webapp/pgsession.py b/lib/lp/services/webapp/pgsession.py
index 51ef456..c3141b1 100644
--- a/lib/lp/services/webapp/pgsession.py
+++ b/lib/lp/services/webapp/pgsession.py
@@ -3,7 +3,7 @@
"""PostgreSQL server side session storage for Zope3."""
-from collections import MutableMapping
+from collections.abc import MutableMapping
from datetime import datetime
import hashlib
import io