Skip to content

Commit

Permalink
PubNub SDK v4.5.1 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
client-engineering-bot committed May 4, 2020
1 parent b3fac01 commit de315c7
Show file tree
Hide file tree
Showing 192 changed files with 770 additions and 721 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,11 @@ _trial_temp

# jupyter dev notebook
PubNubTwisted.ipynb

.travis/README.md

.travis/scripts

deployment_keys
deployment_keys-private
deployment_keys.tar
8 changes: 7 additions & 1 deletion .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: python
version: 4.5.0
version: 4.5.1
schema: 1
scm: github.com/pubnub/python
changelog:
- version: v4.5.1
date: May 4, 2020
changes:
-
text: "Using SSL by default from the Python SDK to be more consistent and encourage best practices."
type: bug
- version: v4.5.0
date: Feb 27, 2020
changes:
Expand Down
49 changes: 38 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "pypy"
sudo: false
dist: xenial
os: linux

install:
- bash scripts/install.sh
script:
- python scripts/run-tests.py
after_success:
- python-codacy-coverage -r coverage.xml


stages:
- name: "test"
if: |
type != pull_request \
AND tag IS blank
- name: "code coverage"
if: |
type == pull_request
jobs:
include:
- stage: "test"
name: 'Python 2.7'
python: '2.7'
script: python scripts/run-tests.py
- name: 'Python 3.4'
python: '3.4'
script: python scripts/run-tests.py
- name: 'Python 3.5'
python: '3.5'
script: python scripts/run-tests.py
- name: 'Python 3.6'
python: '3.6'
script: python scripts/run-tests.py
- name: 'Python PyPi'
python: 'pypy'
script: python scripts/run-tests.py
- stage: "code coverage"
name: 'Test & Code coverage'
python: '3.6'
script: python scripts/run-tests.py
after_success:
- python-codacy-coverage -r coverage.xml
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [v4.5.1](https://github.com/pubnub/python/releases/tag/v4.5.1)

[Full Changelog](https://github.com/pubnub/python/compare/v4.5.0...v4.5.1)

- 🐛 Using SSL by default from the Python SDK to be more consistent and encourage best practices.

## [4.5.0](https://github.com/pubnub/python/tree/v4.5.0)

[Full Changelog](https://github.com/pubnub/python/compare/v4.4.0...v4.5.0)
Expand Down Expand Up @@ -238,5 +244,3 @@


- ⭐Initial Release


3 changes: 2 additions & 1 deletion pubnub/pnconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self):
# TODO: add validation
self.uuid = None
self.origin = "ps.pndsn.com"
self.ssl = False
self.ssl = True
self.non_subscribe_request_timeout = 10
self.subscribe_request_timeout = 310
self.connect_timeout = 5
Expand All @@ -23,6 +23,7 @@ def __init__(self):
self.enable_subscribe = True
self.crypto_instance = None
self.log_verbosity = False
self.enable_presence_heartbeat = False
self.heartbeat_notification_options = PNHeartbeatNotificationOptions.FAILURES
self.reconnect_policy = PNReconnectionPolicy.NONE
self.daemon = False
Expand Down
5 changes: 4 additions & 1 deletion pubnub/pubnub.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ def _message_queue_put(self, message):
def reconnect(self):
self._should_stop = False
self._start_subscribe_loop()
self._register_heartbeat_timer()
# Check the instance flag to determine if we want to perform the presence heartbeat
# This is False by default
if self._pubnub.config.enable_presence_heartbeat is True:
self._register_heartbeat_timer()

def disconnect(self):
self._should_stop = True
Expand Down
2 changes: 1 addition & 1 deletion pubnub/pubnub_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

class PubNubCore:
"""A base class for PubNub Python API implementations"""
SDK_VERSION = "4.5.0"
SDK_VERSION = "4.5.1"
SDK_NAME = "PubNub-Python"

TIMESTAMP_DIVIDER = 1000
Expand Down
2 changes: 1 addition & 1 deletion requirements27-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pytest==4.3.0
tornado==4.5.3
twisted
twisted==19.10.0
pyopenssl
pytest-cov<2.6.0
cbor2
2 changes: 1 addition & 1 deletion requirements35-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest==4.3.0
pytest==5.4.0
pytest-asyncio
tornado==4.5.3
aiohttp==2.3.10
Expand Down
2 changes: 1 addition & 1 deletion requirements36-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest==4.3.0
pytest==5.4.0
pytest-asyncio
tornado==4.5.3
aiohttp==2.3.10
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='pubnub',
version='4.5.0',
version='4.5.1',
description='PubNub Real-time push service in the cloud',
author='PubNub',
author_email='support@pubnub.com',
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/wild/domain_redirect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interactions:
Connection: [keep-alive]
User-Agent: [vcrpy-test]
method: GET
uri: http://seomoz.org/
uri: https://seomoz.org/
response:
body: {string: !!python/unicode ''}
headers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interactions:
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch
response:
body: {string: '{"status": 200, "message": "OK", "service": "channel-registry",
"error": false}'}
Expand All @@ -13,13 +13,13 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:31
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch&pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch&pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
- request:
body: null
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
response:
body: {string: '{"status": 200, "payload": {"channels": ["channel-groups-tornado-ch"],
"group": "channel-groups-tornado-cg"}, "service": "channel-registry", "error":
Expand All @@ -29,13 +29,13 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:32
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
- request:
body: null
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg/remove
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg/remove
response:
body: {string: '{"status": 200, "message": "OK", "service": "channel-registry",
"error": false}'}
Expand All @@ -44,13 +44,13 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:32
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg/remove?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg/remove?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
- request:
body: null
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
response:
body: {string: '{"status": 200, "payload": {"channels": [], "group": "channel-groups-tornado-cg"},
"service": "channel-registry", "error": false}'}
Expand All @@ -59,5 +59,5 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:33
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interactions:
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch1%2Cchannel-groups-tornado-ch2
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch1%2Cchannel-groups-tornado-ch2
response:
body: {string: '{"status": 200, "message": "OK", "service": "channel-registry",
"error": false}'}
Expand All @@ -13,13 +13,13 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:28
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch1,channel-groups-tornado-ch2&pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?add=channel-groups-tornado-ch1,channel-groups-tornado-ch2&pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
- request:
body: null
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
response:
body: {string: '{"status": 200, "payload": {"channels": ["channel-groups-tornado-ch1",
"channel-groups-tornado-ch2"], "group": "channel-groups-tornado-cg"}, "service":
Expand All @@ -29,13 +29,13 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:29
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
- request:
body: null
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?remove=channel-groups-tornado-ch1%2Cchannel-groups-tornado-ch2
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?remove=channel-groups-tornado-ch1%2Cchannel-groups-tornado-ch2
response:
body: {string: '{"status": 200, "message": "OK", "service": "channel-registry",
"error": false}'}
Expand All @@ -44,13 +44,13 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:30
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?remove=channel-groups-tornado-ch1,channel-groups-tornado-ch2&pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?remove=channel-groups-tornado-ch1,channel-groups-tornado-ch2&pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
- request:
body: null
headers:
USER-AGENT: [PubNub-Python-Asyncio/4.0.4]
method: GET
uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
uri: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg
response:
body: {string: '{"status": 200, "payload": {"channels": [], "group": "channel-groups-tornado-cg"},
"service": "channel-registry", "error": false}'}
Expand All @@ -59,5 +59,5 @@ interactions:
CONTENT-TYPE: text/javascript; charset="UTF-8", DATE: 'Fri, 16 Dec 2016 13:51:31
GMT', SERVER: Pubnub}
status: {code: 200, message: OK}
url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
url: https://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/channel-group/channel-groups-tornado-cg?pnsdk=PubNub-Python-Asyncio%2F4.0.4&uuid=b33abd30-f0e6-47af-9922-bd5e2a5485eb
version: 1
Loading

0 comments on commit de315c7

Please sign in to comment.