Skip to content

Conversation

@finswimmer
Copy link
Contributor

@finswimmer finswimmer commented Oct 10, 2025

📒 Description

To gather type information we use now python built-in modul inspect, which is more robust than relying on values in __dict__

This change is required, because xsdata crashes on Python 3.14 with:

xsdata.exceptions.XmlContextError: Failed to detect the declared class for field {xxx}

This is probably due to changes in the type system (see: https://peps.python.org/pep-0649/ and https://peps.python.org/pep-0749/)

Closes: #1174

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.94%. Comparing base (facf8e2) to head (fb92887).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1173   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files         116      116           
  Lines        9371     9374    +3     
  Branches     1429     1430    +1     
=======================================
+ Hits         9366     9369    +3     
  Misses          5        5           

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

Copy link
Owner

@tefra tefra left a comment

Choose a reason for hiding this comment

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

@finswimmer
Copy link
Contributor Author

Hey @tefra,

I'm afraid running the CI pipeline for 3.14 is not yet possible due to #1154. docformatter requires a new release with this fix PyCQA/docformatter#325 included first.

I ran the tests locally for python 3.14 after including the docformatter fix. Except one test all are running fine. The one that is failing is

def test_render_module(self) -> None:
As far as I understand, this is unrelated to the change introduced in the PR.

fin swimmer

@finswimmer
Copy link
Contributor Author

Python 3.9 reaches its end-of-life at the end of this month. The question is, whether you plan to drop supporting it immediately. If so we can simplify the change in this PR.

@finswimmer
Copy link
Contributor Author

Hey @tefra,

I finally found a fix for the failing test under Python 3.14. I included it in this PR and activated the Python 3.14 pipeline. But for this I had to include the branch that contains the fix for docformatter required to run under Python 3.14. This is why I turned the PR into a Draft.

How do you like to proceed?

fin swimmer

@finswimmer finswimmer requested a review from tefra October 15, 2025 04:15
In Python 3.14 `content` might contain additional line-endings
This requires to include a feature branch version for docformatter.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2025

Copy link
Owner

@tefra tefra left a comment

Choose a reason for hiding this comment

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

Thanks @finswimmer

I will merge it and either wait for an official release or try out
https://github.com/DanielNoord/pydocstringformatter

@tefra tefra marked this pull request as ready for review November 4, 2025 07:45
@tefra tefra merged commit 28f63e8 into tefra:main Nov 4, 2025
15 checks passed
@imagejan
Copy link

imagejan commented Jan 6, 2026

Happy new year 🚀
Can we have a release including this change? 🙂

@tefra
Copy link
Owner

tefra commented Jan 6, 2026

Happy new year 🚀 Can we have a release including this change? 🙂

To be honest I was hoping for a new release of the docformatter, I don't want to have a dependency from a github repo, but we can't wait forever either...

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.

Python 3.14: XmlContextError when parsing dataclasses due to PEP 649 annotations

3 participants