From 34cdf05c86548de1c4ca1b2798cdc23885af807b Mon Sep 17 00:00:00 2001 From: Ethan Steinberg Date: Tue, 27 Dec 2022 10:47:19 -0800 Subject: [PATCH 1/5] MAINT: FFT pybind11 fixups * remove the pybind11 version exclusion from Windows Meson job in GitHub actions * pin pybind11 to version `2.10.1` in `pyproject.toml` out of an abundance of caution re: recent issues with `2.10.2` (which has since been yanked from PyPI) * small adjustment to `pypocketfft.cxx` to defened against the segfault that occurs with pybind11 `2.10.2` (arguably not a bug, but safer way to initialize here) --- .github/workflows/windows.yml | 2 +- pyproject.toml | 4 +++- scipy/fft/_pocketfft/pypocketfft.cxx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c51011631f31..2875c06f2107 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -46,7 +46,7 @@ jobs: gfortran --version - name: pip-packages run: | - pip install numpy==1.22.2 cython "pybind11!=2.10.2" pythran meson ninja pytest pytest-xdist pytest-timeout pooch + pip install numpy==1.22.2 cython pybind11 pythran meson ninja pytest pytest-xdist pytest-timeout pooch - name: openblas-libs run: | # Download and install pre-built OpenBLAS library diff --git a/pyproject.toml b/pyproject.toml index 8b67c9eb7c1f..26da2ed92a0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,9 @@ build-backend = 'mesonpy' requires = [ "meson-python>=0.11.0,<0.12.0", "Cython>=0.29.32,<3.0", - "pybind11>=2.10.0,!=2.10.2,<2.11.0", + # conservatively avoid issues from + # https://github.com/pybind/pybind11/issues/4420 + "pybind11==2.10.1", "pythran>=0.12.0,<0.13.0", # `wheel` is needed for non-isolated builds, given that `meson-python` # doesn't list it as a runtime requirement (at least in 0.5.0) diff --git a/scipy/fft/_pocketfft/pypocketfft.cxx b/scipy/fft/_pocketfft/pypocketfft.cxx index ee71a5e41a59..9701eb41722b 100644 --- a/scipy/fft/_pocketfft/pypocketfft.cxx +++ b/scipy/fft/_pocketfft/pypocketfft.cxx @@ -37,7 +37,6 @@ using clong = std::complex; using f32 = float; using f64 = double; using flong = ldbl_t; -auto None = py::none(); shape_t copy_shape(const py::array &arr) { @@ -717,6 +716,8 @@ PYBIND11_MODULE(pypocketfft, m) { using namespace pybind11::literals; + auto None = py::none(); + m.doc() = pypocketfft_DS; m.def("c2c", c2c, c2c_DS, "a"_a, "axes"_a=None, "forward"_a=true, "inorm"_a=0, "out"_a=None, "nthreads"_a=1); From 3e0ae1a21f51ebee3a77733c42700d87a0c35d7d Mon Sep 17 00:00:00 2001 From: Matt Haberland Date: Fri, 30 Dec 2022 14:38:17 -0800 Subject: [PATCH 2/5] REV: integrate.qmc_quad: delay release to SciPy 1.11.0 --- scipy/integrate/__init__.py | 1 - scipy/integrate/_quadrature.py | 2 +- scipy/integrate/tests/test_quadrature.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scipy/integrate/__init__.py b/scipy/integrate/__init__.py index ef914d8fcb70..bb6cce71f10b 100644 --- a/scipy/integrate/__init__.py +++ b/scipy/integrate/__init__.py @@ -20,7 +20,6 @@ quadrature -- Integrate with given tolerance using Gaussian quadrature romberg -- Integrate func using Romberg integration newton_cotes -- Weights and error coefficient for Newton-Cotes integration - qmc_quad -- N-D integration using Quasi-Monte Carlo quadrature IntegrationWarning -- Warning on issues during integration AccuracyWarning -- Warning on issues during quadrature integration diff --git a/scipy/integrate/_quadrature.py b/scipy/integrate/_quadrature.py index 7817fd11b78d..ef00678af6af 100644 --- a/scipy/integrate/_quadrature.py +++ b/scipy/integrate/_quadrature.py @@ -19,7 +19,7 @@ __all__ = ['fixed_quad', 'quadrature', 'romberg', 'romb', 'trapezoid', 'trapz', 'simps', 'simpson', 'cumulative_trapezoid', 'cumtrapz', 'newton_cotes', - 'qmc_quad', 'AccuracyWarning'] + 'AccuracyWarning'] # Make See Also linking for our local copy work properly diff --git a/scipy/integrate/tests/test_quadrature.py b/scipy/integrate/tests/test_quadrature.py index 8d48cefd412c..6298361117df 100644 --- a/scipy/integrate/tests/test_quadrature.py +++ b/scipy/integrate/tests/test_quadrature.py @@ -6,8 +6,8 @@ from scipy.integrate import (quadrature, romberg, romb, newton_cotes, cumulative_trapezoid, cumtrapz, trapz, trapezoid, - quad, simpson, simps, fixed_quad, AccuracyWarning, - qmc_quad) + quad, simpson, simps, fixed_quad, AccuracyWarning) +from scipy.integrate._quadrature import qmc_quad from scipy import stats, special as sc From ac2f45fbe1e39a8f52c1ea2e68764009f02973c0 Mon Sep 17 00:00:00 2001 From: Matt Haberland Date: Fri, 30 Dec 2022 14:46:35 -0800 Subject: [PATCH 3/5] MAINT: integrate._qmc_quad: mark as private with preceding underscore --- scipy/integrate/_quadrature.py | 10 +++++----- scipy/integrate/tests/test_quadrature.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scipy/integrate/_quadrature.py b/scipy/integrate/_quadrature.py index ef00678af6af..b746c7b3b4c5 100644 --- a/scipy/integrate/_quadrature.py +++ b/scipy/integrate/_quadrature.py @@ -1049,11 +1049,11 @@ def newton_cotes(rn, equal=0): def _qmc_quad_iv(func, a, b, n_points, n_estimates, qrng, log): # lazy import to avoid issues with partially-initialized submodule - if not hasattr(qmc_quad, 'qmc'): + if not hasattr(_qmc_quad, 'qmc'): from scipy import stats - qmc_quad.stats = stats + _qmc_quad.stats = stats else: - stats = qmc_quad.stats + stats = _qmc_quad.stats if not callable(func): message = "`func` must be callable." @@ -1123,8 +1123,8 @@ def vfunc(x): QMCQuadResult = namedtuple('QMCQuadResult', ['integral', 'standard_error']) -def qmc_quad(func, a, b, *, n_points=1024, n_estimates=8, qrng=None, - log=False, args=None): +def _qmc_quad(func, a, b, *, n_points=1024, n_estimates=8, qrng=None, + log=False, args=None): """ Compute an integral in N-dimensions using Quasi-Monte Carlo quadrature. diff --git a/scipy/integrate/tests/test_quadrature.py b/scipy/integrate/tests/test_quadrature.py index 6298361117df..00f31c88d899 100644 --- a/scipy/integrate/tests/test_quadrature.py +++ b/scipy/integrate/tests/test_quadrature.py @@ -7,7 +7,7 @@ from scipy.integrate import (quadrature, romberg, romb, newton_cotes, cumulative_trapezoid, cumtrapz, trapz, trapezoid, quad, simpson, simps, fixed_quad, AccuracyWarning) -from scipy.integrate._quadrature import qmc_quad +from scipy.integrate._quadrature import _qmc_quad as qmc_quad from scipy import stats, special as sc From 1ab9f1b10145f0a974d5531700e72d1fb4229b76 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Sun, 1 Jan 2023 14:47:28 -0700 Subject: [PATCH 4/5] DOC: update 1.10.0 relnotes --- doc/release/1.10.0-notes.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst index 3a6f99148f02..3aec4a96200e 100644 --- a/doc/release/1.10.0-notes.rst +++ b/doc/release/1.10.0-notes.rst @@ -2,8 +2,6 @@ SciPy 1.10.0 Release Notes ========================== -.. note:: Scipy 1.10.0 is not released yet! - .. contents:: SciPy 1.10.0 is the culmination of 6 months of hard work. It contains @@ -419,7 +417,7 @@ Authors * David Gilbertson (1) + * Ralf Gommers (251) * Marco Gorelli (2) + -* Matt Haberland (383) +* Matt Haberland (387) * Andrew Hawryluk (2) + * Christoph Hohnerlein (2) + * Loïc Houpert (2) + @@ -489,7 +487,7 @@ Authors * Ilhan Polat (6) * Akshita Prasanth (2) + * Sean Quinn (1) -* Tyler Reddy (142) +* Tyler Reddy (155) * Martin Reinecke (1) * Ned Richards (1) * Marie Roald (1) + @@ -509,6 +507,7 @@ Authors * Alexander Soare (1) + * Bjørge Solli (2) + * Scott Staniewicz (1) +* Ethan Steinberg (3) + * Albert Steppi (3) * Thomas Stoeger (1) + * Kai Striega (4) @@ -540,7 +539,7 @@ Authors * Egor Zemlyanoy (19) * Gavin Zhang (3) + -A total of 182 people contributed to this release. +A total of 183 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. @@ -681,6 +680,7 @@ Issues closed for 1.10.0 * `#17412 `__: BUG: Meson error:compiler for language "cpp", not specified for... * `#17444 `__: BUG: beta.ppf causes segfault * `#17468 `__: Weird errors with running the tests \`scipy.stats.tests.test_distributions\`... +* `#17518 `__: ENH: stats.pearsonr: support complex data * `#17523 `__: BUG: \`[source]\` button in the docs sending to the wrong place * `#17578 `__: TST, BLD, CI: 1.10.0rc1 wheel build/test failures * `#17619 `__: BUG: core dump when calling scipy.optimize.linprog @@ -1204,3 +1204,7 @@ Pull requests for 1.10.0 * `#17640 `__: MAINT: prepare for SciPy 1.10.0rc2 * `#17645 `__: MAINT: stats.rankdata: ensure consistent shape handling * `#17653 `__: MAINT: pybind11 win exclusion +* `#17656 `__: MAINT: 1.10.0rc2 backports, round two +* `#17662 `__: Fix undefined behavior within scipy.fft +* `#17686 `__: REV: integrate.qmc_quad: delay release to SciPy 1.11.0 +* `#17689 `__: REL: integrate.qmc_quad: remove from release notes From 205b6243c6d075d05695e7ac6d007e0f03bfbf42 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Mon, 2 Jan 2023 09:57:15 -0700 Subject: [PATCH 5/5] DOC: add missing author [skip azp] [skip actions] [skip cirrus] --- doc/release/1.10.0-notes.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst index 3aec4a96200e..b9c0da1a1e62 100644 --- a/doc/release/1.10.0-notes.rst +++ b/doc/release/1.10.0-notes.rst @@ -517,6 +517,7 @@ Authors * TianyiQ (1) + * Tiger (1) + * Will Tirone (1) +* Ajay Shanker Tripathi (1) + * Edgar Andrés Margffoy Tuay (1) + * Dmitry Ulyumdzhiev (1) + * Hari Vamsi (1) + @@ -539,7 +540,7 @@ Authors * Egor Zemlyanoy (19) * Gavin Zhang (3) + -A total of 183 people contributed to this release. +A total of 184 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.