commit 6d9b2a675d515c370a60730d6d9c91d32decd038 Author: Damian Johnson atagar@torproject.org Date: Fri Jan 17 12:06:25 2020 -0800
Replace string.letters with string.ascii_letters
Python 3 renamed that constant. This fixes...
Traceback (most recent call last): File "/home/atagar/Desktop/tor/bridgedb/bridgedb/test/test_parse_nickname.py", line 37, in test_parse_nickname_isValidRouterNickname_invalid_symbols self.assertFalse(isValidRouterNickname(name)) File "/home/atagar/Desktop/tor/bridgedb/bridgedb/parse/nickname.py", line 41, in isValidRouterNickname ALPHANUMERIC = string.letters + string.digits builtins.AttributeError: module 'string' has no attribute 'letters'
Test results changed as follows...
before: FAILED (skips=114, failures=14, errors=198, successes=655) after: FAILED (skips=114, failures=13, errors=191, successes=663) --- bridgedb/parse/nickname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bridgedb/parse/nickname.py b/bridgedb/parse/nickname.py index dcc328b..54bcf86 100644 --- a/bridgedb/parse/nickname.py +++ b/bridgedb/parse/nickname.py @@ -38,7 +38,7 @@ def isValidRouterNickname(nickname): :rtype: bool :returns: ``True`` if the nickname is valid, ``False`` otherwise. """ - ALPHANUMERIC = string.letters + string.digits + ALPHANUMERIC = string.ascii_letters + string.digits
try: if not (1 <= len(nickname) <= 19):
tor-commits@lists.torproject.org