Skip to content

drop pydantic v1 support #14014

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

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

drop pydantic v1 support #14014

wants to merge 11 commits into from

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Jul 9, 2025

No description provided.

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jul 9, 2025
Copy link

codecov bot commented Jul 9, 2025

❌ 39 Tests Failed:

Tests completed Failed Passed Skipped
3440 39 3401 67
View the top 3 failed test(s) by shortest run time
::tests.unit.bigquery.test_bigquery_profiler
Stack Traces | 0s run time
.../unit/bigquery/test_bigquery_profiler.py:3: in <module>
    from datahub.ingestion.source.bigquery_v2.bigquery_config import BigQueryV2Config
.../source/bigquery_v2/bigquery_config.py:262: in <module>
    class BigQueryV2Config(
venv/lib/python3.9.../pydantic/_internal/_model_construction.py:237: in __new__
    complete_model_class(
venv/lib/python3.9.../pydantic/_internal/_model_construction.py:597: in complete_model_class
    schema = gen_schema.generate_schema(cls)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:711: in generate_schema
    schema = self._generate_schema_inner(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1004: in _generate_schema_inner
    return self._model_schema(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:837: in _model_schema
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:837: in <dictcomp>
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1206: in _generate_md_field_schema
    common_field = self._common_field_schema(name, field_info, decorators)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1372: in _common_field_schema
    schema = self._apply_annotations(
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:2297: in _apply_annotations
    schema = get_inner_schema(source_type)
venv/lib/python3.9.../pydantic/_internal/_schema_generation_shared.py:83: in __call__
    schema = self._handler(source_type)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:2279: in inner_handler
    schema = self._generate_schema_inner(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1009: in _generate_schema_inner
    return self.match_type(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1127: in match_type
    return self._unknown_type_schema(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:639: in _unknown_type_schema
    raise PydanticSchemaGenerationError(
E   pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'classmethod'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.
E   
E   If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.
E   
E   For further information visit https://errors.pydantic.dev/2.11/u/schema-for-unknown-type
::tests.unit.bigquery.test_bigquery_source
Stack Traces | 0s run time
.../unit/bigquery/test_bigquery_source.py:16: in <module>
    from datahub.ingestion.source.bigquery_v2.bigquery import BigqueryV2Source
.../source/bigquery_v2/bigquery.py:25: in <module>
    from datahub.ingestion.source.bigquery_v2.bigquery_config import BigQueryV2Config
.../source/bigquery_v2/bigquery_config.py:262: in <module>
    class BigQueryV2Config(
venv/lib/python3.9.../pydantic/_internal/_model_construction.py:237: in __new__
    complete_model_class(
venv/lib/python3.9.../pydantic/_internal/_model_construction.py:597: in complete_model_class
    schema = gen_schema.generate_schema(cls)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:711: in generate_schema
    schema = self._generate_schema_inner(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1004: in _generate_schema_inner
    return self._model_schema(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:837: in _model_schema
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:837: in <dictcomp>
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1206: in _generate_md_field_schema
    common_field = self._common_field_schema(name, field_info, decorators)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1372: in _common_field_schema
    schema = self._apply_annotations(
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:2297: in _apply_annotations
    schema = get_inner_schema(source_type)
venv/lib/python3.9.../pydantic/_internal/_schema_generation_shared.py:83: in __call__
    schema = self._handler(source_type)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:2279: in inner_handler
    schema = self._generate_schema_inner(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1009: in _generate_schema_inner
    return self.match_type(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1127: in match_type
    return self._unknown_type_schema(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:639: in _unknown_type_schema
    raise PydanticSchemaGenerationError(
E   pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'classmethod'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.
E   
E   If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.
E   
E   For further information visit https://errors.pydantic.dev/2.11/u/schema-for-unknown-type
::tests.unit.bigquery.test_bigqueryv2_usage_source
Stack Traces | 0s run time
.../unit/bigquery/test_bigqueryv2_usage_source.py:10: in <module>
    from datahub.ingestion.source.bigquery_v2.bigquery_config import BigQueryV2Config
.../source/bigquery_v2/bigquery_config.py:262: in <module>
    class BigQueryV2Config(
venv/lib/python3.9.../pydantic/_internal/_model_construction.py:237: in __new__
    complete_model_class(
venv/lib/python3.9.../pydantic/_internal/_model_construction.py:597: in complete_model_class
    schema = gen_schema.generate_schema(cls)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:711: in generate_schema
    schema = self._generate_schema_inner(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1004: in _generate_schema_inner
    return self._model_schema(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:837: in _model_schema
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:837: in <dictcomp>
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1206: in _generate_md_field_schema
    common_field = self._common_field_schema(name, field_info, decorators)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1372: in _common_field_schema
    schema = self._apply_annotations(
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:2297: in _apply_annotations
    schema = get_inner_schema(source_type)
venv/lib/python3.9.../pydantic/_internal/_schema_generation_shared.py:83: in __call__
    schema = self._handler(source_type)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:2279: in inner_handler
    schema = self._generate_schema_inner(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1009: in _generate_schema_inner
    return self.match_type(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:1127: in match_type
    return self._unknown_type_schema(obj)
venv/lib/python3.9.../pydantic/_internal/_generate_schema.py:639: in _unknown_type_schema
    raise PydanticSchemaGenerationError(
E   pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'classmethod'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.
E   
E   If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.
E   
E   For further information visit https://errors.pydantic.dev/2.11/u/schema-for-unknown-type

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link

alwaysmeticulous bot commented Jul 9, 2025

✅ Meticulous spotted 0 visual differences across 1339 screens tested: view results.

Meticulous evaluated ~8 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit ecd4687. This comment will update as new commits are pushed.

Copy link

codecov bot commented Jul 9, 2025

Bundle Report

Changes will decrease total bundle size by 800 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 19.72MB -800 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js -800 bytes 16.09MB -0.0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant