launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26374
[Merge] ~cjwatson/launchpad:py3-type-repr into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-type-repr into launchpad:master.
Commit message:
Handle different repr of class objects in Python 3
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/398383
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-type-repr into launchpad:master.
diff --git a/lib/lp/app/doc/launchpadview.txt b/lib/lp/app/doc/launchpadview.txt
index 35abcdb..f49c1ef 100644
--- a/lib/lp/app/doc/launchpadview.txt
+++ b/lib/lp/app/doc/launchpadview.txt
@@ -65,7 +65,7 @@ an IStructuredString implementation.
>>> view.error_message = six.ensure_str('A simple string.')
Traceback (most recent call last):
...
- ValueError: <type 'str'> is not a valid value for error_message,
+ ValueError: <... 'str'> is not a valid value for error_message,
only None and IStructuredString are allowed.
>>> print(view.error_message)
None
@@ -73,7 +73,7 @@ an IStructuredString implementation.
>>> view.info_message = six.ensure_str('A simple string.')
Traceback (most recent call last):
...
- ValueError: <type 'str'> is not a valid value for info_message,
+ ValueError: <... 'str'> is not a valid value for info_message,
only None and IStructuredString are allowed.
>>> print(view.info_message)
None
diff --git a/lib/lp/registry/doc/distribution.txt b/lib/lp/registry/doc/distribution.txt
index 5e52148..d9dcd94 100644
--- a/lib/lp/registry/doc/distribution.txt
+++ b/lib/lp/registry/doc/distribution.txt
@@ -188,7 +188,7 @@ a certain string through the magic of fti. For instance:
... print("%-17s rank:%s" % (
... distro_source_package_cache.name,
... type(rank)))
- mozilla-firefox rank:<type 'float'>
+ mozilla-firefox rank:<... 'float'>
The search also matches on exact package names which fti doesn't like,
and even on substrings:
@@ -202,11 +202,11 @@ and even on substrings:
... distro_source_package_cache.__class__.__name__,
... distro_source_package_cache.name,
... type(rank)))
- DistributionSourcePackageCache: alsa-utils rank:<type 'NoneType'>
- DistributionSourcePackageCache: commercialpackage rank:<type 'NoneType'>
- DistributionSourcePackageCache: foobar rank:<type 'NoneType'>
- DistributionSourcePackageCache: mozilla-firefox rank:<type 'NoneType'>
- DistributionSourcePackageCache: netapplet rank:<type 'NoneType'>
+ DistributionSourcePackageCache: alsa-utils rank:<... 'NoneType'>
+ DistributionSourcePackageCache: commercialpackage rank:<... 'NoneType'>
+ DistributionSourcePackageCache: foobar rank:<... 'NoneType'>
+ DistributionSourcePackageCache: mozilla-firefox rank:<... 'NoneType'>
+ DistributionSourcePackageCache: netapplet rank:<... 'NoneType'>
The searchSourcePackages() method just returns a decorated version
of the results from searchSourcePackageCaches():
diff --git a/lib/lp/services/database/doc/security-proxies.txt b/lib/lp/services/database/doc/security-proxies.txt
index c1c1c85..e9f78de 100644
--- a/lib/lp/services/database/doc/security-proxies.txt
+++ b/lib/lp/services/database/doc/security-proxies.txt
@@ -31,7 +31,7 @@ of its variants.
>>> proxied_policy = mark_proxied.membership_policy
>>> type(proxied_policy)
- <type 'zope.security._proxy._Proxy'>
+ <... 'zope.security._proxy._Proxy'>
# We don't want this test to fail when we add new person entries, so we
# compare it against a base number.
diff --git a/lib/lp/services/database/doc/storm-security-proxies.txt b/lib/lp/services/database/doc/storm-security-proxies.txt
index 1c42151..ddb4489 100644
--- a/lib/lp/services/database/doc/storm-security-proxies.txt
+++ b/lib/lp/services/database/doc/storm-security-proxies.txt
@@ -16,7 +16,7 @@ Get Mark's person and another person, wrapped in security proxies.
>>> mark = getUtility(IPersonSet).getByName('mark')
>>> spiv = getUtility(IPersonSet).getByName('spiv')
>>> print(type(mark))
- <type 'zope.security._proxy._Proxy'>
+ <... 'zope.security._proxy._Proxy'>
Get a bug task assigned to Mark. The bug task is also security-proxied.
@@ -24,7 +24,7 @@ Get a bug task assigned to Mark. The bug task is also security-proxied.
>>> print(bugtask.assignee.name)
mark
>>> print(type(mark))
- <type 'zope.security._proxy._Proxy'>
+ <... 'zope.security._proxy._Proxy'>
Assign a different person as the assignee, and check that it worked by reading
it back, despite the security proxies.
diff --git a/lib/lp/services/database/sqlbase.py b/lib/lp/services/database/sqlbase.py
index 57ba46d..65881f7 100644
--- a/lib/lp/services/database/sqlbase.py
+++ b/lib/lp/services/database/sqlbase.py
@@ -397,7 +397,7 @@ def quote_like(x):
>>> quote_like(1)
Traceback (most recent call last):
[...]
- TypeError: Not a string (<type 'int'>)
+ TypeError: Not a string (<... 'int'>)
"""
if not isinstance(x, six.string_types):
diff --git a/lib/lp/services/worlddata/doc/vocabularies.txt b/lib/lp/services/worlddata/doc/vocabularies.txt
index 6b91d7a..835a222 100644
--- a/lib/lp/services/worlddata/doc/vocabularies.txt
+++ b/lib/lp/services/worlddata/doc/vocabularies.txt
@@ -56,7 +56,7 @@ A language token/code may not be used with 'in' tests.
Traceback (most recent call last):
...
AssertionError: 'in LanguageVocabulary' requires ILanguage
- as left operand, got <type 'unicode'> instead.
+ as left operand, got <...> instead.
A LookupError is raised when a term is requested by token that does
not exist.
@@ -106,7 +106,7 @@ A language token/code may not be used with 'in' tests.
Traceback (most recent call last):
...
AssertionError: 'in TranslatableLanguageVocabulary' requires
- ILanguage as left operand, got <type 'unicode'> instead.
+ ILanguage as left operand, got <...> instead.
A LookupError is raised when a term is requested by token that does
not exist.