diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 845e69d1..d1a035d2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ -* @seba-aln @jguz-pubnub @wkal-pubnub -README.md @techwritermat @kazydek @seba-aln @jguz-pubnub +* @parfeon @jguz-pubnub +README.md @techwritermat @kazydek @parfeon @jguz-pubnub diff --git a/.pubnub.yml b/.pubnub.yml index 31aa5c65..fd5ed533 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,5 +1,5 @@ name: python -version: 10.5.0 +version: 10.6.0 schema: 1 scm: github.com/pubnub/python sdks: @@ -18,7 +18,7 @@ sdks: distributions: - distribution-type: library distribution-repository: package - package-name: pubnub-10.5.0 + package-name: pubnub-10.6.0 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.5.0 - location: https://github.com/pubnub/python/releases/download/10.5.0/pubnub-10.5.0.tar.gz + package-name: pubnub-10.6.0 + location: https://github.com/pubnub/python/releases/download/10.6.0/pubnub-10.6.0.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-01-29 + version: 10.6.0 + changes: + - type: feature + text: "Add optional parameters to PNConfiguration.__init__, allowing developers to set subscribe_key, publish_key, and uuid during initialization." - date: 2025-12-02 version: 10.5.0 changes: diff --git a/CHANGELOG.md b/CHANGELOG.md index fcba6b3f..deff9345 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 10.6.0 +January 29 2026 + +#### Added +- Add optional parameters to PNConfiguration.__init__, allowing developers to set subscribe_key, publish_key, and uuid during initialization. Fixed the following issues reported by [@JanluOfficial](https://github.com/JanluOfficial): [#227](https://github.com/pubnub/python/issues/227). + ## 10.5.0 December 02 2025 diff --git a/pubnub/pnconfiguration.py b/pubnub/pnconfiguration.py index 73c8aa81..4e1d0d3d 100644 --- a/pubnub/pnconfiguration.py +++ b/pubnub/pnconfiguration.py @@ -1,5 +1,5 @@ import warnings -from typing import Any +from typing import Any, Optional from copy import deepcopy from Cryptodome.Cipher import AES from pubnub.enums import PNHeartbeatNotificationOptions, PNReconnectionPolicy @@ -14,16 +14,19 @@ class PNConfiguration(object): DEFAULT_CRYPTO_MODULE = LegacyCryptoModule _locked = False - def __init__(self): + def __init__(self, + subscribe_key: Optional[str] = None, + publish_key: Optional[str] = None, + uuid: Optional[str] = None): # TODO: add validation - self._uuid = None + self._uuid = uuid self.origin = "ps.pndsn.com" self.ssl = True self.non_subscribe_request_timeout = 10 self.subscribe_request_timeout = 310 self.connect_timeout = 10 - self.subscribe_key = None - self.publish_key = None + self.subscribe_key = subscribe_key + self.publish_key = publish_key self.secret_key = None self.cipher_key = None self._cipher_mode = AES.MODE_CBC diff --git a/setup.py b/setup.py index d04556c1..2ba4cbcd 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='pubnub', - version='10.5.0', + version='10.6.0', description='PubNub Real-time push service in the cloud', author='PubNub', author_email='support@pubnub.com',