-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Update twisted from 24.10.0 to 24.11.0 #8263
base: master
Are you sure you want to change the base?
Conversation
Do not merge yet. |
@@ -83,7 +83,7 @@ def run(self) -> None: | |||
def running(self) -> bool: | |||
raise NotImplementedError() | |||
|
|||
def resolve(self, name: str, timeout: Sequence[int]) -> defer.Deferred[str]: | |||
def resolve(self, name: str, timeout: Sequence[int] = (1, 3, 11, 45)) -> defer.Deferred[str]: |
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.
We should ignore this line in terms of typing because mypy will fail if other version of Twisted is installed (e.g. on developer machine).
I think this PR should be able to go in still? It's not like it created these problems. |
This is correct. It looks like https://github.com/buildbot/buildbot/blob/master/.bbtravis.yml#L186-L189
is evaluated in |
Right, it should have |
d956f71
to
55ea7e7
Compare
…Core.resolve Intent of this change is to keep compatibility with multiple twisted versions. buildbot_worker/test/fake/reactor.py:86: error: Signature of "CoreReactor" incompatible with "resolve" of supertype "IReactorCore" [override] def resolve(self, name: str, timeout: Sequence[int]) -> defer.Deferred[str]: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ buildbot_worker/test/fake/reactor.py:86: note: Superclass: buildbot_worker/test/fake/reactor.py:86: note: def resolve(self, name: str, timeout: Sequence[int] = ...) -> Deferred[str] buildbot_worker/test/fake/reactor.py:86: note: Subclass: buildbot_worker/test/fake/reactor.py:86: note: def resolve(self, name: str, timeout: Sequence[int]) -> Deferred[str] Found 1 error in 1 file (checked 73 source files)
buildbot/process/workerforbuilder.py:181: error: Incompatible types in assignment (expression has type "States", variable has type "None") [assignment] self.state = States.DETACHED ^~~~~~~~~~~~~~~ buildbot/process/workerforbuilder.py:203: error: Incompatible types in assignment (expression has type "States", variable has type "None") [assignment] self.state = States.AVAILABLE ^~~~~~~~~~~~~~~~
error: Incompatible types in assignment (expression has type "bytes", variable has type "str") [assignment] data = unicode2bytes(data) Problem here seems to be how mypy tracks variable type. Data is str before calling unicode2bytes. But after it is bytes. So probably simplest option is to use new variable name for bytes.
f176a94
to
5ae2507
Compare
…g in requestAvatar inline callback buildbot/worker/protocols/manager/pb.py:58: error: Argument 1 to "bytes2unicode" has incompatible type "Union[bytes, Tuple[()]]"; expected "Union[bytes, str]" [arg-type] avatarIdStr = bytes2unicode(avatarId)
Contributor Checklist:
newsfragments
directory (and read theREADME.txt
in that directory)