Skip to content

Commit 6dfdeba

Browse files
committed
Merge branch '1.6.x'
2 parents 71e2922 + 3d47d37 commit 6dfdeba

File tree

171 files changed

+3234
-2642
lines changed

Some content is hidden

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

171 files changed

+3234
-2642
lines changed

.github/workflows/lint-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- run: codespell || true # --ignore-words-list="" --skip=""
1313
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
1414
- run: flake8 . --count --exit-zero --max-complexity=29 --max-line-length=167 --show-source --statistics
15-
- run: isort --check-only --profile black . || true
15+
- run: isort --check-only --profile black .
1616
- run: pip install -e .
1717
- run: mypy --ignore-missing-imports . || true
1818
- run: mv setup.cfg setup.cfg.disabled

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ nosetests.xml
4545
coverage.xml
4646
*,cover
4747
.hypothesis/
48+
test/ssl/demoCA
49+
test/ssl/rootCA
50+
test/ssl/signingCA
51+
*.csr
4852

4953
# Translations
5054
*.mo

ChangeLog.txt

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,45 @@
1-
v1.6.0 - 2021-xx-xx
1+
v1.6.0 - 2021-10-20
22
===================
33

44
- Changed default TLS version to 1.2 instead of 1.0.
55
- Fix incoming MQTT v5 messages with overall property length > 127 bytes being
66
incorrectly decoded. Closes #541.
7-
- MQTTMessageInfo.wait_for_publish() will now raise exceptions if called when
8-
the publish call produced an error. Closes #550.
7+
- MQTTMessageInfo.wait_for_publish() and MQTTMessageInfo.is_published() will
8+
now raise exceptions if called when the publish call produced an error.
9+
Closes #550.
10+
- Remove periodic retry checks for outgoing messages with QoS>0. This means
11+
that outgoing messages will only be retried on the client reconnecting to
12+
the server. They will *not* be retried when the client is still connected.
13+
- The `rc` parameter in the `on_disconnect` callback now has meaningful values
14+
in the case of an error. Closes #441.
15+
- Callbacks can now be applied to client instances using decorators.
16+
- PUBACK messages are now sent to the broker only after the on_message
17+
callback has returned.
18+
- Raise exceptions when attempting to set MQTT v5 properties to forbidden
19+
values. Closes #586.
20+
- Callbacks can now be updated from within a callback.
21+
- Remove _out_packet_mutex and _current_out_packet_mutex and convert the
22+
_out_packet queue use to thread safe.
23+
- Add basic MQTT v5 support to the subscribe and publish helper functions.
24+
Closes #575.
25+
- Fix on_disconnect() sometimes calling the MQTT v3.x callback when it should
26+
call the MQTT v5 callback. Closes #570.
27+
- Big performance improvement when receiving large payloads, particularly for
28+
SSL. Closes #571,
29+
- Fix connecting with MQTT v5 to a broker that doesn't support MQTT v5.
30+
Closes #566.
31+
- Removed ancient Mosquitto compatibility class.
32+
- Fix exception on calling Client(client_id="", clean_session=False).
33+
Closes #520.
34+
- Experimental support for Websockets continuation frames. Closes #500.
35+
Closes #89.
36+
- `Properties.json()` now converts Correlation Data bytes() objects to hex.
37+
Closes #555.
38+
- Only use the internal sockpair wakeup when running with loop_start() or
39+
loop(). This removes problems when running with an external event loop.
40+
- Drain all of sockpairR bytes to avoid unnecessary wakeups and possible
41+
timeouts. Closes #563.
42+
- Add timeout to MQTTMessageInfo:wait_for_publish().
943

1044

1145
v1.5.1 - 2020-09-22

LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
This project is dual licensed under the Eclipse Public License 1.0 and the
2-
Eclipse Distribution License 1.0 as described in the epl-v10 and edl-v10 files.
1+
This project is dual licensed under the Eclipse Public License 2.0 and the
2+
Eclipse Distribution License 1.0 as described in the epl-v20 and edl-v10 files.
33

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Set DESTDIR if it isn't given
22
DESTDIR?=/
3+
PYTHON?=python3
34

45
.PHONY : all clean clean-build clean-pyc clean-test install test upload
56

67
all :
7-
python ./setup.py build
8+
$(PYTHON) ./setup.py build
89

910
install : all
10-
python ./setup.py install --root=${DESTDIR}
11+
$(PYTHON) ./setup.py install --root=${DESTDIR}
1112

1213
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
1314

@@ -31,8 +32,8 @@ clean-test: ## remove test and coverage artifacts
3132
rm -fr htmlcov/
3233

