Change the following to replace Python 2 code with Python 3:

1) Replace the deprecated unit test method.
2) Wraps filter usage in a list call.
3) Converts the old metaclass syntax to new.
4) Use range instead of xrange method.
5) Change Unicode to str.
6) Several other transformations.
7) Fixed change password test cases.
8) Use simplejson instead of plain JSON.
This commit is contained in:
Cyril Jouve
2020-08-31 16:45:31 +05:30
committed by Akshay Joshi
parent 11d5613866
commit 5a253f9053
385 changed files with 938 additions and 944 deletions

View File

@@ -49,7 +49,7 @@ def get_release_tag(current_url=PG_CURRENT_VERSION_URL,
version_regex=PG_CURRENT_VERSION_REGEX):
resp_text = get_file_from_url(current_url)
version = apply_regex(resp_text, version_regex)
if type(version) == list:
if isinstance(version, list):
version = version[0]
return "REL_" + version.replace(".", "_")