Hi all, I have a general question about Prefect 1....
# prefect-community
Hi all, I have a general question about Prefect 1.0 vs 2.0. Is Prefect 1.0 not going to be supported much longer? I've been working with others on a project that hasn't been deployed yet and uses Prefect 1.0, and I'm wondering if we should not be spending much effort trying to implement it using 1.0. For instance, I was interested in using control flow "case" in 1.0 but am thinking this might conflict with the new case switcher in Python 3.10, and I don't see any use of "case" in 2.0. I realize this question is kind of vague, and any advice would be appreciated!
We will continue to support Prefect 1 through at least June 2023, so you have plenty of time to make the transition, but only Prefect 2 will continue to be improved and maintained in the long term.
For the control flow: it's already fully supported as you can run any Python if/else code in your flows, no need for any case statements
Hi @Anna Geller, thanks for letting me know about that June 2023 transition. For the if/else statements, do you mean that those can be run in flows in Prefect 1 or just Prefect 2? I've tried using if/else statements within flows in Prefect 1, for instance:
Copy code
source_ids = ['a', 'b', 'c']
with Flow("flow_name") as flow:
    for source_id in source_ids:
        data = extract(source_id)
        if data:
            data = transform(data)
But if/else statements like this produce strange behavior and don't work as expected. Thanks!
I would suggest moving to Prefect 2. 🙂
👍 1