Skip to content

Conversation

@ilovelinux
Copy link
Contributor

@ilovelinux ilovelinux commented Oct 11, 2025

We don't run any test about how the code base runs with Pydantic v1, even if it's supposed to be supported.

In fact, the implementations for Pydantic v1 is broken. See #2516.

@ilovelinux
Copy link
Contributor Author

$ tox r -e lock
ROOT: will run in automatically provisioned tox, host /usr/bin/python is missing [requires (has)]: tox>=4.24.1 (4.23.2), tox-uv>=1.23
ROOT: provision> .tox/.tox/bin/python -m tox r -e lock
lock: commands[0]> uv lock --refresh --upgrade
Using CPython 3.12.11
  × No solution found when resolving dependencies for split (markers: python_full_version >= '3.10'; included: datamodel-code-generator[group:pydantic1]; excluded:
  │ datamodel-code-generator[group:black22], datamodel-code-generator[group:black23], datamodel-code-generator[group:black24], datamodel-code-generator[group:dev]):
  ╰─▶ Because datamodel-code-generator:pkg-meta depends on check-wheel-contents>=0.6.1 and only the following versions of check-wheel-contents are available:
          check-wheel-contents<=0.6.1
          check-wheel-contents==0.6.2
          check-wheel-contents==0.6.3
      we can conclude that datamodel-code-generator:pkg-meta depends on check-wheel-contents>=0.6.1.
      And because check-wheel-contents>=0.6.1 depends on pydantic>=2.0 and datamodel-code-generator:pydantic1 depends on pydantic<2, we can conclude that datamodel-code-generator:pydantic1 and
      datamodel-code-generator:pkg-meta are incompatible.
      And because your project requires datamodel-code-generator:pkg-meta and datamodel-code-generator:pydantic1, we can conclude that your project's requirements are unsatisfiable.
lock: exit 1 (1.33 seconds) ../datamodel-code-generator> uv lock --refresh --upgrade pid=237059
  lock: FAIL code 1 (1.35=setup[0.01]+cmd[1.33] seconds)
  evaluation failed :( (1.40 seconds)

@ilovelinux
Copy link
Contributor Author

@gaborbernat @koxudaxi see #2516.

I propose to merge this PR to keep track of the incompatibility in the main branch. Then, I'm gonna create a PR to fix the implementation in the next days, but IMHO they are two separate things.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 11, 2025

CodSpeed Performance Report

Merging #2515 will degrade performances by 20.66%

Comparing ilovelinux:feat/ilovelinux-add-pydantic1-to-test-matrix (ccde4e6) with main (e331407)

🎉 Hooray! pytest-codspeed just leveled up to 4.1.1!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

❌ 23 regressions
✅ 9 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_main_autodetect 57.4 ms 64.3 ms -10.68%
test_main_inheritance_forward_ref 94.7 ms 111 ms -14.7%
test_main_inheritance_forward_ref_keep_model_order 93.2 ms 109.4 ms -14.85%
test_main_json_reuse_enum_default_member 68.4 ms 77.9 ms -12.2%
test_main_jsonschema_collapsed_external_references 71.3 ms 80.6 ms -11.55%
test_main_jsonschema_complex_any_of 57.1 ms 63.7 ms -10.32%
test_main_jsonschema_field_include_all_keys 55.2 ms 62 ms -10.95%
test_main_jsonschema_multiple_files 73.8 ms 85.7 ms -13.89%
test_main_jsonschema_nested_deep 66 ms 77.2 ms -14.5%
test_main_jsonschema_special_field_name 58.1 ms 65.6 ms -11.45%
test_main_nested_directory 181.5 ms 226.3 ms -19.81%
test_main_root_id_jsonschema_self_refs_with_local_file 75.3 ms 85.4 ms -11.86%
test_main_root_id_jsonschema_self_refs_with_remote_file 75.7 ms 85.8 ms -11.8%
test_main_strict_types 68.3 ms 79.1 ms -13.6%
test_main_strict_types_all_with_field_constraints 65 ms 74.7 ms -12.96%
test_force_optional 110 ms 130.2 ms -15.51%
test_main 102.9 ms 120.4 ms -14.56%
test_main_collapse_root_models 72.1 ms 81.4 ms -11.47%
test_main_modular 230.2 ms 290.1 ms -20.66%
test_main_openapi_nullable 113.6 ms 136.5 ms -16.77%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@ilovelinux ilovelinux marked this pull request as draft October 11, 2025 19:18
@ilovelinux
Copy link
Contributor Author

Draft until I fix the issues with CI for Python 3.14

@ilovelinux ilovelinux force-pushed the feat/ilovelinux-add-pydantic1-to-test-matrix branch from eaa7bc5 to d962270 Compare October 22, 2025 17:00
@ilovelinux ilovelinux force-pushed the feat/ilovelinux-add-pydantic1-to-test-matrix branch from be1756d to 016c345 Compare October 22, 2025 17:10
@ilovelinux ilovelinux marked this pull request as ready for review October 22, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant