From 596431b1c271c13144b1fd45546261b53bba5cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Chaves?= Date: Tue, 26 Dec 2023 20:31:08 +0100 Subject: [PATCH] Document the use of repr() for annotation fingerprinting --- docs/providers.rst | 3 +++ docs/settings.rst | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/docs/providers.rst b/docs/providers.rst index 6fbbf2fe..a7433dcf 100644 --- a/docs/providers.rst +++ b/docs/providers.rst @@ -313,6 +313,9 @@ To have other settings respected, in addition to ``CONCURRENT_REQUESTS``, you'd need to use ``crawler.engine.download`` or something like that. Alternatively, you could implement those limits in the library itself. + +.. _annotated: + Attaching metadata to dependencies ================================== diff --git a/docs/settings.rst b/docs/settings.rst index 9fdc3ef1..0c2642ba 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -122,3 +122,8 @@ custom request fingerprinter class to use for requests. This class is used to generate a base fingerprint for a request. If that request uses dependency injection, that fingerprint is then modified to account for requested dependencies. Otherwise, the fingerprint is used as is. + +.. note:: Annotations of :ref:`annotated dependencies ` are + serialized with :func:`repr` for fingerprinting purposes. If you find a + real-world scenario where this is a problem, please `open an issue + `_.