Skip to content

Add conformance results for ty#2208

Open
AlexWaygood wants to merge 12 commits intopython:mainfrom
AlexWaygood:add-ty
Open

Add conformance results for ty#2208
AlexWaygood wants to merge 12 commits intopython:mainfrom
AlexWaygood:add-ty

Conversation

@AlexWaygood
Copy link
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
Comment on lines +1 to +2
conformance_automated = "Fail"
conformant = "Pass"
Copy link
Member

Choose a reason for hiding this comment

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

I know I said we could do this if it made sense, but @JelleZijlstra 's new invariant-checker won't like this. We could either put up a PR to make this assertion less pedantic (is this really required by the spec?), or I intend to put up a PR that will remove this Unknown | on the ty side shortly, so we could also just mark this Partial until then.

Copy link
Member

Choose a reason for hiding this comment

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

Another option is to use ignore_errors to ignore certain errors.

@@ -0,0 +1,19 @@
conformance_automated = "Fail"
conformant = "Unsupported"
Copy link
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...

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

@AlexWaygood AlexWaygood added the topic: conformance tests Issues with the conformance test suite label Mar 7, 2026
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