Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-emoji for openSUSE:Factory 
checked in at 2022-03-11 21:41:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-emoji (Old)
 and      /work/SRC/openSUSE:Factory/.python-emoji.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-emoji"

Fri Mar 11 21:41:43 2022 rev:14 rq:961107 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-emoji/python-emoji.changes        
2022-01-16 23:19:21.886380425 +0100
+++ /work/SRC/openSUSE:Factory/.python-emoji.new.25692/python-emoji.changes     
2022-03-11 21:42:06.474109364 +0100
@@ -1,0 +2,8 @@
+Fri Mar 11 10:28:54 UTC 2022 - Matthias Bach <[email protected]> - 1.7.0
+
+- Update to 1.7.0
+  * New functions emoji_list() and distinct_emoji_list() added.
+  * Added deprecation warnings for several functions and variables
+    that will be removed in version 2.0.0.
+
+-------------------------------------------------------------------

Old:
----
  emoji-1.6.3.tar.gz

New:
----
  emoji-1.7.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-emoji.spec ++++++
--- /var/tmp/diff_new_pack.wXmy19/_old  2022-03-11 21:42:06.870109668 +0100
+++ /var/tmp/diff_new_pack.wXmy19/_new  2022-03-11 21:42:06.874109671 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           python-emoji
-Version:        1.6.3
+Version:        1.7.0
 Release:        0
 Summary:        Emoji for Python
 License:        BSD-3-Clause

++++++ emoji-1.6.3.tar.gz -> emoji-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/CHANGES.md new/emoji-1.7.0/CHANGES.md
--- old/emoji-1.6.3/CHANGES.md  2022-01-15 14:31:07.000000000 +0100
+++ new/emoji-1.7.0/CHANGES.md  2022-03-08 18:46:36.000000000 +0100
@@ -1,6 +1,12 @@
 emoji
 =====
 
+1.7.0
+-----
+* Added `emoji_list()` and `distinct_emoji_list()`
+* Added deprecation warnings for several functions and variables that will be 
removed in version 2.0.0.
+  If you don't want to see these warnings, you can stay with 1.6.x. For 
example in pip/requirements.txt you can pin to 1.6.x with `emoji~=1.6.3`.
+
 1.6.3
 -----
 * Added support for counting unique emojis
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/PKG-INFO new/emoji-1.7.0/PKG-INFO
--- old/emoji-1.6.3/PKG-INFO    2022-01-15 14:38:34.890504100 +0100
+++ new/emoji-1.7.0/PKG-INFO    2022-03-08 18:48:16.149944000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: emoji
-Version: 1.6.3
+Version: 1.7.0
 Summary: Emoji for Python
 Home-page: https://github.com/carpedm20/emoji/
 Author: Taehoon Kim, Kevin Wurster and Tahir Jalilov
@@ -42,7 +42,7 @@
 
 The entire set of Emoji codes as defined by the `unicode consortium 
<http://www.unicode.org/Public/emoji/1.0/full-emoji-list.html>`__
 is supported in addition to a bunch of `aliases 
<http://www.emoji-cheat-sheet.com/>`__.  By
-default, only the official list is enabled but doing 
``emoji.emojize(use_aliases=True)`` enables
+default, only the official list is enabled but doing 
``emoji.emojize(language='alias')`` enables
 both the full list and aliases.
 
 .. code-block:: python
@@ -50,13 +50,13 @@
     >> import emoji
     >> print(emoji.emojize('Python is :thumbs_up:'))
     Python is ????
-    >> print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
+    >> print(emoji.emojize('Python is :thumbsup:', language='alias'))
     Python is ????
     >> print(emoji.demojize('Python is ????'))
     Python is :thumbs_up:
     >>> print(emoji.emojize("Python is fun :red_heart:"))
     Python is fun ???
-    >>> print(emoji.emojize("Python is fun :red_heart:",variant="emoji_type"))
+    >>> print(emoji.emojize("Python is fun :red_heart:", variant="emoji_type"))
     Python is fun ?????? #red heart, not black heart
     >>> print(emoji.is_emoji("????"))
     True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/README.rst new/emoji-1.7.0/README.rst
