sphinx-contrib / sphinxcontrib-towncrier

An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version. Demo: https://ansible-pylibssh.rtfd.io/changelog. Docs: https://sphinxcontrib-towncrier.rtfd.io
https://pypi.org/p/sphinxcontrib-towncrier
BSD 3-Clause "New" or "Revised" License
19 stars 17 forks source link

EncodingWarning #91

Open jaraco opened 3 months ago

jaraco commented 3 months ago

I see this warning when running the docs build for setuptools:

/Users/jaraco/code/pypa/setuptools/.tox/docs/lib/python3.12/site-packages/sphinxcontrib/towncrier/ext.py:66: EncodingWarning: 'encoding' argument not specified.
  towncrier_output = subprocess.check_output(  # noqa: S603
jaraco commented 2 months ago

Somehow, this error has turned from a warning into an error.

Correction, the warning is emitted the same as always. It was a different warning that's surfaced.

jaraco commented 2 months ago

Still, it would be nice to see this EncodingWarning fixed so that it's not a red herring when investigating other issues.

jaraco commented 2 months ago

I tried suppressing the errors by putting this in the docs job for tox:

env =
    # suppress sphinx-contrib/sphinxcontrib-towncrier#91
    PYTHONWARNINGS= ignore:'encoding' argument not specified

But it did not work, possibly because of the -W parameter to Sphinx.

webknjaz commented 2 months ago

Agreed, this should be fixed. EncodingWarning becomes an error if you involve python -bb, for example (single -b for just warning).