labgrid-project / labgrid

Embedded systems control library for development, testing and installation
https://labgrid.readthedocs.io/
Other
327 stars 164 forks source link

modbusrtu/dev extras make pyserial overwrite pyserial-labgrid #1245

Open Bastian-Krause opened 1 year ago

Bastian-Krause commented 1 year ago

Having labgrid installed without extras:

$ pip freeze | grep pyserial
pyserial-labgrid==3.5.0.2
$ python -c 'import serial; print(serial.VERSION)'
3.5.0.2

With modbusrtu or dev extra (pulling in minimalmodbus, which depends on pyserial):

$ pip freeze | grep pyserial
pyserial==3.5
pyserial-labgrid==3.5.0.2
$ python -c 'import serial; print(serial.VERSION)'
3.5

This means pyserial effectively overwrites pyserial-labgrid.

I don't know if pyserial always overwrites pyserial-labgrid, it probably depends on pip's dependency resolving strategy.

jluebbe commented 1 year ago

To avoid this, we might need to rename the package in our pyserial fork, so that the import explicitly uses it.