Skip to content

Compatibility fix for Python 3.14 behavior change, Pydantic 2.13#215

Open
timkpaine wants to merge 1 commit into
mainfrom
tkp/314
Open

Compatibility fix for Python 3.14 behavior change, Pydantic 2.13#215
timkpaine wants to merge 1 commit into
mainfrom
tkp/314

Conversation

@timkpaine
Copy link
Copy Markdown
Member

No description provided.

@timkpaine timkpaine added the part: dependencies PRs or issues related to dependencies label May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

Test Results

843 tests  ±0   841 ✅ ±0   1m 46s ⏱️ +3s
  1 suites ±0     2 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 9321634. ± Comparison against base commit 99a1fd8.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 82.66667% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.16%. Comparing base (99a1fd8) to head (9321634).

Files with missing lines Patch % Lines
ccflow/base.py 48.00% 11 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
- Coverage   95.37%   95.16%   -0.21%     
==========================================
  Files         142      142              
  Lines       11404    11445      +41     
  Branches      620      629       +9     
==========================================
+ Hits        10876    10892      +16     
- Misses        399      428      +29     
+ Partials      129      125       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timkpaine timkpaine force-pushed the tkp/314 branch 3 times, most recently from 57af9e8 to eb08b21 Compare May 26, 2026 03:45
- tokenize: add cycle detection for circular closures, stop MRO walk at
  PydanticBaseModel, fix docstring stripping for Python 3.14 bytecode
- tokenize: handle _abc._abc_data objects in normalize_token fallback
  (Python 3.14 exposes these in function closures of ABC-derived classes)
- arrow: move Literal sentinel values to module level for deferred
  annotation evaluation
- pyproject: pin csp<1 for python<3.14 (no 3.14 wheels yet)
- tests: adapt assertions for Python 3.14 behavior changes (enum docs,
  error messages, argparse/Hydra incompatibility)

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine timkpaine marked this pull request as ready for review May 27, 2026 14:40
Copy link
Copy Markdown
Collaborator

@ptomecek ptomecek left a comment

Choose a reason for hiding this comment

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

Why not use the polymorphic_serialization config dict approach from #117 instead of overwriting model_dump and model_dump_json? I think that approach was cleaner - just need to link it to the pydantic version

Comment thread ccflow/base.py
annotate = annotationlib.get_annotate_from_class_namespace(namespaces)
if annotate is None:
return {}
return dict(annotationlib.call_annotate_function(annotate, annotationlib.Format.VALUE))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why Format.VALUE instead of Format.FORWARDREF, which I think will handle unresolved forward refs better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part: dependencies PRs or issues related to dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants