#4 Update to 0.70.15 (close RHBZ#2224813)
Merged 10 months ago by music. Opened 10 months ago by music.
rpms/ music/python-multiprocess v0.70.15  into  rawhide

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

  /multiprocess-0.70.13.tar.gz

  /multiprocess-0.70.14.tar.gz

  /multiprocess-3daf4ba7031fa9ce0536bbbb8388d15ac7935c8f.tar.gz

+ /multiprocess-0.70.15.tar.gz

file modified
+19 -10
@@ -24,13 +24,8 @@ 

  https://github.com/uqfoundation/multiprocess/issues, with a legacy list

  maintained at https://uqfoundation.github.io/project/pathos/query.}

  

- # Package a pre-release snapshot for Python 3.12 support.

- # https://bugzilla.redhat.com/show_bug.cgi?id=2175136

- %global commit 3daf4ba7031fa9ce0536bbbb8388d15ac7935c8f

- %global snapdate 20230220

- 

  Name:           python-multiprocess

- Version:        0.70.15~dev0^%{?commit:%{snapdate}git%(echo '%{commit}' | cut -b -7)}

+ Version:        0.70.15

  Release:        %autorelease

  Summary:        Better multiprocessing and multithreading in python

  
@@ -44,9 +39,7 @@ 

  # https://gitlab.com/fedora/legal/fedora-license-data/-/merge_requests/211

  License:        BSD-3-Clause AND LicenseRef-Fedora-Public-Domain

  URL:            https://github.com/uqfoundation/multiprocess

- %{?!commit:%global srcurl %{pypi_source multiprocess}}

- %{?commit:%global srcurl %{url}/archive/%{commit}/multiprocess-%{commit}.tar.gz}

- Source0:        %{srcurl}

+ Source:         %{pypi_source multiprocess}

  BuildArch:      noarch

  

  BuildRequires:  dos2unix
@@ -72,7 +65,7 @@ 

  This package provides documentation for %{name}.

  

  %prep

- %autosetup -n multiprocess-%{?!commit:%{version}}%{?commit}

+ %autosetup -n multiprocess-%{version}

  

  # Convert line endings

  find py%{python3_version}/{doc,examples}/ -type f -exec dos2unix '{}' '+'
@@ -85,6 +78,22 @@ 

  # don’t want the RPM package to have to be arched.

  sed -r -i 's/^([[:blank:]]*)(distclass=BinaryDistribution,)/\1# \2/' setup.py

  

+ # These tests appear to fail because the Python interpreter subprocess called

+ # through test.support.script_helper.assert_python_ok() does not inherit the

+ # PYTHONPATH environment variable, so it cannot find the multiprocess package

+ # in the buildroot.

+ s='@unittest.skip("Does not respect PYTHONPATH")'

+ for t in \

+     test_spawn_sys_executable_none_allows_import \

+     test_global_named_resource_spawn

+ do

+   # The find-then-modify pattern keeps us from discarding mtimes on any sources

+   # that do not need modification.

+   find . -type f -name '*.py' -exec \

+       gawk '/^[[:blank:]]*def '"$t"'\(/ { print FILENAME; nextfile }' '{}' '+' |

+     xargs -r -t sed -r -i 's/^([[:blank:]]*)def '"$t"'\(/\1'"$s"'\n&/'

+ done

+ 

  %generate_buildrequires

  %pyproject_buildrequires

  

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

- SHA512 (multiprocess-3daf4ba7031fa9ce0536bbbb8388d15ac7935c8f.tar.gz) = e98f005cdd17b8f19b24f20155e5c04c4228c5241ec48d2ca969c338613ce584273b6066be0cd9eb694a44555c262d2fe557eff0516bc650123eaefbabc6f7d0

+ SHA512 (multiprocess-0.70.15.tar.gz) = 095c15e942bebe2dffa5054ce46f30f69b3f0fcbfbd87b6742546dcacdb6a5d0d3274002f5f58f73345761adaa19866573ae20d420f8ca4cc00ca5270f8acb84

