Also remove almost everything from `_core.py` and moves it to `ffi/__init__.py`.
Micropip imports `IN_BROWSER` from `pyodide._core` so we leave that in there.
Resolves https://github.com/pyodide/pyodide/issues/3432
I added a new decorator called `@docs_argspec` to override the argument specification
of a function used in the docs by setting `func.__wraps__` to a fake function. This only
happens when building the docs, normally it is a no-op.
`@docs_argspec` is needed when using `@overload` because mypy requires the argspec
of the main function to be at least as general as the argspecs of all the overloads, which
causes suboptimal rendering in the api docs.
In #3461 I dropped `sphinx-panels` but of course we *were* using it. It has a successor called
`sphinx-design` which works with sphinx 5.x (still not 6.x but we have several packages that cap
sphinx <6). I also updated the use of the tabbed directive to the new sphinx-design api.
The `pyodide.ffi` stuff is defined in `_pyodide._core_docs`. We don't want `_pyodide._core_docs` to appear in the documentation because this isn't where you should import things from so we override the `__name__` of `_pyodide._core_docs` to be `pyodide.ffi`. But then Sphinx fails to locate the source for the stuff defined in `_pyodide._core_docs`. This patches `ModuleAnalyzer` to tell it to look for the source of things from `pyodide.ffi` in `_pyodide._core_docs`.
Remove the property prefix from properties, add a link for ast.Module.
Previously this included more significant changes but they have been upstreamed into sphinx-autodoc-typehints.
I opened a PR for one of the Napoleon changes:
https://github.com/sphinx-doc/sphinx/pull/11131
But we use Sphinx v5.3 so even if we upstream Napoleon fixes into Sphinx v6.x,
we won't get to use them for a while.
Some minor cleanup: define `InternalError` and `ConversionError` in `_pyodide_core`
and import them into C. This should make it possible to pickle/unpickle them.
With this we can get up to Sphinx 5.3.0 (from Sphinx 4.5.0). I dropped sphinx-panels
since it has a version pin on Spinx < 5 (we don't seem to use it anyways). I moved to
sphinx-book-theme 0.4.0rc1 since version 0.3.0 pins Sphinx < 5.
This is relevant because new versions of sphinx-autodoc-typehints require Sphinx>=5.3
so we can't pull in my fixes to sphinx-autodoc-typehints.
In the future, I would like for version caps (==, <, <=, and =~) to have comments
explaining them. I removed all the version caps since none of them seem to actively break.
In particular, we can now use jinja2 version 3 so we don't have to pin docutils 0.16.
Increased the number of cross references, removed some types
for better compatibility with sphinx-autodoc-typehints and made
various other minor improvements.
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This updates the version of python-sat. No changes are made in the compilation process
for the package itself, i.e. I am hopeful it will successfully pyodide-compile "as is".
This adds rust toolchain into our docker image so we don't have to install it every time.
make rust command still exists, but I removed it from the docs. So now a user (who wants to build a package that requires rust) is responsible for installing rust toolchain in their build setup, which is reasonable I think.
Co-authored-by: josephrocca <1167575+josephrocca@users.noreply.github.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>