sphinxcontrib-towncrier icon indicating copy to clipboard operation
sphinxcontrib-towncrier copied to clipboard

EncodingWarning

Open jaraco opened this issue 1 year ago • 4 comments

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 avatar Jun 19 '24 16:06 jaraco

~~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 avatar Jul 17 '24 19:07 jaraco

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

jaraco avatar Jul 17 '24 19:07 jaraco

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.

jaraco avatar Jul 17 '24 19:07 jaraco

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

webknjaz avatar Jul 17 '24 20:07 webknjaz