Skip to content

Version 1.11 breaks deployments on python 3.9

Traceback (most recent call last):
  File "/opt/conda/envs/bliss_lima/bin/LimaCCDs", line 6, in <module>
    from Lima.Server.LimaCCDs import main
  File "/opt/conda/envs/bliss_lima/lib/python3.9/site-packages/Lima/Server/LimaCCDs.py", line 73, in <module>
    from Lima.Server import plugins
  File "/opt/conda/envs/bliss_lima/lib/python3.9/site-packages/Lima/Server/plugins/__init__.py", line 62, in <module>
Traceback (most recent call last):
  File "/opt/conda/envs/bliss_lima/bin/LimaCCDs", line 6, in <module>
    from Lima.Server.LimaCCDs import main
  File "/opt/conda/envs/bliss_lima/lib/python3.9/site-packages/Lima/Server/LimaCCDs.py", line 73, in <module>
    __all__ = _init_module()
  File "/opt/conda/envs/bliss_lima/lib/python3.9/site-packages/Lima/Server/plugins/__init__.py", line 56, in _init_module
    from Lima.Server import plugins
  File "/opt/conda/envs/bliss_lima/lib/python3.9/site-packages/Lima/Server/plugins/__init__.py", line 62, in <module>
    __all__ = _init_module()
  File "/opt/conda/envs/bliss_lima/lib/python3.9/site-packages/Lima/Server/plugins/__init__.py", line 56, in _init_module
    for entry_point in eps.select(group="Lima_tango_plugin"):
AttributeError: 'dict' object has no attribute 'select'
    for entry_point in eps.select(group="Lima_tango_plugin"):

In newer versions of importlib.metadata, entry_points() returns an EntryPoints object that supports .select(group=...).

But in older Python 3.9.x (before 3.10), importlib.metadata.entry_points() returns a dictionary-like object, not supporting .select().

I noticed in the CI of several of our packages that require integration tests with Bliss. For example: https://gitlab.esrf.fr/workflow/ewoksapps/ewoksbm29/-/jobs/1953862.

I see that in setup.py you do not restrict the python version. Can you add this and perhaps making a new pypi/anaconda release while yanking 1.11?

Edited by Wout De Nolf