#1090126 pyte: FTBFS: ERROR: Invalid value `None` in intersphinx_mapping['http://docs.python.org/']. Expected a two-element tuple or list.

Package:
src:pyte
Source:
src:pyte
Submitter:
Santiago Vila
Date:
2025-01-14 09:39:02 UTC
Severity:
normal
Tags:
#1090126#5
Date:
2024-12-16 13:47:05 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:
--------------------------------------------------------------------------------
[...]
 debian/rules binary
dh binary --with python3,sphinxdoc --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:311: python3.13 setup.py config
/usr/lib/python3/dist-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
running config
I: pybuild base:311: python3.12 setup.py config
/usr/lib/python3/dist-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
running config
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_build
I: pybuild base:311: /usr/bin/python3.13 setup.py build
/usr/lib/python3/dist-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/modes.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/screens.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/escape.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/graphics.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/streams.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/__main__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/compat.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/control.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
copying pyte/charsets.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/pyte
I: pybuild base:311: /usr/bin/python3 setup.py build
/usr/lib/python3/dist-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/modes.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/screens.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/escape.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/graphics.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/streams.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/__main__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/compat.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/control.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
copying pyte/charsets.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/pyte
python3 -m sphinx -b html -d docs/build/doctrees docs docs/build/html
Running Sphinx v8.1.3
loading translations [en]... done
making output directory... done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
ERROR: Invalid value `None` in intersphinx_mapping['http://docs.python.org/']. Expected a two-element tuple or list.

Configuration error:
Invalid `intersphinx_mapping` configuration (1 error).
make[1]: *** [debian/rules:11: override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202412/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.

Thanks.

#1090126#12
Date:
2024-12-30 08:10:27 UTC
From:
To:
Dear maintainer,

[ adding a CC to debian-python@lists.debian.org to solicit further input
on best practices ]

The intersphinx_mapping does not conform to the recent standards
anymore, cf.
<https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_mapping>.

A simple patch along the lines of

| --- pyte-0.8.0.orig/docs/conf.py
| +++ pyte-0.8.0/docs/conf.py
| @@ -176,7 +176,7 @@ else:
|  htmlhelp_basename = 'pytedoc'
|
|  # Example configuration for intersphinx: refer to the Python standard library.
| -intersphinx_mapping = {'http://docs.python.org/': None}
| +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
|
|  autodoc_member_order = 'bysource'
|  todo_include_todos = True

allows the package to successfully build its documentation again.

JFTR, so far this seems to be unresolved even in the most recent
upstream version, cf.
<https://github.com/selectel/pyte/blob/master/docs/conf.py#L215>, so I
filed <https://github.com/selectel/pyte/issues/191> for this.


@debian-python:

However, AFAIK intersphinx will download things from the internet during
build, which is not allowed by policy. So maybe just ripping out all
intersphinx references from the conf.py would be more suitable. I tested
that and the resulting files are identical (except for a missing
reference to intersphinx in the resulting searchindex.js, of course).
I don't know the current best practices on that with respect to Sphinx,
hence the CC.

Cheers,
Flo

#1090126#21
Date:
2024-12-30 08:22:09 UTC
From:
To:
Yes, we normally patch docs/conf.py to use objects.inv from the -doc
packages.

#1090126#26
Date:
2024-12-30 09:16:13 UTC
From:
To:
Ah, right, thanks for the pointer. And when I restrict my codesearch to
just files below debian/ as per
<https://codesearch.debian.net/search?q=intersphinx_mapping+path%3Adebian%2F&literal=1>
then I get sensible patch samples, whereas without that restriction I was
overwhelmed by 355 pages of intersphinx_mapping that seemingly still
cause downloads during build.

So yeah, then my previous patch should rather look like this, I presume:

| Index: pyte-0.8.0/docs/conf.py
| ===================================================================
| --- pyte-0.8.0.orig/docs/conf.py
| +++ pyte-0.8.0/docs/conf.py
| @@ -176,7 +176,9 @@ else:
|  htmlhelp_basename = 'pytedoc'
|
|  # Example configuration for intersphinx: refer to the Python standard library.
| -intersphinx_mapping = {'http://docs.python.org/': None}
| +intersphinx_mapping = {
| +    'python': ('/usr/share/doc/python3-doc/html', '/usr/share/doc/python3-doc/html/objects.inv'),
| +}
|
|  autodoc_member_order = 'bysource'
|  todo_include_todos = True

I confirmed that the FTBFS will still remain resolved with this.

HTH,
Flo

#1090126#29
Date:
2025-01-14 08:50:09 UTC
From:
To:
Hello,

Bug #1090126 in pyte reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/python-team/packages/pyte/-/commit/140e1bee81c76cbd359e0eea80cb4d902fcc0b93
------------------------------------------------------------------------
Fix intersphinx_mapping to point to docs shipped by the python3-doc package

Closes: #1090126
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1090126

#1090126#36
Date:
2025-01-14 09:36:44 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
pyte, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1090126@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrej Shadura <andrewsh@debian.org> (supplier of updated pyte package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 14 Jan 2025 09:34:54 +0100
Source: pyte
Architecture: source
Version: 0.8.0-3
Distribution: unstable
Urgency: medium
Maintainer: Andrej Shadura <andrewsh@debian.org>
Changed-By: Andrej Shadura <andrewsh@debian.org>
Closes: 1090126
Changes:
 pyte (0.8.0-3) unstable; urgency=medium
 .
   [ Ondřej Nový ]
   * d/control: Update Vcs-* fields with new Debian Python Team Salsa
     layout.
 .
   [ Andrej Shadura ]
   * Bump debhelper from old 12 to 13.
   * Use dh-sequence-python3.
   * Update standards version to 4.6.2, no changes needed.
   * Apply multi-arch hints.
     + python-pyte-doc: Add Multi-Arch: foreign.
   * Remove constraints unnecessary since buster:
     + Build-Depends: Drop versioned constraint on python3-setuptools.
 .
   [ Florian Ernst ]
   * Fix intersphinx_mapping to point to docs shipped by the python3-doc package
     (Closes: #1090126)
Checksums-Sha1:
 5a4f4966ac26dd4d868fbda2a150f3b19b91a7f3 1495 pyte_0.8.0-3.dsc
 93af98cfea74cd462efbbdf59270859fa609fffd 4504 pyte_0.8.0-3.debian.tar.xz
Checksums-Sha256:
 3ff210922e0ee39fa547e40120c1d7451b8941da96bde57b4bd3ffa5add146b3 1495 pyte_0.8.0-3.dsc
 e5d66e3286d58c01c5fc9a9b12ae8edcf73c96d634fc57875c87f03d5639392d 4504 pyte_0.8.0-3.debian.tar.xz
Files:
 c2ef25bfa1d0d04c2391727ecf22efcc 1495 python optional pyte_0.8.0-3.dsc
 34fdfc3c9e0f0afd7c8959a42dbe2622 4504 python optional pyte_0.8.0-3.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQSD3NF/RLIsyDZW7aHoRGtKyMdyYQUCZ4YlNwAKCRDoRGtKyMdy
YexLAQDjYhdWIHAg1RB1rpy/h56Z462HSHESPNqpmMhULJ8ZkwD/XTRwfuvHLMMn
1QcIF9+1Ij93aSefsMypFPr/++W/iA4=
=xXI6
-----END PGP SIGNATURE-----