Skip to content

Fix for Python 3.9 moving Iterable to collections.abc#497

Merged
PierreF merged 1 commit intoeclipse-paho:masterfrom
Brishen:master
Jul 29, 2020
Merged

Fix for Python 3.9 moving Iterable to collections.abc#497
PierreF merged 1 commit intoeclipse-paho:masterfrom
Brishen:master

Conversation

@Brishen
Copy link
Contributor

@Brishen Brishen commented Jun 9, 2020

Signed-off-by: Brishen Hawkins brishen.hawkins@gmail.com

Signed-off-by: Brishen Hawkins <brishen.hawkins@gmail.com>
@Brishen
Copy link
Contributor Author

Brishen commented Jun 9, 2020

The Travis-CI build is failing because the tests are outdated. See my pull request for the testing repo: eclipse-paho/paho.mqtt.testing#65

@PierreF
Copy link
Contributor

PierreF commented Jul 29, 2020

The Travis error seems unrelated to this PR. Sadly our tests fail from time to time, but I can't reproduce those failure making it hard to solve. Most of the time, re-running test "fix" them :(
On the Iterable, it indeed move to collections.abc since Python 3.3 (but it's probably only Python 3.9 which dropped it presence in collections).
Anyway, thank for your contribution !

@PierreF PierreF merged commit d7592a6 into eclipse-paho:master Jul 29, 2020
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request Aug 31, 2022
Fixes the following error on calling mqtt.publish():

  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 222, in single
    multiple([msg], hostname, port, client_id, keepalive, will, auth, tls,
  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 126, in multiple
    if not isinstance(msgs, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'

Backported from eclipse-paho/paho.mqtt.python#497

This was deprecated in python 3.9 and stopped working in python 3.10

Signed-off-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
arnout pushed a commit to buildroot/buildroot that referenced this pull request Sep 18, 2022
Fixes the following error on calling mqtt.publish():

  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 222, in single
    multiple([msg], hostname, port, client_id, keepalive, will, auth, tls,
  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 126, in multiple
    if not isinstance(msgs, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'

Backported from eclipse-paho/paho.mqtt.python#497

This was deprecated in python 3.9 and stopped working in python 3.10

Signed-off-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 2526a2f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
arnout pushed a commit to buildroot/buildroot that referenced this pull request Sep 18, 2022
Fixes the following error on calling mqtt.publish():

  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 222, in single
    multiple([msg], hostname, port, client_id, keepalive, will, auth, tls,
  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 126, in multiple
    if not isinstance(msgs, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'

Backported from eclipse-paho/paho.mqtt.python#497

This was deprecated in python 3.9 and stopped working in python 3.10

Signed-off-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 2526a2f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
ccrisan pushed a commit to ccrisan/thingos that referenced this pull request Nov 15, 2023
Fixes the following error on calling mqtt.publish():

  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 222, in single
    multiple([msg], hostname, port, client_id, keepalive, will, auth, tls,
  File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 126, in multiple
    if not isinstance(msgs, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'

Backported from eclipse-paho/paho.mqtt.python#497

This was deprecated in python 3.9 and stopped working in python 3.10

Signed-off-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants