From 91f7ccad1ec41472ed2085f8620b76f052e7e242 Mon Sep 17 00:00:00 2001 From: jguz-pubnub Date: Fri, 12 Jun 2026 11:23:26 +0200 Subject: [PATCH 1/3] Log endpoint name instead of numeric operation type --- pubnub/endpoints/endpoint.py | 1 + pubnub/request_handlers/async_aiohttp.py | 2 +- pubnub/request_handlers/async_httpx.py | 2 +- pubnub/request_handlers/httpx.py | 6 +++--- pubnub/request_handlers/requests.py | 2 +- pubnub/structures.py | 4 +++- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pubnub/endpoints/endpoint.py b/pubnub/endpoints/endpoint.py index aee7e370..cc4e3592 100644 --- a/pubnub/endpoints/endpoint.py +++ b/pubnub/endpoints/endpoint.py @@ -134,6 +134,7 @@ def options(self): create_status=self.create_status, create_exception=self.create_exception, operation_type=self.operation_type(), + operation_name=self.name(), data=data, files=self.build_file_upload_request(), sort_arguments=self._sort_params, diff --git a/pubnub/request_handlers/async_aiohttp.py b/pubnub/request_handlers/async_aiohttp.py index 3b057b66..e2323d28 100644 --- a/pubnub/request_handlers/async_aiohttp.py +++ b/pubnub/request_handlers/async_aiohttp.py @@ -173,7 +173,7 @@ async def async_request(self, options_func, cancellation_event): else: data = "N/A" - logger.debug("[%s %s] %s" % (options.operation_type, response_info.http_version, data)) + logger.debug("[%s %s] %s", options.operation_name, response_info.http_version, data) if response.status not in (200, 307, 204): diff --git a/pubnub/request_handlers/async_httpx.py b/pubnub/request_handlers/async_httpx.py index 512e4a56..26507a4c 100644 --- a/pubnub/request_handlers/async_httpx.py +++ b/pubnub/request_handlers/async_httpx.py @@ -226,7 +226,7 @@ async def async_request(self, options_func, cancellation_event): else: data = "N/A" - logger.debug("[%s %s] %s" % (options.operation_type, response_info.http_version, data)) + logger.debug("[%s %s] %s", options.operation_name, response_info.http_version, data) if response.status_code not in (200, 307, 204): diff --git a/pubnub/request_handlers/httpx.py b/pubnub/request_handlers/httpx.py index b0ad5c37..aa893cb1 100644 --- a/pubnub/request_handlers/httpx.py +++ b/pubnub/request_handlers/httpx.py @@ -436,13 +436,13 @@ def _invoke_request(self, p_options, e_options, base_origin): res = session.request(**args) try: - logger.debug("[%s %s] %s" % (e_options.operation_type, res.http_version, res.text)) + logger.debug("[%s %s] %s", e_options.operation_name, res.http_version, res.text) except httpx.ResponseNotRead: content = res.content.decode('utf-8', errors='ignore') - logger.debug("[%s %s] %s" % (e_options.operation_type, res.http_version, content)) + logger.debug("[%s %s] %s", e_options.operation_name, res.http_version, content) except Exception as e: msg = "(content access failed: %s)" % str(e) - logger.debug("[%s %s] %s" % (e_options.operation_type, res.http_version, msg)) + logger.debug("[%s %s] %s", e_options.operation_name, res.http_version, msg) except httpx.ConnectError as e: if use_watchdog and self._watchdog.triggered: diff --git a/pubnub/request_handlers/requests.py b/pubnub/request_handlers/requests.py index 781d65ec..d2c2f497 100644 --- a/pubnub/request_handlers/requests.py +++ b/pubnub/request_handlers/requests.py @@ -276,7 +276,7 @@ def _invoke_request(self, p_options, e_options, base_origin): f"HTTP/{res.raw.version // 10}.{res.raw.version % 10}" if res.raw and res.raw.version else "unknown" ) - logger.debug("[%s %s] %s" % (e_options.operation_type, http_ver, res.text)) + logger.debug("[%s %s] %s", e_options.operation_name, http_ver, res.text) except requests.exceptions.ConnectionError as e: raise PubNubException( diff --git a/pubnub/structures.py b/pubnub/structures.py index af7575c3..7d6e577e 100644 --- a/pubnub/structures.py +++ b/pubnub/structures.py @@ -8,7 +8,8 @@ def __init__( create_response, create_status, create_exception, operation_type, data=None, sort_arguments=False, allow_redirects=True, use_base_path=None, files=None, - request_headers=None, non_json_response=False + request_headers=None, non_json_response=False, + operation_name=None ): assert len(path) > 0 assert callable(params_callback) @@ -35,6 +36,7 @@ def __init__( self.create_status = create_status self.create_exception = create_exception self.operation_type = operation_type + self.operation_name = operation_name self.allow_redirects = allow_redirects self.use_base_path = use_base_path self.request_headers = request_headers From 33726c7ce8079a82306f2c341b1fbbb4a61c9de5 Mon Sep 17 00:00:00 2001 From: jguz-pubnub Date: Mon, 15 Jun 2026 10:10:20 +0200 Subject: [PATCH 2/3] Drop operation identifier from request handler debug logs Co-Authored-By: Claude Opus 4.7 (1M context) --- pubnub/endpoints/endpoint.py | 1 - pubnub/request_handlers/async_aiohttp.py | 2 +- pubnub/request_handlers/async_httpx.py | 2 +- pubnub/request_handlers/httpx.py | 6 +++--- pubnub/request_handlers/requests.py | 2 +- pubnub/structures.py | 4 +--- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/pubnub/endpoints/endpoint.py b/pubnub/endpoints/endpoint.py index cc4e3592..aee7e370 100644 --- a/pubnub/endpoints/endpoint.py +++ b/pubnub/endpoints/endpoint.py @@ -134,7 +134,6 @@ def options(self): create_status=self.create_status, create_exception=self.create_exception, operation_type=self.operation_type(), - operation_name=self.name(), data=data, files=self.build_file_upload_request(), sort_arguments=self._sort_params, diff --git a/pubnub/request_handlers/async_aiohttp.py b/pubnub/request_handlers/async_aiohttp.py index e2323d28..0a92a090 100644 --- a/pubnub/request_handlers/async_aiohttp.py +++ b/pubnub/request_handlers/async_aiohttp.py @@ -173,7 +173,7 @@ async def async_request(self, options_func, cancellation_event): else: data = "N/A" - logger.debug("[%s %s] %s", options.operation_name, response_info.http_version, data) + logger.debug("[%s] %s", response_info.http_version, data) if response.status not in (200, 307, 204): diff --git a/pubnub/request_handlers/async_httpx.py b/pubnub/request_handlers/async_httpx.py index 26507a4c..3cb50fb3 100644 --- a/pubnub/request_handlers/async_httpx.py +++ b/pubnub/request_handlers/async_httpx.py @@ -226,7 +226,7 @@ async def async_request(self, options_func, cancellation_event): else: data = "N/A" - logger.debug("[%s %s] %s", options.operation_name, response_info.http_version, data) + logger.debug("[%s] %s", response_info.http_version, data) if response.status_code not in (200, 307, 204): diff --git a/pubnub/request_handlers/httpx.py b/pubnub/request_handlers/httpx.py index aa893cb1..7a1fe872 100644 --- a/pubnub/request_handlers/httpx.py +++ b/pubnub/request_handlers/httpx.py @@ -436,13 +436,13 @@ def _invoke_request(self, p_options, e_options, base_origin): res = session.request(**args) try: - logger.debug("[%s %s] %s", e_options.operation_name, res.http_version, res.text) + logger.debug("[%s] %s", res.http_version, res.text) except httpx.ResponseNotRead: content = res.content.decode('utf-8', errors='ignore') - logger.debug("[%s %s] %s", e_options.operation_name, res.http_version, content) + logger.debug("[%s] %s", res.http_version, content) except Exception as e: msg = "(content access failed: %s)" % str(e) - logger.debug("[%s %s] %s", e_options.operation_name, res.http_version, msg) + logger.debug("[%s] %s", res.http_version, msg) except httpx.ConnectError as e: if use_watchdog and self._watchdog.triggered: diff --git a/pubnub/request_handlers/requests.py b/pubnub/request_handlers/requests.py index d2c2f497..62c50a7b 100644 --- a/pubnub/request_handlers/requests.py +++ b/pubnub/request_handlers/requests.py @@ -276,7 +276,7 @@ def _invoke_request(self, p_options, e_options, base_origin): f"HTTP/{res.raw.version // 10}.{res.raw.version % 10}" if res.raw and res.raw.version else "unknown" ) - logger.debug("[%s %s] %s", e_options.operation_name, http_ver, res.text) + logger.debug("[%s] %s", http_ver, res.text) except requests.exceptions.ConnectionError as e: raise PubNubException( diff --git a/pubnub/structures.py b/pubnub/structures.py index 7d6e577e..af7575c3 100644 --- a/pubnub/structures.py +++ b/pubnub/structures.py @@ -8,8 +8,7 @@ def __init__( create_response, create_status, create_exception, operation_type, data=None, sort_arguments=False, allow_redirects=True, use_base_path=None, files=None, - request_headers=None, non_json_response=False, - operation_name=None + request_headers=None, non_json_response=False ): assert len(path) > 0 assert callable(params_callback) @@ -36,7 +35,6 @@ def __init__( self.create_status = create_status self.create_exception = create_exception self.operation_type = operation_type - self.operation_name = operation_name self.allow_redirects = allow_redirects self.use_base_path = use_base_path self.request_headers = request_headers From 12e9c366bc55de78f7877131dfef872e25b5d3c4 Mon Sep 17 00:00:00 2001 From: PubNub Release Bot <120067856+pubnub-release-bot@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:58:57 +0000 Subject: [PATCH 3/3] PubNub SDK 10.7.1 release. --- .pubnub.yml | 13 +++++++++---- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.pubnub.yml b/.pubnub.yml index b9efca0c..7e3ce40b 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,5 +1,5 @@ name: python -version: 10.7.0 +version: 10.7.1 schema: 1 scm: github.com/pubnub/python sdks: @@ -18,7 +18,7 @@ sdks: distributions: - distribution-type: library distribution-repository: package - package-name: pubnub-10.7.0 + package-name: pubnub-10.7.1 location: https://pypi.org/project/pubnub/ supported-platforms: supported-operating-systems: @@ -94,8 +94,8 @@ sdks: - distribution-type: library distribution-repository: git release - package-name: pubnub-10.7.0 - location: https://github.com/pubnub/python/releases/download/10.7.0/pubnub-10.7.0.tar.gz + package-name: pubnub-10.7.1 + location: https://github.com/pubnub/python/releases/download/10.7.1/pubnub-10.7.1.tar.gz supported-platforms: supported-operating-systems: Linux: @@ -169,6 +169,11 @@ sdks: license-url: https://github.com/encode/httpx/blob/master/LICENSE.md is-required: Required changelog: + - date: 2026-06-15 + version: 10.7.1 + changes: + - type: bug + text: "Drop operation identifier from request handler debug logs." - date: 2026-06-08 version: 10.7.0 changes: diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d3cb60..3f0ecc63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 10.7.1 +June 15 2026 + +#### Fixed +- Drop operation identifier from request handler debug logs. + ## 10.7.0 June 08 2026 diff --git a/setup.py b/setup.py index 58def440..c95296a6 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='pubnub', - version='10.7.0', + version='10.7.1', description='PubNub Real-time push service in the cloud', author='PubNub', author_email='support@pubnub.com',