Merge ~cjwatson/launchpad:py3-py2-unicode-compatible into launchpad:master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 3639ded8f4f521e419c4dcd1e045a7fb92460aa7 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:py3-py2-unicode-compatible |
Merge into: | launchpad:master |
Diff against target: |
248 lines (+37/-17) 9 files modified
lib/lp/registry/interfaces/mailinglist.py (+3/-4) lib/lp/registry/interfaces/sourcepackagename.py (+6/-1) lib/lp/registry/model/sourcepackagename.py (+3/-1) lib/lp/services/messages/model/message.py (+3/-1) lib/lp/services/webapp/publisher.py (+5/-3) lib/lp/services/webhooks/payload.py (+5/-3) lib/lp/soyuz/interfaces/binarypackagename.py (+6/-1) lib/lp/soyuz/model/binarypackagename.py (+3/-1) lib/lp/translations/utilities/gettext_po_parser.py (+3/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thiago F. Pappacena (community) | Approve | ||
Review via email: mp+387710@code.launchpad.net |
Commit message
Use six.python_
Description of the change
Where appropriate, this makes it easier to define __str__ and __unicode__ for Python 2 and only __str__ for Python 3.
In some places we define __unicode__ only to deliberately mark it as not implemented. However, those are related to URLs, where it seems to make sense to define whatever the native __str__ is on each version, so mark the __unicode__ definition as Python-2-only.
To post a comment you must log in.
LGTM