#5 Update to 5.0.7 (RHBZ#2270887)
Merged 3 months ago by gui1ty. Opened 3 months ago by gui1ty.
rpms/ gui1ty/python-pebble update  into  rawhide

file modified
+1
@@ -1,3 +1,4 @@ 

  /Pebble-4.5.3.tar.gz

  /Pebble-5.0.3.tar.gz

  /Pebble-5.0.6.tar.gz

+ /pebble-5.0.7.tar.gz

file added
+25
@@ -0,0 +1,25 @@ 

+ From 4910122fe3e8ac183cde68ac6141b5579b0dc0c8 Mon Sep 17 00:00:00 2001

+ From: Sandro <devel@penguinpee.nl>

+ Date: Fri, 22 Mar 2024 20:24:10 +0100

+ Subject: [PATCH] Fix RuntimeError

+ 

+ In our build environment the call to `fileinput.input()` throws

+ a `RuntimeError("input() already active")`. This solves the error

+ without impacting functionality.

+ ---

+  setup.py | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/setup.py b/setup.py

+ index ee6ae5b..0bccb6e 100644

+ --- a/setup.py

+ +++ b/setup.py

+ @@ -8,7 +8,7 @@

+  

+  def package_version():

+      module_path = os.path.join(CWD, 'pebble', '__init__.py')

+ -    for line in fileinput.input(module_path):

+ +    for line in fileinput.FileInput(module_path):

+          if line.startswith('__version__'):

+              return line.split('=')[-1].strip().replace('\'', '')

+  

file modified
+26 -15
@@ -1,12 +1,26 @@ 

+ %global forgeurl https://github.com/noxdafox/pebble

+ 

+ # Tests take rather long compared to build. Allow skipping.

+ %bcond tests 1

+ 

  Name:           python-pebble

- Version:        5.0.6

+ Version:        5.0.7

  Release:        %autorelease

  Summary:        Threading and multiprocessing eye-candy for Python

+ 

+ %global tag %{version}

+ %forgemeta

+ 

  License:        LGPL-3.0-or-later

- URL:            https://github.com/noxdafox/pebble

- Source:         %{pypi_source Pebble}

+ URL:            %{forgeurl}

+ Source:         %{forgesource}

+ Patch:          %{forgeurl}/pull/130.patch

+ 

  BuildArch:      noarch

  

+ BuildRequires:  python3-devel

+ BuildRequires:  python3-pytest

+ 

  %global _description %{expand:

  Pebble provides an API to manage threads and processes within an application.

  It wraps Python’s standard library threading and multiprocessing objects.}
@@ -16,31 +30,28 @@ 

  %package -n python3-pebble

  Summary:        %{summary}

  

- BuildRequires:  python3-devel

- BuildRequires:  python3-setuptools

- BuildRequires:  python3-pip

- BuildRequires:  python3-wheel

- BuildRequires:  python3-pytest

- 

  %description -n python3-pebble %_description

  

  %prep

- %autosetup -n Pebble-%{version}

+ %forgeautosetup

  

  %generate_buildrequires

- # errors

- # %%pyproject_buildrequires

+ %pyproject_buildrequires

  

  %build

  %pyproject_wheel

  

  %install

  %pyproject_install

- %pyproject_save_files pebble

+ %pyproject_save_files -l pebble

  

  %check

- # test intermittently hangs

- %{pytest} -v -k "not test_process_pool_multiple_futures"

+ %if %{with tests}

+   # test intermittently hangs

+   %{pytest} -v -k "not test_process_pool_multiple_futures"

+ %else

+   %pyproject_check_import

+ %endif

  

  %files -n python3-pebble -f %{pyproject_files}

  %doc README.rst

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (Pebble-5.0.6.tar.gz) = 95afadcb1cad00e6a1e0c4f40c7f77e598f5c74af04dc57999dcc1cdea237dc8f7385b2bd60b19c4f7b47e5efad0d7b7310012f45ce8975c938a554a287eb69e

+ SHA512 (pebble-5.0.7.tar.gz) = 5044ba70e174cb67c965e409c9f2bc6f718a36de86d4510e3e8eb40e334ed46ba8ac9edf5c04a4af5e3ad2abed01bd518cdd4726bfaf46b2a6253fbcbe323cd7

  • Use forge macros
  • Allow skipping tests
  • Revert to using Python RPM macros
  • Assert existence of license file

More info in the commit messages. This supersedes PR #4 (I'll close that).

Fixes

  • handle race condition under different interpreters
  • handle frozen classes as exceptions
  • handle unexpected errors when reading from pipe in process decorators
  • allow different context from multiprocessing ones

Pull-Request has been merged by gui1ty

3 months ago