Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn Pydantic into an optional dependency #37320

Merged
merged 1 commit into from Feb 12, 2024

Commits on Feb 12, 2024

  1. Turn Pydantic into an optional dependency

    We've been internally using pydantic for internal API and it caused
    some compatibility issues, because Pydantic is so popular and currently
    still users of Pydantic are somewhat split between Pydantic 1 and
    Pydantic 2.  The popularity of Pydantic works against us, and since we
    are not yet using it in "production" (and in the future we will only
    actually use it for Internal API), it seems that turning Pydantic into
    an optional dependency is the best way we can proceed.
    
    It's as simple as converting all the direct imports into a common util
    imports that have a fallback mechanism when import is not found.
    
    This should enable less conflicts when installing 3rd-party libraries
    with Airflow.
    
    Added test where pydantic is removed. Also made sure that the special
    cases we have tests for run full suite of tests - non-db and db.
    potiuk committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    16aeb19 View commit details
    Browse the repository at this point in the history