#3622 closed defect (fixed)

typechecks job is broken on CI for master@HEAD

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

The latest Twisted release is allowed into our build environment and it includes new type information which conflicts with our usage of mypy.

src/allmydata/util/deferredutil.py:216: error: "Deferred" expects no type arguments, but 1 given
src/allmydata/util/deferredutil.py:216: error: The return type of a generator function should be "Generator" or one of its supertypes
src/allmydata/util/deferredutil.py:218: error: "Deferred" expects no type arguments, but 1 given
src/allmydata/storage_client.py:150: error: 'StorageFarmBroker' is missing following 'IStorageBroker' interface members: get_all_connections, get_all_connectors, get_all_peerids, get_all_connections_for, get_permuted_peers.
src/allmydata/introducer/client.py:39: error: 'IntroducerClient' is missing following 'RIIntroducerSubscriberClient_v2' interface members: __remote_name__, announce_v2.
src/allmydata/storage/server.py:54: error: 'StorageServer' is missing following 'RIStorageServer' interface members: __remote_name__, get_version, allocate_buckets, add_lease, renew_lease, get_buckets, slot_readv, advise_corrupt_share.
src/allmydata/storage/server.py:55: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/testing/web.py:236: error: '_SynchronousProducer' is missing following 'IBodyProducer' interface members: stopProducing.
src/allmydata/testing/web.py:236: error: '_SynchronousProducer' is missing following 'twisted.internet.interfaces.IPushProducer' interface members: pauseProducing, resumeProducing.
src/allmydata/scripts/tahoe_invite.py:109: error: List item 0 has incompatible type "Tuple[str, None, Type[InviteOptions], str]"; expected "Tuple[str, None, Type[BaseOptions], str]"
src/allmydata/scripts/create_node.py:202: error: Unsupported operand types for + ("List[Tuple[str, Optional[str], Union[int, str, None], str]]" and "List[Tuple[str, None, Optional[str], str]]")
src/allmydata/scripts/create_node.py:202: error: Unsupported operand types for + ("List[Tuple[str, Optional[str], Union[int, str, None], str]]" and "List[Tuple[str, None, None, str]]")
src/allmydata/scripts/create_node.py:217: error: Unsupported operand types for + ("List[Sequence[Any]]" and "List[Tuple[str, None, Optional[str], str]]")
src/allmydata/scripts/create_node.py:217: error: Unsupported operand types for + ("List[Sequence[Any]]" and "List[Tuple[str, None, None, str]]")
src/allmydata/immutable/upload.py:1867: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/control.py:69: error: 'ControlServer' is missing following 'RIControlClient' interface members: wait_for_client_connections, upload_random_data_from_file, download_to_tempfile_and_delete, get_memory_usage, speed_test, measure_peer_response_time.
src/allmydata/scripts/tahoe_check.py:125: error: Incompatible types in assignment (expression has type "str", base class "LineOnlyReceiver" defined the type as "bytes")
src/allmydata/scripts/tahoe_check.py:184: error: Incompatible types in assignment (expression has type "str", base class "LineOnlyReceiver" defined the type as "bytes")
src/allmydata/scripts/tahoe_manifest.py:16: error: Incompatible types in assignment (expression has type "str", base class "LineOnlyReceiver" defined the type as "bytes")
src/allmydata/web/common.py:735: error: "IRequest" has no attribute "fields"
src/allmydata/web/common.py:736: error: "IRequest" has no attribute "fields"
src/allmydata/frontends/sftpd.py:1918: error: 'FakeTransport' is missing following 'ITransport' interface members: getPeer, getHost.
src/allmydata/frontends/sftpd.py:1993: error: Signature of "Dispatcher" incompatible with "requestAvatar" of supertype "IRealm"
src/allmydata/frontends/sftpd.py:2001: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/web/operations.py:37: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/webish.py:234: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/introducer/server.py:152: error: 'IntroducerService' is missing following 'RIIntroducerPublisherAndSubscriberService_v2' interface members: __remote_name__, get_version, publish_v2, subscribe_v2.
src/allmydata/introducer/server.py:153: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/test/test_multi_introducers.py:180: error: Module has no attribute "main"
src/allmydata/test/common.py:326: error: Signature of "AdoptedServerPort" incompatible with "parseStreamServer" of supertype "IStreamServerEndpointStringParser"
src/allmydata/test/common.py:424: error: 'DummyProducer' is missing following 'twisted.internet.interfaces.IProducer' interface members: stopProducing.
src/allmydata/test/web/test_web.py:111: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/test/web/test_web.py:257: error: Incompatible types in assignment (expression has type "str", base class "Service" defined the type as "None")
src/allmydata/test/test_repairer.py:83: error: Definition of "failUnlessIsInstance" in base class "_Assertions" is incompatible with definition in base class "RepairTestMixin"
src/allmydata/test/test_repairer.py:375: error: Definition of "failUnlessIsInstance" in base class "_Assertions" is incompatible with definition in base class "RepairTestMixin"
Found 35 errors in 20 files (checked 284 source files)

Change History (4)

comment:1 Changed at 2021-03-17T14:21:48Z by exarkun

  • Owner set to exarkun
  • Status changed from new to assigned

comment:4 Changed at 2023-06-26T19:53:00Z by itamarst

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.