Skip to content

Conversation

@guoci
Copy link
Contributor

@guoci guoci commented Nov 19, 2025

@srittau
Copy link
Collaborator

srittau commented Nov 19, 2025

As far as I can see, this class was only added in 3.14 "for real". So we need to distinguish between those cases.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@guoci
Copy link
Contributor Author

guoci commented Nov 19, 2025

I need help with resolving the remaining errors

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@guoci
Copy link
Contributor Author

guoci commented Nov 20, 2025

It appears that the attribute name type is causing the error. If I rename it to _type_, it works fine.
See: #15057

@srittau
Copy link
Collaborator

srittau commented Nov 20, 2025

I think it's best to have to complete separate _CField classes, one for 3.14+ and one for < 3.14. This way we can keep the @type_check_only decorator and it could alleviate some of the problems.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@guoci guoci requested a review from srittau December 20, 2025 19:21
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks!

@srittau srittau merged commit 67c0ee5 into python:main Dec 20, 2025
63 checks passed
@guoci guoci deleted the update_ctypes_CField branch December 21, 2025 14:57
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.

2 participants