bluesky / hklpy

Diffractometer computation library with ophyd pseudopositioner support
https://blueskyproject.io/hklpy
BSD 3-Clause "New" or "Revised" License
2 stars 11 forks source link

databroker v2.0 causes TypeError #336

Open prjemian opened 1 month ago

prjemian commented 1 month ago

This code: https://github.com/bluesky/hklpy/blob/782b8ae5f4e587da119119dd6dcc023066abb945/hkl/tests/test_save_restore_UB.py#L28-L30

triggers this exception in Py3.11 CI:

2024-05-23T17:36:41.4183877Z descriptor = <slot wrapper '__call__' of 'type' objects>
2024-05-23T17:36:41.4184587Z obj = <property object at 0x7f6832ff93f0>
2024-05-23T17:36:41.4184989Z 
2024-05-23T17:36:41.4185183Z     def _descriptor_get(descriptor, obj):
2024-05-23T17:36:41.4185749Z         if isclass(descriptor):
2024-05-23T17:36:41.4186242Z             return descriptor
2024-05-23T17:36:41.4186914Z         get = getattr(type(descriptor), '__get__', _sentinel)
2024-05-23T17:36:41.4187643Z         if get is _sentinel:
2024-05-23T17:36:41.4188104Z             return descriptor
2024-05-23T17:36:41.4188630Z >       return get(descriptor, obj, type(obj))
2024-05-23T17:36:41.4189711Z E       TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
2024-05-23T17:36:41.4190472Z 
2024-05-23T17:36:41.4191067Z ../../../micromamba/envs/hklpy-test-py-3.11/lib/python3.11/inspect.py:2432: TypeError
2024-05-23T17:36:41.4192165Z ______________ ERROR at setup of test_fourc_run_orientation_info _______________
prjemian commented 1 month ago

Root cause is installation of databroker 2.0.0b40 in the workflow.

Project dependencies: https://github.com/bluesky/hklpy/blob/782b8ae5f4e587da119119dd6dcc023066abb945/pyproject.toml#L50-L59

Workflow installs Python with these additional dependencies: https://github.com/bluesky/hklpy/blob/782b8ae5f4e587da119119dd6dcc023066abb945/.github/workflows/conda_unit_test.yml#L44-L48

Could pin databroker=1.2 in the workflow.

prjemian commented 1 month ago

related:

prjemian commented 1 month ago

More a problem about what code is used to subscribe to the RE documents.