Skip to content

πŸŽ› πŸ”Š A Python library for audio.

Add support for Python 3.13rc1 and drop support for Python 3.7. (#348)

Peter Sobot15ed6059a34a
diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml
index 998e414..8ba5bc4 100644
--- a/.github/workflows/all.yml
+++ b/.github/workflows/all.yml
@@ -131,11 +131,11 @@ jobs:
ccache --show-stats --verbose
ccache --zero-stats
# cat ${{ runner.workspace }}/.ccache_log || true
- - name: Delete Existing Cache for ${{ runner.os }} Objects
- run: gh cache delete --repo ${{ github.repository }} ${{ steps.cache-objects-restore.outputs.cache-primary-key }}
- env:
- # This token requires the "repo" scope.
- GITHUB_TOKEN: ${{ secrets.ACTION_CLEAR_CACHES_TOKEN }}
+ # - name: Delete Existing Cache for ${{ runner.os }} Objects
+ # run: gh cache delete --repo ${{ github.repository }} ${{ steps.cache-objects-restore.outputs.cache-primary-key }}
+ # env:
+ # # This token requires the "repo" scope.
+ # GITHUB_TOKEN: ${{ secrets.ACTION_CLEAR_CACHES_TOKEN }}
- name: Save Cached ${{ runner.os }} Objects
id: cache-objects-save
uses: actions/cache/save@v4
@@ -215,11 +215,11 @@ jobs:
ccache --zero-stats
# cat ${{ runner.workspace }}/.ccache_log || true
# ls -lashR ${{ runner.workspace }}/pedalboard
- - name: Delete Existing Cache for ${{ runner.os }} Objects
- run: gh cache delete --repo ${{ github.repository }} ${{ steps.cache-objects-restore.outputs.cache-primary-key }}
- env:
- # This token requires the "repo" scope.
- GITHUB_TOKEN: ${{ secrets.ACTION_CLEAR_CACHES_TOKEN }}
+ # - name: Delete Existing Cache for ${{ runner.os }} Objects
+ # run: gh cache delete --repo ${{ github.repository }} ${{ steps.cache-objects-restore.outputs.cache-primary-key }}
+ # env:
+ # # This token requires the "repo" scope.
+ # GITHUB_TOKEN: ${{ secrets.ACTION_CLEAR_CACHES_TOKEN }}
- name: Save Cached ${{ runner.os }} Objects
id: cache-objects-save
uses: actions/cache/save@v4
@@ -314,11 +314,11 @@ jobs:
ccache --zero-stats
# cat ${{ runner.workspace }}/.ccache_log || true
# ls -lashR ${{ runner.workspace }}
- - name: Delete Existing Cache for ${{ runner.os }} Objects
- run: gh cache delete --repo ${{ github.repository }} ${{ steps.cache-objects-restore.outputs.cache-primary-key }}
- env:
- # This token requires the "repo" scope.
- GITHUB_TOKEN: ${{ secrets.ACTION_CLEAR_CACHES_TOKEN }}
+ # - name: Delete Existing Cache for ${{ runner.os }} Objects
+ # run: gh cache delete --repo ${{ github.repository }} ${{ steps.cache-objects-restore.outputs.cache-primary-key }}
+ # env:
+ # # This token requires the "repo" scope.
+ # GITHUB_TOKEN: ${{ secrets.ACTION_CLEAR_CACHES_TOKEN }}
- name: Save Cached ${{ runner.os }} Objects
id: cache-objects-save
uses: actions/cache/save@v4
@@ -447,24 +447,24 @@ jobs:
strategy:
matrix:
include:
- - { os: macos-13, python-version: "3.7", compiler: "clang", cc: "ccache clang", cxx: "ccache clang++" }
- { os: macos-13, python-version: "3.8", compiler: "clang", cc: "ccache clang", cxx: "ccache clang++" }
- { os: macos-13, python-version: "3.9", compiler: "clang", cc: "ccache clang", cxx: "ccache clang++" }
- { os: macos-13, python-version: "3.10", compiler: "clang", cc: "ccache clang", cxx: "ccache clang++" }
- { os: macos-13, python-version: "3.11", compiler: "clang", cc: "ccache clang", cxx: "ccache clang++" }
- { os: macos-13, python-version: "3.12", compiler: "clang", cc: "ccache clang", cxx: "ccache clang++" }
- - { os: ubuntu-20.04, python-version: "3.7", compiler: "gcc", cc: "ccache gcc", cxx: "ccache g++" }
+ - { os: macos-13, python-version: "3.13.0-rc.1", compiler: "clang", cc: "ccache clang", cxx: "ccache clang++" }
- { os: ubuntu-20.04, python-version: "3.8", compiler: "gcc", cc: "ccache gcc", cxx: "ccache g++" }
- { os: ubuntu-20.04, python-version: "3.9", compiler: "gcc", cc: "ccache gcc", cxx: "ccache g++" }
- { os: ubuntu-20.04, python-version: "3.10", compiler: "gcc", cc: "ccache gcc", cxx: "ccache g++" }
- { os: ubuntu-20.04, python-version: "3.11", compiler: "gcc", cc: "ccache gcc", cxx: "ccache g++" }
- { os: ubuntu-20.04, python-version: "3.12", compiler: "gcc", cc: "ccache gcc", cxx: "ccache g++" }
- # - { os: windows-latest, python-version: "3.7", compiler: "msvc", cc: "msvc", cxx: "msvc" }
+ - { os: ubuntu-20.04, python-version: "3.13.0-rc.1", compiler: "gcc", cc: "ccache gcc", cxx: "ccache g++" }
# - { os: windows-latest, python-version: "3.8", compiler: "msvc", cc: "msvc", cxx: "msvc" }
# - { os: windows-latest, python-version: "3.9", compiler: "msvc", cc: "msvc", cxx: "msvc" }
# - { os: windows-latest, python-version: "3.10", compiler: "msvc", cc: "msvc", cxx: "msvc" }
# - { os: windows-latest, python-version: "3.11", compiler: "msvc", cc: "msvc", cxx: "msvc" }
- { os: windows-latest, python-version: "3.12", compiler: "msvc", cc: "msvc", cxx: "msvc" }
+ - { os: windows-latest, python-version: "3.13.0-rc.1", compiler: "msvc", cc: "msvc", cxx: "msvc" }
name: Test with Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- name: Set up Python ${{ matrix.python-version }}
@@ -593,7 +593,7 @@ jobs:
needs: [prime-asan-build-caches]
strategy:
matrix:
- python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: ['ubuntu-20.04']
name: Test with Python ${{ matrix.python-version }} + Address Sanitizer
steps:
@@ -679,47 +679,45 @@ jobs:
strategy:
matrix:
include:
- - { os: macos-12, build: cp36-macosx_x86_64 }
- - { os: macos-12, build: cp37-macosx_x86_64 }
- { os: macos-12, build: cp38-macosx_x86_64 }
- { os: macos-12, build: cp39-macosx_x86_64 }
- { os: macos-12, build: cp310-macosx_x86_64 }
- { os: macos-12, build: cp311-macosx_x86_64 }
- { os: macos-12, build: cp312-macosx_x86_64 }
+ # - { os: macos-12, build: cp313-macosx_x86_64 }
+ # - { os: macos-12, build: cp313t-macosx_x86_64 }
- { os: macos-12, build: cp38-macosx_universal2 }
- { os: macos-12, build: cp39-macosx_universal2 }
- { os: macos-12, build: cp310-macosx_universal2 }
- { os: macos-12, build: cp311-macosx_universal2 }
- { os: macos-12, build: cp312-macosx_universal2 }
+ # - { os: macos-12, build: cp313-macosx_universal2 }
+ # - { os: macos-12, build: cp313t-macosx_universal2 }
- { os: macos-12, build: cp38-macosx_arm64 }
- { os: macos-12, build: cp39-macosx_arm64 }
- { os: macos-12, build: cp310-macosx_arm64 }
- { os: macos-12, build: cp311-macosx_arm64 }
- { os: macos-12, build: cp312-macosx_arm64 }
+ # - { os: macos-12, build: cp313-macosx_arm64 }
+ # - { os: macos-12, build: cp313t-macosx_arm64 }
- { os: macos-12, build: pp37-macosx_x86_64 }
- { os: macos-12, build: pp38-macosx_x86_64 }
- { os: macos-12, build: pp39-macosx_x86_64 }
- - { os: windows-latest, build: cp36-win_amd64 }
- - { os: windows-latest, build: cp37-win_amd64 }
- { os: windows-latest, build: cp38-win_amd64 }
- { os: windows-latest, build: cp39-win_amd64 }
- { os: windows-latest, build: cp310-win_amd64 }
- { os: windows-latest, build: cp311-win_amd64 }
- { os: windows-latest, build: cp312-win_amd64 }
+ # - { os: windows-latest, build: cp313-win_amd64 }
+ # - { os: windows-latest, build: cp313t-win_amd64 }
- { os: windows-latest, build: pp37-win_amd64 }
- { os: windows-latest, build: pp38-win_amd64 }
- { os: windows-latest, build: pp39-win_amd64 }
- - { os: windows-latest, build: cp36-win32 }
- - { os: windows-latest, build: cp37-win32 }
- { os: windows-latest, build: cp38-win32 }
- { os: windows-latest, build: cp39-win32 }
- { os: windows-latest, build: cp310-win32 }
- { os: windows-latest, build: cp311-win32 }
- { os: windows-latest, build: cp312-win32 }
- - { os: 'ubuntu-20.04', build: cp36-manylinux_x86_64 }
- - { os: 'ubuntu-20.04', build: cp36-manylinux_aarch64 }
- - { os: 'ubuntu-20.04', build: cp37-manylinux_x86_64 }
- - { os: 'ubuntu-20.04', build: cp37-manylinux_aarch64 }
- { os: 'ubuntu-20.04', build: cp38-manylinux_x86_64 }
- { os: 'ubuntu-20.04', build: cp38-manylinux_aarch64 }
- { os: 'ubuntu-20.04', build: cp38-musllinux_x86_64 }
@@ -740,6 +738,14 @@ jobs:
- { os: 'ubuntu-20.04', build: cp312-manylinux_aarch64 }
- { os: 'ubuntu-20.04', build: cp312-musllinux_x86_64 }
- { os: 'ubuntu-20.04', build: cp312-musllinux_aarch64 }
+ - { os: 'ubuntu-20.04', build: cp313-manylinux_x86_64 }
+ - { os: 'ubuntu-20.04', build: cp313-manylinux_aarch64 }
+ # - { os: 'ubuntu-20.04', build: cp313-musllinux_x86_64 }
+ # - { os: 'ubuntu-20.04', build: cp313-musllinux_aarch64 }
+ - { os: 'ubuntu-20.04', build: cp313t-manylinux_x86_64 }
+ - { os: 'ubuntu-20.04', build: cp313t-manylinux_aarch64 }
+ # - { os: 'ubuntu-20.04', build: cp313t-musllinux_x86_64 }
+ # - { os: 'ubuntu-20.04', build: cp313t-musllinux_aarch64 }
- { os: 'ubuntu-20.04', build: pp37-manylinux_x86_64 }
- { os: 'ubuntu-20.04', build: pp37-manylinux_aarch64 }
- { os: 'ubuntu-20.04', build: pp38-manylinux_x86_64 }
@@ -779,10 +785,12 @@ jobs:
# The musllinux containers on aarch64 take 6+ hours to test.
# Also testing any pypy versions fails, as TensorFlow isn't pypy compatible.
CIBW_TEST_SKIP: "*manylinux* *musllinux_aarch* *pp* *-macosx_universal2:arm64"
+ CIBW_PRERELEASE_PYTHONS: "1"
# Use the minimum macOS deployment target that has C++17 support:
MACOSX_DEPLOYMENT_TARGET: "10.13"
CIBW_MUSLLINUX_X86_64_IMAGE: quay.io/pypa/musllinux_1_1_x86_64:2024-04-29-07d05a0
CIBW_MUSLLINUX_AARCH64_IMAGE: quay.io/pypa/musllinux_1_1_aarch64:2024-04-29-07d05a0
+ CIBW_FREE_THREADED_SUPPORT: "1"
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f37af53..a01e2fe 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,7 +8,7 @@ We'd love to get patches from you!
To compile Pedalboard from scratch, the following packages will need to be installed:
-- [Python 3.7](https://www.python.org/downloads/) or higher.
+- [Python 3.8](https://www.python.org/downloads/) or higher.
- A C++ compiler, e.g. `gcc`, `clang`, etc.
- On macOS, a working Xcode installation should provide this.
- On Linux:
diff --git a/README.md b/README.md
index f869701..023864b 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ If you are new to Python, follow [INSTALLATION.md](https://github.com/spotify/pe
### Compatibility
-`pedalboard` is thoroughly tested with Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12 as well as experimental support for PyPy 3.7, 3.8, and 3.9.
+`pedalboard` is thoroughly tested with Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13.
- Linux
- Tested heavily in production use cases at Spotify
diff --git a/pedalboard/python_bindings.cpp b/pedalboard/python_bindings.cpp
index 8ebd2a5..fd83cf0 100644
--- a/pedalboard/python_bindings.cpp
+++ b/pedalboard/python_bindings.cpp
@@ -72,7 +72,7 @@ namespace py = pybind11;
using namespace Pedalboard;
-PYBIND11_MODULE(pedalboard_native, m) {
+PYBIND11_MODULE(pedalboard_native, m, py::mod_gil_not_used()) {
m.doc() =
("This module provides classes and functions for generating and adding "
"effects to audio. Most classes in this module are subclasses of "
diff --git a/pyproject.toml b/pyproject.toml
index 69add7b..a5cd814 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,9 +2,11 @@
requires = [
"setuptools>=59.6.0",
"wheel>=0.36.2",
- "pybind11>=2.12",
+ 'pybind11>=2.13; python_version>="3.9"',
+ 'pybind11<=2.12; python_version<="3.8"',
# Building with NumPy 2 allows backwards compatibility with NumPy 1:
- 'numpy>=2; python_version>="3.9"',
+ 'numpy>=2.1.0rc1; python_version>="3.13"',
+ 'numpy>=2; python_version>="3.9" and python_version<"3.13"',
'numpy<2; python_version<="3.8"',
]
@@ -18,4 +20,4 @@ before-all = "yum install -y libsndfile libX11-devel libXrandr-devel libXinerama
# Use apk instead of yum when building on Alpine Linux
# (Note: this is experimental, as most VSTs require glibc and thus Alpine Linux isn't that useful)
select = "*-musllinux*"
-before-all = "apk add libsndfile libx11-dev libxrandr-dev libxinerama-dev libxrender-dev libxcomposite-dev libxinerama-dev libxcursor-dev freetype-dev libexecinfo-dev"
+before-all = "apk add libsndfile libx11-dev libxrandr-dev libxinerama-dev libxrender-dev libxcomposite-dev libxinerama-dev libxcursor-dev freetype-dev"
diff --git a/setup.py b/setup.py
index 1199391..a364276 100644
--- a/setup.py
+++ b/setup.py
@@ -483,13 +483,12 @@ setup(
"Programming Language :: C++",
"Programming Language :: Python",
"Topic :: Multimedia :: Sound/Audio",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
],
ext_modules=[pedalboard_cpp],
install_requires=["numpy"],
diff --git a/test-requirements.txt b/test-requirements.txt
index 71d03dc..72c87a4 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -2,13 +2,16 @@ coverage
pytest>6.2
pytest-cov
pytest-mock
-pybind11>=2.10.4
+pybind11<2.13; python_version < '3.7'
+pybind11>=2.13; python_version >= '3.7'
setuptools>=59
pip>22; python_version > '3.6'
pip>21; python_version < '3.7'
wheel
-numpy
+numpy>=2.1.0rc1; python_version>="3.13"
+numpy>=2; python_version>="3.9" and python_version<"3.13"
+numpy<2; python_version<="3.8"
google-cloud-storage
tqdm
psutil
diff --git a/vendors/execinfo.h b/vendors/execinfo.h
new file mode 100644
index 0000000..5d5e5c5
--- /dev/null
+++ b/vendors/execinfo.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _EXECINFO_H
+#define _EXECINFO_H 1
+
+/* Store up to SIZE return address of the current program state in
+ ARRAY and return the exact number of values stored. */
+int backtrace(void **__array, int __size) { return 0; }
+
+/* Return names of functions from the backtrace list in ARRAY in a newly
+ malloc()ed memory block. */
+char **backtrace_symbols(void *const *__array, int __size) {
+ return (char **)0;
+}
+
+/* This function is similar to backtrace_symbols() but it writes the result
+ immediately to a file. */
+void backtrace_symbols_fd(void *const *__array, int __size, int __fd) {}
+
+#endif /* execinfo.h */
\ No newline at end of file
diff --git a/vendors/pybind11 b/vendors/pybind11
index 19a6b9f..0c69e1e 160000
--- a/vendors/pybind11
+++ b/vendors/pybind11
@@ -1 +1 @@
-Subproject commit 19a6b9f4efb569129c878b7f8db09132248fbaa1
+Subproject commit 0c69e1eb2177fa8f8580632c7b1f97fdb606ce8f