--- old/emoji-1.6.3/README.rst  2021-09-25 15:44:18.000000000 +0200
+++ new/emoji-1.7.0/README.rst  2022-03-08 18:46:36.000000000 +0100
@@ -9,7 +9,7 @@
 
 The entire set of Emoji codes as defined by the `unicode consortium 
<http://www.unicode.org/Public/emoji/1.0/full-emoji-list.html>`__
 is supported in addition to a bunch of `aliases 
<http://www.emoji-cheat-sheet.com/>`__.  By
-default, only the official list is enabled but doing 
``emoji.emojize(use_aliases=True)`` enables
+default, only the official list is enabled but doing 
``emoji.emojize(language='alias')`` enables
 both the full list and aliases.
 
 .. code-block:: python
@@ -17,13 +17,13 @@
     >> import emoji
     >> print(emoji.emojize('Python is :thumbs_up:'))
     Python is ????
-    >> print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
+    >> print(emoji.emojize('Python is :thumbsup:', language='alias'))
     Python is ????
     >> print(emoji.demojize('Python is ????'))
     Python is :thumbs_up:
     >>> print(emoji.emojize("Python is fun :red_heart:"))
     Python is fun ???
-    >>> print(emoji.emojize("Python is fun :red_heart:",variant="emoji_type"))
+    >>> print(emoji.emojize("Python is fun :red_heart:", variant="emoji_type"))
     Python is fun ?????? #red heart, not black heart
     >>> print(emoji.is_emoji("????"))
     True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/emoji/__init__.py 
new/emoji-1.7.0/emoji/__init__.py
--- old/emoji-1.6.3/emoji/__init__.py   2022-01-15 14:29:11.000000000 +0100
+++ new/emoji-1.7.0/emoji/__init__.py   2022-03-08 18:46:36.000000000 +0100
@@ -8,20 +8,30 @@
 emoji terminal output for Python.
 
     >>> import emoji
-    >>> print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
+    >>> print(emoji.emojize('Python is :thumbsup:', language='alias'))
     Python is ????
