-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add types.MethodType.__get__
on py313+
#14190
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
types.MethodType.__get__
types.MethodType.__get__
on py313+
This comment has been minimized.
This comment has been minimized.
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.
Could you remove the extra newlines that were probably inserted by your autoformatter?
ah yes sorry about that; rookie mistake |
Diff from mypy_primer, showing the effect of this PR on open source code: archinstall (https://github.com/archlinux/archinstall)
- ./archinstall/tui/curses_menu.py:710: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
- https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
- Please report a bug at https://github.com/python/mypy/issues
- version: 1.15.0
- ./archinstall/tui/curses_menu.py:710: : note: use --pdb to drop into pdb
- Traceback (most recent call last):
- File "mypy/checkexpr.py", line 5903, in accept
- File "mypy/nodes.py", line 1889, in accept
- File "mypy/checkexpr.py", line 3284, in visit_member_expr
- File "mypy/checkexpr.py", line 3309, in analyze_ordinary_member_access
- File "mypy/checkmember.py", line 207, in analyze_member_access
- File "mypy/checkmember.py", line 226, in _analyze_member_access
- File "mypy/checkmember.py", line 344, in analyze_instance_member_access
- File "mypy/meet.py", line 96, in meet_types
- File "mypy/subtypes.py", line 223, in is_proper_subtype
- File "mypy/subtypes.py", line 351, in _is_subtype
- File "mypy/types.py", line 1469, in accept
- File "mypy/subtypes.py", line 581, in visit_instance
- File "mypy/subtypes.py", line 2095, in infer_class_variances
- File "mypy/subtypes.py", line 2057, in infer_variance
- File "mypy/subtypes.py", line 186, in is_subtype
- File "mypy/subtypes.py", line 351, in _is_subtype
- File "mypy/types.py", line 3033, in accept
- File "mypy/subtypes.py", line 1079, in visit_partial_type
- RuntimeError: Partial type "<partial list[?]>" cannot be checked with "issubtype()"
|
Interestingly that crash also went away with #14198, which suggests it's a case of nondeterminism in mypy. |
Primer passed previously. |
runtime behavior (3.13):
related to https://discuss.python.org/t/when-should-we-assume-callable-types-are-method-descriptors/92938