Skip to content

Commit 67263d6

Browse files
authored
Merge pull request #122 from avalentino/bugfix/python-1.12-compat
Fix compatibility with Python >= 3.12
2 parents 84682d6 + d31c4c6 commit 67263d6

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
python -m pytest tests
5151
python -m pytest --doctest-only resampy
5252
- name: Upload coverage to Codecov
53-
uses: codecov/codecov-action@v3
53+
uses: codecov/codecov-action@v4
5454
with:
5555
token: ${{ secrets.CODECOV_TOKEN }}
5656
files: ./coverage.xml

.readthedocs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.12"
7+
8+
python:
9+
install:
10+
- method: pip
11+
path: .
12+
- requirements: docs/requirements.txt
13+
14+
sphinx:
15+
configuration: docs/conf.py

docs/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@
6666
# |version| and |release|, also used in various other places throughout the
6767
# built documents.
6868
#
69-
import imp
70-
resampy_version = imp.load_source('resampy.version', '../resampy/version.py')
69+
import importlib.util
70+
spec = importlib.util.spec_from_file_location('resampy.version', '../resampy/version.py')
71+
resampy_version = importlib.util.module_from_spec(spec)
72+
spec.loader.exec_module(resampy_version)
7173

7274
# The short X.Y version.
7375
version = resampy_version.short_version

0 commit comments

Comments
 (0)