-    >> print(emoji.emojize('Python is :thumbs_up:'))
+    >>> print(emoji.emojize('Python is :thumbs_up:'))
     Python is ????
 """
 
 
+import sys
 from emoji.core import *
-from emoji.unicode_codes import *
+if sys.version_info[0] == 3 and sys.version_info[1] >= 7:
+    # On Python>3.7 the __getattr__() method (see below) will be used to show
+    # a deprecation warning for module variables like EMOJI_UNICODE_* and 
UNICODE_EMOJI_*
+    import emoji.unicode_codes
+else:
+    # On Python<3.7 __getattr__() is not supported
+    # Normal import of all module variables
+    from emoji.unicode_codes import *
+
 
 __all__ = [
     # emoji.core
     'emojize', 'demojize', 'get_emoji_regexp', 'emoji_count', 'emoji_lis',
-    'replace_emoji', 'version',
+    'distinct_emoji_lis', 'replace_emoji', 'version', 'is_emoji',
+    'emoji_list', 'distinct_emoji_list',
     # emoji.unicode_codes
     'EMOJI_UNICODE_ENGLISH', 'EMOJI_UNICODE_SPANISH', 
'EMOJI_UNICODE_PORTUGUESE',
     'EMOJI_UNICODE_ITALIAN', 'EMOJI_UNICODE_FRENCH', 'EMOJI_UNICODE_GERMAN',
@@ -30,7 +40,7 @@
     'EMOJI_ALIAS_UNICODE_ENGLISH', 'UNICODE_EMOJI_ALIAS_ENGLISH', 'EMOJI_DATA',
 ]
 
-__version__ = '1.6.3'
+__version__ = '1.7.0'
 __author__ = 'Taehoon Kim, Kevin Wurster and Tahir Jalilov'
 __email__ = '[email protected]'
 # and [email protected], [email protected]
@@ -65,3 +75,23 @@
 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 '''
+
+
+_DEPRECATED = [
+    'EMOJI_UNICODE_ENGLISH', 'EMOJI_UNICODE_SPANISH', 
'EMOJI_UNICODE_PORTUGUESE',
+    'EMOJI_UNICODE_ITALIAN', 'EMOJI_UNICODE_FRENCH', 'EMOJI_UNICODE_GERMAN',
+
+    'UNICODE_EMOJI_ENGLISH', 'UNICODE_EMOJI_SPANISH', 
'UNICODE_EMOJI_PORTUGUESE',
+    'UNICODE_EMOJI_ITALIAN', 'UNICODE_EMOJI_FRENCH', 'UNICODE_EMOJI_GERMAN',
+
+    'EMOJI_ALIAS_UNICODE_ENGLISH', 'UNICODE_EMOJI_ALIAS_ENGLISH',
+]
+
+
+def __getattr__(varname):
+    if varname in emoji.unicode_codes.__all__:
+        if varname in _DEPRECATED:
+            # Show a deprecation warning
+            emoji.core._deprecation_removed(varname, "Use 'emoji.EMOJI_DATA' 
instead.")
+        return getattr(emoji.unicode_codes, varname)
+    raise AttributeError("module 'emoji' has no attribute '%s'" % (varname, ))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/emoji/core.py 
new/emoji-1.7.0/emoji/core.py
--- old/emoji-1.6.3/emoji/core.py       2022-01-15 14:22:32.000000000 +0100
+++ new/emoji-1.7.0/emoji/core.py       2022-03-08 18:46:36.000000000 +0100
@@ -19,6 +19,7 @@
     'emojize', 'demojize', 'get_emoji_regexp',
     'emoji_lis', 'distinct_emoji_lis', 'emoji_count',
     'replace_emoji', 'is_emoji', 'version',
+    'emoji_list', 'distinct_emoji_list',
 ]
 
 PY2 = sys.version_info[0] == 2
@@ -28,9 +29,22 @@
 _DEFAULT_DELIMITER = ':'
 
 
+class _DeprecatedParameter:
+    pass
+
+
+def _deprecation(message, stacklevel=3):
+    message = (message + "\n") if message else ""
+    warnings.warn("%sTo hide this warning, pin/downgrade the package to 
'emoji~=1.6.3'" % (message, ), DeprecationWarning, stacklevel=stacklevel)
+
+
+def _deprecation_removed(name, message=""):
+    _deprecation("'emoji.%s' is deprecated and will be removed in version 
2.0.0. %s" % (name, message), 4)
+
+
 def emojize(
         string,
-        use_aliases=False,
+        use_aliases=_DeprecatedParameter,
         delimiters=(_DEFAULT_DELIMITER, _DEFAULT_DELIMITER),
         variant=None,
         language='en',
@@ -39,7 +53,7 @@
 ):
     """Replace emoji names in a string with unicode codes.
         >>> import emoji
-        >>> print(emoji.emojize("Python is fun :thumbsup:", use_aliases=True))
+        >>> print(emoji.emojize("Python is fun :thumbsup:", language='alias'))
         Python is fun ????
         >>> print(emoji.emojize("Python is fun :thumbs_up:"))
         Python is fun ????
@@ -51,7 +65,7 @@
         Python is fun ?????? #red heart, not black heart
 
     :param string: String contains emoji names.
-    :param use_aliases: (optional) Enable emoji aliases.  See 
``emoji.UNICODE_EMOJI_ALIAS``.
+    :param use_aliases: (optional) Deprecated. Use language='alias' instead
     :param delimiters: (optional) Use delimiters other than _DEFAULT_DELIMITER
     :param variant: (optional) Choose variation selector between "base"(None), 
VS-15 ("text_type") and VS-16 ("emoji_type")
     :param language: Choose language of emoji name: language code 'es', 'de', 
etc. or 'alias'
@@ -78,6 +92,11 @@
 
     """
 
+    if use_aliases is _DeprecatedParameter:
+        use_aliases = False
+    else:
+        _deprecation("The parameter 'use_aliases' in emoji.emojize() is 
deprecated and will be removed in version 2.0.0. Use language='alias' instead.")
+
     if use_aliases or language == 'alias':
         if language not in ('en', 'alias'):
             warnings.warn("use_aliases=True is only supported for 
language='en'. "
@@ -121,7 +140,7 @@
 
 def demojize(
         string,
-        use_aliases=False,
+        use_aliases=_DeprecatedParameter,
         delimiters=(_DEFAULT_DELIMITER, _DEFAULT_DELIMITER),
         language='en',
         version=None,
@@ -137,7 +156,7 @@
         Unicode is tricky __hushed_face__
 
     :param string: String contains unicode characters. MUST BE UNICODE.
-    :param use_aliases: (optional) Return emoji aliases.  See 
``emoji.UNICODE_EMOJI_ALIAS``.
+    :param use_aliases: (optional) Deprecated. Use language='alias' instead
     :param delimiters: (optional) User delimiters other than 
``_DEFAULT_DELIMITER``
     :param language: Choose language of emoji name: language code 'es', 'de', 
etc. or 'alias'
         to use English aliases
@@ -162,13 +181,17 @@
 
     """
 
