python-numexpr/fix-test-max-threads-unset.patch
Daniel Garcia f0bcbbbf19 - Add upstream patch fix-test-max-threads-unset.patch
- Remove upstreamed patch numexpr-pr485-allow-numpy1.patch
- Update to 2.10.1:
  - The default number of 'safe' threads has been upgraded to 16
    (instead of previous 8). That means that if your CPU has > 16
    cores, the default is to use 16. You can always override this with
    the "NUMEXPR_MAX_THREADS" environment variable.
  - NumPy 1.23 is now the minimum supported.
  - Preliminary support for Python 3.13. Thanks to Karolina Surma.
  - Fix tests on nthreads detection (closes: #479). Thanks to
    @avalentino.
  - The build process has been modernized and now uses the
    pyproject.toml file for more of the configuration options.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numexpr?expand=0&rev=41
2024-11-12 11:40:48 +00:00

14 lines
722 B
Diff

Index: numexpr-2.10.1/numexpr/tests/test_numexpr.py
===================================================================
--- numexpr-2.10.1.orig/numexpr/tests/test_numexpr.py
+++ numexpr-2.10.1/numexpr/tests/test_numexpr.py
@@ -1129,7 +1129,7 @@ class test_threading_config(TestCase):
"if 'NUMEXPR_MAX_THREADS' in os.environ: os.environ.pop('NUMEXPR_MAX_THREADS')",
"if 'OMP_NUM_THREADS' in os.environ: os.environ.pop('OMP_NUM_THREADS')",
"import numexpr",
- "assert(numexpr.nthreads <= 8)",
+ f"assert(numexpr.nthreads <= {MAX_THREADS})",
"exit(0)"])
subprocess.check_call([sys.executable, '-c', script])