https://prefect.io logo
b

Brett Naul

02/08/2022, 1:19 PM
is there (going to be) any way to run prefect 1.0 and 2.0 in the same installation for backwards compatibility? it'd be nice to have a way to experiment with one or two flows without mixing environments/branches
k

Kevin Kho

02/08/2022, 2:53 PM
I don’t think so because all the imports will change
b

Brett Naul

02/08/2022, 4:01 PM
not sure what that means...say I want to change exactly one module to use prefect 2.0; if I could
pip install prefect2
and
import prefect2 as prefect
just inside that one module then everything else in the codebase could still work and I'd only have to update the one file. is there anything that would prevent me from doing that?
k

Kevin Kho

02/08/2022, 4:08 PM
I see what you mean. Let me ask the team what the thought around this is
The API isn’t backwards compatible, so even if they could be installed side-by-side (which would require a different package name and ensuring all the same dependencies) code wouldn’t trivially transfer between them. The 2.0 is specifically to indicate that this represents a breaking change from 1.x
b

Brett Naul

02/08/2022, 4:15 PM
yes, that's exactly why I meant by
I'd only have to update the one file
in particular I already have a branch that is using the 2.0 alpha for some things, but every other piece of code that I didn't update can't run because of all the breaking changes. if they were simply different packages then there'd be no issue (personally I think releasing an entirely different package under the same pypi name is not really the way to go but it seems too late for that)
9 Views