https://prefect.io logo
Title
p

Philip Billaudelle

12/12/2019, 11:44 AM
Hi 👋 I have been running into the following
DeprecationWarning
, which seems to lead to an
ERROR
in my prefect Runner:
ERROR - prefect.FlowRunner | Unexpected error: DeprecationWarning("Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working")
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/runner.py", line 48, in inner
    new_state = method(self, state, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/flow_runner.py", line 482, in get_flow_run_state
    key_states = set(flatten_seq([all_final_states[t] for t in reference_tasks]))
  File "/usr/local/lib/python3.7/site-packages/prefect/utilities/collections.py", line 29, in flatten_seq
    if isinstance(item, collections.Iterable) and not isinstance(
  File "/usr/local/lib/python3.7/collections/__init__.py", line 52, in __getattr__
    DeprecationWarning, stacklevel=2)
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
It seems to be caused by import
Iterable
directly from
collections
instead of
collections.abc
: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/utilities/collections.py#L29
Does that make sense? What would you recommend to solve it?
j

josh

12/12/2019, 2:19 PM
Interesting @Philip Billaudelle what does your Flow look like and which version of Prefect are you running?
p

Philip Billaudelle

12/12/2019, 2:34 PM
Hi @josh, I upgraded to 0.8.0 and it's working fine now. I was on
>=0.5,<0.6
before. Thx for checking my message.
j

josh

12/12/2019, 2:40 PM
Great!