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 2023-06-28 21:33:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-emoji (Old)
 and      /work/SRC/openSUSE:Factory/.python-emoji.new.13546 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-emoji"

Wed Jun 28 21:33:44 2023 rev:21 rq:1095795 version:2.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-emoji/python-emoji.changes        
2023-06-19 22:50:49.825656326 +0200
+++ /work/SRC/openSUSE:Factory/.python-emoji.new.13546/python-emoji.changes     
2023-06-28 21:33:55.126058089 +0200
@@ -1,0 +2,9 @@
+Wed Jun 28 09:38:08 UTC 2023 - Matthias Bach <ma...@marix.org> - 2.6.0
+
+- Update to 2.6.0
+  * New function purely_emoji() | Check if a string contains only
+    emojis
+- Switch package to modern Python package build instead of legacy
+  setup.py invocation.
+
+-------------------------------------------------------------------

Old:
----
  emoji-2.5.1.tar.gz

New:
----
  emoji-2.6.0.tar.gz

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

Other differences:
------------------
++++++ python-emoji.spec ++++++
--- /var/tmp/diff_new_pack.nHv2u8/_old  2023-06-28 21:33:55.798062056 +0200
+++ /var/tmp/diff_new_pack.nHv2u8/_new  2023-06-28 21:33:55.810062127 +0200
@@ -18,15 +18,17 @@
 
 
 Name:           python-emoji
-Version:        2.5.1
+Version:        2.6.0
 Release:        0
 Summary:        Emoji for Python
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
 URL:            https://github.com/carpedm20/emoji/
 Source:         
https://files.pythonhosted.org/packages/source/e/emoji/emoji-%{version}.tar.gz
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch
@@ -59,10 +61,10 @@
 %autosetup -n emoji-%{version} -p1
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}/emoji*
 
 %check

++++++ emoji-2.5.1.tar.gz -> emoji-2.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-2.5.1/CHANGES.md new/emoji-2.6.0/CHANGES.md
--- old/emoji-2.5.1/CHANGES.md  2023-06-15 19:36:32.000000000 +0200
+++ new/emoji-2.6.0/CHANGES.md  2023-06-28 10:51:40.000000000 +0200
@@ -1,6 +1,10 @@
 emoji
 =====
 
+v2.6.0 (2023-06-28)
+-----
+* Added new function purely_emoji() | Check if a string contains only emojis
+
 v2.5.1 (2023-06-15)
 -----
 * Fix Malformed zero width joiner (\u200d) causes IndexError
@@ -24,7 +28,7 @@
 v2.2.0 (2022-10-31)
 -----
 * Added support for Unicode Version 15
-* Added more translations for existing languages: (similar to Turkish Language)
+* Added more translations for existing languages: (similar to the Turkish 
Language)
 * Added Readme on how to add a language
 * Fix 2.0.0: sphinx warnings reference target not found
 
@@ -43,7 +47,7 @@
 * Removed distinct_emoji_lis
 * Made the list of languages public: emoji.LANGUAGES = 
['en','es','pt','it','fr','de']
 * Updated translations to release-41 (no changes compared to release-40)
-* Generate a documentation for the public functions from the docstrings with 
Sphinx
+* Generate documentation for the public functions from the docstrings with 
Sphinx
 * Added some more examples to the README: e.g. how to replace/remove emojis
 * Total count of emojis:  4702
 
@@ -51,7 +55,7 @@
 -----
 * 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`.
+  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`.
 
 v1.6.3 (2022-01-15)
 -----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-2.5.1/PKG-INFO new/emoji-2.6.0/PKG-INFO
--- old/emoji-2.5.1/PKG-INFO    2023-06-15 19:40:47.604136200 +0200
+++ new/emoji-2.6.0/PKG-INFO    2023-06-28 11:02:12.315989300 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: emoji
-Version: 2.5.1
+Version: 2.6.0
 Summary: Emoji for Python
 Home-page: https://github.com/carpedm20/emoji/
 Author: Taehoon Kim, Kevin Wurster
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-2.5.1/emoji/__init__.py 
new/emoji-2.6.0/emoji/__init__.py
--- old/emoji-2.5.1/emoji/__init__.py   2023-06-15 19:36:32.000000000 +0200
+++ new/emoji-2.6.0/emoji/__init__.py   2023-06-28 10:51:40.000000000 +0200
@@ -19,13 +19,13 @@
     # emoji.core
     'emojize', 'demojize', 'analyze', 'config',
     'emoji_list', 'distinct_emoji_list', 'emoji_count',
