Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pytest-listener for 
openSUSE:Factory checked in at 2022-12-09 13:18:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-listener (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-listener.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-listener"

Fri Dec  9 13:18:26 2022 rev:4 rq:1041841 version:1.7.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-listener/python-pytest-listener.changes
    2021-05-16 23:44:24.965069198 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-listener.new.1835/python-pytest-listener.changes
  2022-12-09 13:19:51.451663511 +0100
@@ -1,0 +2,8 @@
+Thu Dec  8 11:30:00 UTC 2022 - [email protected]
+
+- do not require six
+- added patches
+  fix https://github.com/man-group/pytest-plugins/issues/209
+  + python-pytest-listener-no-six.patch
+
+-------------------------------------------------------------------

New:
----
  python-pytest-listener-no-six.patch

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

Other differences:
------------------
++++++ python-pytest-listener.spec ++++++
--- /var/tmp/diff_new_pack.nilKWm/_old  2022-12-09 13:19:51.851665635 +0100
+++ /var/tmp/diff_new_pack.nilKWm/_new  2022-12-09 13:19:51.859665678 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pytest-listener
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,16 +25,16 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/manahl/pytest-plugins
 Source:         
https://files.pythonhosted.org/packages/source/p/pytest-listener/pytest-listener-%{version}.tar.gz
+# https://github.com/man-group/pytest-plugins/issues/209
+Patch0:         python-pytest-listener-no-six.patch
 BuildRequires:  %{python_module setuptools-git}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-pytest-server-fixtures
-Requires:       python-six
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module pytest-server-fixtures}
-BuildRequires:  %{python_module six}
 # /SECTION
 %python_subpackages
 
@@ -42,7 +42,7 @@
 Simple JSON listener using TCP that listens for data and stores it in a queue 
for later retrieval.
 
 %prep
-%setup -q -n pytest-listener-%{version}
+%autosetup -p1 -n pytest-listener-%{version}
 # required to find the one file in the topdir
 sed -i "/packages=find_packages/ a \        py_modules=['pytest_listener']," 
setup.py
 

++++++ python-pytest-listener-no-six.patch ++++++
Index: pytest-listener-1.7.0/pytest_listener.py
===================================================================
--- pytest-listener-1.7.0.orig/pytest_listener.py
+++ pytest-listener-1.7.0/pytest_listener.py
@@ -3,14 +3,13 @@
 import collections
 import json
 import logging
+import pickle
 import socket
 import time
 from threading import Thread, Event
 from time import sleep
 
 import pytest
-from six import string_types
-from six.moves import cPickle
 from pytest_server_fixtures.base import get_ephemeral_port, get_ephemeral_host
 
 TERMINATOR = json.dumps(['STOP']).encode('utf-8')
@@ -59,7 +58,7 @@ class TimedMsg(object):
         return 'TimedMsg: %s (@ %s)' % (str(self.value), self.time)
 
     def pickled(self):
-        return cPickle.dumps(self)
+        return pickle.dumps(self)
 
 
 class Listener(Thread):
@@ -114,7 +113,7 @@ class Listener(Thread):
             return None, None
 
         try:
-            data = cPickle.loads(data)
+            data = pickle.loads(data)
         except:
             try:
                 data = data.decode('utf-8')
@@ -128,7 +127,7 @@ class Listener(Thread):
         if isinstance(data, TimedMsg):
             d = data.value
             t = data.time
-        elif isinstance(data, string_types):
+        elif isinstance(data, str):
             try:
                 d = json.loads(data)
             except:

Reply via email to