Wykres commitów

130 Commity (pre-commit)

Autor SHA1 Wiadomość Data
Marius Kriegerowski 65fe9bedc1 inherit BrokerException from Exception 2021-03-26 15:20:24 +01:00
Marius Kriegerowski 613e77f6b4 more strict flake8. Fixed typos. 2021-03-17 10:57:32 +01:00
Florian Ludwig 560eed263b cleanup BrokerContext.sessions 2021-03-16 10:59:26 +01:00
Florian Ludwig f328f8ca90 add more type hints 2021-03-16 10:59:26 +01:00
Florian Ludwig f3d7fa90f3 cleanup broker.start 2021-03-16 10:59:26 +01:00
lrasku c41b01499d Fix topic filter matching
- re.escape() the whole filter string first to escape _all_ regex
  metacharacters in it, not just $. (# and + are both regex metacharacters,
  so their replace expressions now need a leading \\ to replace the
  escaping, too.)
- # matches topics both with and without a trailing /, so the replace
  expressions adds a '?' before the '.*'. The .lstrip('?') at the end removes
  this in case the # was the first character in the filter.
- + should only match a single level, but it should _also_ match empty levels,
  so use '[^/]*' to replace it.
- Use Regex.fullmatch() to match against the whole topic string, not just
  its start.