-    'replace_emoji', 'is_emoji', 'version',
+    'replace_emoji', 'is_emoji', 'purely_emoji', 'version',
     'Token', 'EmojiMatch', 'EmojiMatchZWJ', 'EmojiMatchZWJNonRGI',
     # emoji.unicode_codes
     'EMOJI_DATA', 'STATUS', 'LANGUAGES',
 ]
 
-__version__ = '2.5.1'
+__version__ = '2.6.0'
 __author__ = 'Taehoon Kim, Kevin Wurster'
 __email__ = 'carped...@gmail.com'
 # and wurst...@gmail.com, tahir.jali...@gmail.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-2.5.1/emoji/core.py 
new/emoji-2.6.0/emoji/core.py
--- old/emoji-2.5.1/emoji/core.py       2023-06-08 16:53:57.000000000 +0200
+++ new/emoji-2.6.0/emoji/core.py       2023-06-28 10:51:40.000000000 +0200
@@ -16,7 +16,7 @@
 __all__ = [
     'emojize', 'demojize', 'analyze', 'config',
     'emoji_list', 'distinct_emoji_list', 'emoji_count',
-    'replace_emoji', 'is_emoji', 'version',
+    'replace_emoji', 'is_emoji', 'purely_emoji', 'version',
     'Token', 'EmojiMatch', 'EmojiMatchZWJ', 'EmojiMatchZWJNonRGI',
 ]
 
@@ -314,12 +314,21 @@
 
 def is_emoji(string):
     """
-    Returns True if the string is an emoji, and it is "recommended for
+    Returns True if the string is a single emoji, and it is "recommended for
     general interchange" by Unicode.org.
     """
     return string in unicode_codes.EMOJI_DATA
 
 
+def purely_emoji(string: str) -> bool:
+    """
+    Returns True if the string contains only emojis.
+    This might not imply that `is_emoji` for all the characters, for example,
+    if the string contains variation selectors.
+    """
+    return all(isinstance(m.value, EmojiMatch) for m in analyze(string, 
non_emoji=True))
+
+
 def version(string):
     """
     Returns the Emoji Version of the emoji.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-2.5.1/emoji.egg-info/PKG-INFO 
new/emoji-2.6.0/emoji.egg-info/PKG-INFO
--- old/emoji-2.5.1/emoji.egg-info/PKG-INFO     2023-06-15 19:40:47.000000000 
+0200
+++ new/emoji-2.6.0/emoji.egg-info/PKG-INFO     2023-06-28 11:02:12.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: emoji
-Version: 2.5.1
+Version: 2.6.0
 Summary: Emoji for Python
 Home-page: https://github.com/carpedm20/emoji/
 Author: Taehoon Kim, Kevin Wurster
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/emoji-2.5.1/tests/test_core.py 
new/emoji-2.6.0/tests/test_core.py
--- old/emoji-2.5.1/tests/test_core.py  2023-06-08 16:53:57.000000000 +0200
+++ new/emoji-2.6.0/tests/test_core.py  2023-06-28 10:51:40.000000000 +0200
@@ -358,6 +358,8 @@
     assert emoji.is_emoji('😁')
     assert not emoji.is_emoji('H')
     assert emoji.is_emoji('🇫🇷')
+    assert not emoji.is_emoji('🇫🇷🇫🇷')
+    assert not emoji.is_emoji('\ufe0f')  # variation selector
 
 
 def test_long_emoji():
@@ -512,3 +514,19 @@
     combined = emoji.emojize(text % ":woman_dark_skin_tone_white_hair:")
     seperated = emoji.emojize(text % 
":woman::dark_skin_tone:\u200d:white_hair:")
     assert combined == seperated,  "%r != %r" % (ascii(combined), 
ascii(seperated))
+
+
+purely_emoji_testdata = [
+    ('\U0001f600\ufe0f', True),
+    ('\U0001f600', True),
+    ('\U0001f600\U0001f600\U0001f600', True),
+    ('abc', False),
+    ('abc\U0001f600', False),
+    ('\U0001f600c', False),
+    ('\u270a\U0001f3fe', True),
+]
+
+
+@pytest.mark.parametrize("string,expected", purely_emoji_testdata)
+def test_purely_emoji(string: str, expected: bool):
+    assert emoji.purely_emoji(string) == expected

Reply via email to