You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shutil.copyfileobj stopped working in 1.2.0 #15031
I think this is actually a mypy bug, though one that was exposed through the typeshed change. It would help to try to create a reproducer that doesn't rely on the stdlib (basically, copy-paste in the definitions of IO, open, and copyfileobj, and simplify them as much as possible).
Activity
hauntsaninja commentedon Apr 11, 2023
Yeah, I ran into this too. Seems triggered by change in typeshed: https://github.com/python/mypy/pull/14902/files#diff-363460977156fcfda748f21565484fe1d5862edf2823e9784cbf34d1e52ff2f2
henryiii commentedon Apr 11, 2023
Should I open an issue over there, then?
JelleZijlstra commentedon Apr 11, 2023
I think this is actually a mypy bug, though one that was exposed through the typeshed change. It would help to try to create a reproducer that doesn't rely on the stdlib (basically, copy-paste in the definitions of
IO,open, andcopyfileobj, and simplify them as much as possible).AlexWaygood commentedon Apr 11, 2023
It looks like #14975 fixes this false positive, which strongly implies to me that this is the same bug as #14943
AlexWaygood commentedon Apr 11, 2023
Here's a minimal-ish repro that doesn't rely on typeshed's stdlib stubs:
https://mypy-play.net/?mypy=latest&python=3.11&gist=7443887f86538e58f87bc9b6f1957ce5
It does indeed end up looking very similar to #14943.
ignore mypy lint due to python/mypy#15031
workaround python/mypy#15031
chore(deps-dev): bump mypy from 1.1.1 to 1.4.1
chore(deps-dev): bump mypy from 1.1.1 to 1.4.1
chore(deps-dev): bump mypy from 1.1.1 to 1.4.1
Filter overload items based on self type during type inference (pytho…
henryiii commentedon Oct 21, 2024
Thanks! Type ignore removed in pypa/cibuildwheel#2054.