Skip to content

Commit c1ab574

Browse files
authored
Merge pull request #722 from jarrodmillman/spec0-3-24
Drop support for older dependencies (see SPEC 0)
2 parents 622bcd5 + 94e8f04 commit c1ab574

File tree

8 files changed

+63
-69
lines changed

8 files changed

+63
-69
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
MPLBACKEND: Agg
1818
CYTHON_TRACE: 1
1919
CYTHONSPEC: cython
20-
NUMPY_MIN: numpy==1.22.4
21-
CYTHON_MIN: cython==0.29.35
22-
SCIPY_MIN: scipy==1.8.0
20+
NUMPY_MIN: numpy==1.23.0
21+
CYTHON_MIN: cython==3.0.4
22+
SCIPY_MIN: scipy==1.9.0
2323

2424
strategy:
2525
# Ensure that a wheel builder finishes even if another fails
2626
fail-fast: false
2727
matrix:
28-
python-version: ["3.9", "3.10", "3.11", "3.12"]
28+
python-version: ["3.10", "3.11", "3.12"]
2929
MINIMUM_REQUIREMENTS: [0]
3030
USE_SCIPY: [0]
3131
USE_SDIST: [0]
@@ -34,15 +34,15 @@ jobs:
3434
OPTIONS_NAME: ["default"]
3535
include:
3636
- platform_id: manylinux_x86_64
37-
python-version: "3.9"
37+
python-version: "3.10"
3838
MINIMUM_REQUIREMENTS: 1
3939
OPTIONS_NAME: "minimum-req"
4040
- platform_id: manylinux_x86_64
41-
python-version: "3.9"
41+
python-version: "3.10"
4242
USE_SCIPY: 1
4343
OPTIONS_NAME: "with-scipy"
4444
- platform_id: manylinux_x86_64
45-
python-version: "3.9"
45+
python-version: "3.10"
4646
USE_SDIST: 1
4747
OPTIONS_NAME: "install-from-sdist"
4848
- platform_id: manylinux_x86_64
@@ -129,23 +129,23 @@ jobs:
129129
MPLBACKEND: Agg
130130
CYTHON_TRACE: 1
131131
CYTHONSPEC: cython
132-
NUMPY_MIN: numpy==1.22.4
133-
CYTHON_MIN: cython==0.29.35
134-
SCIPY_MIN: scipy==1.8.0
132+
NUMPY_MIN: numpy==1.23.0
133+
CYTHON_MIN: cython==3.0.4
134+
SCIPY_MIN: scipy==1.9.0
135135

136136
strategy:
137137
# Ensure that a wheel builder finishes even if another fails
138138
fail-fast: false
139139
matrix:
140-
python-version: ["3.9", "3.12"]
140+
python-version: ["3.10", "3.12"]
141141
MINIMUM_REQUIREMENTS: [0]
142142
USE_SCIPY: [0]
143143
USE_SDIST: [0]
144144
REFGUIDE_CHECK: [0]
145145
PIP_FLAGS: [""]
146146
OPTIONS_NAME: ["default"]
147147
include:
148-
- python-version: "3.9"
148+
- python-version: "3.10"
149149
MINIMUM_REQUIREMENTS: 1
150150
OPTIONS_NAME: "osx-minimum-req"
151151
- python-version: "3.12"

