Hi, 2.8.1 is breaking the `from prefect.orion` imp...
# prefect-community
Hi, 2.8.1 is breaking the
from prefect.orion
import path and is therefore, unfortunately, not backwards compatible 😢
Is an import failing for you at runtime? When I use imports from
on 2.8.1, they work but display a deprecation warning:
Copy code
test.py:9: DeprecationWarning: The 'prefect.orion' module has been deprecated. It will not be available after Aug 2023. Use 'prefect.server' instead.
  from prefect.orion.services.loop_service 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.
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
@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.
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.
Copy code

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
Copy code
orion_import_flow.py:4:0: E0401: Unable to import 'prefect.orion.schemas.filters' (import-error)
orion_import_flow.py:4:0: E0611: No name 'orion' in module 'prefect' (no-name-in-module)
with Prefect 2.8.1 i'm using pylint 2.14.2
Great thanks let me see what I can do
I don’t have high hopes though
I tried this
but still get
Copy code
************* Module example
example.py:4:0: E0401: Unable to import 'prefect.orion.schemas.filters' (import-error)