scott-griffiths / bitstring

A Python module to help you manage your bits
https://bitstring.readthedocs.io/en/stable/index.html
MIT License
404 stars 68 forks source link

sphinx warnings `reference target not found` #258

Closed kloczek closed 1 year ago

kloczek commented 1 year ago

On building my packages I'm using sphinx-build command with -n switch which shows warmings about missing references. These are not critical issues. Here is the output with warnings:

```console + /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man Running Sphinx v6.1.3 making output directory... done building [mo]: targets for 0 po files that are out of date writing output... building [man]: all manpages updating environment: [new config] 21 added, 0 changed, 0 removed reading sources... [100%] slicing looking for now-outdated files... none found pickling environment... done checking consistency... done writing... python-bitstring.3 { manual creation packing interpretation slicing reading misc reference quick_ref bitstring_classes bits bitarray constbitstream bitstream functions appendices examples exp-golomb optimisation release_notes } /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:9: WARNING: py:mod reference target not found: struct /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:9: WARNING: py:mod reference target not found: array /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:11: WARNING: py:class reference target not found: BitStream /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:11: WARNING: py:class reference target not found: BitArray /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:11: WARNING: py:class reference target not found: ConstBitStream /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:11: WARNING: py:class reference target not found: Bits /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:13: WARNING: py:class reference target not found: BitArray /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:13: WARNING: py:class reference target not found: BitStream /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:17: WARNING: py:attr reference target not found: Bits.hex /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:17: WARNING: py:attr reference target not found: Bits.bin /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/manual.rst:17: WARNING: py:attr reference target not found: Bits.int /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/packing.rst:119: WARNING: py:mod reference target not found: struct /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/packing.rst:119: WARNING: py:mod reference target not found: array /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/misc.rst:83: WARNING: py:func reference target not found: len /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/misc.rst:158: WARNING: py:mod reference target not found: copy /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/bitstring_classes.rst:54: WARNING: py:mod reference target not found: struct /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/bitstring_classes.rst:54: WARNING: py:mod reference target not found: array /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/bits.rst:1: WARNING: py:attr reference target not found: pos /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/bits.rst:1: WARNING: py:attr reference target not found: pos /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/bits.rst:5: WARNING: py:meth reference target not found: read /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/bits.rst:3: WARNING: py:mod reference target not found: copy /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/constbitstream.rst:1: WARNING: py:attr reference target not found: len /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/exp-golomb.rst:9: WARNING: py:attr reference target not found: ue /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/exp-golomb.rst:9: WARNING: py:attr reference target not found: se /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/exp-golomb.rst:51: WARNING: py:attr reference target not found: uie /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/exp-golomb.rst:51: WARNING: py:attr reference target not found: sie /home/tkloczko/rpmbuild/BUILD/bitstring-bitstring-4.0.2/doc/optimisation.rst:19: WARNING: py:meth reference target not found: Bits.read done build succeeded, 27 warnings. ```

You can peak on fixes that kind of issues in other projects https://github.com/RDFLib/rdflib-sqlalchemy/issues/95 https://github.com/RDFLib/rdflib/pull/2036 https://github.com/click-contrib/sphinx-click/commit/abc31069 https://github.com/frostming/unearth/issues/14 https://github.com/jaraco/cssutils/issues/21 https://github.com/latchset/jwcrypto/pull/289 https://github.com/latchset/jwcrypto/pull/289 https://github.com/pypa/distlib/commit/98b9b89f https://github.com/pywbem/pywbem/pull/2895 https://github.com/sissaschool/elementpath/commit/bf869d9e https://github.com/sissaschool/xmlschema/commit/42ea98f2 https://github.com/sqlalchemy/sqlalchemy/commit/5e88e6e8

scott-griffiths commented 1 year ago

Thanks, that's good to know. I thought that it always warned about missing references by default. As you say I don't think any are serious but I'll clean them up for next time.

scott-griffiths commented 1 year ago

This is fixed on main now. I've added the -n switch to my default makefile so I should notice it in future.