Marsmallow 3.24.0 deprecates construction of Field
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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:
<snip/>
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.11/site-packages/workflows/util/zocalo/configuration.py", line 33, in <module>
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.
- Dominant language
- Python
- Stars
- 9
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DiamondLightSource/python-workflows
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Dependency Dashboard Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
All issues in DiamondLightSource/python-workflows
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100