Skip to content

Commit de315c7

Browse files
PubNub SDK v4.5.1 release.
1 parent b3fac01 commit de315c7

File tree

192 files changed

+770
-721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+770
-721
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ _trial_temp
7373

7474
# jupyter dev notebook
7575
PubNubTwisted.ipynb
76+
77+
.travis/README.md
78+
79+
.travis/scripts
80+
81+
deployment_keys
82+
deployment_keys-private
83+
deployment_keys.tar

.pubnub.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
name: python
2-
version: 4.5.0
2+
version: 4.5.1
33
schema: 1
44
scm: github.com/pubnub/python
55
changelog:
6+
- version: v4.5.1
7+
date: May 4, 2020
8+
changes:
9+
-
10+
text: "Using SSL by default from the Python SDK to be more consistent and encourage best practices."
11+
type: bug
612
- version: v4.5.0
713
date: Feb 27, 2020
814
changes:

.travis.yml

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,41 @@
11
language: python
2-
python:
3-
- "2.7"
4-
- "3.4"
5-
- "3.5"
6-
- "3.6"
7-
- "pypy"
8-
sudo: false
2+
dist: xenial
3+
os: linux
4+
95
install:
106
- bash scripts/install.sh
11-
script:
12-
- python scripts/run-tests.py
13-
after_success:
14-
- python-codacy-coverage -r coverage.xml
7+
8+
9+
stages:
10+
- name: "test"
11+
if: |
12+
type != pull_request \
13+
AND tag IS blank
14+
- name: "code coverage"
15+
if: |
16+
type == pull_request
17+
18+
jobs:
19+
include:
20+
- stage: "test"
21+
name: 'Python 2.7'
22+
python: '2.7'
23+
script: python scripts/run-tests.py
24+
- name: 'Python 3.4'
25+
python: '3.4'
26+
script: python scripts/run-tests.py
27+
- name: 'Python 3.5'
28+
python: '3.5'
29+
script: python scripts/run-tests.py
30+
- name: 'Python 3.6'
31+
python: '3.6'
32+
script: python scripts/run-tests.py
33+
- name: 'Python PyPi'
34+
python: 'pypy'
35+
script: python scripts/run-tests.py
36+
- stage: "code coverage"
37+
name: 'Test & Code coverage'
38+
python: '3.6'
39+
script: python scripts/run-tests.py
40+
after_success:
41+
- python-codacy-coverage -r coverage.xml

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [v4.5.1](https://github.com/pubnub/python/releases/tag/v4.5.1)
2+
3+
[Full Changelog](https://github.com/pubnub/python/compare/v4.5.0...v4.5.1)
4+
5+
- 🐛 Using SSL by default from the Python SDK to be more consistent and encourage best practices.
6+
17
## [4.5.0](https://github.com/pubnub/python/tree/v4.5.0)
28

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

239245

240246
- ⭐Initial Release
241-
242-

pubnub/pnconfiguration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self):
1010
# TODO: add validation
1111
self.uuid = None
1212
self.origin = "ps.pndsn.com"
13-
self.ssl = False
13+
self.ssl = True
1414
self.non_subscribe_request_timeout = 10
1515
self.subscribe_request_timeout = 310
1616
self.connect_timeout = 5
@@ -23,6 +23,7 @@ def __init__(self):
2323
self.enable_subscribe = True
2424
self.crypto_instance = None
2525
self.log_verbosity = False
26+
self.enable_presence_heartbeat = False
2627
self.heartbeat_notification_options = PNHeartbeatNotificationOptions.FAILURES
2728
self.reconnect_policy = PNReconnectionPolicy.NONE
2829
self.daemon = False

pubnub/pubnub.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,10 @@ def _message_queue_put(self, message):
248248
def reconnect(self):
249249
self._should_stop = False
250250
self._start_subscribe_loop()
251-
self._register_heartbeat_timer()
251+
# Check the instance flag to determine if we want to perform the presence heartbeat
252+
# This is False by default
253+
if self._pubnub.config.enable_presence_heartbeat is True:
254+
self._register_heartbeat_timer()
252255

253256
def disconnect(self):
254257
self._should_stop = True

pubnub/pubnub_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
class PubNubCore:
5858
"""A base class for PubNub Python API implementations"""
59-
SDK_VERSION = "4.5.0"
59+
SDK_VERSION = "4.5.1"
6060
SDK_NAME = "PubNub-Python"
6161

6262
TIMESTAMP_DIVIDER = 1000

requirements27-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pytest==4.3.0
22
tornado==4.5.3
3-
twisted
3+
twisted==19.10.0
44
pyopenssl
55
pytest-cov<2.6.0
66
cbor2

requirements35-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pytest==4.3.0
1+
pytest==5.4.0
22
pytest-asyncio
33
tornado==4.5.3
44
aiohttp==2.3.10

requirements36-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pytest==4.3.0
1+
pytest==5.4.0
22
pytest-asyncio
33
tornado==4.5.3
44
aiohttp==2.3.10

0 commit comments

Comments
 (0)