Bug#998059: sphinx: LANGUAGE environment variable inconsistently affects output of objects.inv

2024-07-08 Thread James Addison
Followup-For: Bug #998059
Control: forwarded -1 https://github.com/sphinx-doc/sphinx/pull/10067
Control: close -1

This variance in Sphinx project 'objects.inv' output files was resolved by a
change within Sphinx that added a default config language code.  That change
stabilized the output of gettext-based translation resource loading, removing
variance based on the build host's LANGUAGE environment variable.



Bug#998059: sphinx: LANGUAGE environment variable inconsistently affects output of objects.inv

2023-04-10 Thread James Addison
Package: python3-sphinx
Followup-For: Bug #998059
X-Debbugs-Cc: la...@debian.org
Control: found -1 4.5.0
Control: notfound -1 5.0.0

Dear Maintainer,

My updated understanding is that this issue was fixed[1] in version 5.0.0 of
Sphinx.

I've documented[2] the process I followed using 'git bisect' to determine when
the fix was introduced (between versions 4.5.0 and 5.0.0 of sphinx).

Since my previous comment, the (I now believe, incorrect) changeset that I'd
forwarded to resolve the problem in more recent Sphinx versions was accepted,
so I've offered an explanation and revert changeset that I hope may be
acceptable before the upcoming 6.2.0 release.

Although it could be time-consuming to understand and verify my findings, if
someone has time to do that then I'd be grateful (I've confused myself a few
times while working on this bug, and I don't trust my findings enough yet to
close it).

Thank you,
James

[1] - 
https://github.com/sphinx-doc/sphinx/commit/e4e58a4f2791e528cdaa861b96636a1e37a558ba

[2] - https://github.com/sphinx-doc/sphinx/issues/9778#issuecomment-1501172176



Bug#998059: sphinx: LANGUAGE environment variable inconsistently affects output of objects.inv

2022-11-15 Thread James Addison
Source: sphinx
Version: 3.2.1-2
Followup-For: Bug #998059
X-Debbugs-Cc: j...@jp-hosting.net

After taking another look at this issue a couple of weeks ago, and some further 
discussion with Chris on the relevant GitHub issue, it seemed like a better 
approach (instead of disabling objects.inv output altogether, or configuring 
environment variables on a per-package basis) is to set a neutral/null 
translation locale during reproducible builds for sphinx.  A pull request to do 
that has been opened/forwarded upstream.



Bug#998059: sphinx: LANGUAGE environment variable inconsistently affects output of objects.inv

2022-10-02 Thread James Addison
Source: sphinx
Followup-For: Bug #998059
X-Debbugs-Cc: debian-pyt...@lists.debian.org

(context: cross-posting based on an idea[1] that has been discussed upstream in 
sphinx's GitHub repository about how to resolve locale-based build variance)

The SPHINXOPTS[2] environment variable provides a way to selectively override 
defined environment variables (such as LANGUAGE) in a way that should only 
affect sphinx (limiting the effects on unrelated build steps).

For example:

  SPHINXOPTS='-D LANGUAGE="en_US.UTF-8"'

That would allow the objects.inv file to be built in a fixed language on a 
per-package basis.

It doesn't seem ideal to artificially limit documentation localization for 
affected packages, but could allow many of the affected packages to pass 
diffoscope reproducibility testing.

Alternatives explored: I wasn't able to identify a straightforward, supported 
way to disable creation of the objects.inv file, nor is it currently possible 
to invoke a multi-locale HTML sphinx build (an approach that might permit 
output of monolithic documentation outputs that wouldn't vary based on build 
environment locale).  I'll file a feature request for the former; the latter is 
tracked by an existing request[3].

[1] - https://github.com/sphinx-doc/sphinx/issues/9778#issuecomment-1264065231

[2] - 
https://github.com/sphinx-doc/sphinx/blob/v4.5.0/doc/man/sphinx-build.rst#environment-variables

[3] - https://github.com/sphinx-doc/sphinx/issues/788