Bug#1008680: scipy: FTBFS with Python 3.10 as default

2022-04-03 Thread Drew Parsons
Source: scipy
Followup-For: Bug #1008680

The error on distutils is clouding the issue. 

distutils is deprecated, packages need to update their code. scipy and
sphinx are both aware about it and are dealing with it.

But scipy uses distutils in its own build, and the deprecation warning
is not triggering error there.

sphinx does not usually treat a warning as an error, and the -W flag
has not been invoked here.

The problem is in the fine print.  The sphinx error refers to a log
file.  Reading the log points the finger at pydata_sphinx_theme:

  File "/usr/lib/python3/dist-packages/pydata_sphinx_theme/__init__.py", line 
14, in 
from .bootstrap_html_translator import BootstrapHTML5Translator
  File 
"/usr/lib/python3/dist-packages/pydata_sphinx_theme/bootstrap_html_translator.py",
 line 3, in 
from distutils.version import LooseVersion
  File "/usr/lib/python3.10/distutils/__init__.py", line 19, in 
warnings.warn(_DEPRECATION_MESSAGE,
DeprecationWarning: The distutils package is deprecated and slated for removal 
in Python 3.12. Use setuptools or check PEP 632 for potential alternatives


So even though sphinx is not supposed to treat warnings as errors,
apparently this is happening with sphinx themes, or at least with
pydata_sphinx_theme.

The solution is either to instruct scipy to not use
pydata_sphinx_theme for its docs, or patch pydata_sphinx_theme. The
first might cause a growing snowball of problems depending on how
scipy is using the pydata theme.

pydata_sphinx_theme has a simple patch already at
https://github.com/pydata/pydata-sphinx-theme/pull/590
Probably this is the best solution.



Bug#1008680: scipy: FTBFS with Python 3.10 as default

2022-04-03 Thread Drew Parsons
Source: scipy
Followup-For: Bug #1008680

It's in the doc build, the error message refers to sphinx.
Is the bug in sphinx, not in scipy?



Bug#1008680: scipy: FTBFS with Python 3.10 as default

2022-04-03 Thread Drew Parsons
Source: scipy
Followup-For: Bug #1008680

Yes, looks to me the problem is the one discussed at
https://github.com/sphinx-doc/sphinx/issues/9595
https://github.com/sphinx-doc/sphinx/issues/9820



Bug#1008680: scipy: FTBFS with Python 3.10 as default

2022-04-03 Thread Drew Parsons
Source: scipy
Version: 1.7.3-2
Followup-For: Bug #1008680

However, likely addressed by scipy upstream at
https://github.com/scipy/scipy/commit/60d5ee3955bd3ff5982a08e8d64ec8b5f5f62dc9



Bug#1008680: scipy: FTBFS with Python 3.10 as default

2022-03-30 Thread Graham Inggs
Source: scipy
Version: 1.7.3-2
Severity: serious
Tags: ftbfs patch
User: debian-pyt...@lists.debian.org
Usertags: python3.10

Hi Maintainer

As can be seen on reproducible builds [1], scipy FTBFS with Python
3.10 as the default version.  I've copied what I hope is the relevant
part of the log below.

I've also attached a patch against scipy 1.8.0-1exp2 that works for me.

Regards
Graham


[1] https://tests.reproducible-builds.org/debian/rb-pkg/scipy.html


LANG=C python3 -msphinx -b html -d build/doctrees   source build/html
Running Sphinx v4.3.2

Exception occurred:
  File "/usr/lib/python3.10/distutils/__init__.py", line 19, in 
warnings.warn(_DEPRECATION_MESSAGE,
DeprecationWarning: The distutils package is deprecated and slated for
removal in Python 3.12. Use setuptools or check PEP 632 for potential
alternatives
The full traceback has been saved in /tmp/sphinx-err-9djw0js6.log, if
you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error
message can be provided next time.
A bug report can be filed in the tracker at
. Thanks!
SciPy (VERSION 1.7.3)
make[2]: *** [Makefile:122: html-build] Error 2
Description: Ignore distutils deprecation warnings in doc build
Author: Graham Inggs 
Last-Update: 2022-03-30

--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -149,6 +149,7 @@
 r"OpenSSL\.rand is deprecated",  # OpenSSL package in linkcheck
 r"Using or importing the ABCs from",  # 3.5 importlib._bootstrap
 r"'contextfunction' is renamed to 'pass_context'",  # Jinja
+r"distutils package is deprecated",
 ):
 warnings.filterwarnings(  # deal with other modules having bad imports
 'ignore', message=".*" + key, category=DeprecationWarning)