From 2c0e2a6d8a961ce320915302caadbb31cc565983 Mon Sep 17 00:00:00 2001 From: Sharath Huddar Date: Mon, 3 Jul 2023 03:53:03 +0530 Subject: [PATCH 1/3] Fix import of create_model in tools.py (#6364) --- changes/6361-SharathHuddar.md | 1 + pydantic/tools.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/6361-SharathHuddar.md diff --git a/changes/6361-SharathHuddar.md b/changes/6361-SharathHuddar.md new file mode 100644 index 00000000000..2897d88ff21 --- /dev/null +++ b/changes/6361-SharathHuddar.md @@ -0,0 +1 @@ +Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copied over to V2 branch diff --git a/pydantic/tools.py b/pydantic/tools.py index 9cdb4538eb5..45be27704cb 100644 --- a/pydantic/tools.py +++ b/pydantic/tools.py @@ -21,7 +21,7 @@ def _generate_parsing_type_name(type_: Any) -> str: @lru_cache(maxsize=2048) def _get_parsing_type(type_: Any, *, type_name: Optional[NameFactory] = None) -> Any: - from pydantic.main import create_model + from .main import create_model if type_name is None: type_name = _generate_parsing_type_name From 8750c37a553f5107562722605369fcd2cb7cdaa3 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 3 Jul 2023 15:37:38 +0300 Subject: [PATCH 2/3] no longer tag docs release as latest --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b522930a945..77fbb9ccf98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -491,8 +491,7 @@ jobs: with: version_file_path: 'pydantic/version.py' - # need to remove "latest" once V2 is released! - - run: mike deploy -b docs-site ${{ steps.check-version.outputs.VERSION_MAJOR_MINOR }} latest --update-aliases --push + - run: mike deploy -b docs-site ${{ steps.check-version.outputs.VERSION_MAJOR_MINOR }} --update-aliases --push if: "startsWith(github.ref, 'refs/tags/') && !fromJSON(steps.check-version.outputs.IS_PRERELEASE)" release: From 15c82d978d9e3b3893f00982b9e0c5c8d5c7821d Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Tue, 4 Jul 2023 17:31:49 +0200 Subject: [PATCH 3/3] Prepare for 1.10.11 (#6420) --- HISTORY.md | 4 ++++ changes/6361-SharathHuddar.md | 1 - pydantic/version.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 changes/6361-SharathHuddar.md diff --git a/HISTORY.md b/HISTORY.md index b129569a4f7..37e324ef6e7 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## v1.10.11 (2023-07-04) + +* Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copied over to V2 branch, #6361 by @SharathHuddar + ## v2.0b3 (2023-06-16) Third beta pre-release of Pydantic V2 diff --git a/changes/6361-SharathHuddar.md b/changes/6361-SharathHuddar.md deleted file mode 100644 index 2897d88ff21..00000000000 --- a/changes/6361-SharathHuddar.md +++ /dev/null @@ -1 +0,0 @@ -Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copied over to V2 branch diff --git a/pydantic/version.py b/pydantic/version.py index b7114b49d9c..49ddd535f09 100644 --- a/pydantic/version.py +++ b/pydantic/version.py @@ -1,6 +1,6 @@ __all__ = 'compiled', 'VERSION', 'version_info' -VERSION = '1.10.10' +VERSION = '1.10.11' try: import cython # type: ignore