We should upgrade at least F39 and F40, which are using a pre-release snapshot of this release.

Source diff from 0.70.14:

https://github.com/uqfoundation/multiprocess/compare/multiprocess-0.70.14...multiprocess-0.70.15

Source diff from the pre-release snapshot:

https://github.com/uqfoundation/multiprocess/compare/3daf4ba7031fa9ce0536bbbb8388d15ac7935c8f...multiprocess-0.70.15


There is a new pair of test failures, which I haven’t quite figured out how to handle yet:

======================================================================
FAIL: test_spawn_sys_executable_none_allows_import (__main__.MiscTestCase.test_spawn_sys_executable_none_allows_import)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-multiprocess-0.70.15-1.fc40.x86_64/usr/lib/python3.12/site-packages/multiprocess/tests/__init__.py", line 200, in spawn_check_wrapper
    return test_item(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-multiprocess-0.70.15-1.fc40.x86_64/usr/lib/python3.12/site-packages/multiprocess/tests/__init__.py", line 5924, in test_spawn_sys_executable_none_allows_import
    rc, out, err = script_helper.assert_python_ok(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/test/support/script_helper.py", line 166, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/test/support/script_helper.py", line 151, in _assert_python
    res.fail(cmd_line)
  File "/usr/lib64/python3.12/test/support/script_helper.py", line 76, in fail
    raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/usr/bin/python3', '-X', 'faulthandler', '-I', '-c', 'if 1:\n            import sys\n            sys.executable = None\n            assert "multiprocess" not in sys.modules, "already imported!"\n            import multiprocess as multiprocessing\n            import multiprocess.spawn  # This should not fail\n']

stdout:
---

---

stderr:
---
Traceback (most recent call last):  
  File "<string>", line 5, in <module>
ModuleNotFoundError: No module named 'multiprocess'
---
======================================================================
FAIL: test_global_named_resource_spawn (__main__.TestNamedResource.test_global_named_resource_spawn)
----------------------------------------------------------------------
Traceback (most recent call last):  
  File "/builddir/build/BUILDROOT/python-multiprocess-0.70.15-1.fc40.x86_64/usr/lib/python3.12/site-packages/multiprocess/tests/__init__.py", line 200, in spawn_check_wrapper
    return test_item(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-multiprocess-0.70.15-1.fc40.x86_64/usr/lib/python3.12/site-packages/multiprocess/tests/__init__.py", line 5903, in test_global_named_resource_spawn
    rc, out, err = script_helper.assert_python_ok(testfn)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/test/support/script_helper.py", line 166, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/test/support/script_helper.py", line 151, in _assert_python
    res.fail(cmd_line)
  File "/usr/lib64/python3.12/test/support/script_helper.py", line 76, in fail
    raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/usr/bin/python3', '-X', 'faulthandler', '-I', '@test_5655_tmpæ']

stdout:
---

---

stderr:
---
Traceback (most recent call last):  
  File "/builddir/build/BUILD/multiprocess-0.70.15/@test_5655_tmp��", line 1, in <module>
    import multiprocess as mp
ModuleNotFoundError: No module named 'multiprocess'
---

----------------------------------------------------------------------
Ran 373 tests in 79.814s

FAILED (failures=2, skipped=44)

I suspect that the subprocess may simply not be inheriting the PYTHONPATH we set, but it will take a little investigation to confirm this and figure out how to work around it.

I have added an ugly hack in %prep to skip these two tests. It’s too bad we can’t just use pytest.

rebased onto fb1834d

10 months ago

We should upgrade at least F39 and F40, which are using a pre-release snapshot of this release.

Follow-up: this is for F39/F40 only, since python-dill in F38 is too old.

I tested this in local mock builds with python-SALib, python-cro, python-pathos, and python-sklearn-genetic, and observed no regressions.

Since this is pretty straightforward and I want to make sure we ship the final release in F39, I’m going to go ahead and merge this. If we want to tweak some details later, that’s fine.

Pull-Request has been merged by music

10 months ago