Skip to content

Commit 8ee850b

Browse files
Fixes for various errors (#146)
* Fix typo in consumer models Closes #145 * Add urls to PyPi package Closes #115 Fix for is_error Closes #102 * Typo and a shorthand * PubNub SDK 7.0.2 release. Co-authored-by: Client Engineering Bot <60980775+client-engineering-bot@users.noreply.github.com>
1 parent 342c981 commit 8ee850b

File tree

9 files changed

+34
-12
lines changed

9 files changed

+34
-12
lines changed

.pubnub.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: python
2-
version: 7.0.1
2+
version: 7.0.2
33
schema: 1
44
scm: github.com/pubnub/python
55
sdks:
@@ -18,7 +18,7 @@ sdks:
1818
distributions:
1919
- distribution-type: library
2020
distribution-repository: package
21-
package-name: pubnub-7.0.1
21+
package-name: pubnub-7.0.2
2222
location: https://pypi.org/project/pubnub/
2323
supported-platforms:
2424
supported-operating-systems:
@@ -97,8 +97,8 @@ sdks:
9797
-
9898
distribution-type: library
9999
distribution-repository: git release
100-
package-name: pubnub-7.0.1
101-
location: https://github.com/pubnub/python/releases/download/7.0.1/pubnub-7.0.1.tar.gz
100+
package-name: pubnub-7.0.2
101+
location: https://github.com/pubnub/python/releases/download/7.0.2/pubnub-7.0.2.tar.gz
102102
supported-platforms:
103103
supported-operating-systems:
104104
Linux:
@@ -169,6 +169,15 @@ sdks:
169169
license-url: https://github.com/aio-libs/aiohttp/blob/master/LICENSE.txt
170170
is-required: Required
171171
changelog:
172+
- date: 2022-11-24
173+
version: 7.0.2
174+
changes:
175+
- type: bug
176+
text: "This change fixes typo in consumer models user and space resulting in setting invalid flags for the request."
177+
- type: bug
178+
text: "This change fixes error in calling and returning value of `status.is_error()` method."
179+
- type: bug
180+
text: "This change adds additional informations to PyPi package. Informations include URLs to source code and documentation, required python version (at least 3.7) and updates a list of supported python versions (removed 3.6 and added 3.10)."
172181
- date: 2022-10-05
173182
version: 7.0.1
174183
changes:

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 7.0.2
2+
November 24 2022
3+
4+
#### Fixed
5+
- This change fixes typo in consumer models user and space resulting in setting invalid flags for the request.
6+
- This change fixes error in calling and returning value of `status.is_error()` method.
7+
- This change adds additional informations to PyPi package. Informations include URLs to source code and documentation, required python version (at least 3.7) and updates a list of supported python versions (removed 3.6 and added 3.10). Fixed the following issues reported by [@Saluev](https://github.com/Saluev), [@natekspencer](https://github.com/natekspencer) and [@andriyor](https://github.com/andriyor): [#145](https://github.com/pubnub/python/issues/145), [#102](https://github.com/pubnub/python/issues/102) and [#115](https://github.com/pubnub/python/issues/115).
8+
19
## 7.0.1
210
October 05 2022
311

pubnub/models/consumer/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ def __init__(self):
2020
self.affected_groups = None
2121

2222
def is_error(self):
23-
return self.error is not None
23+
return bool(self.error)

pubnub/models/consumer/v3/space.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get(self):
4141
return self
4242

4343
def update(self):
44-
self._get = True
44+
self._update = True
4545
return self
4646

4747
def join(self):

pubnub/models/consumer/v3/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get(self):
4141
return self
4242

4343
def update(self):
44-
self._get = True
44+
self._update = True
4545
return self
4646

4747
def join(self):

pubnub/pubnub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def _perform_heartbeat_loop(self):
214214

215215
def heartbeat_callback(raw_result, status):
216216
heartbeat_verbosity = self._pubnub.config.heartbeat_notification_options
217-
if status.is_error:
217+
if status.is_error():
218218
if heartbeat_verbosity in (PNHeartbeatNotificationOptions.ALL, PNHeartbeatNotificationOptions.FAILURES):
219219
self._listener_manager.announce_status(status)
220220
else:

pubnub/pubnub_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ async def _perform_heartbeat_loop(self):
503503
envelope = await heartbeat_call
504504

505505
heartbeat_verbosity = self._pubnub.config.heartbeat_notification_options
506-
if envelope.status.is_error:
506+
if envelope.status.is_error():
507507
if heartbeat_verbosity in (PNHeartbeatNotificationOptions.ALL, PNHeartbeatNotificationOptions.FAILURES):
508508
self._listener_manager.announce_status(envelope.status)
509509
else:

pubnub/pubnub_core.py

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

8484
class PubNubCore:
8585
"""A base class for PubNub Python API implementations"""
86-
SDK_VERSION = "7.0.1"
86+
SDK_VERSION = "7.0.2"
8787
SDK_NAME = "PubNub-Python"
8888

8989
TIMESTAMP_DIVIDER = 1000

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,32 @@
22

33
setup(
44
name='pubnub',
5-
version='7.0.1',
5+
version='7.0.2',
66
description='PubNub Real-time push service in the cloud',
77
author='PubNub',
88
author_email='support@pubnub.com',
99
url='http://pubnub.com',
10+
project_urls={
11+
'Source': 'https://github.com/pubnub/python',
12+
'Documentation': 'https://www.pubnub.com/docs/sdks/python',
13+
},
1014
packages=find_packages(exclude=("examples*", 'tests*')),
1115
license='MIT',
1216
classifiers=(
1317
'Development Status :: 5 - Production/Stable',
1418
'Intended Audience :: Developers',
1519
'Programming Language :: Python',
16-
'Programming Language :: Python :: 3.6',
1720
'Programming Language :: Python :: 3.7',
1821
'Programming Language :: Python :: 3.8',
1922
'Programming Language :: Python :: 3.9',
23+
'Programming Language :: Python :: 3.10',
2024
'Programming Language :: Python :: Implementation :: CPython',
2125
'License :: OSI Approved :: MIT License',
2226
'Operating System :: OS Independent',
2327
'Topic :: Internet :: WWW/HTTP',
2428
'Topic :: Software Development :: Libraries :: Python Modules',
2529
),
30+
python_requires='>=3.7',
2631
install_requires=[
2732
'pycryptodomex>=3.3',
2833
'requests>=2.4',

0 commit comments

Comments
 (0)