[Twisted-Python] Twisted 21.7.0 Pre-Release Announcement

Richard van der Hoff richard at matrix.org
Thu Jul 15 10:00:06 MDT 2021


On 11/07/2021 00:49, Glyph wrote:
> Thank you Adi!  Very glad to see us collectively getting back on the 
> release-management horse again!  And it was super encouraging to see 
> how quickly you were able to get this out, with all the automation 
> that everyone (not least of all yourself) has been building to make 
> this process faster and simpler.
>
To echo this: thank you for your work, Adi!

> It appears we've buried the lede on one of our biggest features in 
> this release though - 
> https://github.com/twisted/twisted/pull/1448/files 
> <https://github.com/twisted/twisted/pull/1448/files> had no newsfile 
> that shows up in the changelog, but it properly made Deferred into a 
> generic, so I think this is the first release of Twisted where you 
> might /reasonably/ be able to use mypy without your own custom stub 
> files! :)

This looks very cool, but presents us with a problem.

mypy now complains about instantiations of Deferred without a type 
annotation:

 > d = defer.Deferred()

results in an error:

 > synapse/util/async_helpers.py:124: error: Need type annotation for 
'd'  [var-annotated]

We can't just go and add type annotations because we need to maintain 
compatibility with older Twisted (to make it possible to package in 
Debian et al).

Any suggestions for keeping mypy happy?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20210715/df024404/attachment.htm>


More information about the Twisted-Python mailing list