Merge ~cjwatson/launchpad:string-ascii into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 03432a5c554b33c238cd8275afe84c4484cdc29b
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:string-ascii
Merge into: launchpad:master
Diff against target: 50 lines (+5/-5)
3 files modified
lib/lp/bugs/adapters/treelookup.py (+1/-1)
lib/lp/services/testing/tests/test_customresult.py (+3/-3)
lib/lp/snappy/model/snapstoreclient.py (+1/-1)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Review via email: mp+379799@code.launchpad.net

Commit message

Use string.ascii_{letters,lowercase}

Description of the change

Python 3 removed string.letters and string.lowercase.

To post a comment you must log in.
Revision history for this message
Ioana Lasc (ilasc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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:
110 else:110 else:
111 return format % self.result.describe(level)111 return format % self.result.describe(level)
112112
113 _describe_key_chars = set(string.letters + string.digits + '-_+=*')113 _describe_key_chars = set(string.ascii_letters + string.digits + '-_+=*')
114114
115 def _describe_key(self, key):115 def _describe_key(self, key):
116 """Return a pretty representation of a simple key.116 """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):
41 f.flush()41 f.flush()
4242
43 @staticmethod43 @staticmethod
44 def make_suite(testnames=string.lowercase):44 def make_suite(testnames=string.ascii_lowercase):
45 """Make a suite containing `testnames` (default: 'a'..'z')."""45 """Make a suite containing `testnames` (default: 'a'..'z')."""
46 suite = unittest.TestSuite()46 suite = unittest.TestSuite()
47 for testname in testnames:47 for testname in testnames:
@@ -55,8 +55,8 @@ class TestFilterTests(TestCase):
55 The first has 'a'..'m' and the second 'n'..'z'.55 The first has 'a'..'m' and the second 'n'..'z'.
56 """56 """
57 return (57 return (
58 TestFilterTests.make_suite(string.lowercase[:13]),58 TestFilterTests.make_suite(string.ascii_lowercase[:13]),
59 TestFilterTests.make_suite(string.lowercase[13:]),59 TestFilterTests.make_suite(string.ascii_lowercase[13:]),
60 )60 )
6161
62 @staticmethod62 @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):
83 """Attaches macaroon authentication to a given Request object."""83 """Attaches macaroon authentication to a given Request object."""
8484
85 # The union of the base64 and URL-safe base64 alphabets.85 # The union of the base64 and URL-safe base64 alphabets.
86 allowed_chars = set(string.digits + string.letters + "+/=-_")86 allowed_chars = set(string.digits + string.ascii_letters + "+/=-_")
8787
88 def __init__(self, root_macaroon_raw, unbound_discharge_macaroon_raw=None,88 def __init__(self, root_macaroon_raw, unbound_discharge_macaroon_raw=None,
89 logger=log):89 logger=log):

Subscribers

People subscribed via source and target branches

to status/vote changes: