This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Arthur-Milchior
Recipients Arthur-Milchior, docs@python
Date 2021-11-28.23:27:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638142026.43.0.0921492249915.issue45920@roundup.psfhosted.org>
In-reply-to
Content
I know understand one thing I missed.
I needed to do `make venv` after changing the make file to get 3.10 in virtual environment.
The issue being that this would make doc harder to create on ubuntu since 3.10 is not yet easily accessible through apt/snap.

Anyway, even when it's done, when 3.10-venv is installed on my machine and I remake venv, and I run doctest, it still fails with:

Document: library/statistics
----------------------------

Warning, treated as error:
**********************************************************************
File "library/statistics.rst", line 150, in default
Failed example:
    fmean(grades, weights)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.10/doctest.py", line 1348, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest default[2]>", line 1, in <module>
        fmean(grades, weights)
    TypeError: fmean() takes 1 positional argument but 2 were given


Which comes from the fact that fmean got a new argument in 3.11 it didn't had in 3.10

So I guess the only way to actually get make doctest to work is if the virtual env uses the version of python in main. Is there anyway to do that?
History
Date User Action Args
2021-11-28 23:27:06Arthur-Milchiorsetrecipients: + Arthur-Milchior, docs@python
2021-11-28 23:27:06Arthur-Milchiorsetmessageid: <1638142026.43.0.0921492249915.issue45920@roundup.psfhosted.org>
2021-11-28 23:27:06Arthur-Milchiorlinkissue45920 messages
2021-11-28 23:27:06Arthur-Milchiorcreate