Skip to content

Commit

Permalink
Merge branch '1.6.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Oct 19, 2021
2 parents 71e2922 + 3d47d37 commit 6dfdeba
Show file tree
Hide file tree
Showing 171 changed files with 3,234 additions and 2,642 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- run: codespell || true # --ignore-words-list="" --skip=""
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- run: flake8 . --count --exit-zero --max-complexity=29 --max-line-length=167 --show-source --statistics
- run: isort --check-only --profile black . || true
- run: isort --check-only --profile black .
- run: pip install -e .
- run: mypy --ignore-missing-imports . || true
- run: mv setup.cfg setup.cfg.disabled
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ nosetests.xml
coverage.xml
*,cover
.hypothesis/
test/ssl/demoCA
test/ssl/rootCA
test/ssl/signingCA
*.csr

# Translations
*.mo
Expand Down
40 changes: 37 additions & 3 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
v1.6.0 - 2021-xx-xx
v1.6.0 - 2021-10-20
===================

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


v1.5.1 - 2020-09-22
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This project is dual licensed under the Eclipse Public License 1.0 and the
Eclipse Distribution License 1.0 as described in the epl-v10 and edl-v10 files.
This project is dual licensed under the Eclipse Public License 2.0 and the
Eclipse Distribution License 1.0 as described in the epl-v20 and edl-v10 files.

9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Set DESTDIR if it isn't given
DESTDIR?=/
PYTHON?=python3

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

all :
python ./setup.py build
$(PYTHON) ./setup.py build

install : all
python ./setup.py install --root=${DESTDIR}
$(PYTHON) ./setup.py install --root=${DESTDIR}

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

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

test :
python setup.py test
$(PYTHON) setup.py test
$(MAKE) -C test test

upload : test
python ./setup.py sdist upload
$(PYTHON) ./setup.py sdist upload
21 changes: 17 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document describes the source code for the `Eclipse Paho <http:https://eclipse.or

This code provides a client class which enable applications to connect to an `MQTT <http:https://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.

It supports Python 2.7.9+ or 3.5+.
It supports Python 2.7.9+ or 3.6+.

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.

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

Defaults to 0. 0 means unlimited. When the queue is full, any further outgoing messages would be dropped.
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.

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

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

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

Both functions include support for MQTT v5.0, but do not currently let you
set any properties on connection or when sending messages.

Single
``````

Expand Down Expand Up @@ -1266,6 +1273,9 @@ Multiple

Publish multiple messages to a broker, then disconnect cleanly.

This function includes support for MQTT v5.0, but does not currently let you
set any properties on connection or when sending messages.

.. code:: python
multiple(msgs, hostname="localhost", port=1883, client_id="", keepalive=60,
Expand Down Expand Up @@ -1311,6 +1321,9 @@ and processing of messages.

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

Both functions include support for MQTT v5.0, but do not currently let you
set any properties on connection or when subscribing.

Simple
``````

Expand Down
6 changes: 3 additions & 3 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<body lang="EN-US">
<h2>About This Content</h2>

<p><em>December 9, 2013</em></p>
<p><em>December 9, 2013</em></p>
<h3>License</h3>

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

0 comments on commit 6dfdeba

Please sign in to comment.