* Cover 2.12 in the release notes up to 9bb973dc54
* Add one more highlight
* Better merge of the news entries.
* Cover 2.12 in the release notes up to 642af40.
* Cover 2.12 in the release notes up to 7a0a34b.
* Cover 2.12 in the release notes up to b4bad97.
* Add not yet merged PRs #6463, #6507, #6511 to the 2.12 release notes.
* Cover 2.12 in the release notes up to d85c39f, small fixes.
* Cover 2.12 in the release notes up to d215669.
* Cover #6527 in the release notes.
* Address PR feedback.
* Cover recent PRs.
* Finalize the 2.12.0 release notes, small additional fixes.
---------
Co-authored-by: Andrey Rakhmatullin <wrar@wrar.name>
We're storing exceptions captured by Twisted on the media pipeline
cache, but we're also using the defer.returnValue method with our
own methods decorated with @defer.inlineCallbacks.
The defer.returnValue method passes returned values forward by
throwing a defer._DefGen_Return exception, which in its turn
extends the BaseException class and is captured by Twisted.
This way, the latest exception stored in the Failure's object may
also have an HtmlResponse object in its __context__ attribute. As
the Response object also keeps track of the Request object that
has originated it, you could figure it out how many RAM we're
wasting here.
This could easily lead to a Memory Leak problem when running
spiders with Media Pipeline enabled and a particular Request set
that tends to raise a significant number of exceptions.
Example triggers:
- media requests with 404 status responses
- user land exceptins coming from custom middlewares
- etc.
This allows to remove `get_testlog` helper, `flushLoggedErrors` from
twisted.trial.unittest.TestCase and Twisted log observers created for
each test on conftest.py.