← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:PyYAML-5.4.1 into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:PyYAML-5.4.1 into launchpad:master.

Commit message:
Upgrade to PyYAML 5.4.1

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1920751 in Launchpad itself: "snapcraft.yaml and emojis"
  https://bugs.launchpad.net/launchpad/+bug/1920751

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/399977

This adds support for emoji in snapcraft.yaml files.

Dependencies MP: https://code.launchpad.net/~cjwatson/lp-source-dependencies/+git/lp-source-dependencies/+merge/399976
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:PyYAML-5.4.1 into launchpad:master.
diff --git a/lib/lp/snappy/tests/test_snap.py b/lib/lp/snappy/tests/test_snap.py
index 0c6f68e..c1816ad 100644
--- a/lib/lp/snappy/tests/test_snap.py
+++ b/lib/lp/snappy/tests/test_snap.py
@@ -2213,6 +2213,13 @@ class TestSnapSet(TestCaseWithFactory):
                 CannotFetchSnapcraftYaml,
                 getUtility(ISnapSet).getSnapcraftYaml, snap)
 
+    def test_getSnapcraftYaml_emoji(self):
+        self.useFixture(GitHostingFixture(blob="summary: \U0001f680\n"))
+        [git_ref] = self.factory.makeGitRefs()
+        self.assertEqual(
+            {"summary": "\U0001f680"},
+            getUtility(ISnapSet).getSnapcraftYaml(git_ref))
+
     def test__findStaleSnaps(self):
         # Stale; not built automatically.
         self.factory.makeSnap(is_stale=True)
diff --git a/requirements/launchpad.txt b/requirements/launchpad.txt
index 75a3d7d..6ae9f65 100644
--- a/requirements/launchpad.txt
+++ b/requirements/launchpad.txt
@@ -129,7 +129,7 @@ python-memcached==1.58
 # lp1 Fix normalization of non-ASCII query strings on Python 2.
 python-openid2==3.2+lp1
 python-swiftclient==3.8.1
-PyYAML==3.10
+PyYAML==5.4.1
 rabbitfixture==0.5.0
 requests-file==1.4.3
 requests-toolbelt==0.9.1