You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/11/02 21:49:28 UTC

[allura] 02/24: [#8474] Upgrade emoji 1.7.0 -> 2.1.0

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit ebde51da14327e1c198f74c14f1ea73943b7cd6d
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Wed Oct 26 21:06:11 2022 +0000

    [#8474] Upgrade emoji 1.7.0 -> 2.1.0
---
 Allura/allura/lib/helpers.py             | 2 +-
 Allura/allura/lib/markdown_extensions.py | 2 +-
 Allura/allura/lib/utils.py               | 2 +-
 requirements.txt                         | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 2efce7911..da5f3e954 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -1288,7 +1288,7 @@ def hide_private_info(message):
 
 def emojize(text):
     """Coverts emoji codes to unicode emojis"""
-    return emoji.emojize(text, use_aliases=True)
+    return emoji.emojize(text, language="alias")
 
 
 def get_current_reaction(react_users_dict):
diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index b929a6b7a..c1d089d77 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -311,7 +311,7 @@ class EmojiInlinePattern(markdown.inlinepatterns.Pattern):
 
     def handleMatch(self, m):
         emoji_code = m.group(2)
-        return emoji.emojize(emoji_code, use_aliases=True)
+        return emoji.emojize(emoji_code, language="alias")
 
 
 class UserMentionExtension(markdown.Extension):
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index b6e7ee0de..41b2c979f 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -761,7 +761,7 @@ def get_reactions_json():
     """ Returns global reactions json """
     j = OrderedDict()
     for em in get_reaction_emoji_list():
-        j[em] = emoji.emojize(em, use_aliases=True)
+        j[em] = emoji.emojize(em, language='alias')
     return json.dumps(j)
 
 
diff --git a/requirements.txt b/requirements.txt
index 0c31f4d39..7d8f3e011 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -38,7 +38,7 @@ docutils==0.18.1
     # via pypeline
 easywidgets==0.4.1
     # via -r requirements.in
-emoji==1.7.0
+emoji==2.1.0
     # via -r requirements.in
 feedgenerator==2.0.0
     # via -r requirements.in