Also add two unit tests to test this matching, and fix an incorrect match
against + in test_client_subscribe_publish_dollar_topic_2.
2021-03-15 13:43:47 +01:00
Marius Kriegerowski 7921e2cc22 linter project with black at default line length 88 2021-03-15 10:18:00 +01:00
Marius Kriegerowski db3dffa857 use black linter with 96 char line length 2021-03-14 21:44:41 +01:00
Marius Kriegerowski 30582f4cac Revert "Fixed critical bugs e.g., incorrectly retained messages on qos0, race conditions on detached sessions, eliminated set_exception on client disconnect tasks, a few debug log message isEnabledFor wrappers."
This reverts commit 1f5efd383f.
2021-03-09 19:13:32 +01:00
Marius Kriegerowski e0fabc0bc3 Refactor to comply python3.8 2021-03-09 19:13:32 +01:00
shipmints 1f5efd383f Fixed critical bugs e.g., incorrectly retained messages on qos0, race conditions on detached sessions, eliminated set_exception on client disconnect tasks, a few debug log message isEnabledFor wrappers. 2020-04-01 15:09:09 -04:00
shipmints 6d6dd997f1 Asyncio fixes 2020-02-20 10:46:29 -05:00
Jan Seeger d8450e9922 Enable reuse_address by default. 2019-08-06 17:06:22 +02:00
Nicolas 1af9e7f99c
Merge pull request #139 from gdraynz/py37
python3.7 support
2018-07-16 21:06:44 +02:00
Aleksandr Mironov 0f17486e13 Pass CA params to broker's SSL context 2018-07-12 11:16:51 +03:00
Guillaume Desvé 31888f8e69 python3.7 support 2018-06-29 15:56:27 +02:00
Nicolas 7c8e393166
Merge pull request #114 from phooky/master
Correctly handle CONNECT with zero-length client_id
2018-04-29 17:30:02 +02:00
Román Cárdenas 59f9d28029 Added topic filtering Plugin 2018-03-19 10:58:56 +01:00
Román Cárdenas 42143a196c Client authentication error fixed 2018-03-16 15:27:31 +01:00
Adam Mayer bbcf7b3849
correctly handle CONNECT with zero-length client_id
Zero-length client_ids in CONNECT packets show up in the payload as empty strings, not None; the broker should generate a new id for these connections.
2018-03-14 13:21:17 -04:00
Guillaume Desvé 90a9344068 Add __slots__ attribute to the most used classes 2017-10-10 16:09:55 +02:00
Stein Magnus Jodal ce4824bf70 flake8: Fix all F841 unused local variable warnings 2017-08-07 01:23:21 +02:00
Stein Magnus Jodal 6435e4239c flake8: Fix all F401 unused imports warnings 2017-08-07 01:23:21 +02:00
Stein Magnus Jodal 1b5ead2e08 flake8: Fix all E402 import warnings 2017-08-07 01:23:21 +02:00
Stein Magnus Jodal 177bfb627c flake8: Fix all E1xx indentation warnings 2017-08-07 01:23:21 +02:00
Stein Magnus Jodal df2c9b8a43 flake8: Fix all E3xx newline warnings 2017-08-07 01:23:20 +02:00
Stein Magnus Jodal 6f4b306886 flake8: Fix all E2xx whitespace warnings 2017-08-07 01:23:20 +02:00
Stein Magnus Jodal 8d414355ed Merge branch 'master' into transitions-0.5 2017-08-06 08:52:39 +02:00
Stein Magnus Jodal d3a6d9d759 Support transitions >= 0.5.0
transitions 0.5.0 replaced MachineError with ValueError and
AttributeError for exceptions raised when transitioning the state
machine. MachineError is still available in transitions 0.5.0, so we
catch both MachineError and the relevant new exception to work with
both old and new versions of transitions.
2017-07-26 14:49:02 +02:00
Stein Magnus Jodal a89e744a47 Change deprecated warn() to warning() 2017-07-26 14:06:17 +02:00
Florian Ludwig f88d87fc60 accept boolean as config argument for "ssl" 2016-07-30 21:17:57 +02:00
Nicolas a0cb5f5009 Add some checking for invalid port value (see issue #42) 2016-06-10 21:30:05 +02:00
Nicolas 9f61197cdd Fix #41
Use direct match if topic filter doen't contain wildcard chars
2016-05-31 21:56:46 +02:00
Nicolas da269d45e8 Change message level logged when clean session is set but the session to delete is not found. 2016-05-19 21:18:57 +02:00
Nicolas f298a4a543 Fix #35
Test retain message exists before trying to delete it.
2016-05-04 22:43:06 +02:00
Nicolas 13c4a8a09f Fix #36
Don't start listener if it doesn't contain a 'bind' parameter
2016-05-04 21:33:01 +02:00
Nicolas e9b806348e Fix #32 2016-04-10 23:02:10 +02:00
Nicolas ea62725868 Fix #30 2016-04-10 22:32:07 +02:00
Nicolas e391ccebaf Fix #27 2016-04-10 22:17:28 +02:00
Nicolas 5dc5293063 Fix #25 #26 2016-04-10 22:15:17 +02:00
Nicolas 360d5b03c7 Fix #28 2016-04-10 22:06:33 +02:00
Nicolas d380029cb5 Fix typo 2016-04-06 14:33:13 +02:00
njouanin ba09225779 Fix issue #22 2016-03-08 21:10:46 +01:00
pumelo 0064c500ac Add subprotocol headers for ws connection as defined by the mqtt specification v3.1.1 chapter 6:
''The WebSocket Sub Protocol name selected and returned by the server MUST be “mqtt” [MQTT-6.0.0-4]."
2016-03-04 22:52:18 +01:00
njouanin 5458ec7764 No need to close stream when client has disconnected (it is already closed).
Fixes issue #19
2016-02-05 14:14:57 +01:00
Nico 82985b6f1c Improve documentation 2015-11-13 22:07:58 +01:00
Nico d71b9c1483 Fix toc and add missing documents 2015-11-06 23:02:19 +01:00
Nico 8dab60a444 Add support for both Python 3.4 and 3.5 2015-11-01 21:27:33 +01:00
Nico 4dcf8eb477 Revert to 3.4 coroutine syntax 2015-11-01 15:58:20 +01:00
Nico e6c7c4d3cb Implement $SYS topics as broker plugin 2015-10-19 21:37:31 +02:00