python-hyper / hpack

HTTP/2 Header Encoding for Python
https://hpack.readthedocs.io/en/latest/
MIT License
72 stars 32 forks source link

4.0.0: sphinx warnings #268

Closed kloczek closed 2 years ago

kloczek commented 3 years ago
+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.0.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [100%] security/index
WARNING: autodoc: failed to import class 'Encoder' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'Decoder' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'HeaderTuple' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'NeverIndexedHeaderTuple' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'HPACKError' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'HPACKDecodingError' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'InvalidTableIndex' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'OversizedHeaderListError' from module 'hpack'; the following exception was raised:
No module named 'hpack'
WARNING: autodoc: failed to import class 'InvalidTableSizeError' from module 'hpack'; the following exception was raised:
No module named 'hpack'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... hpack.1 { installation api security/index } done
build succeeded, 9 warnings.
Kriechi commented 3 years ago

I suspect an error in your installation or environment. The full instructions on how to generate the docs are wrapped into tox and work in our CI and locally for me: tox -e docs which is equivalent to a make html with an already installed hpack package.

Can you test that and report back please?

kloczek commented 3 years ago

No only setuptools build_sphinx assumes that module will be available in root directory of the project. For some reason you've choose to put source code under src/hyper. That breaks many things in setuptools and this why you've been forced to wrap many things in tox. This is why I've created that ticket (if it was not obvious). I would suggest to move src/hyper/ to hyper/ on next release.

Kriechi commented 3 years ago

Sorry, your original issue was not obvious to identify as you did not provide any comment or explanation of what problem you are encountering. Just dumping a long command line output is not descriptive or providing any insights into your environment, what you are trying to do, and why you think this is a problem.

We are closely following the official PyPA sample project and repository directory layout: https://github.com/pypa/sampleproject

This should not be an issue because we use tox to provide well-defined and repeatable virtualenvs which correctly install the package and define all its dependencies - all into the correct locations. Does tox -e docs work for you and build a clean set of documentation files with sphinx?

Please use the tooling and configuration as we defined it for this project - if you don't follow them, you are very likely to experience issues (as you have reported multiple of them already).

kloczek commented 2 years ago

Sorry, your original issue was not obvious to identify as you did not provide any comment or explanation of what problem you are encountering.

Command is in first line of that ticket:

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx