Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Fix a code block in leaks.rst. (#7489)

Andrey Rakhmatullind05b241f648f
diff --git a/docs/topics/leaks.rst b/docs/topics/leaks.rst
index e61f33aed..ff05cd284 100644
--- a/docs/topics/leaks.rst
+++ b/docs/topics/leaks.rst
@@ -68,19 +68,21 @@ Response, Item, Spider and Selector objects.
You can enter the telnet console and inspect how many objects (of the classes
mentioned above) are currently alive using the ``prefs()`` function which is an
-alias to the :func:`~scrapy.utils.trackref.print_live_refs` function::
+alias to the :func:`~scrapy.utils.trackref.print_live_refs` function:
+
+.. code-block:: bash
telnet localhost 6023
- .. code-block:: pycon
+.. code-block:: pycon
- >>> prefs()
- Live References
+ >>> prefs()
+ Live References
- ExampleSpider 1 oldest: 15s ago
- HtmlResponse 10 oldest: 1s ago
- Selector 2 oldest: 0s ago
- FormRequest 878 oldest: 7s ago
+ ExampleSpider 1 oldest: 15s ago
+ HtmlResponse 10 oldest: 1s ago
+ Selector 2 oldest: 0s ago
+ FormRequest 878 oldest: 7s ago
As you can see, that report also shows the "age" of the oldest object in each
class. If you're running multiple spiders per process chances are you can