From ad6a04580e46cbddfbf27abca511f87ba152e4d4 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 11 Mar 2024 14:19:16 +0100 Subject: [PATCH 1/6] Increment version --- setup.py | 2 +- src/zlib_ng/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index fc336a6..2a34c5e 100644 --- a/setup.py +++ b/setup.py @@ -123,7 +123,7 @@ def build_zlib_ng(): setup( name="zlib-ng", - version="0.4.1", + version="0.5.0-dev", description="Drop-in replacement for zlib and gzip modules using zlib-ng", author="Leiden University Medical Center", author_email="r.h.p.vorderman@lumc.nl", # A placeholder for now diff --git a/src/zlib_ng/__init__.py b/src/zlib_ng/__init__.py index 53c4ac5..aa9ea12 100644 --- a/src/zlib_ng/__init__.py +++ b/src/zlib_ng/__init__.py @@ -5,4 +5,4 @@ # This file is part of python-zlib-ng which is distributed under the # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2. -__version__ = "0.4.1" +__version__ = "0.5.0-dev" From e42d49316cfbfb7a07437f1dc09f9500ceb823ab Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 5 Apr 2024 16:14:01 +0200 Subject: [PATCH 2/6] Add missing incref call --- src/zlib_ng/zlib_ngmodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zlib_ng/zlib_ngmodule.c b/src/zlib_ng/zlib_ngmodule.c index 79fa29d..f6d543d 100644 --- a/src/zlib_ng/zlib_ngmodule.c +++ b/src/zlib_ng/zlib_ngmodule.c @@ -3061,6 +3061,7 @@ PyInit_zlib_ng(void) ver = PyUnicode_FromString("1.2.12"); if (ver!= NULL) { PyModule_AddObject(m, "ZLIB_VERSION", ver); + Py_INCREF(ver); PyModule_AddObject(m, "ZLIB_RUNTIME_VERSION", ver); } From 2c80f39e4c2a7efc4798944ea4a0faebbf3f97fe Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 5 Apr 2024 16:24:10 +0200 Subject: [PATCH 3/6] Checkout both macos --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aa6b46..59170f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,9 @@ jobs: - "pypy-3.10" os: ["ubuntu-latest"] include: - - os: "macos-latest" + - os: "macos-latest" # For m1 macos + python-version: "3.8" + - os: "macos-13" # for x86 macos python-version: "3.8" - os: "windows-latest" python-version: "3.8" From 39b8832983ad4ddfcfe909cf8de0fe4484ec10e8 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 5 Apr 2024 16:26:14 +0200 Subject: [PATCH 4/6] Be make agnostic for macos --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2a34c5e..8da9d85 100644 --- a/setup.py +++ b/setup.py @@ -105,7 +105,8 @@ def build_zlib_ng(): run_args = dict(cwd=build_dir, env=build_env) if sys.platform == "darwin": # Cmake does not work properly subprocess.run([os.path.join(build_dir, "configure")], **run_args) - subprocess.run(["gmake", "libz-ng.a"], **run_args) + make_program = "gmake" if shutil.which("gmake") else "make" + subprocess.run([make_program, "libz-ng.a"], **run_args) elif sys.platform == "linux": subprocess.run([os.path.join(build_dir, "configure")], **run_args) subprocess.run(["make", "libz-ng.a", "-j", str(cpu_count)], **run_args) From e06b1d89a80da08b43aad159a2b65c37f2b21f23 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Wed, 10 Apr 2024 13:02:03 +0200 Subject: [PATCH 5/6] Update changelog with patches for 0.4.2 --- CHANGELOG.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0d447b5..7dc80dd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,12 @@ Changelog .. This document is user facing. Please word the changes in such a way .. that users understand how the changes affect the new version. +version 0.4.2 +----------------- ++ Fix a reference counting error that happened on module initialization and + triggered an error in the CPython debug build. ++ Fix a setup.py error that was triggered on MacOS ARM64. + version 0.4.1 ----------------- + Fix a bug where streams that were passed to gzip_ng_threaded.open where From 94d5954d66401b7839d7d4b83ec4bc4ab2a31c0c Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Wed, 10 Apr 2024 13:04:39 +0200 Subject: [PATCH 6/6] Set stable version number --- setup.py | 2 +- src/zlib_ng/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8da9d85..7fb82b6 100644 --- a/setup.py +++ b/setup.py @@ -124,7 +124,7 @@ def build_zlib_ng(): setup( name="zlib-ng", - version="0.5.0-dev", + version="0.4.2", description="Drop-in replacement for zlib and gzip modules using zlib-ng", author="Leiden University Medical Center", author_email="r.h.p.vorderman@lumc.nl", # A placeholder for now diff --git a/src/zlib_ng/__init__.py b/src/zlib_ng/__init__.py index aa9ea12..e696c44 100644 --- a/src/zlib_ng/__init__.py +++ b/src/zlib_ng/__init__.py @@ -5,4 +5,4 @@ # This file is part of python-zlib-ng which is distributed under the # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2. -__version__ = "0.5.0-dev" +__version__ = "0.4.2"