Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork131
Bring over TypeVarTests from CPython#165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
I started out trying to backportpython/cpython#104571, butrealized that it makes sense to backport CPython's whole TypeVarTestsclass since we now have our own implementation of TypeVar.I dropped test_var_substitution and test_bad_var_substitutionsince they rely on the internal __typing_subst__ method, and thetype substitution logic is generally very hard to get preciselythe same across versions.
JelleZijlstra commentedMay 21, 2023
CI is failing because we didn't bring over the fix forpython/cpython#84123. It doesn't seem worth the effort to fix that for early versions of 3.7 and 3.8, so I'm just going to skip that test before 3.9. |
AlexWaygood left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Haven't done a line-by-line review, but I trust in your copy-and-paste abilities :)
I started out trying to backportpython/cpython#104571, but
realized that it makes sense to backport CPython's whole TypeVarTests
class since we now have our own implementation of TypeVar.
I dropped test_var_substitution and test_bad_var_substitution
since they rely on the internaltyping_subst method, and the
type substitution logic is generally very hard to get precisely
the same across versions.