Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -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
13 changes: 8 additions & 5 deletions pubnub/pnconfiguration.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jguz-pubnub shouldn't only publish_key be optional? All non-publish endpoints require subscribe_key and we also made uuid required as well (we need to start migration to the userId).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't be backward compatible. So maybe for now we can have it, but should plan some migration and notification about deprecation.

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
Expand Down