Skip to content

Conversation

@Zaharid
Copy link
Owner

@Zaharid Zaharid commented Dec 17, 2025

In Python 3.14, type annotations are resolved in a delayed manner by default, and get resolved, on demand, when accession annotations. This allows writing recursive types such as a dataclass where some field contains itself.

As a minor annoyance, accessing the type attribute of the fields, does not resolve the delayed forward reference.

Add tests for Python 3.14

Closes #13.

In Python 3.14, type annotations are resolved in a delayed manner by
default, and get resolved, on demand, when accession __annotations__.
This allows writing recursive types such as a dataclass where some field
contains itself.

As a minor annoyance, accessing the type attribute of the fields, does
not resolve the delayed forward reference.

Add tests for Python 3.14
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.83%. Comparing base (2c110e4) to head (7ed7c0b).

Files with missing lines Patch % Lines
validobj/tests/test_delayed_dataclasses.py 90.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##            master      #15      +/-   ##
===========================================
- Coverage   100.00%   99.83%   -0.17%     
===========================================
  Files            9       10       +1     
  Lines          608      620      +12     
===========================================
+ Hits           608      619      +11     
- Misses           0        1       +1     
Flag Coverage Δ
unittests 99.83% <91.66%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@Zaharid Zaharid merged commit 540e108 into master Dec 17, 2025
7 of 10 checks passed
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.

class that contains itself not supported

3 participants