DiamondLightSource / DiamondLightSource/python-workflows
Marsmallow 3.24.0 deprecates construction of Field
- Ngôn ngữ chính
- Python
- Star
- 9
- Fork
- 8
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
While running system tests for mx-bluesky, I encountered the following warning while loading the zocalo configuration, which we have had to add an explicit ignore for:
```
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.11/site-packages/workflows/util/zocalo/configuration.py", line 33, in
class Pika:
File "/usr/local/lib/python3.11/site-packages/workflows/util/zocalo/configuration.py", line 36, in Pika
class Schema(PluginSchema):
File "/usr/local/lib/python3.11/site-packages/workflows/util/zocalo/configuration.py", line 38, in Schema
port = fields.Field(required=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/marshmallow/fields.py", line 165, in __init__
warnings.warn(
marshmallow.warnings.ChangedInMarshmallow4Warning: `Field` should not be instantiated. Use `fields.Raw` or another field subclass instead.
```
It seems that in 3.24.0 of marshamallow, they have deprecated this usage and are now generating warnings for it.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start at workflows/util/zocalo/configuration.py, specifically Pika.Schema.port, where fields.Field(required=True) emits the Marshmallow warning. Check the surrounding schema and system-test setup, then verify that loading the zocalo configuration no longer requires the explicit warning ignore under Marshmallow 3.24.0.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100