Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyshark for openSUSE:Factory 
checked in at 2026-05-28 17:27:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyshark (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyshark.new.1937 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyshark"

Thu May 28 17:27:44 2026 rev:6 rq:1355502 version:0.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyshark/python-pyshark.changes    
2026-02-02 14:57:51.145259408 +0100
+++ /work/SRC/openSUSE:Factory/.python-pyshark.new.1937/python-pyshark.changes  
2026-05-28 17:29:03.432979363 +0200
@@ -1,0 +2,8 @@
+Thu May 28 02:12:50 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch support-python-314.patch:
+  * Support Python 3.14 asyncio loop changes. (bsc#1266046)
+- Fix Requires.
+- Fix line endings for the README.
+
+-------------------------------------------------------------------

New:
----
  support-python-314.patch

----------(New B)----------
  New:
- Add patch support-python-314.patch:
  * Support Python 3.14 asyncio loop changes. (bsc#1266046)
----------(New E)----------

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

Other differences:
------------------
++++++ python-pyshark.spec ++++++
--- /var/tmp/diff_new_pack.7mX9Qv/_old  2026-05-28 17:29:04.225012148 +0200
+++ /var/tmp/diff_new_pack.7mX9Qv/_new  2026-05-28 17:29:04.225012148 +0200
@@ -23,27 +23,27 @@
 Release:        0
 Summary:        A Python wrapper for tshark output parsing
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://github.com/KimiNewt/pyshark
 #Git-Clone:     https://github.com/KimiNewt/pyshark.git
 Source:         https://github.com/KimiNewt/pyshark/archive/v%{version}.tar.gz
 # PATCH-FIX-UPSTREAM fix_tshark.patch -- based on PR 744
 Patch0:         fix_tshark.patch
+# PATCH-FIX-UPSTREAM gh#KimiNewt/pyshark#755
+Patch1:         support-python-314.patch
 BuildRequires:  %{python_module appdirs}
 BuildRequires:  %{python_module lxml}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module py}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module termcolor}
 BuildRequires:  %{python_module wheel}
+BuildRequires:  dos2unix
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  wireshark
-Requires:       %{python_module packaging}
 Requires:       python-appdirs
 Requires:       python-lxml
-Requires:       python-py
+Requires:       python-packaging
 Requires:       python-termcolor
 Requires:       wireshark
 BuildArch:      noarch
@@ -55,6 +55,7 @@
 
 %prep
 %autosetup -p1 -n pyshark-%{version}/src
+dos2unix ../README.md
 
 %build
 %pyproject_wheel
@@ -66,7 +67,9 @@
 %check
 # test "inmem_capture" needs to be fixed upstream, do not run it for now
 rm -f ../tests/capture/test_inmem_capture.py 
../tests/capture/test_live_capture.py
-%pytest ../tests
+# test_iterate_empty_psml_capture broken with Python 3.14 forkserver
+# test_get_tshark_path missing config
+%pytest ../tests -k 'not (test_iterate_empty_psml_capture or 
test_get_tshark_path)'
 
 %files %{python_files}
 %license ../LICENSE.txt

++++++ support-python-314.patch ++++++
>From e1dff5f347e8a6a8007528ee2dc7bd4efbb2cd5f Mon Sep 17 00:00:00 2001
From: zhu <[email protected]>
Date: Sun, 22 Mar 2026 17:17:34 +0100
Subject: [PATCH] compatibilize with python 3.14

---
 src/pyshark/capture/capture.py | 36 +++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/src/pyshark/capture/capture.py b/src/pyshark/capture/capture.py
index b7aef6ef..a25b913f 100644
--- src/pyshark/capture/capture.py
+++ src/pyshark/capture/capture.py
@@ -169,27 +169,31 @@ def _verify_capture_parameters(self):
     def _setup_eventloop(self):
         """Sets up a new eventloop as the current one according to the OS."""
         if os.name == "nt":
-            current_eventloop = 
asyncio.get_event_loop_policy().get_event_loop()
-            if isinstance(current_eventloop, asyncio.ProactorEventLoop):
-                self.eventloop = current_eventloop
-            else:
-                # On Python before 3.8, Proactor is not the default eventloop 
type, so we have to create a new one.
-                # If there was an existing eventloop this can create issues, 
since we effectively disable it here.
-                if asyncio.all_tasks():
-                    warnings.warn("The running eventloop has tasks but pyshark 
must set a new eventloop to continue. "
-                                  "Existing tasks may not run.")
+            try:
+                current_eventloop = 
asyncio.get_event_loop_policy().get_event_loop()
+                if isinstance(current_eventloop, asyncio.ProactorEventLoop):
+                    self.eventloop = current_eventloop
+                else:
+                    # On Python before 3.8, Proactor is not the default 
eventloop type, so we have to create a new one.
+                    # If there was an existing eventloop this can create 
issues, since we effectively disable it here.
+                    if asyncio.all_tasks():
+                        warnings.warn(
+                            "The running eventloop has tasks but pyshark must 
set a new eventloop to continue. "
+                            "Existing tasks may not run.")
+                    self.eventloop = asyncio.ProactorEventLoop()
+            except RuntimeError:
+                # Python 3.14+ raise Runtime Error because the implicit 
creation of Eventloop has been deprecated
                 self.eventloop = asyncio.ProactorEventLoop()
-                asyncio.set_event_loop(self.eventloop)
+            asyncio.set_event_loop(self.eventloop)
         else:
             try:
                 self.eventloop = 
asyncio.get_event_loop_policy().get_event_loop()
             except RuntimeError:
-                if threading.current_thread() != threading.main_thread():
-                    # Ran not in main thread, make a new eventloop
-                    self.eventloop = asyncio.new_event_loop()
-                    asyncio.set_event_loop(self.eventloop)
-                else:
-                    raise
+                # Python 3.14+ raise Runtime Error because the implicit 
creation of Eventloop has been deprecated
+                self.eventloop = asyncio.new_event_loop()
+            asyncio.set_event_loop(self.eventloop)
+            if sys.version_info >= (3, 14):
+                return
             if os.name == "posix" and isinstance(threading.current_thread(), 
threading._MainThread):
                 # The default child watchers (ThreadedChildWatcher) 
attach_loop method is empty!
                 # While using pyshark with ThreadedChildWatcher, asyncio could 
raise a ChildProcessError

Reply via email to