launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25951
[Merge] ~cjwatson/launchpad:py3-language-pack-bytesio into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-language-pack-bytesio into launchpad:master.
Commit message:
Port language-pack.txt to io.BytesIO
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/395905
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-language-pack-bytesio into launchpad:master.
diff --git a/lib/lp/translations/doc/language-pack.txt b/lib/lp/translations/doc/language-pack.txt
index 43e089c..074e1fb 100644
--- a/lib/lp/translations/doc/language-pack.txt
+++ b/lib/lp/translations/doc/language-pack.txt
@@ -9,8 +9,8 @@ DELTA, there is also a reference to the related FULL LanguagePack.
A DELTA language pack is an export that has all translation resources that
were updated since the export date for the associate FULL export.
+ >>> import io
>>> from zope.component import getUtility
- >>> from cStringIO import StringIO
>>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.translations.enums import LanguagePackType
>>> from lp.translations.interfaces.languagepack import (
@@ -22,11 +22,11 @@ were updated since the export date for the associate FULL export.
Let's upload a dummy file to librarian.
>>> uploader = getUtility(ILibrarianClient)
- >>> content = 'foo'
+ >>> content = b'foo'
>>> file_alias = uploader.addFile(
... name='foo.tar.gz',
... size=len(content),
- ... file=StringIO(content),
+ ... file=io.BytesIO(content),
... contentType='application/x-gtar')
We need too a distribution series to link the language pack with it.