smarthomeNG / smarthome

Device integration platform for your smart home
https://www.smarthomeNG.de
GNU General Public License v3.0
119 stars 92 forks source link

Darstellung von Paketversion falsch mit Paketen für die ``<`` gilt - Beispiel paho-mqtt #656

Open bmxp opened 1 week ago

bmxp commented 1 week ago

In requirements/conf_all.txt findet sich

# SmartHomeNG-module 'mqtt'
paho-mqtt>=1.2.2,<2.0.0

# SmartHomeNG-lib
psutil>=5.9.8,<6.0.0

image

Als maximale Version sollte bei paho-mqtt nicht 2.0.0 in grün angezeigt werden, ebenso für psutil was explizit als Anforderung < 6.0.0 hat.

Morg42 commented 5 days ago

lib/shpypi.py, Zeile 1009 ff:

        for req in reqs:
            operator, version = self._split_operator(req)
            if operator in ['>=', '==', '>']:
                result['min'] = version
            if operator in ['<', '<=', '==']:
                result['max'] = version

Auch bei Operatoren ">" und "<" werden die angegebenen Werte als min/max gesichert.

Ich kenne das System nicht gut genug, um zu wissen, wie man das am besten umgeht - bei version < 4.2.0 dann 4.1.999 als max setzen? Ansonsten bräuchte man neben min/max noch jeweils ein zusätzliches Feld "below"/"above" oder so.

(Schonmal als Hinweis, wo man suchen muss - bzw. jetzt nur noch lösen ;) )