[Python-Dev] Doc tests failing for many PRs on GitHub

2020-08-31 Thread Mark Shannon



___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/5LNWMVXD72FBJDNO7GKEF2KVIE4V5BKG/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Doc tests failing for many PRs on GitHub

2020-08-31 Thread Mark Shannon

Hi,

There seems to be something wrong with the doc tests for PRs on Github.

https://github.com/python/cpython/pull/22026/checks?check_run_id=1050881634
https://github.com/python/cpython/pull/22025/checks?check_run_id=1050403463

Anyone know what the issue is?

Cheers,
Mark.

(apologies for the previous empty email)
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/KMXK6BQWQZRR2TGVRLECMR7CUVIVTUMQ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Doc tests failing for many PRs on GitHub

2020-08-31 Thread Karthikeyan
The last successful build is
https://travis-ci.com/github/python/cpython/jobs/379161961
Recent failure build is
https://travis-ci.com/github/python/cpython/jobs/379329436

I can see setuptools being upgraded from 49.6.0 to 50.0.0 as a difference.
I can see the below command to print sphinx-build version error out in the
makefile but unfortunately the error is being redirected to /dev/null in
the makefile and I needed to run it explicitly to see the output. There is
a recent change that moves Loader to _abc and imports Loader from _abc
inside abc is done with below commit. The same code is present in 49.6.0
too at
https://github.com/pypa/setuptools/blob/04e3df22df840c6bb244e9b27bc56750c44b7c85/_distutils_hack/__init__.py#L79
. So I am not sure why this causes error.

Pinning the dependency of setuptools to 49.6.0 in Doc/makefile runs the
tests fine without error. Can you please try pinning it and see if it helps?

I am not sure if the below commit is the cause that is picked up in
setuptools but someone can correct me if I am wrong about the importlib
machinery error.

commit 9e09849d20987c131b28bcdd252e53440d4cd1b3
Author: Victor Stinner 
Date:   Wed Jun 17 23:15:59 2020 +0200

bpo-41006: importlib.util no longer imports typing (GH-20938)

Create importlib._abc submodule to avoid importing typing when
importlib.util is imported. Move Loader ABC into importlib._abc.

./python
Python 3.10.0a0 (heads/master:75c80b0bda, Aug 30 2020, 13:53:05)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib.util
>>> importlib.util.abc.Loader
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'importlib.util' has no attribute 'abc'
>>>
➜  cpython git:(master) ✗ git checkout
9e09849d20987c131b28bcdd252e53440d4cd1b3~1 Lib/importlib/util.py
➜  cpython git:(master) ✗ ./python
Python 3.10.0a0 (heads/master:75c80b0bda, Aug 30 2020, 13:53:05)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib.util
>>> importlib.util.abc.Loader


xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4"
doctest suspicious html
make: Entering directory '/root/cpython/Doc'
make[1]: Entering directory '/root/cpython/Doc'
mkdir -p build
echo PATH=./venv/bin:$PATH blurb help
PATH=./venv/bin:/root/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
blurb help
echo PATH=./venv/bin:$PATH sphinx-build --version
PATH=./venv/bin:/root/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
sphinx-build --version
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees  -q -W
--keep-going -j4 -W . build/doctest
Traceback (most recent call last):
  File "/root/cpython/Doc/./venv/bin/sphinx-build", line 5, in 
from sphinx.cmd.build import main
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/cmd/build.py",
line 23, in 
from sphinx.application import Sphinx
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/application.py",
line 28, in 
from sphinx.config import Config
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/config.py",
line 22, in 
from sphinx.util import logging
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/__init__.py",
line 40, in 
from sphinx.util import smartypants  # noqa
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/smartypants.py",
line 33, in 
from sphinx.util.docutils import __version_info__ as docutils_version
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/docutils.py",
line 17, in 
from distutils.version import LooseVersion
  File "", line 1007, in _find_and_load
  File "", line 982, in _find_and_load_unlocked
  File "", line 925, in _find_spec
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/_distutils_hack/__init__.py",
line 74, in find_spec
return method()
  File