+    if use_aliases is _DeprecatedParameter:
+        use_aliases = False
+    else:
+        _deprecation("The parameter 'use_aliases' in emoji.demojize() is 
deprecated and will be removed in version 2.0.0. Use language='alias' instead.")
+
     if language == 'alias':
         language = 'en'
         use_aliases = True
     elif use_aliases and language != 'en':
-            warnings.warn("use_aliases=True is only supported for 
language='en'. "
-                          "It is recommended to use demojize(string, 
language='alias') instead", stacklevel=2)
-            language = 'en'
+        warnings.warn("use_aliases=True is only supported for language='en'. 
It is recommended to use demojize(string, language='alias') instead", 
stacklevel=2)
+        language = 'en'
 
     tree = _get_search_tree()
     result = []
@@ -218,7 +241,7 @@
     return "".join(result)
 
 
-def replace_emoji(string, replace='', language=None, version=-1):
+def replace_emoji(string, replace='', language=_DeprecatedParameter, 
version=-1):
     """Replace unicode emoji in a customizable string.
 
     :param string: String contains unicode characters. MUST BE UNICODE.
@@ -228,9 +251,12 @@
         replace(str, dict) -> str
     :param version: (optional) Max version. If set to an Emoji Version,
         only emoji above this version will be replaced.
-    :param language: (optional) Parameter is no longer used
+    :param language: (optional) Deprecated and has no effect
     """
 
+    if language is not _DeprecatedParameter:
+        _deprecation("The parameter 'language' in emoji.replace_emoji() is 
deprecated and will be removed in version 2.0.0.")
+
     if version > -1:
         def f(emj, emj_data):
             if emj_data['E'] <= version:
@@ -239,9 +265,9 @@
                 return replace(emj, emj_data)
             return str(replace)
 
-        return demojize(string, use_aliases=False, language='en', version=-1, 
handle_version=f)
+        return demojize(string, language='en', version=-1, handle_version=f)
     else:
-        return demojize(string, use_aliases=False, language='en', version=-1, 
handle_version=replace)
+        return demojize(string, language='en', version=-1, 
handle_version=replace)
 
 
 def get_emoji_regexp(language=None):
@@ -251,6 +277,8 @@
     :param language: (optional) Parameter is no longer used
     """
 
+    _deprecation_removed("get_emoji_regexp()", "If you want to remove emoji 
from a string, consider the method emoji.replace_emoji(str, replace='').")
+
     global _EMOJI_REGEXP
     # Build emoji regexp once
     if _EMOJI_REGEXP is None:
@@ -262,13 +290,16 @@
     return _EMOJI_REGEXP
 
 
-def emoji_lis(string, language=None):
+def emoji_lis(string, language=_DeprecatedParameter):
     """Returns the location and emoji in list of dict format.
         >>> emoji.emoji_lis("Hi, I am fine. ????")
-        >>> [{'location': 15, 'emoji': '????'}]
+        [{'location': 15, 'emoji': '????'}]
 
-    :param language: (optional) Parameter is no longer used
+    :param language: (optional) Deprecated and has no effect
     """
+
+    _deprecation_removed("emoji_lis()", "Use method emoji.emoji_list(str) 
instead.")
+
     _entities = []
 
     def f(emj, emj_data):
@@ -277,22 +308,56 @@
             'emoji': emj,
         })
 
-    demojize(string, use_aliases=False, language='en',
+    demojize(string, language='en',
+             version=-1, handle_version=f)
+    return _entities
+
+
+def emoji_list(string):
+    """Returns the location and emoji in list of dict format.
+        >>> emoji.emoji_list("Hi, I am fine. ????")
+        [{'match_start': 15, 'match_end': 16, 'emoji': '????'}]y
+
+    """
+
+    _entities = []
+
+    def f(emj, emj_data):
+        _entities.append({
+            'match_start': emj_data['match_start'],
+            'match_end': emj_data['match_end'],
+            'emoji': emj,
+        })
+
+    demojize(string, language='en',
              version=-1, handle_version=f)
     return _entities
 
 
-def distinct_emoji_lis(string, language=None):
+def distinct_emoji_lis(string, language=_DeprecatedParameter):
     """Returns distinct list of emojis from the string.
 
-    :param language: (optional) Parameter is no longer used
+    :param language: (optional) Deprecated and has no effect
     """
+
+    _deprecation_removed("distinct_emoji_lis()", "Use method 
emoji.distinct_emoji_list(str) instead.")
+
     distinct_list = list(
         {e['emoji'] for e in emoji_lis(string)}
     )
     return distinct_list
 
 
+def distinct_emoji_list(string):
+    """Returns distinct list of emojis from the string.
+    """
+
+    distinct_list = list(
+        {e['emoji'] for e in emoji_list(string)}
+    )
+    return distinct_list
+
+
 def emoji_count(string, unique=False):
     """Returns the count of emojis in a string.
 
@@ -338,7 +403,7 @@
     replace_emoji(string, replace=f, version=-1)
     if version:
         return version[0]
-    emojize(string, use_aliases=True, version=-1, handle_version=f)
+    emojize(string, language='alias', version=-1, handle_version=f)
     if version:
         return version[0]
     for lang_code in unicode_codes.EMOJI_UNICODE:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/emoji.egg-info/PKG-INFO 
new/emoji-1.7.0/emoji.egg-info/PKG-INFO
--- old/emoji-1.6.3/emoji.egg-info/PKG-INFO     2022-01-15 14:38:34.000000000 
+0100
+++ new/emoji-1.7.0/emoji.egg-info/PKG-INFO     2022-03-08 18:48:16.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: emoji
-Version: 1.6.3
+Version: 1.7.0
 Summary: Emoji for Python
 Home-page: https://github.com/carpedm20/emoji/
 Author: Taehoon Kim, Kevin Wurster and Tahir Jalilov
@@ -42,7 +42,7 @@
 
 The entire set of Emoji codes as defined by the `unicode consortium 
<http://www.unicode.org/Public/emoji/1.0/full-emoji-list.html>`__
 is supported in addition to a bunch of `aliases 
<http://www.emoji-cheat-sheet.com/>`__.  By
-default, only the official list is enabled but doing 
``emoji.emojize(use_aliases=True)`` enables
+default, only the official list is enabled but doing 
``emoji.emojize(language='alias')`` enables
 both the full list and aliases.
 
 .. code-block:: python
@@ -50,13 +50,13 @@
     >> import emoji
     >> print(emoji.emojize('Python is :thumbs_up:'))
     Python is ????
-    >> print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
+    >> print(emoji.emojize('Python is :thumbsup:', language='alias'))
     Python is ????
     >> print(emoji.demojize('Python is ????'))
     Python is :thumbs_up:
     >>> print(emoji.emojize("Python is fun :red_heart:"))
     Python is fun ???
-    >>> print(emoji.emojize("Python is fun :red_heart:",variant="emoji_type"))
+    >>> print(emoji.emojize("Python is fun :red_heart:", variant="emoji_type"))
     Python is fun ?????? #red heart, not black heart
     >>> print(emoji.is_emoji("????"))
     True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/emoji.egg-info/SOURCES.txt 
new/emoji-1.7.0/emoji.egg-info/SOURCES.txt
--- old/emoji-1.6.3/emoji.egg-info/SOURCES.txt  2022-01-15 14:38:34.000000000 
+0100
+++ new/emoji-1.7.0/emoji.egg-info/SOURCES.txt  2022-03-08 18:48:16.000000000 
+0100
@@ -15,6 +15,7 @@
 emoji/unicode_codes/data_dict.py
 tests/__init__.py
 tests/test_core.py
+tests/test_deprecation.py
 tests/test_dict.py
 tests/test_unicode_codes.py
 tests/test_versions.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/tests/test_core.py 
new/emoji-1.7.0/tests/test_core.py
--- old/emoji-1.6.3/tests/test_core.py  2022-01-15 14:22:32.000000000 +0100
+++ new/emoji-1.7.0/tests/test_core.py  2022-03-08 18:46:36.000000000 +0100
@@ -252,6 +252,23 @@
     assert emoji.distinct_emoji_lis('Hi, I am fine. ????????????????') == 
['????']
 
 
+def test_emoji_list():
+    assert emoji.emoji_list('Hi, I am ???? test')[0]['match_start'] == 9
+    assert emoji.emoji_list('Hi') == []
+    if len('Hello ????????????') < 10:  # skip these tests on python with 
UCS-2 as the string length/positions are different
+        assert emoji.emoji_list('Hi, I am fine. ????') == [
+            {'match_start': 15, 'match_end': 16, 'emoji': '????'}]
+        assert emoji.emoji_list('Hello ????????????') == [
+            {'emoji': '????????', 'match_start': 6, 'match_end': 8}, {'emoji': 
'????', 'match_start': 8, 'match_end': 9}]
+
+
+def test_distinct_emoji_list():
+    assert emoji.distinct_emoji_list('Hi, I am fine. ????') == ['????']
+    assert emoji.distinct_emoji_list('Hi') == []
+    assert set(emoji.distinct_emoji_list('Hello ????????????')) == 
{'????????', '????'}
+    assert emoji.distinct_emoji_list('Hi, I am fine. ????????????????') == 
['????']
+
+
 def test_emoji_count():
     assert emoji.emoji_count('Hi, I am fine. ????') == 1
     assert emoji.emoji_count('Hi') == 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-1.6.3/tests/test_deprecation.py 
new/emoji-1.7.0/tests/test_deprecation.py
--- old/emoji-1.6.3/tests/test_deprecation.py   1970-01-01 01:00:00.000000000 
+0100
+++ new/emoji-1.7.0/tests/test_deprecation.py   2022-03-08 18:46:36.000000000 
+0100
@@ -0,0 +1,77 @@
+# -*- coding: UTF-8 -*-
+
+
+"""Unittests for deprecation warnings"""
+
+import sys
+import emoji
+import pytest
+
+
+def test_deprecation_get_emoji_regexp():
+    with pytest.warns(DeprecationWarning):
+        emoji.get_emoji_regexp()
+
+
[email protected]("error")
+def test_deprecation_replace_emoji_language():
+    with pytest.warns(DeprecationWarning):
+        emoji.replace_emoji("test", replace="", language="en")
+
+    emoji.replace_emoji("test", replace="")
+
+
[email protected]("error")
+def test_deprecation_emoji_lis():
+    with pytest.warns(DeprecationWarning):
+        emoji.emoji_lis("test")
+
+    emoji.emoji_list("test")
+
+
[email protected]("error")
+def test_deprecation_distinct_emoji_lis():
+    with pytest.warns(DeprecationWarning):
+        emoji.distinct_emoji_lis("test")
+
+    emoji.distinct_emoji_list("test")
+
+
[email protected]("error")
+def test_deprecation_emojize_use_aliases():
+    with pytest.warns(DeprecationWarning) :
+        emoji.emojize("test", True)
+    with pytest.warns(DeprecationWarning) :
+        emoji.emojize("test", use_aliases=True)
+    with pytest.warns(DeprecationWarning):
+        emoji.emojize("test", use_aliases=False)
+    with pytest.warns(DeprecationWarning):
+        emoji.emojize("test", use_aliases=None)
+
+    emoji.emojize("test")
+    emoji.emojize("test", language="alias")
+
+
[email protected]("error")
+def test_deprecation_demojize_use_aliases():
+    with pytest.warns(DeprecationWarning):
+        emoji.demojize("test", True)
+    with pytest.warns(DeprecationWarning):
+        emoji.demojize("test", use_aliases=True)
+    with pytest.warns(DeprecationWarning):
+        emoji.demojize("test", use_aliases=False)
+    with pytest.warns(DeprecationWarning):
+        emoji.demojize("test", use_aliases=None)
+
+    emoji.demojize("test")
+    emoji.demojize("test", language="alias")
+
+
[email protected]("error")
+def test_deprecation_module_variables():
+    if sys.version_info[0] == 3 and sys.version_info[1] >= 7:
+        with pytest.warns(DeprecationWarning):
+            for _ in emoji.EMOJI_UNICODE_ENGLISH:
+             pass
+    for _ in emoji.EMOJI_DATA:
+        pass

Reply via email to