launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24379
[Merge] ~cjwatson/launchpad:string-ascii into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:string-ascii into launchpad:master.
Commit message:
Use string.ascii_{letters,lowercase}
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/379799
Python 3 removed string.letters and string.lowercase.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:string-ascii into launchpad:master.
diff --git a/lib/lp/bugs/adapters/treelookup.py b/lib/lp/bugs/adapters/treelookup.py
index 45acab5..3c35c22 100644
--- a/lib/lp/bugs/adapters/treelookup.py
+++ b/lib/lp/bugs/adapters/treelookup.py
@@ -110,7 +110,7 @@ class LookupBranch:
else:
return format % self.result.describe(level)
- _describe_key_chars = set(string.letters + string.digits + '-_+=*')
+ _describe_key_chars = set(string.ascii_letters + string.digits + '-_+=*')
def _describe_key(self, key):
"""Return a pretty representation of a simple key.
diff --git a/lib/lp/services/testing/tests/test_customresult.py b/lib/lp/services/testing/tests/test_customresult.py
index 338ca2e..0baf596 100644
--- a/lib/lp/services/testing/tests/test_customresult.py
+++ b/lib/lp/services/testing/tests/test_customresult.py
@@ -41,7 +41,7 @@ class TestFilterTests(TestCase):
f.flush()
@staticmethod
- def make_suite(testnames=string.lowercase):
+ def make_suite(testnames=string.ascii_lowercase):
"""Make a suite containing `testnames` (default: 'a'..'z')."""
suite = unittest.TestSuite()
for testname in testnames:
@@ -55,8 +55,8 @@ class TestFilterTests(TestCase):
The first has 'a'..'m' and the second 'n'..'z'.
"""
return (
- TestFilterTests.make_suite(string.lowercase[:13]),
- TestFilterTests.make_suite(string.lowercase[13:]),
+ TestFilterTests.make_suite(string.ascii_lowercase[:13]),
+ TestFilterTests.make_suite(string.ascii_lowercase[13:]),
)
@staticmethod
diff --git a/lib/lp/snappy/model/snapstoreclient.py b/lib/lp/snappy/model/snapstoreclient.py
index 7d094aa..9d007de 100644
--- a/lib/lp/snappy/model/snapstoreclient.py
+++ b/lib/lp/snappy/model/snapstoreclient.py
@@ -83,7 +83,7 @@ class MacaroonAuth(requests.auth.AuthBase):
"""Attaches macaroon authentication to a given Request object."""
# The union of the base64 and URL-safe base64 alphabets.
- allowed_chars = set(string.digits + string.letters + "+/=-_")
+ allowed_chars = set(string.digits + string.ascii_letters + "+/=-_")
def __init__(self, root_macaroon_raw, unbound_discharge_macaroon_raw=None,
logger=log):