Your message dated Sat, 25 Sep 2021 21:44:14 +0300
with message-id <YU9t/[email protected]>
and subject line Re: Bug#833820: sphinx: Avoid evaulating default function 
arguments when including them in the documentation
has caused the Debian Bug report #833820,
regarding sphinx: Avoid evaulating default function arguments when including 
them in the documentation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
833820: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833820
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: sphinx
Version: 1.3.6-2
Severity: wishlist
User: [email protected]
Usertags: toolchain
X-Debbugs-Cc: [email protected]

Hi.  The documentation generated by sphinx expands default python
arguments instead of reproducing the values listed in the source.  This
is related to the reproducability issues reported in
<URL: https://bugs.debian.org/795976 > and
<URL: https://bugs.debian.org/822197 >, but seem to be a different issue
from those solved there.

I discovered this from
<URL: 
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/txtorcon.html
 >
which report this difference in the generated documentation
(txtorcon-state.txt):

@@ -385,15 +385,15 @@
       Returns:
          Deferred which callbacks with this Circuit instance
 
       ONLY after Tor has confirmed it is gone (not simply that the
       CLOSECIRCUIT command has been queued). This could be a while if
       you included IfUnused.
 
-   age(now=datetime.datetime(2016, 8, 5, 7, 33, 8, 845335))
+   age(now=datetime.datetime(2017, 9, 7, 13, 58, 10, 541674))
 
       Returns an integer which is the difference in seconds from 'now'
       to when this circuit was created.
 
       Returns None if there is no created-time.
 
    update(args)

This documentation is generated from this function definition in
txtorcon/circuit.py in the source:

    def age(self, now=datetime.datetime.utcnow()):
        """
        Returns an integer which is the difference in seconds from
        'now' to when this circuit was created.

        Returns None if there is no created-time.
        """

Notice how the now argument is supposed to be a dynamic function call to
datetime.datetime.utcnow(), and not a fixed timestamp as the
documentation could lead you to believe.

Please change sphinx to correctly report the arguments used by this age
function.  It would have the side effect of making the txtorcon build
reproducable.

-- 
Happy hacking
Petter Reinholdtsen

--- End Message ---
--- Begin Message ---
Version: 4.0.1-1

Hi Petter!

On Tue, Aug 09, 2016 at 01:08:23AM +0200, Petter Reinholdtsen wrote:
> Hi.  The documentation generated by sphinx expands default python
> arguments instead of reproducing the values listed in the source.
> [...]

Starting with Sphinx 4 (which I have just uploaded to unstable), there
is a new configuration option to disable evaluation of default argument
values, `autodoc_preserve_defaults`. See:

- 
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_preserve_defaults
- https://github.com/sphinx-doc/sphinx/pull/8771

So I am closing this bug.

--
Dmitry Shachnev

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to