Skip to content

Commit 34ac041

Browse files
authored
MAINT: fix numba v68; Python 3.15 (#257)
- Tests: enable 3.15, remove 3.11 - Numba v0.68 fix: Something changed, which returns a np.exp(-inf) as nan, no longer as 0, when fastmath is enabled. Disabling it. - Update GHAs
1 parent 12a7b18 commit 34ac041

5 files changed

Lines changed: 36 additions & 25 deletions

File tree

‎.github/workflows/linkcheck.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727

2828
# Checks-out your repository under $GITHUB_WORKSPACE
2929
- name: Checkout
30-
uses: actions/checkout@v6.0.1
30+
uses: actions/checkout@v7.0.1
3131

3232
- name: Setup Python
33-
uses: actions/setup-python@v6.1.0
33+
uses: actions/setup-python@v4.1.0
3434
with:
3535
python-version: "3.13"
3636

‎.github/workflows/linux.yml‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,40 +36,40 @@ jobs:
3636
matrix:
3737
os: [ubuntu, ] # macos, windows] # Only Linux currently.
3838
case:
39-
- python-version: "3.11"
39+
- python-version: "3.12"
4040
name: minimal
4141
os: ubuntu
4242
conda: "numba 'numpy==2.0.0' scipy scooby libdlf"
4343
test: ""
44-
- python-version: "3.12"
44+
- python-version: "3.13"
4545
name: plain
4646
os: ubuntu
47-
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf"
47+
conda: "numba 'numpy' scipy scooby libdlf"
4848
test: ""
49-
- python-version: "3.12"
49+
- python-version: "3.13"
5050
name: full
5151
os: ubuntu
52-
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf matplotlib pytest-mpl"
52+
conda: "numba 'numpy' scipy scooby libdlf matplotlib pytest-mpl"
5353
test: "--mpl"
54-
- python-version: "3.13"
54+
- python-version: "3.14"
5555
name: plain
5656
os: ubuntu
57-
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf"
57+
conda: "numba 'numpy' scipy scooby libdlf"
5858
test: ""
59-
- python-version: "3.13"
59+
- python-version: "3.14"
6060
name: full
6161
os: ubuntu
62-
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf matplotlib pytest-mpl"
62+
conda: "numba 'numpy' scipy scooby libdlf matplotlib pytest-mpl"
6363
test: "--mpl"
64-
- python-version: "3.14"
64+
- python-version: "3.15"
6565
name: plain
6666
os: ubuntu
67-
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf"
67+
conda: "numba 'numpy' scipy scooby libdlf"
6868
test: ""
69-
- python-version: "3.14"
69+
- python-version: "3.15"
7070
name: full
7171
os: ubuntu
72-
conda: "numba 'numpy>=2.0.0' scipy scooby libdlf matplotlib pytest-mpl"
72+
conda: "numba 'numpy' scipy scooby libdlf matplotlib pytest-mpl"
7373
test: "--mpl"
7474

7575
env:
@@ -81,7 +81,7 @@ jobs:
8181

8282
# Checks-out your repository under $GITHUB_WORKSPACE
8383
- name: Checkout
84-
uses: actions/checkout@v6.0.1
84+
uses: actions/checkout@v7.0.1
8585
with:
8686
# Need to fetch more than the last commit so that setuptools-scm can
8787
# create the correct version string. If the number of commits since
@@ -97,7 +97,7 @@ jobs:
9797
run: git fetch origin 'refs/tags/*:refs/tags/*'
9898

9999
- name: Setup miniconda
100-
uses: conda-incubator/setup-miniconda@v3.2.0
100+
uses: conda-incubator/setup-miniconda@v4.1.0
101101
with:
102102
auto-update-conda: true
103103
python-version: ${{ matrix.case.python-version }}
@@ -156,7 +156,7 @@ jobs:
156156
steps:
157157
# Checks-out your repository under $GITHUB_WORKSPACE
158158
- name: Checkout
159-
uses: actions/checkout@v6.0.1
159+
uses: actions/checkout@v7.0.1
160160
with:
161161
# Need to fetch more than the last commit so that setuptools-scm can
162162
# create the correct version string. If the number of commits since
@@ -172,7 +172,7 @@ jobs:
172172
run: git fetch origin 'refs/tags/*:refs/tags/*'
173173

174174
- name: Setup Python
175-
uses: actions/setup-python@v6.1.0
175+
uses: actions/setup-python@v7.1.0
176176
with:
177177
python-version: "3.11"
178178

@@ -199,7 +199,7 @@ jobs:
199199
200200
- name: Publish to Test PyPI
201201
if: success()
202-
uses: pypa/gh-action-pypi-publish@v1.13.0
202+
uses: pypa/gh-action-pypi-publish@v1.14.3
203203
with:
204204
user: __token__
205205
password: ${{ secrets.TEST_PYPI_PASSWORD }}
@@ -211,7 +211,7 @@ jobs:
211211
- name: Publish to PyPI
212212
# Only for releases
213213
if: success() && github.event_name == 'release'
214-
uses: pypa/gh-action-pypi-publish@v1.13.0
214+
uses: pypa/gh-action-pypi-publish@v1.14.3
215215
with:
216216
user: __token__
217217
password: ${{ secrets.PYPI_PASSWORD }}

‎.github/workflows/macos_windows.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
# Checks-out your repository under $GITHUB_WORKSPACE
4343
- name: Checkout
44-
uses: actions/checkout@v6.0.1
44+
uses: actions/checkout@v7.0.1
4545
with:
4646
# Need to fetch more than the last commit so that setuptools-scm can
4747
# create the correct version string. If the number of commits since
@@ -57,7 +57,7 @@ jobs:
5757
run: git fetch origin 'refs/tags/*:refs/tags/*'
5858

5959
- name: Setup miniconda
60-
uses: conda-incubator/setup-miniconda@v3.2.0
60+
uses: conda-incubator/setup-miniconda@v4.1.0
6161
with:
6262
auto-update-conda: true
6363
python-version: ${{ matrix.python }}

‎CHANGELOG.rst‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ v2.6.x
1010
""""""
1111

1212

13+
v2.6.1: Fix for numba v0.68
14+
---------------------------
15+
16+
**2026-10-23**
17+
18+
- Bug fix to keep it working with numba v0.68.
19+
20+
- Maintenance
21+
22+
- Testing: added Python 3.15; removed Python 3.11.
23+
24+
1325
v2.6.0: Arbitrary waveforms
1426
---------------------------
1527

‎empymod/kernel.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
# Numba-settings
4040
_numba_setting = {'nogil': True, 'cache': True}
41-
_numba_with_fm = {'fastmath': True, **_numba_setting}
4241

4342

4443
def __dir__():
@@ -418,7 +417,7 @@ def greenfct(zsrc, zrec, lsrc, lrec, depth, etaH, etaV, zetaH, zetaV, lambd,
418417
return GTM, GTE
419418

420419

421-
@nb.njit(**_numba_with_fm)
420+
@nb.njit(**_numba_setting)
422421
def reflections(depth, e_zH, Gam, lrec, lsrc):
423422
r"""Calculate Rp, Rm.
424423

0 commit comments

Comments
 (0)