Closed qmonnet closed 1 year ago
Just tested master + this PR and pytest is failing for me
@kloczek is it passing for you on master
without the PR?
@kloczek is it passing for you on
master
without the PR?
I have no idea because on my build infra I cannot send build request because broken build dependencies when m2r
is used.
Is there a viable fork of this project? It would be good to be able to get this functionality to work again.
Should we post: https://github.com/sphinx-contrib/github-administration to see if there is a path to reviving this project.
I think we could setup the CIs again and start moving it forward. There seems to be about 10 small PRs that would benefit from a bit of maintenance.
Just tested master + this PR and pytest is failing for me
@kloczek Right, I could reproduce, not sure how I missed it the first time. Thanks! I adjusted the tests accordingly. It's a bit dirty because I had to adjust the base JSON/YAML files used for the tests, but apart from updating mdinclude, I don't have a better proposal right now. See the last commit I pushed for details.
@hmaarrfk Sorry, I'm not familiar with the github-administration repo. When you say "reviving this project", you mean openapi
? (Not m2r
, right? Which seems to be archived now, by the way). I'm not familiar with the process but we can get someone to give some attention and help maintaining openapi
again, by all means, go ahead! :) Maybe try to keep the original authors/maintainers in the loop.
OK just tested upodated PR and I was able to commit it, build it and pass cleanly pytest
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-openapi-0.7.0-5.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-openapi-0.7.0-5.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/openapi-0.7.0, configfile: tox.ini
plugins: xdist-3.0.2
collected 496 items
tests/test_openapi.py ................................. [ 6%]
tests/test_schema_utils.py ......... [ 8%]
tests/test_spec_examples.py .............................................................. [ 21%]
tests/lib2to3/test_convert.py ............ [ 23%]
tests/lib2to3/test_convert_operation.py ...... [ 25%]
tests/lib2to3/test_convert_parameter.py ................ [ 28%]
tests/lib2to3/test_convert_parameters.py ... [ 28%]
tests/lib2to3/test_convert_path.py ........... [ 31%]
tests/lib2to3/test_convert_paths.py .... [ 32%]
tests/lib2to3/test_convert_request_body.py ..... [ 33%]
tests/lib2to3/test_convert_request_body_formdata.py ............ [ 35%]
tests/lib2to3/test_convert_response.py ............. [ 38%]
tests/lib2to3/test_convert_responses.py .... [ 39%]
tests/renderers/httpdomain/test_render.py ......... [ 40%]
tests/renderers/httpdomain/test_render_json_schema_description.py .................................................................................................. [ 60%]
[ 60%]
tests/renderers/httpdomain/test_render_operation.py ............. [ 63%]
tests/renderers/httpdomain/test_render_parameter.py .......................................... [ 72%]
tests/renderers/httpdomain/test_render_parameters.py ............. [ 74%]
tests/renderers/httpdomain/test_render_paths.py ......... [ 76%]
tests/renderers/httpdomain/test_render_request_body.py .... [ 77%]
tests/renderers/httpdomain/test_render_request_body_example.py ......................... [ 82%]
tests/renderers/httpdomain/test_render_response.py .................................... [ 90%]
tests/renderers/httpdomain/test_render_response_example.py .............................. [ 96%]
tests/renderers/httpdomain/test_render_responses.py ........ [ 97%]
tests/renderers/httpdomain/test_render_restructuredtext_markup.py .......... [100%]
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:123
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 1.17.1-unknown is an invalid version and will not be supported in a future release
warnings.warn(
../../../../../usr/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py:111
/usr/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py:111: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===================================================================== 487 passed, 2 warnings in 16.08s =====================================================================
As you can see, this is currently failing CI. Not your fault though: the deps in pre-commit
are also rather out-of-date. If you could rebase this onto the changes in https://github.com/sphinx-contrib/openapi/pull/136 then you should get this pass :green_circle: and we can look to merge and release it.
I've actually gone ahead and rebased this myself. Let's see how this passes. There was a small formatting issue on the first commit so I fixed that as part of the rebase also.
It is yet another thing. In sphinxcontrib/init.py sphinxcontrib-openapi
used pkg_resources
.
This modle is already marked as deprecated and is known that it meeeses sys.path
which bloks altering in conf.py path to sphinxcontrib-openapi
to be able generate dosumentation without have installed sphinxcontrib-openapi
(by just execute for rxample sphinx-build -n -T -b <out_format> docs build/sphinx
).
On https://github.com/python/importlib_metadata/issues/378 is poasible to find some hints how to migrate to importlib-metadata
.
Yes 😄
m2r is unmaintained. It relies on mistune, but is not compatible with mistune versions >= 2.0. This makes it impossible to update mistune, even though there is a CVE in the old versions of the package.
Switch to sphinx-mdinclude instead.
Note: There is also m2r2, but it is not look like a suitable alternative because the project simply forces the use of an older mistune version.
I haven't managed to pass the full CI locally successfully, but the issues seemed to be related to my setup and not to the changes from this PR. If they did come from the PR, I would welcome some assistance to address them.
Fixes: #123 Possibly addresses #121 as well