Title: Fix various inheritances · Issue #3968 · python/typeshed · GitHub
Open Graph Title: Fix various inheritances · Issue #3968 · python/typeshed
X Title: Fix various inheritances · Issue #3968 · python/typeshed
Description: I had a patch to stubtest that added checking of base classes. Unfortunately, it was too noisy to consider merging, although some fixes did come out of it. I complicated the patch today, and most of the following look actionable. Figured...
Open Graph Description: I had a patch to stubtest that added checking of base classes. Unfortunately, it was too noisy to consider merging, although some fixes did come out of it. I complicated the patch today, and most o...
X Description: I had a patch to stubtest that added checking of base classes. Unfortunately, it was too noisy to consider merging, although some fixes did come out of it. I complicated the patch today, and most o...
Opengraph URL: https://github.com/python/typeshed/issues/3968
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix various inheritances","articleBody":"I had a patch to stubtest that added checking of base classes. Unfortunately, it was too noisy to consider merging, although some fixes did come out of it.\r\nI complicated the patch today, and most of the following look actionable. Figured I'd jot the output down here, so it doesn't get forgotten about, since I'm not sure I want to merge this newly complicated patch (branch at https://github.com/hauntsaninja/mypy/tree/stubtestbaseclass). I'll chip away at these, but if someone reading this is looking to contribute to typeshed, this is a good place to start!\r\n\r\n\u003cdetails>\r\n\r\n```\r\n~/dev/mypy stubtestbaseclass λ python3.8 -m mypy.stubtest --custom-typeshed-dir ~/dev/typeshed --check-typeshed\r\nerror: asyncio.locks._ContextManagerMixin is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 14\r\n\u003cTypeInfo asyncio.locks._ContextManagerMixin> inherits from asyncio.futures.Future\r\nMRO: asyncio.locks._ContextManagerMixin, asyncio.futures.Future, typing.Awaitable, typing.Iterable, builtins.object\r\nRuntime: at line 49 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/asyncio/locks.py\r\n\u003cclass 'asyncio.locks._ContextManagerMixin'> inherits from builtins.object\r\nMRO: asyncio.locks._ContextManagerMixin, builtins.object\r\n\r\nerror: asyncio.protocols.BufferedProtocol is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 14\r\n\u003cTypeInfo asyncio.protocols.BufferedProtocol> inherits from asyncio.protocols.Protocol\r\nMRO: asyncio.protocols.BufferedProtocol, asyncio.protocols.Protocol, asyncio.protocols.BaseProtocol, builtins.object\r\nRuntime: at line 109 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/asyncio/protocols.py\r\n\u003cclass 'asyncio.protocols.BufferedProtocol'> inherits from asyncio.protocols.BaseProtocol\r\nMRO: asyncio.protocols.BufferedProtocol, asyncio.protocols.BaseProtocol, builtins.object\r\n\r\nerror: concurrent.futures.process.BrokenProcessPool is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 8\r\n\u003cTypeInfo concurrent.futures.process.BrokenProcessPool> inherits from builtins.RuntimeError\r\nMRO: concurrent.futures.process.BrokenProcessPool, builtins.RuntimeError, builtins.Exception, builtins.BaseException, builtins.object\r\nRuntime: at line 490 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/concurrent/futures/process.py\r\n\u003cclass 'concurrent.futures.process.BrokenProcessPool'> inherits from concurrent.futures._base.BrokenExecutor\r\nMRO: concurrent.futures.process.BrokenProcessPool, concurrent.futures._base.BrokenExecutor, builtins.RuntimeError, builtins.Exception, builtins.BaseException, builtins.object\r\n\r\nerror: ctypes.LittleEndianStructure is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 261\r\n\u003cTypeInfo ctypes.LittleEndianStructure> inherits from ctypes.Structure\r\nMRO: ctypes.LittleEndianStructure, ctypes.Structure, ctypes._StructUnionBase, ctypes._CData, builtins.object\r\nRuntime:\r\n\u003cclass '_ctypes.Structure'> inherits from _ctypes._CData\r\nMRO: _ctypes.Structure, _ctypes._CData, builtins.object\r\n\r\nerror: distutils.command.build_py.build_py_2to3 is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 10\r\n\u003cTypeInfo distutils.command.build_py.build_py_2to3> inherits from distutils.command.build_py.build_py\r\nMRO: distutils.command.build_py.build_py_2to3, distutils.command.build_py.build_py, distutils.cmd.Command, builtins.object\r\nRuntime: at line 394 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/distutils/command/build_py.py\r\n\u003cclass 'distutils.command.build_py.build_py_2to3'> inherits from distutils.command.build_py.build_py, distutils.util.Mixin2to3\r\nMRO: distutils.command.build_py.build_py_2to3, distutils.command.build_py.build_py, distutils.cmd.Command, distutils.util.Mixin2to3, builtins.object\r\n\r\nerror: email.feedparser.BytesFeedParser is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 13\r\n\u003cTypeInfo email.feedparser.BytesFeedParser> inherits from builtins.object\r\nMRO: email.feedparser.BytesFeedParser, builtins.object\r\nRuntime: at line 532 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/email/feedparser.py\r\n\u003cclass 'email.feedparser.BytesFeedParser'> inherits from email.feedparser.FeedParser\r\nMRO: email.feedparser.BytesFeedParser, email.feedparser.FeedParser, builtins.object\r\n\r\nerror: email.generator.BytesGenerator is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 16\r\n\u003cTypeInfo email.generator.BytesGenerator> inherits from builtins.object\r\nMRO: email.generator.BytesGenerator, builtins.object\r\nRuntime: at line 392 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/email/generator.py\r\n\u003cclass 'email.generator.BytesGenerator'> inherits from email.generator.Generator\r\nMRO: email.generator.BytesGenerator, email.generator.Generator, builtins.object\r\n\r\nerror: enum.auto is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 57\r\n\u003cTypeInfo enum.auto> inherits from enum.IntFlag\r\nMRO: enum.auto, enum.IntFlag, builtins.int, enum.Flag, enum.Enum, builtins.object\r\nRuntime: at line 44 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/enum.py\r\n\u003cclass 'enum.auto'> inherits from builtins.object\r\nMRO: enum.auto, builtins.object\r\n\r\nerror: io.BufferedRandom is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 132\r\n\u003cTypeInfo io.BufferedRandom> inherits from io.BufferedReader, io.BufferedWriter\r\nMRO: io.BufferedRandom, io.BufferedReader, io.BufferedWriter, io.BufferedIOBase, io.IOBase, builtins.object\r\nRuntime:\r\n\u003cclass '_io.BufferedRandom'> inherits from _io._BufferedIOBase\r\nMRO: _io.BufferedRandom, _io._BufferedIOBase, _io._IOBase, builtins.object\r\n\r\nerror: io.IncrementalNewlineDecoder is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 215\r\n\u003cTypeInfo io.IncrementalNewlineDecoder> inherits from codecs.IncrementalDecoder\r\nMRO: io.IncrementalNewlineDecoder, codecs.IncrementalDecoder, builtins.object\r\nRuntime:\r\n\u003cclass '_io.IncrementalNewlineDecoder'> inherits from builtins.object\r\nMRO: _io.IncrementalNewlineDecoder, builtins.object\r\n\r\nerror: io.StringIO is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 205\r\n\u003cTypeInfo io.StringIO> inherits from io.TextIOWrapper\r\nMRO: io.StringIO, io.TextIOWrapper, typing.TextIO, typing.IO, typing.Iterator, typing.Iterable, builtins.object\r\nRuntime:\r\n\u003cclass '_io.StringIO'> inherits from _io._TextIOBase\r\nMRO: _io.StringIO, _io._TextIOBase, _io._IOBase, builtins.object\r\n\r\nerror: multiprocessing.queues.Queue is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 7\r\n\u003cTypeInfo multiprocessing.queues.Queue> inherits from queue.Queue\r\nMRO: multiprocessing.queues.Queue, queue.Queue, builtins.object\r\nRuntime: at line 34 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/multiprocessing/queues.py\r\n\u003cclass 'multiprocessing.queues.Queue'> inherits from builtins.object\r\nMRO: multiprocessing.queues.Queue, builtins.object\r\n\r\nerror: os._wrap_close is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 603\r\n\u003cTypeInfo os._wrap_close> inherits from io.TextIOWrapper\r\nMRO: os._wrap_close, io.TextIOWrapper, typing.TextIO, typing.IO, typing.Iterator, typing.Iterable, builtins.object\r\nRuntime: at line 996 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/os.py\r\n\u003cclass 'os._wrap_close'> inherits from builtins.object\r\nMRO: os._wrap_close, builtins.object\r\n\r\nerror: selectors.DefaultSelector is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 75\r\n\u003cTypeInfo selectors.DefaultSelector> inherits from selectors.BaseSelector\r\nMRO: selectors.DefaultSelector, selectors.BaseSelector, builtins.object\r\nRuntime: at line 506 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/selectors.py\r\n\u003cclass 'selectors.KqueueSelector'> inherits from selectors._BaseSelectorImpl\r\nMRO: selectors.KqueueSelector, selectors._BaseSelectorImpl, selectors.BaseSelector, builtins.object\r\n\r\nerror: socketserver.UDPServer is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 50\r\n\u003cTypeInfo socketserver.UDPServer> inherits from socketserver.BaseServer\r\nMRO: socketserver.UDPServer, socketserver.BaseServer, builtins.object\r\nRuntime: at line 516 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/socketserver.py\r\n\u003cclass 'socketserver.UDPServer'> inherits from socketserver.TCPServer\r\nMRO: socketserver.UDPServer, socketserver.TCPServer, socketserver.BaseServer, builtins.object\r\n\r\nerror: socketserver.UnixDatagramServer is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 61\r\n\u003cTypeInfo socketserver.UnixDatagramServer> inherits from socketserver.BaseServer\r\nMRO: socketserver.UnixDatagramServer, socketserver.BaseServer, builtins.object\r\nRuntime: at line 689 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/socketserver.py\r\n\u003cclass 'socketserver.UnixDatagramServer'> inherits from socketserver.UDPServer\r\nMRO: socketserver.UnixDatagramServer, socketserver.UDPServer, socketserver.TCPServer, socketserver.BaseServer, builtins.object\r\n\r\nerror: socketserver.UnixStreamServer is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 56\r\n\u003cTypeInfo socketserver.UnixStreamServer> inherits from socketserver.BaseServer\r\nMRO: socketserver.UnixStreamServer, socketserver.BaseServer, builtins.object\r\nRuntime: at line 686 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/socketserver.py\r\n\u003cclass 'socketserver.UnixStreamServer'> inherits from socketserver.TCPServer\r\nMRO: socketserver.UnixStreamServer, socketserver.TCPServer, socketserver.BaseServer, builtins.object\r\n\r\nerror: threading.BoundedSemaphore is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 148\r\n\u003cTypeInfo threading.BoundedSemaphore> inherits from builtins.object\r\nMRO: threading.BoundedSemaphore, builtins.object\r\nRuntime: at line 456 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/threading.py\r\n\u003cclass 'threading.BoundedSemaphore'> inherits from threading.Semaphore\r\nMRO: threading.BoundedSemaphore, threading.Semaphore, builtins.object\r\n\r\nerror: tracemalloc.DomainFilter is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 17\r\n\u003cTypeInfo tracemalloc.DomainFilter> inherits from builtins.object\r\nMRO: tracemalloc.DomainFilter, builtins.object\r\nRuntime: at line 375 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/tracemalloc.py\r\n\u003cclass 'tracemalloc.DomainFilter'> inherits from tracemalloc.BaseFilter\r\nMRO: tracemalloc.DomainFilter, tracemalloc.BaseFilter, builtins.object\r\n\r\nerror: tracemalloc.Filter is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 22\r\n\u003cTypeInfo tracemalloc.Filter> inherits from builtins.object\r\nMRO: tracemalloc.Filter, builtins.object\r\nRuntime: at line 327 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/tracemalloc.py\r\n\u003cclass 'tracemalloc.Filter'> inherits from tracemalloc.BaseFilter\r\nMRO: tracemalloc.Filter, tracemalloc.BaseFilter, builtins.object\r\n\r\nerror: typing.NamedTuple is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 627\r\n\u003cTypeInfo typing.NamedTuple> inherits from builtins.tuple\r\nMRO: typing.NamedTuple, builtins.tuple, typing.Sequence, typing.Collection, typing.Iterable, typing.Container, typing.Reversible, builtins.object\r\nRuntime: at line 1641 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/typing.py\r\n\u003cclass 'typing.NamedTuple'> inherits from builtins.object\r\nMRO: typing.NamedTuple, builtins.object\r\n\r\nerror: unittest.TextTestRunner is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 24\r\n\u003cTypeInfo unittest.runner.TextTestRunner> inherits from unittest.runner.TestRunner\r\nMRO: unittest.runner.TextTestRunner, unittest.runner.TestRunner, builtins.object\r\nRuntime: at line 120 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/unittest/runner.py\r\n\u003cclass 'unittest.runner.TextTestRunner'> inherits from builtins.object\r\nMRO: unittest.runner.TextTestRunner, builtins.object\r\n\r\nerror: unittest.mock.Mock is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 126\r\n\u003cTypeInfo unittest.mock.Mock> inherits from unittest.mock.NonCallableMock, unittest.mock.CallableMixin\r\nMRO: unittest.mock.Mock, unittest.mock.NonCallableMock, unittest.mock.CallableMixin, unittest.mock.Base, builtins.object\r\nRuntime: at line 1161 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/unittest/mock.py\r\n\u003cclass 'unittest.mock.Mock'> inherits from unittest.mock.CallableMixin, unittest.mock.NonCallableMock\r\nMRO: unittest.mock.Mock, unittest.mock.CallableMixin, unittest.mock.NonCallableMock, unittest.mock.Base, builtins.object\r\n\r\nerror: unittest.runner.TextTestRunner is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 24\r\n\u003cTypeInfo unittest.runner.TextTestRunner> inherits from unittest.runner.TestRunner\r\nMRO: unittest.runner.TextTestRunner, unittest.runner.TestRunner, builtins.object\r\nRuntime: at line 120 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/unittest/runner.py\r\n\u003cclass 'unittest.runner.TextTestRunner'> inherits from builtins.object\r\nMRO: unittest.runner.TextTestRunner, builtins.object\r\n\r\nerror: weakref.KeyedRef is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 66\r\n\u003cTypeInfo weakref.KeyedRef> inherits from _weakref.ReferenceType\r\nMRO: weakref.KeyedRef, _weakref.ReferenceType, builtins.object\r\nRuntime: at line 311 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/weakref.py\r\n\u003cclass 'weakref.KeyedRef'> inherits from builtins.weakref\r\nMRO: weakref.KeyedRef, builtins.weakref, builtins.object\r\n\r\nerror: weakref.WeakMethod is inconsistent, base classes and MRO differ. INHERITANCE\r\nStub: at line 29\r\n\u003cTypeInfo weakref.WeakMethod> inherits from _weakref.ReferenceType\r\nMRO: weakref.WeakMethod, _weakref.ReferenceType, builtins.object\r\nRuntime: at line 36 in file /Users/shantanu/.pyenv/versions/3.8.2/lib/python3.8/weakref.py\r\n\u003cclass 'weakref.WeakMethod'> inherits from builtins.weakref\r\nMRO: weakref.WeakMethod, builtins.weakref, builtins.object\r\n```\r\n\r\n\u003c/details>","author":{"url":"https://github.com/hauntsaninja","@type":"Person","name":"hauntsaninja"},"datePublished":"2020-05-06T06:41:02Z","url":"https://github.com/python/typeshed/issues/3968"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e8be985e-efc3-c8bd-c2a5-bb7881c4b807 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D75C:396A8E:1846DDE:2038ED4:6B002BD5 |
| html-safe-nonce | 07022e6975397163524e0e28f0055dc9ca494cfe263f843a60894d25405bde1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzVDOjM5NkE4RToxODQ2RERFOjIwMzhFRDQ6NkIwMDJCRDUiLCJ2aXNpdG9yX2lkIjoiNDU0MjkxMjczMTg0MTMwOTY1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e820d80397bb2b3ac90508c0d83526d876bb5eb0cf0a60c901c6dcbdbbff10c6 |
| hovercard-subject-tag | issue:613086106 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/3968/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8cfd2cb5853006571532035445a3cdb14aadc9134eca6832d1f67316feb249c8/python/typeshed/issues/3968 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8cfd2cb5853006571532035445a3cdb14aadc9134eca6832d1f67316feb249c8/python/typeshed/issues/3968 |
| og:image:alt | I had a patch to stubtest that added checking of base classes. Unfortunately, it was too noisy to consider merging, although some fixes did come out of it. I complicated the patch today, and most o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hauntsaninja |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width