Toby Rahloff

02/17/2023, 9:48 AM
Hi, 2.8.1 is breaking the
from prefect.orion
import path and is therefore, unfortunately, not backwards compatible 😢

Ryan Peden

02/17/2023, 12:59 PM
Is an import failing for you at runtime? When I use imports from
on 2.8.1, they work but display a deprecation warning: DeprecationWarning: The 'prefect.orion' module has been deprecated. It will not be available after Aug 2023. Use 'prefect.server' instead.
  from import LoopService
Other things in
should do the same thing, but if you encounter anything that's not working, please let us know so we can investigate.

Justin Trautmann

02/17/2023, 1:25 PM
hey Ryan, thanks for the input. It works indeed at runtime 🤯 but our CI that includes pylint checks and the IDE cannot resolve the deprecated imports, i guess because it is not actually evaluating the
. So this means that we either need to disable these checks in our CI or refactor immediately in order to unblock our pipelines? 🤔
🤯 1


02/17/2023, 4:15 PM
@Justin Trautmann Is there a reproduction you could share? I’m happy to try to fix this, it’s just pretty tricky as-is to make all the import machinery work correctly for old modules.

Justin Trautmann

02/17/2023, 4:24 PM
sure. thank you for looking into it. i agree that the python import machinery can be tricky sometimes and i'm quite impressed by what you are doing in importtools.

from prefect import flow
from prefect.orion.schemas.filters import FlowFilter

def main() -> None:

if __name__ == "__main__":
pylint on this code throws no errors with Prefect 2.8.0 but reports E0401: Unable to import 'prefect.orion.schemas.filters' (import-error) E0611: No name 'orion' in module 'prefect' (no-name-in-module)
with Prefect 2.8.1 i'm using pylint 2.14.2


02/17/2023, 4:42 PM
Great thanks let me see what I can do
I don’t have high hopes though
I tried this
but still get
************* Module example E0401: Unable to import 'prefect.orion.schemas.filters' (import-error)