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

[BUGFIX] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform #7163

Merged
merged 2 commits into from Feb 16, 2023

Conversation

Kilo59
Copy link
Member

@Kilo59 Kilo59 commented Feb 16, 2023

Changes proposed in this pull request:

The pydantic 1.10.4 release updates the minimum version of typing_extenions which was the source of the ImportError: cannot import name dataclass_transform errors in some environments.
The issue stems from the fact the pydantic v.1.10 had started to rely on a typing_extension import that didn't exist in the minimum type_extension version.

Consequently, if a user had an earlier version of pydantic or typing_extentions installed in the environment pip would consider the requirement satisfied and would not update the needed version.
This frequently happened in environments like Databricks.
With this change, pip will automatically update the pydantic and typing_extension versions if needed when installing great_expectations.

pydantic/pydantic#4885

Fixes #6486

Note:

This also fixes the RuntimeError: no validator found for <class 're.Pattern'>, see `arbitrary_types_allowed` in Config error that could result from an older pydantic version.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit c94f8b2
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/63ee48803fe61c0008ca8825
😎 Deploy Preview https://deploy-preview-7163--niobium-lead-7998.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ghost
Copy link

ghost commented Feb 16, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@Kilo59 Kilo59 marked this pull request as ready for review February 16, 2023 14:53
@Kilo59 Kilo59 enabled auto-merge (squash) February 16, 2023 14:56
@Kilo59 Kilo59 self-assigned this Feb 16, 2023
@Kilo59 Kilo59 requested a review from a team February 16, 2023 14:57
@Kilo59 Kilo59 changed the title [MAINTENANCE] pydantic>=1.10.4 [BUG] pydantic>=1.10.4 Feb 16, 2023
@Kilo59 Kilo59 changed the title [BUG] pydantic>=1.10.4 [BUG] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform Feb 16, 2023
@Kilo59 Kilo59 changed the title [BUG] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform [BUGFIX] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform Feb 16, 2023
Copy link
Member

@cdkini cdkini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a comment regarding why we're specifying a patch version?

Copy link
Contributor

@billdirks billdirks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cdkini cdkini disabled auto-merge February 16, 2023 16:59
@cdkini cdkini merged commit 68752af into develop Feb 16, 2023
@cdkini cdkini deleted the pydantic-version branch February 16, 2023 16:59
Shinnnyshinshin pushed a commit that referenced this pull request Feb 16, 2023
* develop: (29 commits)
  [BUGFIX] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform (#7163)
  [MAINTENANCE] ZEP - update asset factories method signatures from asset models (#7096)
  Delete cli v012 tests. (#7159)
  [CONTRIB] added new Expectations  - India_zip_code expectation and not_to_be_future_date expectation (#6086)
  [MAINTENANCE] Remove unused dockerfile (#7152)
  [DOCS] doc-464 consolidating and standardizing snippets (#7154)
  [BUGFIX] Patch broken rendered content Cloud tests (#7155)
  [MAINTENANCE] Clean up `mypy` violations in `CardinalityChecker` (#7146)
  [MAINTENANCE] Clean up pathlib.Path() usage in DataConnector utilities and restore tighter formatting in great_expectations/util.py  (#7149)
  [MAINTENANCE] Change all instances of `create_expectation_suite` to `add_expectation_suite` in tests, docs, and source code (#7117)
  [BUGFIX] Parse pandas version correctly for development builds (#7147)
  [MAINTENANCE] Update V3 DataConnector utilities to support New Datasources (ZEP) (#7144)
  [BUGFIX] Patch inconsistent ordering within GCP test asserts (#7130)
  Refactor sql splitter to take selectable instead of str. (#7133)
  [BUGFIX] `TupleAzureBlobStoreBackend` no longer gives warning when obfuscating connection string (#7139)
  [MAINTENANCE] ruff 0.0.246 update (#7137)
  [MAINTENANCE] Output Consistent Data Format from "table.head" Metric for every ExecutionEngine (#7134)
  [BUGFIX] Copy previous versions after checking out the the current commit (#7142)
  [DOCS] Remove sitemap.xml (#7141)
  [MAINTENANCE] mypy `v1.0.0` (#7138)
  ...
Shinnnyshinshin pushed a commit that referenced this pull request Feb 16, 2023
* develop:
  [FEATURE] ZEP - Dynamically define `add_<ASSET_TYPE>_asset()` methods if needed (#7121)
  [FEATURE] Update zep to use sqlalchemy_data_splitter.py (#7151)
  [RELEASE] 0.15.49 (#7168)
  [BUGFIX] ID/PK Spark and Sql fall back when `unexpected_index_column_names` have not been defined (#7150)
  [CONTRIB] Update the rendered text for min and max values to be clearer. (#7166)
  [MAINTENANCE] Clean up additional deprecation warnings from outdated CRUD API (#7156)
  [MAINTENANCE] Bump minimum version of `pytest` (#7164)
  [BUGFIX] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform (#7163)
  [MAINTENANCE] ZEP - update asset factories method signatures from asset models (#7096)
Shinnnyshinshin pushed a commit to jmoskovc/great_expectations that referenced this pull request Feb 16, 2023
* develop:
  [FEATURE] ZEP - Dynamically define `add_<ASSET_TYPE>_asset()` methods if needed (great-expectations#7121)
  [FEATURE] Update zep to use sqlalchemy_data_splitter.py (great-expectations#7151)
  [RELEASE] 0.15.49 (great-expectations#7168)
  [BUGFIX] ID/PK Spark and Sql fall back when `unexpected_index_column_names` have not been defined (great-expectations#7150)
  [CONTRIB] Update the rendered text for min and max values to be clearer. (great-expectations#7166)
  [MAINTENANCE] Clean up additional deprecation warnings from outdated CRUD API (great-expectations#7156)
  [MAINTENANCE] Bump minimum version of `pytest` (great-expectations#7164)
  [BUGFIX] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform (great-expectations#7163)
  [MAINTENANCE] ZEP - update asset factories method signatures from asset models (great-expectations#7096)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Pydantic issue with airflow operator
3 participants