Skip to content

Add conformance results for ty#2208

Merged
AlexWaygood merged 13 commits intopython:mainfrom
AlexWaygood:add-ty
Mar 7, 2026
Merged

Add conformance results for ty#2208
AlexWaygood merged 13 commits intopython:mainfrom
AlexWaygood:add-ty

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood commented Mar 6, 2026

No description provided.

@AlexWaygood AlexWaygood marked this pull request as ready for review March 6, 2026 18:25
@AlexWaygood AlexWaygood requested a review from carljm March 6, 2026 18:25
@@ -0,0 +1,19 @@
conformance_automated = "Fail"
conformant = "Unsupported"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This "Unsupported" doesn't feel right for the name generics_variance, because we support a lot of variance checking, but I guess what this file is really testing is all about enforcing not using the wrong explicit-variance legacy TypeVar in the wrong place, and we don't yet do that...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dataclass_transform_converter.py should also not really be marked as "Unsupported", but I asked David to write me some notes for that one and he opened astral-sh/ruff#23088 instead 😆

Copy link
Copy Markdown
Member

@carljm carljm Mar 7, 2026

Choose a reason for hiding this comment

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

I tried the same with "constructors callable" but there were some subtleties in the fix that deserved more careful attention :)

conformance_automated = "Fail"
conformant = "Partial"
notes = """
Deliberately does not allow `str` to be narrowed to literal string types through equality or containment checks due to the possibility of `str` subclasses that could have unexpected equality semantics.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should make a PR to remove these assertions from the conformance suite. Unsound narrowing behavior is not required by the spec and shouldn't be asserted by the conformance suite.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. But I'll do it as a followup.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@AlexWaygood AlexWaygood added the topic: conformance tests Issues with the conformance test suite label Mar 7, 2026
@AlexWaygood AlexWaygood merged commit d08f800 into python:main Mar 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: conformance tests Issues with the conformance test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants