sbtinstruments / aiomqtt

The idiomatic asyncio MQTT client, wrapped around paho-mqtt
https://sbtinstruments.github.io/aiomqtt
BSD 3-Clause "New" or "Revised" License
392 stars 71 forks source link

[BUG] Cannot install version 2.0.0 with paho-mqtt 2.0.0 #293

Closed dreamwhite closed 2 months ago

dreamwhite commented 2 months ago

Good afternoon and thank you so much for maintaining this project. I'm actually working on a personal project which requires paho-mqtt 2.0.0 and wanted to integrate aiomqtt for async stuff.

I'm using poetry as my dependency and venv manager and in pyproject.toml I referenced the libraries like it follows:

[tool.poetry.dependencies]
python = "^3.11"
paho-mqtt = "2.0.0"
websockets = "^12.0"
aiomqtt = "2.0.0"

As far as I run poetry install I get this error:

Updating dependencies
Resolving dependencies... (0.1s)

Because aiomqtt (2.0.0) depends on paho-mqtt (>=1.6.0,<2.0.0)
 and MYPROJECT depends on paho-mqtt (2.0.0), aiomqtt is forbidden.
So, because MYPROJECT depends on aiomqtt (2.0.0), version solving failed.

Seems like aiomqtt isn't supporting paho-mqtt 2.0.0 as the error says?

I also tried ditching poetry and using virtualenv but seems like it uses paho-mqtt 1.6.1 rather than paho-mqtt 2.0.0:

Collecting aiomqtt
  Downloading aiomqtt-2.0.1-py3-none-any.whl (16 kB)
Collecting paho-mqtt
  Downloading paho_mqtt-2.0.0-py3-none-any.whl (66 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.9/66.9 kB 2.0 MB/s eta 0:00:00
  Downloading paho-mqtt-1.6.1.tar.gz (99 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.4/99.4 kB 6.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Installing collected packages: paho-mqtt, aiomqtt
  DEPRECATION: paho-mqtt is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for paho-mqtt ... done
Successfully installed aiomqtt-2.0.1 paho-mqtt-1.6.1

[notice] A new release of pip available: 22.3.1 -> 24.0
[notice] To update, run: pip install --upgrade pip

Sorry if opening a duplicate issue but couldn't find anything so far. Best regards

dreamwhite

skewty commented 2 months ago

Duplicate. See https://github.com/sbtinstruments/aiomqtt/issues/279#issuecomment-2061853810

empicano commented 2 months ago

Hi there, I just made the release with the switch to paho-mqtt 2.0 😋

aiomqtt versions <2.1.0 only support paho-mqtt <2.0.0, aiomqtt versions >=2.1.0 only support paho-mqtt >=2.0.0. Let me know if there's anything left unclear or unsolved!