.github/workflows/wheel_tests_and_release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
os: [ubuntu-latest]
37-
cibw_python: ["cp39", "cp310", "cp311", "cp312"]
37+
cibw_python: ["cp310", "cp311", "cp312"]
3838
cibw_arch: ["x86_64"]
3939
steps:
4040
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/setup-python@v5
4444
name: Install Python
4545
with:
46-
python-version: "3.9"
46+
python-version: "3.10"
4747
- name: Build the wheel
4848
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # 2.17.0
4949
with:
@@ -66,7 +66,7 @@ jobs:
6666
fail-fast: false
6767
matrix:
6868
os: [ubuntu-latest]
69-
cibw_python: ["cp39", "cp310", "cp311", "cp312"]
69+
cibw_python: ["cp310", "cp311", "cp312"]
7070
cibw_arch: ["aarch64"]
7171
steps:
7272
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
@@ -75,7 +75,7 @@ jobs:
7575
- uses: actions/setup-python@v5
7676
name: Install Python
7777
with:
78-
python-version: "3.9"
78+
python-version: "3.10"
7979
- name: Set up QEMU
8080
uses: docker/setup-qemu-action@v3
8181
with:
@@ -102,7 +102,7 @@ jobs:
102102
matrix:
103103
# macos-13 is the last runner that supports Intel (x86_64) architecture
104104
os: [macos-13, macos-14]
105-
cibw_python: ["cp39", "cp310", "cp311", "cp312"]
105+
cibw_python: ["cp310", "cp311", "cp312"]
106106
cibw_arch: ["x86_64", "arm64"]
107107
exclude:
108108
- os: macos-14
@@ -151,7 +151,7 @@ jobs:
151151
matrix:
152152
os: [windows-latest]
153153
cibw_arch: ["AMD64", "x86"]
154-
cibw_python: ["cp39", "cp310", "cp311", "cp312"]
154+
cibw_python: ["cp310", "cp311", "cp312"]
155155
steps:
156156
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
157157
with:
@@ -160,7 +160,7 @@ jobs:
160160
- uses: actions/setup-python@v5
161161
name: Install Python
162162
with:
163-
python-version: "3.9"
163+
python-version: "3.10"
164164

165165
- name: Setup MSVC (32-bit)
166166
if: matrix.cibw_arch == 'x86'
@@ -208,7 +208,7 @@ jobs:
208208
- uses: actions/setup-python@v5
209209
name: Install Python
210210
with:
211-
python-version: "3.9"
211+
python-version: "3.10"
212212

213213
- name: Install Twine
214214
run: |

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ For more usage examples see the `demo`_ directory in the source package.
6565
Installation
6666
------------
6767

68-
PyWavelets supports `Python`_ >=3.9, and is only dependent on `NumPy`_
69-
(supported versions are currently ``>= 1.14.6``). To pass all of the tests,
68+
PyWavelets supports `Python`_ >=3.10, and is only dependent on `NumPy`_
69+
(supported versions are currently ``>= 1.23.0``). To pass all of the tests,
7070
`Matplotlib`_ is also required. `SciPy`_ is also an optional dependency. When
7171
present, FFT-based continuous wavelet transforms will use FFTs from SciPy
7272
rather than NumPy.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build: off
77
environment:
88
matrix:
99
- arch: x64
10-
PY_PYTHON: 3.9
10+
PY_PYTHON: 3.10
1111
- arch: x86
1212
PY_PYTHON: 3.10-32
1313
- arch: x64

doc/source/dev/testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ Running tests with Tox
4949
----------------------
5050

5151
There's also a config file for running tests with `Tox`_ (``pip install tox``).
52-
For example, to run tests for Python 3.9 and 3.10, use
52+
For example, to run tests for Python 3.10, Python 3.11, and 3.12, use
5353

5454
.. code-block:: bash
5555
56-
tox -e py39,py310
56+
tox -e py310,py311,py312
5757
5858
For more information see the `Tox`_ documentation.
5959

pyproject.toml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ maintainers = [
2929
{name = "The PyWavelets Developers", email = "[email protected]"}
3030
]
3131
description = "PyWavelets, wavelet transform module"
32-
requires-python = ">=3.9"
33-
dependencies = ["numpy>=1.22.4,<3"]
32+
requires-python = ">=3.10"
33+
dependencies = ["numpy>=1.23,<3"]
3434
readme = "README.rst"
3535
classifiers = [
3636
"Development Status :: 5 - Production/Stable",
@@ -42,35 +42,40 @@ classifiers = [
4242
"Programming Language :: C",
4343
"Programming Language :: Python",
4444
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.9",
4645
"Programming Language :: Python :: 3.10",
4746
"Programming Language :: Python :: 3.11",
4847
"Programming Language :: Python :: 3.12",
4948
"Topic :: Software Development :: Libraries :: Python Modules"
5049
]
5150

51+
[project.optional-dependencies]
52+
optional = ["scipy>=1.9"]
53+
5254
[project.urls]
5355
homepage = "https://github.com/PyWavelets/pywt"
5456
source = "https://github.com/PyWavelets/pywt"
5557
documentation = "https://pywavelets.readthedocs.io/"
5658

5759
[tool.ruff]
5860
line-length = 88
59-
target-version = 'py39'
60-
lint.select = [
61-
'I',
62-
'UP',
63-
'C4',
64-
'E713',
65-
'NPY201',
66-
'PIE',
67-
'PGH003',
68-
'PLR0402',
69-
'SIM101',
70-
'SIM109',
71-
'SIM110',
72-
'SIM118',
73-
'SIM2',
61+
target-version = 'py310'
62+
select = [
63+
"I",
64+
"UP",
65+
"C4",
66+
"E713",
67+
"NPY201",
68+
"PIE",
69+
"PGH003",
70+
"PLR0402",
71+
"SIM101",
72+
"SIM109",
73+
"SIM110",
74+
"SIM118",
75+
"SIM2",
76+
]
77+
ignore = [
78+
"UP038", # https://github.com/astral-sh/ruff/issues/7871
7479
]
7580

7681
[tool.spin]

pywt/_cwt.py

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,23 @@
1515
import numpy as np
1616

1717
try:
18-
# Prefer scipy.fft (new in SciPy 1.4)
19-
import scipy.fft
18+
import scipy
2019
fftmodule = scipy.fft
2120
next_fast_len = fftmodule.next_fast_len
2221
except ImportError:
23-
try:
24-
import scipy.fftpack
25-
fftmodule = scipy.fftpack
26-
next_fast_len = fftmodule.next_fast_len
27-
except ImportError:
28-
fftmodule = np.fft
29-
30-
# provide a fallback so scipy is an optional requirement
31-
def next_fast_len(n):
32-
"""Round up size to the nearest power of two.
33-
34-
Given a number of samples `n`, returns the next power of two
35-
following this number to take advantage of FFT speedup.
36-
This fallback is less efficient than `scipy.fftpack.next_fast_len`
37-
"""
38-
return 2**ceil(np.log2(n))
22+
fftmodule = np.fft
23+
24+
# provide a fallback so scipy is an optional requirement
25+
# note: numpy.fft in numpy 2.0 is as fast as scipy.fft, so could be used
26+
# unconditionally once the minimum supported numpy version is >=2.0
27+
def next_fast_len(n):
28+
"""Round up size to the nearest power of two.
29+
30+
Given a number of samples `n`, returns the next power of two
31+
following this number to take advantage of FFT speedup.
32+
This fallback is less efficient than `scipy.fftpack.next_fast_len`
33+
"""
34+
return 2**ceil(np.log2(n))
3935

4036

4137
def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1):

tox.ini

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,14 @@
2020

2121
[tox]
2222
toxworkdir = {homedir}/.tox/pywt/
23-
envlist = py39, py310
23+
envlist = py310, py311, py312
2424

2525
[testenv]
2626
deps =
27-
flake8
2827
pytest
2928
cython
3029
numpy
3130
matplotlib
3231
changedir = {envdir}
3332
commands =
3433
pytest {toxinidir}/pywt/tests -v
35-
# flake8 --exit-zero pywt
36-
37-
[pep8]
38-
max_line_length = 79
39-
statistics = True
40-
ignore = E121,E122,E123,E125,E126,E127,E128,E226,E231,E501,E712

0 commit comments

Comments
 (0)