twisted / pydoctor

This is pydoctor, an API documentation generator that works by static analysis.
https://pydoctor.readthedocs.io
Other
179 stars 48 forks source link

Fix CI #730

Closed tristanlatr closed 10 months ago

tristanlatr commented 10 months ago
codecov[bot] commented 10 months ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (965ed95) 92.62% compared to head (38ff2af) 92.62%.

:exclamation: Current head 38ff2af differs from pull request most recent head 8ec066f. Consider uploading reports for the commit 8ec066f to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #730 +/- ## ======================================= Coverage 92.62% 92.62% ======================================= Files 47 47 Lines 8132 8132 Branches 1944 1944 ======================================= Hits 7532 7532 Misses 343 343 Partials 257 257 ``` | [Files Changed](https://app.codecov.io/gh/twisted/pydoctor/pull/730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=twisted) | Coverage Δ | | |---|---|---| | [pydoctor/model.py](https://app.codecov.io/gh/twisted/pydoctor/pull/730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=twisted#diff-cHlkb2N0b3IvbW9kZWwucHk=) | `94.63% <ø> (ø)` | | | [pydoctor/templatewriter/\_\_init\_\_.py](https://app.codecov.io/gh/twisted/pydoctor/pull/730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=twisted#diff-cHlkb2N0b3IvdGVtcGxhdGV3cml0ZXIvX19pbml0X18ucHk=) | `92.54% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tristanlatr commented 10 months ago

I can't reproduce the current issue locally, tox -e test -- pydoctor/test/test_model.py::test_introspection_extension works on my local machine :/

tristanlatr commented 10 months ago

Only python3.10 and 3.11 are failing :/ so weird.

tristanlatr commented 10 months ago

Any clue @adiroiban @glyph ?

glyph commented 10 months ago

@tristanlatr the first thing to investigate here is to make sure that mypy and all its transitive dependencies are pinned.

glyph commented 10 months ago

Once we know that the environment is consistent everywhere I can investigate if something trickier is going on :)

tristanlatr commented 10 months ago

I’m not talking about the mypy failure, but rather the unit tests failure on python 3.10 and 3.11. Mypy errors are obvious to fix and I will get to that later

glyph commented 10 months ago

I’m not talking about the mypy failure, but rather the unit tests failure on python 3.10 and 3.11.

Ah. Hm. I don't know enough about pydoctor's extension-module introspection capabilities, but surely there's something in the stdlib that we could use that's known to be an extension module and that doesn't depend on the sad little https://pypi.org/project/cython-test-exception-raiser/ project? It occurs to me that there's a 1.0.2, and I don't know what's in the chnagelog there, but maybe pinning the old version is part of the problem?

glyph commented 10 months ago

(debugging this for far too long right now I was not able to figure out what's going on)

tristanlatr commented 10 months ago

Thanks for your help. Maybe the cProfile module can be used instead.

tristanlatr commented 10 months ago

The cython function is not recognized because it's not actually a function object for pydoctor.

>>> type(cython_test_exception_raiser.raiser.raiseException).__mro__
(<class '_cython_3_0_2.cython_function_or_method'>, <class 'object'>)

I'll prepare a fix.