3334
test :
34-
python setup.py test
35+
$(PYTHON) setup.py test
3536
$(MAKE) -C test test
3637

3738
upload : test
38-
python ./setup.py sdist upload
39+
$(PYTHON) ./setup.py sdist upload

README.rst

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This document describes the source code for the `Eclipse Paho <http://eclipse.or
55

66
This code provides a client class which enable applications to connect to an `MQTT <http://mqtt.org/>`_ broker to publish messages, and to subscribe to topics and receive published messages. It also provides some helper functions to make publishing one off messages to an MQTT server very straightforward.
77

8-
It supports Python 2.7.9+ or 3.5+.
8+
It supports Python 2.7.9+ or 3.6+.
99

1010
The MQTT protocol is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. Designed as an extremely lightweight publish/subscribe messaging transport, it is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.
1111

@@ -249,7 +249,7 @@ max_queued_messages_set()
249249
250250
Set the maximum number of outgoing messages with QoS>0 that can be pending in the outgoing message queue.
251251

252-
Defaults to 0. 0 means unlimited. When the queue is full, any further outgoing messages would be dropped.
252+
Defaults to 0. 0 means unlimited, but due to implementation currently limited to 65555 (65535 messages in queue + 20 in flight). When the queue is full, any further outgoing messages would be dropped.
253253

254254
message_retry_set()
255255
'''''''''''''''''''
@@ -681,9 +681,13 @@ Returns a MQTTMessageInfo which expose the following attributes and methods:
681681
``on_publish()`` callback if it is defined. ``wait_for_publish`` may be easier
682682
depending on your use-case.
683683
* ``wait_for_publish()`` will block until the message is published. It will
684-
raise ValueError if the message is not queued (rc == ``MQTT_ERR_QUEUE_SIZE``).
684+
raise ValueError if the message is not queued (rc ==
685+
``MQTT_ERR_QUEUE_SIZE``), or a RuntimeError if there was an error when
686+
publishing, most likely due to the client not being connected.
685687
* ``is_published`` returns True if the message has been published. It will
686-
raise ValueError if the message is not queued (rc == ``MQTT_ERR_QUEUE_SIZE``).
688+
raise ValueError if the message is not queued (rc ==
689+
``MQTT_ERR_QUEUE_SIZE``), or a RuntimeError if there was an error when
690+
publishing, most likely due to the client not being connected.
687691

688692
A ``ValueError`` will be raised if topic is ``None``, has zero length or is
689693
invalid (contains a wildcard), if ``qos`` is not one of 0, 1 or 2, or if the
@@ -1173,6 +1177,9 @@ broker, then disconnect with nothing else required.
11731177

11741178
The two functions provided are ``single()`` and ``multiple()``.
11751179

1180+
Both functions include support for MQTT v5.0, but do not currently let you
1181+
set any properties on connection or when sending messages.
1182+
11761183
Single
11771184
``````
11781185

@@ -1266,6 +1273,9 @@ Multiple
12661273

12671274
Publish multiple messages to a broker, then disconnect cleanly.
12681275

1276+
This function includes support for MQTT v5.0, but does not currently let you
1277+
set any properties on connection or when sending messages.
1278+
12691279
.. code:: python
12701280
12711281
multiple(msgs, hostname="localhost", port=1883, client_id="", keepalive=60,
@@ -1311,6 +1321,9 @@ and processing of messages.
13111321

13121322
The two functions provided are ``simple()`` and ``callback()``.
13131323

1324+
Both functions include support for MQTT v5.0, but do not currently let you
1325+
set any properties on connection or when subscribing.
1326+
13141327
Simple
13151328
``````
13161329

about.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<body lang="EN-US">
77
<h2>About This Content</h2>
88

9-
<p><em>December 9, 2013</em></p>
9+
<p><em>December 9, 2013</em></p>
1010
<h3>License</h3>
1111

1212
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
1313
indicated below, the Content is provided to you under the terms and conditions of the
14-
Eclipse Public License Version 1.0 ("EPL") and Eclipse Distribution License Version 1.0 ("EDL").
14+
Eclipse Public License Version 2.0 ("EPL") and Eclipse Distribution License Version 1.0 ("EDL").
1515
A copy of the EPL is available at
16-
<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
16+
<a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>
1717
and a copy of the EDL is available at
1818
<a href="http://www.eclipse.org/org/documents/edl-v10.php">http://www.eclipse.org/org/documents/edl-v10.php</a>.
1919
For purposes of the EPL, "Program" will mean the Content.</p>

0 commit comments

Comments
 (0)