diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 853d956..2f4e6eb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -92,6 +92,7 @@ jobs: - "3.11" - "3.12" - "3.13" + - "3.14" steps: - uses: actions/checkout@v4 - name: Try to get cached BlazingMQ build artifacts diff --git a/README.md b/README.md index 58bd12e..adb1934 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ [![MessageQueue](https://img.shields.io/badge/MessageQueue-blue)](#) [![Documentation](https://img.shields.io/badge/Documentation-blue)](https://bloomberg.github.io/blazingmq) [![Code Style](https://img.shields.io/badge/Black-black)](#) -![Supported Python versions](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.1220%7C%203.13-blue?logo=python) +![Supported Python versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue?logo=python) # BlazingMQ Python SDK diff --git a/news/60.misc.rst b/news/60.misc.rst new file mode 100644 index 0000000..8955da4 --- /dev/null +++ b/news/60.misc.rst @@ -0,0 +1 @@ +Support Python 3.14 diff --git a/setup.py b/setup.py index 09223a4..db9740a 100644 --- a/setup.py +++ b/setup.py @@ -201,6 +201,7 @@ def create_extension(name, libraries, **kwargs): "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", diff --git a/src/blazingmq/_callbacks.py b/src/blazingmq/_callbacks.py index 9b39c82..3eeb11a 100644 --- a/src/blazingmq/_callbacks.py +++ b/src/blazingmq/_callbacks.py @@ -123,12 +123,14 @@ def on_message( user_callback(message, message_handle) del message_handle # The message handle holds a reference to the extension session. - if sys.getrefcount(ext_session) == 2: # covered in a subprocess # pragma: no cover + ext_session_ref_count = sys.getrefcount(ext_session) + if ext_session_ref_count == 2: # covered in a subprocess # pragma: no cover # Dropping our reference to the extension session will drop its reference count # to 0, calling __dealloc__ and stop() from its own background thread. print( - "Deadlock detected by blazingmq after calling %s; aborting process." - % user_callback, + f"Deadlock detected by blazingmq after calling { user_callback } " + + f"(ext_session ref count is { ext_session_ref_count }); " + + f"aborting process.", file=sys.stderr, ) try: