MagicStack / MagicStack/asyncpg

0.25.0: sphinx warnings `reference target not found`

未关闭
#928 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
8.1k
派生
468
PR 合并指标
30 天内没有已合并 PR

描述

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:

[tkloczko@devel-g2v asyncpg-0.25.0]$ PYTHONPATH=$PWD/build/$(cd build; ls -d1 lib*) /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.2
WARNING: Invalid configuration value found: 'language = None'. Update your configuration to a valid langauge code. Falling back to 'en' (English).
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] api/index
WARNING: autodoc: failed to import function 'connection.connect' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import class 'connection.Connection' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import class 'prepared_stmt.PreparedStatement' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import class 'transaction.Transaction' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import class 'cursor.CursorFactory' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import class 'cursor.Cursor' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import function 'pool.create_pool' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import class 'pool.Pool' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
WARNING: autodoc: failed to import module 'types' from module 'asyncpg'; the following exception was raised:
No module named 'asyncpg.protocol.protocol'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-asyncpg.3 { installation usage api/index faq } /home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:7: WARNING: py:func reference target not found: asyncpg.connection.connect
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:7: WARNING: py:class reference target not found: asyncpg.connection.Connection
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:77: WARNING: py:class reference target not found: asyncpg.types.Range
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:80: WARNING: py:class reference target not found: asyncpg.types.Range
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:88: WARNING: py:class reference target not found: asyncpg.types.BitString
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:92: WARNING: py:class reference target not found: asyncpg.types.Box
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:117: WARNING: py:class reference target not found: asyncpg.types.Circle
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:147: WARNING: py:class reference target not found: asyncpg.types.Line
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:149: WARNING: py:class reference target not found: asyncpg.types.LineSegment
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:154: WARNING: py:class reference target not found: asyncpg.types.Path
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:156: WARNING: py:class reference target not found: asyncpg.types.Point
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:158: WARNING: py:class reference target not found: asyncpg.types.Polygon
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:182: WARNING: py:meth reference target not found: asyncpg.connection.Connection.set_type_codec
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:182: WARNING: py:meth reference target not found: asyncpg.connection.Connection.set_builtin_type_codec
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:314: WARNING: py:meth reference target not found: asyncpg.connection.Connection.set_builtin_type_codec
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:341: WARNING: py:meth reference target not found: asyncpg.connection.Connection
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:371: WARNING: py:func reference target not found: asyncpg.pool.create_pool
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/usage.rst:371: WARNING: py:class reference target not found: asyncpg.pool.Pool
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:30: WARNING: py:meth reference target not found: Connection.prepare
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:52: WARNING: py:meth reference target not found: Connection.fetch
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:52: WARNING: py:meth reference target not found: Connection.fetchrow
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:52: WARNING: py:meth reference target not found: Connection.fetchval
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:117: WARNING: py:meth reference target not found: asyncpg.connection.Connection.transaction
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:145: WARNING: py:meth reference target not found: asyncpg.connection.Connection.cursor
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:203: WARNING: py:meth reference target not found: asyncpg.connection.Connection.cursor
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:203: WARNING: py:meth reference target not found: asyncpg.prepared_stmt.PreparedStatement.cursor
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:211: WARNING: py:meth reference target not found: asyncpg.connection.Connection.cursor
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:211: WARNING: py:meth reference target not found: asyncpg.prepared_stmt.PreparedStatement.cursor
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/api/index.rst:211: WARNING: py:exc reference target not found: asyncpg.exceptions.InterfaceError
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/faq.rst:30: WARNING: py:func reference target not found: asyncpg.connection.connect
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/faq.rst:41: WARNING: py:meth reference target not found: asyncpg.connection.Connection.cursor
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/faq.rst:41: WARNING: py:meth reference target not found: asyncpg.prepared_stmt.PreparedStatement.cursor
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/faq.rst:71: WARNING: py:func reference target not found: asyncpg.connection.connect
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/faq.rst:71: WARNING: py:func reference target not found: asyncpg.pool.create_pool
/home/tkloczko/rpmbuild/BUILD/asyncpg-0.25.0/docs/faq.rst:71: WARNING: py:meth reference target not found: asyncpg.connection.Connection.prepare
done
build succeeded, 45 warnings.

The manual pages are in build/sphinx/man.

You can peak on fixes that kind of issues in other projects
https://github.com/latchset/jwcrypto/pull/289
https://github.com/click-contrib/sphinx-click/commit/abc31069
https://github.com/latchset/jwcrypto/pull/289
https://github.com/RDFLib/rdflib-sqlalchemy/issues/95
https://github.com/sissaschool/elementpath/commit/bf869d9e
https://github.com/jaraco/cssutils/issues/21
https://github.com/pywbem/pywbem/pull/2895

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用所示的 sphinx-build 命令复现问题,并结合 autodoc 警告检查 docs/usage.rst、docs/api/index.rst 和 docs/faq.rst。跟踪缺失的目标和导入失败,然后验证文档构建能够完成,且不会出现所报告的引用警告。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
documentation
Issue 类型
文档
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。