"/root/cpython/Doc/venv/lib/python3.10/site-packages/_distutils_hack/__init__.py",
line 79, in spec_for_distutils
class DistutilsLoader(importlib.util.abc.Loader):
AttributeError: module 'importlib.util' has no attribute 'abc'
Makefile:49: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory '/root/cpython/Doc'
Testing of doctests in the sources finished, look at the results in
build/doctest/output.txt
Makefile:129: recipe for target 'doctest' failed
make: *** [doctest] Error 1
make: Leaving directory '/root/cpython/Doc'

Thanks

On Mon, Aug 31, 2020 at 5:35 PM Mark Shannon  wrote:

> Hi,
>
> There seems to be something wrong with the doc tests for PRs on Github.
>
> https://github.com/python/cpython/pull/22026/checks?check_run_id=1050881634
> https://github.com/python/cpython/pull/22025/checks?check_run_id=1050403463
>
> Anyone know what the issue is?
>

[Python-Dev] Re: Doc tests failing for many PRs on GitHub

2020-08-31 Thread Ammar Askar
Karthik, your analysis is correct. You just have to import importlib
first to get the error:

>>> import importlib
>>> import importlib.util
>>> importlib.util.abc.Loader
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'importlib.util' has no attribute 'abc'

On Mon, Aug 31, 2020 at 12:09 PM Karthikeyan  wrote:
>
> The last successful build is 
> https://travis-ci.com/github/python/cpython/jobs/379161961
> Recent failure build is 
> https://travis-ci.com/github/python/cpython/jobs/379329436
>
> I can see setuptools being upgraded from 49.6.0 to 50.0.0 as a difference. I 
> can see the below command to print sphinx-build version error out in the 
> makefile but unfortunately the error is being redirected to /dev/null in the 
> makefile and I needed to run it explicitly to see the output. There is a 
> recent change that moves Loader to _abc and imports Loader from _abc inside 
> abc is done with below commit. The same code is present in 49.6.0 too at 
> https://github.com/pypa/setuptools/blob/04e3df22df840c6bb244e9b27bc56750c44b7c85/_distutils_hack/__init__.py#L79
>  . So I am not sure why this causes error.
>
> Pinning the dependency of setuptools to 49.6.0 in Doc/makefile runs the tests 
> fine without error. Can you please try pinning it and see if it helps?
>
> I am not sure if the below commit is the cause that is picked up in 
> setuptools but someone can correct me if I am wrong about the importlib 
> machinery error.
>
> commit 9e09849d20987c131b28bcdd252e53440d4cd1b3
> Author: Victor Stinner 
> Date:   Wed Jun 17 23:15:59 2020 +0200
>
> bpo-41006: importlib.util no longer imports typing (GH-20938)
>
> Create importlib._abc submodule to avoid importing typing when
> importlib.util is imported. Move Loader ABC into importlib._abc.
>
> ./python
> Python 3.10.0a0 (heads/master:75c80b0bda, Aug 30 2020, 13:53:05)
> [GCC 7.5.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import importlib.util
> >>> importlib.util.abc.Loader
> Traceback (most recent call last):
>   File "", line 1, in 
> AttributeError: module 'importlib.util' has no attribute 'abc'
> >>>
> ➜  cpython git:(master) ✗ git checkout 
> 9e09849d20987c131b28bcdd252e53440d4cd1b3~1 Lib/importlib/util.py
> ➜  cpython git:(master) ✗ ./python
> Python 3.10.0a0 (heads/master:75c80b0bda, Aug 30 2020, 13:53:05)
> [GCC 7.5.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import importlib.util
> >>> importlib.util.abc.Loader
> 
>
> xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" 
> doctest suspicious html
> make: Entering directory '/root/cpython/Doc'
> make[1]: Entering directory '/root/cpython/Doc'
> mkdir -p build
> echo PATH=./venv/bin:$PATH blurb help
> PATH=./venv/bin:/root/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
>  blurb help
> echo PATH=./venv/bin:$PATH sphinx-build --version
> PATH=./venv/bin:/root/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
>  sphinx-build --version
> Building NEWS from Misc/NEWS.d with blurb
> PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees  -q -W 
> --keep-going -j4 -W . build/doctest
> Traceback (most recent call last):
>   File "/root/cpython/Doc/./venv/bin/sphinx-build", line 5, in 
> from sphinx.cmd.build import main
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/cmd/build.py", 
> line 23, in 
> from sphinx.application import Sphinx
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/application.py", 
> line 28, in 
> from sphinx.config import Config
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/config.py", line 
> 22, in 
> from sphinx.util import logging
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/__init__.py",
>  line 40, in 
> from sphinx.util import smartypants  # noqa
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/smartypants.py",
>  line 33, in 
> from sphinx.util.docutils import __version_info__ as docutils_version
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/docutils.py",
>  line 17, in 
> from distutils.version import LooseVersion
>   File "", line 1007, in _find_and_load
>   File "", line 982, in _find_and_load_unlocked
>   File "", line 925, in _find_spec
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/_distutils_hack/__init__.py",
>  line 74, in find_spec
> return method()
>   File 
> "/root/cpython/Doc/venv/lib/python3.10/site-packages/_distutils_hack/__init__.py",
>  line 79, in spec_for_distutils
> class DistutilsLoader(importlib.util.abc.Loader):
> AttributeError: module 'importlib.util' has no attribute 'abc'
> Makefile:49: recipe for target 'build' failed
> make[1]: *** [build] Error 1
> make[1]: Leavin

[Python-Dev] Re: Doc tests failing for many PRs on GitHub

2020-08-31 Thread Ammar Askar
Filed https://github.com/pypa/setuptools/issues/2362 against
setuptools, not sure what we should do locally to fix this in the
meantime.

On Mon, Aug 31, 2020 at 1:11 PM Ammar Askar  wrote:
>
> Karthik, your analysis is correct. You just have to import importlib
> first to get the error:
>
> >>> import importlib
> >>> import importlib.util
> >>> importlib.util.abc.Loader
> Traceback (most recent call last):
>   File "", line 1, in 
> AttributeError: module 'importlib.util' has no attribute 'abc'
>
> On Mon, Aug 31, 2020 at 12:09 PM Karthikeyan  wrote:
> >
> > The last successful build is 
> > https://travis-ci.com/github/python/cpython/jobs/379161961
> > Recent failure build is 
> > https://travis-ci.com/github/python/cpython/jobs/379329436
> >
> > I can see setuptools being upgraded from 49.6.0 to 50.0.0 as a difference. 
> > I can see the below command to print sphinx-build version error out in the 
> > makefile but unfortunately the error is being redirected to /dev/null in 
> > the makefile and I needed to run it explicitly to see the output. There is 
> > a recent change that moves Loader to _abc and imports Loader from _abc 
> > inside abc is done with below commit. The same code is present in 49.6.0 
> > too at 
> > https://github.com/pypa/setuptools/blob/04e3df22df840c6bb244e9b27bc56750c44b7c85/_distutils_hack/__init__.py#L79
> >  . So I am not sure why this causes error.
> >
> > Pinning the dependency of setuptools to 49.6.0 in Doc/makefile runs the 
> > tests fine without error. Can you please try pinning it and see if it helps?
> >
> > I am not sure if the below commit is the cause that is picked up in 
> > setuptools but someone can correct me if I am wrong about the importlib 
> > machinery error.
> >
> > commit 9e09849d20987c131b28bcdd252e53440d4cd1b3
> > Author: Victor Stinner 
> > Date:   Wed Jun 17 23:15:59 2020 +0200
> >
> > bpo-41006: importlib.util no longer imports typing (GH-20938)
> >
> > Create importlib._abc submodule to avoid importing typing when
> > importlib.util is imported. Move Loader ABC into importlib._abc.
> >
> > ./python
> > Python 3.10.0a0 (heads/master:75c80b0bda, Aug 30 2020, 13:53:05)
> > [GCC 7.5.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import importlib.util
> > >>> importlib.util.abc.Loader
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > AttributeError: module 'importlib.util' has no attribute 'abc'
> > >>>
> > ➜  cpython git:(master) ✗ git checkout 
> > 9e09849d20987c131b28bcdd252e53440d4cd1b3~1 Lib/importlib/util.py
> > ➜  cpython git:(master) ✗ ./python
> > Python 3.10.0a0 (heads/master:75c80b0bda, Aug 30 2020, 13:53:05)
> > [GCC 7.5.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import importlib.util
> > >>> importlib.util.abc.Loader
> > 
> >
> > xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" 
> > doctest suspicious html
> > make: Entering directory '/root/cpython/Doc'
> > make[1]: Entering directory '/root/cpython/Doc'
> > mkdir -p build
> > echo PATH=./venv/bin:$PATH blurb help
> > PATH=./venv/bin:/root/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
> >  blurb help
> > echo PATH=./venv/bin:$PATH sphinx-build --version
> > PATH=./venv/bin:/root/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
> >  sphinx-build --version
> > Building NEWS from Misc/NEWS.d with blurb
> > PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees  -q -W 
> > --keep-going -j4 -W . build/doctest
> > Traceback (most recent call last):
> >   File "/root/cpython/Doc/./venv/bin/sphinx-build", line 5, in 
> > from sphinx.cmd.build import main
> >   File 
> > "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/cmd/build.py", 
> > line 23, in 
> > from sphinx.application import Sphinx
> >   File 
> > "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/application.py",
> >  line 28, in 
> > from sphinx.config import Config
> >   File 
> > "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/config.py", 
> > line 22, in 
> > from sphinx.util import logging
> >   File 
> > "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/__init__.py",
> >  line 40, in 
> > from sphinx.util import smartypants  # noqa
> >   File 
> > "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/smartypants.py",
> >  line 33, in 
> > from sphinx.util.docutils import __version_info__ as docutils_version
> >   File 
> > "/root/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/docutils.py",
> >  line 17, in 
> > from distutils.version import LooseVersion
> >   File "", line 1007, in _find_and_load
> >   File "", line 982, in _find_and_load_unlocked
> >   File "", line 925, in _find_spec
> >   File 
> > "/root/cpython/Doc/venv/lib/python3.10/site-packages/_distutils_h

[Python-Dev] Re: Resurrecting PEP-472

2020-08-31 Thread Stefano Borini
On Sat, 29 Aug 2020 at 19:33, Antoine Pitrou  wrote:

> Agreed with Victor.  Please create a new PEP.

on it.

-- 
Kind regards,

Stefano Borini
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/KQQBVUPVDK6HGH3H23TOQIAB4MUXGA6U/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Deferred, coalescing, and other very recent reference counting optimization

2020-08-31 Thread Raihan Rasheed Apurbo
In CPython we have reference counting. My question is can we optimize current 
RC using
strategies like Deferred RC and Coalescing? If no then where would I face 
problems if I try
to implement these sorts of strategies?

These strategies all depend on the concept that we don't need the exact value of
reference count all the time. So far in my observation, we only need exact 
value before
running a cycle collector.  If we can manage to make sure that we have exact 
value before
entering the cycle collector then in my opinion we can add these optimizations 
strategies
to some extent.  Is there something that I am missing? Or It is quite possible? 
If not
possible please tell me the factors I should consider.

Thanks in advance.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/YOQGF2QSOJSRPOJIYLJMMT72E6OTVLQP/
Code of Conduct: http://python.org/psf/codeofconduct/