From 2e2c9489e992f7fda9f2995afc9c91932614114a Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 2 Mar 2023 11:56:28 -0500 Subject: [PATCH 1/3] README: Remove out of date references to Cython versions. --- README.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index e3cb98cf..f35fbaaa 100644 --- a/README.rst +++ b/README.rst @@ -54,7 +54,7 @@ To check out the development sources, you can use Git_:: You may also download source tarballs of any snapshot from that URL. Source releases will require a C compiler in order to build `line_profiler`. -In addition, git checkouts will also require Cython_ >= 0.10. Source releases +In addition, git checkouts will also require Cython. Source releases on PyPI should contain the pregenerated C sources, so Cython should not be required in that case. @@ -381,8 +381,7 @@ Frequently Asked Questions It should contain the generated C sources already. If you are running into problems, that may be a bug; let me know. If you are building from a git checkout or snapshot, you will need Cython to generate the - C sources. You will probably need version 0.10 or higher. There is a bug in - some earlier versions in how it handles NULL PyObject* pointers. + C sources. As of version ``3.0.0`` manylinux wheels containing the binaries are available on pypi. Work is still needed to publish osx and win32 wheels. From e8a89a975336a133ccec6742eac0819457d80def Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 2 Mar 2023 11:44:52 -0500 Subject: [PATCH 2/3] Stop requiring a bleeding-edge version of Cython. Requiring `Cython>=3.0.0a11` opens the door to any later pre-release; this includes the newly-released 3.0.0b1, which breaks backwards compatibility or requires the addition of a non-backwards-compatible compiler flag (`legacy_implicit_noexcept`). Fixing this would require code changes and pinning the minimum Cython version to 3.0.0b1. There is no reason to require a bleeding-edge version of Cython. Doing so opens the door to installs suddenly failing due to breaking changes in dependencies, such as this one. Python 3.12 will break compatibility with Cython 0.29, however, so we make an exception for that version of Python. For Python 3.12, we leave Cython pinned to 3.0.0a11, which is the latest version which works with that Python but is still compatible with the current code. For other versions of Python, revert the version bump to bleeding-edge Cython added in a9448ec3b3720dec352bf6a90b5bfbecaf8d13d1, and only require 0.29.24 or higher. Fixes: #204. --- pyproject.toml | 6 +++++- requirements/build.txt | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4eb4fdd2..46ce0180 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,9 @@ [build-system] -requires = ["setuptools>=41.0.1", "Cython>=3.0.0a11"] +requires = [ + "setuptools>=41.0.1", + "Cython==3.0.0a11 ; python_version < '4.0' and python_version >= '3.12' ", + "Cython>=0.29.24,<=3.0.0a11 ; python_version < '3.12' ", +] build-backend = "setuptools.build_meta" # comment out to disable pep517 [tool.coverage.run] diff --git a/requirements/build.txt b/requirements/build.txt index 6a282aec..94ad12ea 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,5 +1,7 @@ # Cython is the only hard requirement -Cython>=3.0.0a11 +Cython==3.0.0a11 ; python_version < '4.0' and python_version >= '3.12' # Python 3.12+ +Cython>=0.29.24,<=3.0.0a11 ; python_version < '3.12' # Python 3.6 - 3.11 + scikit-build>=0.11.1 cmake>=3.21.2 ninja>=1.10.2 From 152c0d465fe317424dfb36e7822e740086ba5606 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 3 Mar 2023 12:47:54 -0500 Subject: [PATCH 3/3] Version 4.0.3. --- CHANGELOG.rst | 4 ++++ kernprof.py | 2 +- line_profiler/line_profiler.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6a164b62..5dfd4a35 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,10 @@ Changes ======= +4.0.3 +~~~~ +* FIX: Stop requiring bleeding-edge Cython unless necesasry (for Python 3.12). #206 + 4.0.2 ~~~~~ * FIX: AttributeError on certain methods. #191 diff --git a/kernprof.py b/kernprof.py index b3a7d619..54cb8c2d 100755 --- a/kernprof.py +++ b/kernprof.py @@ -13,7 +13,7 @@ # NOTE: This version needs to be manually maintained with the line_profiler # __version__ for now. -__version__ = '4.0.2' +__version__ = '4.0.3' # Guard the import of cProfile such that 3.x people # without lsprof can still use this script. diff --git a/line_profiler/line_profiler.py b/line_profiler/line_profiler.py index e9cf56ad..bfcd009e 100755 --- a/line_profiler/line_profiler.py +++ b/line_profiler/line_profiler.py @@ -16,7 +16,7 @@ f'Has it been compiled? Underlying error is ex={ex!r}' ) -__version__ = '4.0.2' +__version__ = '4.0.3' def load_ipython_extension(ip):