-
Notifications
You must be signed in to change notification settings - Fork 901
Open
Description
This is an incomplete list of next steps to build proper stubs from PyO3 codebases:
- introspect all class methods (including adding a test for all magic methods) (partial: Refine some magic methods introspection #5273)
- introspect classes associated constants (
const) Introspect class associated constants #5272 - introspect modules associated constants (
const) add declarative module level constants export #5096 - introspect simple enums built by
#[pyclass] - introspect complex enums built by
#[pyclass] - introspect exceptions built by
create_exception! - introspect class inheritance (
#[pyclass(extends=)]) Introspection: Basic pyclass(extends) support #5331 -
@typing.finaldecorator on class that cannot be subclasses (without#[pyclass(subclass)]) Introspection: add typing.final on final classes #5552 - introspect auto-generated magic methods (
#[pyclass(eq, eq_int, ord, hash, str)]) Generate introspection for #[pyclass(eq, eq_int, ord, hash, str)] #5338 - introspect fields getter and setter (
#[pyo3(get, set)],#[pyclass(get_all, set_all)]) Introspection: support#[pyo3(get, set)]and#[pyclass(get_all, set_all)]#5370 - implement return type annotation Introspection: implement output type #5208
- fill
PYTHON_TYPEconstant on all implementations of the relevant traits (FromPyObjectandIntoPyObject) Introspection: simplify code by leveraging that building type hint for containers now work #5634 Introspection: Declare INPUT_TYPE and OUTPUT_TYPE nearly everywhere #5637 Introspection: Set INPUT_TYPE and OUTPUT_TYPE on Vec<_> and &[] #5639 Introspection: properly set OUTPUT_TYPE on IntoPyObject implementations for Bound, Borrow and Py and add a PyTypeCheck bound to them #5640 - fill
INPUT_TYPEin#[derive(FromPyObject)]Basic introspection of #[derive(FromPyObject)] #5339 - fill
OUTPUT_TYPEin#[derive(IntoPyObject)]Basic introspection of #[derive(IntoPyObject)] #5365 - figure out how to emit
#[classattr]in the stubs - support cross-modules types (class defined in module A and used in module B as an input/output type)
- add doc strings to the generated stubs
- proper test coverage
- proper formatting of stubs (not a blocker)
- integration into
maturin - proper type stubs for containers (
list[T]instead oflist). Introspection: Set INPUT_TYPE and OUTPUT_TYPE on Vec<_> and &[] #5639 - allow to set custom type annotations (both inputs and output) Introspection: allows to override annotations in signature #5241
- allow to set custom stubs for eg. protocols
- add
_typeshed.Incompleteto relevant places (modules with a#[pymodule_init]function...) (doc) Introspection: properly tag modules as incomplete when needed #5207 - choose between
_typeshed.Incompleteandtyping.Anyin type annotations - make sure to properly gate introspection element with
cfgmacros - provide a way to set
@overloads - Support WASM files in
pyo3-introspection - Allow custom type annotations without strings (example:
#[pyo3(signature = (arg: list[int]) -> list[int])]) - Add version information to the generated JSON blobs
- Figure out if the function used to tag incomplete modules should be generated by pyo3-macros instead
- Make sure we don't try to import
Nonefrombuiltins, it does not work
davidhewitt, clouds56, chingiztob, vigith, Fogapod and 24 more
Metadata
Metadata
Assignees
Labels
No labels