Full Code of PyO3/pyo3 for AI

main baca1031feed cached
766 files
4.6 MB
1.2M tokens
8440 symbols
1 requests
Download .txt
Showing preview only (4,909K chars total). Download the full file or copy to clipboard to get everything.
Repository: PyO3/pyo3
Branch: main
Commit: baca1031feed
Files: 766
Total size: 4.6 MB

Directory structure:
gitextract_jnohosl3/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.md
│   ├── actions/
│   │   └── fetch-merge-base/
│   │       └── action.yml
│   ├── dependabot.yml
│   ├── pull_request_template.md
│   └── workflows/
│       ├── benches.yml
│       ├── build.yml
│       ├── cache-cleanup.yml
│       ├── changelog.yml
│       ├── ci-cache-warmup.yml
│       ├── ci.yml
│       ├── coverage-pr-base.yml
│       ├── netlify-build.yml
│       ├── netlify-deploy.yml
│       └── release.yml
├── .gitignore
├── .netlify/
│   ├── internal_banner.html
│   └── redirect.sh
├── .towncrier.template.md
├── Architecture.md
├── CHANGELOG.md
├── CITATION.cff
├── Cargo.toml
├── Code-of-Conduct.md
├── Contributing.md
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── Releasing.md
├── assets/
│   └── script.py
├── build.rs
├── codecov.yml
├── emscripten/
│   ├── .gitignore
│   ├── Makefile
│   └── runner.py
├── examples/
│   ├── Cargo.toml
│   ├── README.md
│   ├── decorator/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── pyproject.toml
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── src/
│   │   │   └── lib.rs
│   │   └── tests/
│   │       ├── example.py
│   │       └── test_.py
│   ├── getitem/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── pyproject.toml
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── src/
│   │   │   └── lib.rs
│   │   └── tests/
│   │       └── test_getitem.py
│   ├── maturin-starter/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── pyproject.toml
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── maturin_starter/
│   │   │   └── __init__.py
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── src/
│   │   │   ├── lib.rs
│   │   │   └── submodule.rs
│   │   └── tests/
│   │       ├── test_maturin_starter.py
│   │       └── test_submodule.py
│   ├── plugin/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── plugin_api/
│   │   │   │   └── Cargo.toml
│   │   │   └── pre-script.rhai
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── plugin_api/
│   │   │   ├── Cargo.toml
│   │   │   ├── noxfile.py
│   │   │   ├── pyproject.toml
│   │   │   ├── src/
│   │   │   │   └── lib.rs
│   │   │   └── tests/
│   │   │       ├── test_Gadget.py
│   │   │       └── test_import.py
│   │   ├── python_plugin/
│   │   │   ├── gadget_init_plugin.py
│   │   │   └── rng.py
│   │   └── src/
│   │       └── main.rs
│   ├── setuptools-rust-starter/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── setup.cfg
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── requirements-dev.txt
│   │   ├── setuptools_rust_starter/
│   │   │   └── __init__.py
│   │   ├── src/
│   │   │   ├── lib.rs
│   │   │   └── submodule.rs
│   │   └── tests/
│   │       ├── test_setuptools_rust_starter.py
│   │       └── test_submodule.py
│   └── word-count/
│       ├── .template/
│       │   ├── Cargo.toml
│       │   ├── pre-script.rhai
│       │   └── pyproject.toml
│       ├── Cargo.toml
│       ├── MANIFEST.in
│       ├── README.md
│       ├── cargo-generate.toml
│       ├── noxfile.py
│       ├── pyproject.toml
│       ├── src/
│       │   └── lib.rs
│       ├── tests/
│       │   └── test_word_count.py
│       └── word_count/
│           └── __init__.py
├── guide/
│   ├── book.toml
│   ├── pyclass-parameters.md
│   ├── pyo3_version.py
│   ├── src/
│   │   ├── SUMMARY.md
│   │   ├── advanced.md
│   │   ├── async-await.md
│   │   ├── building-and-distribution/
│   │   │   └── multiple-python-versions.md
│   │   ├── building-and-distribution.md
│   │   ├── changelog.md
│   │   ├── class/
│   │   │   ├── call.md
│   │   │   ├── numeric.md
│   │   │   ├── object.md
│   │   │   ├── protocols.md
│   │   │   └── thread-safety.md
│   │   ├── class.md
│   │   ├── contributing.md
│   │   ├── conversions/
│   │   │   ├── tables.md
│   │   │   └── traits.md
│   │   ├── conversions.md
│   │   ├── debugging.md
│   │   ├── ecosystem/
│   │   │   ├── async-await.md
│   │   │   ├── logging.md
│   │   │   └── tracing.md
│   │   ├── ecosystem.md
│   │   ├── exception.md
│   │   ├── faq.md
│   │   ├── features.md
│   │   ├── free-threading.md
│   │   ├── function/
│   │   │   ├── error-handling.md
│   │   │   └── signature.md
│   │   ├── function-calls.md
│   │   ├── function.md
│   │   ├── getting-started.md
│   │   ├── index.md
│   │   ├── migration.md
│   │   ├── module.md
│   │   ├── parallelism.md
│   │   ├── performance.md
│   │   ├── python-from-rust/
│   │   │   ├── calling-existing-code.md
│   │   │   └── function-calls.md
│   │   ├── python-from-rust.md
│   │   ├── python-typing-hints.md
│   │   ├── rust-from-python.md
│   │   ├── trait-bounds.md
│   │   ├── type-stub.md
│   │   └── types.md
│   └── theme/
│       ├── tabs.css
│       └── tabs.js
├── newsfragments/
│   ├── .gitignore
│   ├── 5349.added.md
│   ├── 5349.changed.md
│   ├── 5668.added.md
│   ├── 5668.fixed.md
│   ├── 5668.removed.md
│   ├── 5753.changed.md
│   ├── 5770.added.md
│   ├── 5782.added.md
│   ├── 5797.changed.md
│   ├── 5803.changed.md
│   ├── 5809.packaging.md
│   ├── 5824.changed.md
│   ├── 5828.added.md
│   ├── 5830.changed.md
│   ├── 5837.fixed.md
│   ├── 5839.changed.md
│   ├── 5841.changed.md
│   ├── 5847.fixed.md
│   ├── 5849.added.md
│   ├── 5857.added.md
│   ├── 5865.packaging.md
│   ├── 5866.changed.md
│   ├── 5883.changed.md
│   ├── 5887.added.md
│   ├── 5891.added.md
│   ├── 5893.removed.md
│   ├── 5896.changed.md
│   └── 5897.changed.md
├── noxfile.py
├── pyo3-benches/
│   ├── Cargo.toml
│   ├── benches/
│   │   ├── bench_any.rs
│   │   ├── bench_attach.rs
│   │   ├── bench_bigint.rs
│   │   ├── bench_call.rs
│   │   ├── bench_comparisons.rs
│   │   ├── bench_critical_sections.rs
│   │   ├── bench_decimal.rs
│   │   ├── bench_dict.rs
│   │   ├── bench_err.rs
│   │   ├── bench_extract.rs
│   │   ├── bench_frompyobject.rs
│   │   ├── bench_intern.rs
│   │   ├── bench_intopyobject.rs
│   │   ├── bench_list.rs
│   │   ├── bench_py.rs
│   │   ├── bench_pyclass.rs
│   │   ├── bench_pystring_from_fmt.rs
│   │   ├── bench_set.rs
│   │   └── bench_tuple.rs
│   └── build.rs
├── pyo3-build-config/
│   ├── Cargo.toml
│   ├── build.rs
│   └── src/
│       ├── errors.rs
│       ├── impl_.rs
│       └── lib.rs
├── pyo3-ffi/
│   ├── ACKNOWLEDGEMENTS
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   ├── examples/
│   │   ├── README.md
│   │   ├── sequential/
│   │   │   ├── .template/
│   │   │   │   ├── Cargo.toml
│   │   │   │   ├── pre-script.rhai
│   │   │   │   └── pyproject.toml
│   │   │   ├── Cargo.toml
│   │   │   ├── MANIFEST.in
│   │   │   ├── README.md
│   │   │   ├── build.rs
│   │   │   ├── cargo-generate.toml
│   │   │   ├── noxfile.py
│   │   │   ├── pyproject.toml
│   │   │   ├── src/
│   │   │   │   ├── id.rs
│   │   │   │   ├── lib.rs
│   │   │   │   └── module.rs
│   │   │   └── tests/
│   │   │       ├── test.rs
│   │   │       └── test_.py
│   │   └── string-sum/
│   │       ├── .template/
│   │       │   ├── Cargo.toml
│   │       │   ├── pre-script.rhai
│   │       │   └── pyproject.toml
│   │       ├── Cargo.toml
│   │       ├── MANIFEST.in
│   │       ├── README.md
│   │       ├── build.rs
│   │       ├── cargo-generate.toml
│   │       ├── noxfile.py
│   │       ├── pyproject.toml
│   │       ├── src/
│   │       │   └── lib.rs
│   │       └── tests/
│   │           └── test_.py
│   └── src/
│       ├── abstract_.rs
│       ├── bltinmodule.rs
│       ├── boolobject.rs
│       ├── bytearrayobject.rs
│       ├── bytesobject.rs
│       ├── ceval.rs
│       ├── codecs.rs
│       ├── compat/
│       │   ├── mod.rs
│       │   ├── py_3_10.rs
│       │   ├── py_3_13.rs
│       │   ├── py_3_14.rs
│       │   ├── py_3_15.rs
│       │   └── py_3_9.rs
│       ├── compile.rs
│       ├── complexobject.rs
│       ├── context.rs
│       ├── cpython/
│       │   ├── abstract_.rs
│       │   ├── bytesobject.rs
│       │   ├── ceval.rs
│       │   ├── code.rs
│       │   ├── compile.rs
│       │   ├── complexobject.rs
│       │   ├── critical_section.rs
│       │   ├── descrobject.rs
│       │   ├── dictobject.rs
│       │   ├── floatobject.rs
│       │   ├── frameobject.rs
│       │   ├── funcobject.rs
│       │   ├── genobject.rs
│       │   ├── import.rs
│       │   ├── initconfig.rs
│       │   ├── listobject.rs
│       │   ├── lock.rs
│       │   ├── longobject.rs
│       │   ├── methodobject.rs
│       │   ├── mod.rs
│       │   ├── object.rs
│       │   ├── objimpl.rs
│       │   ├── pydebug.rs
│       │   ├── pyerrors.rs
│       │   ├── pyframe.rs
│       │   ├── pyhash.rs
│       │   ├── pylifecycle.rs
│       │   ├── pymem.rs
│       │   ├── pystate.rs
│       │   ├── pythonrun.rs
│       │   ├── tupleobject.rs
│       │   ├── unicodeobject.rs
│       │   └── weakrefobject.rs
│       ├── datetime.rs
│       ├── descrobject.rs
│       ├── dictobject.rs
│       ├── enumobject.rs
│       ├── fileobject.rs
│       ├── fileutils.rs
│       ├── floatobject.rs
│       ├── genericaliasobject.rs
│       ├── impl_/
│       │   ├── macros.rs
│       │   └── mod.rs
│       ├── import.rs
│       ├── intrcheck.rs
│       ├── iterobject.rs
│       ├── lib.rs
│       ├── listobject.rs
│       ├── longobject.rs
│       ├── marshal.rs
│       ├── memoryobject.rs
│       ├── methodobject.rs
│       ├── modsupport.rs
│       ├── moduleobject.rs
│       ├── object.rs
│       ├── objimpl.rs
│       ├── osmodule.rs
│       ├── pyarena.rs
│       ├── pybuffer.rs
│       ├── pycapsule.rs
│       ├── pyerrors.rs
│       ├── pyframe.rs
│       ├── pyhash.rs
│       ├── pylifecycle.rs
│       ├── pymem.rs
│       ├── pyport.rs
│       ├── pystate.rs
│       ├── pystrtod.rs
│       ├── pythonrun.rs
│       ├── pytypedefs.rs
│       ├── rangeobject.rs
│       ├── refcount.rs
│       ├── setobject.rs
│       ├── sliceobject.rs
│       ├── structmember.rs
│       ├── structseq.rs
│       ├── sysmodule.rs
│       ├── traceback.rs
│       ├── tupleobject.rs
│       ├── typeslots.rs
│       ├── unicodeobject.rs
│       ├── warnings.rs
│       └── weakrefobject.rs
├── pyo3-ffi-check/
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   ├── macro/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── src/
│   │   └── main.rs
│   └── wrapper.h
├── pyo3-introspection/
│   ├── Cargo.toml
│   ├── src/
│   │   ├── introspection.rs
│   │   ├── lib.rs
│   │   ├── model.rs
│   │   └── stubs.rs
│   └── tests/
│       └── test.rs
├── pyo3-macros/
│   ├── Cargo.toml
│   └── src/
│       └── lib.rs
├── pyo3-macros-backend/
│   ├── Cargo.toml
│   └── src/
│       ├── attributes.rs
│       ├── combine_errors.rs
│       ├── derive_attributes.rs
│       ├── frompyobject.rs
│       ├── intopyobject.rs
│       ├── introspection.rs
│       ├── konst.rs
│       ├── lib.rs
│       ├── method.rs
│       ├── module.rs
│       ├── params.rs
│       ├── py_expr.rs
│       ├── pyclass.rs
│       ├── pyfunction/
│       │   └── signature.rs
│       ├── pyfunction.rs
│       ├── pyimpl.rs
│       ├── pymethod.rs
│       ├── quotes.rs
│       └── utils.rs
├── pyo3-runtime/
│   ├── README.md
│   ├── pyproject.toml
│   ├── src/
│   │   └── pyo3_runtime/
│   │       └── __init__.py
│   └── tests/
│       └── __init__.py
├── pyproject.toml
├── pytests/
│   ├── Cargo.toml
│   ├── MANIFEST.in
│   ├── MODULE_DOC.md
│   ├── README.md
│   ├── build.rs
│   ├── conftest.py
│   ├── noxfile.py
│   ├── pyproject.toml
│   ├── src/
│   │   ├── awaitable.rs
│   │   ├── buf_and_str.rs
│   │   ├── comparisons.rs
│   │   ├── consts.rs
│   │   ├── datetime.rs
│   │   ├── dict_iter.rs
│   │   ├── enums.rs
│   │   ├── exception.rs
│   │   ├── lib.rs
│   │   ├── misc.rs
│   │   ├── objstore.rs
│   │   ├── othermod.rs
│   │   ├── path.rs
│   │   ├── pyclasses.rs
│   │   ├── pyfunctions.rs
│   │   ├── sequence.rs
│   │   └── subclassing.rs
│   ├── stubs/
│   │   ├── __init__.pyi
│   │   ├── awaitable.pyi
│   │   ├── buf_and_str.pyi
│   │   ├── comparisons.pyi
│   │   ├── consts.pyi
│   │   ├── datetime.pyi
│   │   ├── dict_iter.pyi
│   │   ├── enums.pyi
│   │   ├── exception.pyi
│   │   ├── misc.pyi
│   │   ├── objstore.pyi
│   │   ├── othermod.pyi
│   │   ├── path.pyi
│   │   ├── pyclasses.pyi
│   │   ├── pyfunctions.pyi
│   │   ├── sequence.pyi
│   │   └── subclassing.pyi
│   └── tests/
│       ├── test_awaitable.py
│       ├── test_buf_and_str.py
│       ├── test_comparisons.py
│       ├── test_datetime.py
│       ├── test_dict_iter.py
│       ├── test_enums.py
│       ├── test_enums_match.py
│       ├── test_hammer_attaching_in_thread.py
│       ├── test_misc.py
│       ├── test_objstore.py
│       ├── test_othermod.py
│       ├── test_path.py
│       ├── test_pyclasses.py
│       ├── test_pyfunctions.py
│       ├── test_sequence.py
│       └── test_subclassing.py
├── src/
│   ├── buffer.rs
│   ├── byteswriter.rs
│   ├── call.rs
│   ├── conversion.rs
│   ├── conversions/
│   │   ├── anyhow.rs
│   │   ├── bigdecimal.rs
│   │   ├── bytes.rs
│   │   ├── chrono.rs
│   │   ├── chrono_tz.rs
│   │   ├── either.rs
│   │   ├── eyre.rs
│   │   ├── hashbrown.rs
│   │   ├── indexmap.rs
│   │   ├── jiff.rs
│   │   ├── mod.rs
│   │   ├── num_bigint.rs
│   │   ├── num_complex.rs
│   │   ├── num_rational.rs
│   │   ├── ordered_float.rs
│   │   ├── rust_decimal.rs
│   │   ├── serde.rs
│   │   ├── smallvec.rs
│   │   ├── std/
│   │   │   ├── array.rs
│   │   │   ├── cell.rs
│   │   │   ├── cstring.rs
│   │   │   ├── ipaddr.rs
│   │   │   ├── map.rs
│   │   │   ├── mod.rs
│   │   │   ├── num.rs
│   │   │   ├── option.rs
│   │   │   ├── osstr.rs
│   │   │   ├── path.rs
│   │   │   ├── set.rs
│   │   │   ├── slice.rs
│   │   │   ├── string.rs
│   │   │   ├── time.rs
│   │   │   └── vec.rs
│   │   ├── time.rs
│   │   └── uuid.rs
│   ├── coroutine/
│   │   ├── cancel.rs
│   │   └── waker.rs
│   ├── coroutine.rs
│   ├── err/
│   │   ├── cast_error.rs
│   │   ├── downcast_error.rs
│   │   ├── err_state.rs
│   │   ├── impls.rs
│   │   └── mod.rs
│   ├── exceptions.rs
│   ├── ffi/
│   │   ├── mod.rs
│   │   └── tests.rs
│   ├── ffi_ptr_ext.rs
│   ├── fmt.rs
│   ├── impl_/
│   │   ├── callback.rs
│   │   ├── concat.rs
│   │   ├── coroutine.rs
│   │   ├── deprecated.rs
│   │   ├── exceptions.rs
│   │   ├── extract_argument.rs
│   │   ├── freelist.rs
│   │   ├── frompyobject.rs
│   │   ├── introspection.rs
│   │   ├── panic.rs
│   │   ├── pycell.rs
│   │   ├── pyclass/
│   │   │   ├── assertions.rs
│   │   │   ├── doc.rs
│   │   │   ├── lazy_type_object.rs
│   │   │   └── probes.rs
│   │   ├── pyclass.rs
│   │   ├── pyclass_init.rs
│   │   ├── pyfunction.rs
│   │   ├── pymethods.rs
│   │   ├── pymodule.rs
│   │   ├── trampoline.rs
│   │   ├── unindent.rs
│   │   └── wrap.rs
│   ├── impl_.rs
│   ├── inspect.rs
│   ├── instance.rs
│   ├── internal/
│   │   ├── get_slot.rs
│   │   └── state.rs
│   ├── internal.rs
│   ├── internal_tricks.rs
│   ├── interpreter_lifecycle.rs
│   ├── lib.rs
│   ├── macros.rs
│   ├── marker.rs
│   ├── marshal.rs
│   ├── panic.rs
│   ├── prelude.rs
│   ├── py_result_ext.rs
│   ├── pybacked.rs
│   ├── pycell/
│   │   └── impl_.rs
│   ├── pycell.rs
│   ├── pyclass/
│   │   ├── create_type_object.rs
│   │   ├── gc.rs
│   │   └── guard.rs
│   ├── pyclass.rs
│   ├── pyclass_init.rs
│   ├── sealed.rs
│   ├── sync/
│   │   ├── critical_section.rs
│   │   └── once_lock.rs
│   ├── sync.rs
│   ├── test_utils.rs
│   ├── tests/
│   │   ├── hygiene/
│   │   │   ├── misc.rs
│   │   │   ├── mod.rs
│   │   │   ├── pyclass.rs
│   │   │   ├── pyfunction.rs
│   │   │   ├── pymethods.rs
│   │   │   └── pymodule.rs
│   │   └── mod.rs
│   ├── type_object.rs
│   ├── types/
│   │   ├── any.rs
│   │   ├── boolobject.rs
│   │   ├── bytearray.rs
│   │   ├── bytes.rs
│   │   ├── capsule.rs
│   │   ├── code.rs
│   │   ├── complex.rs
│   │   ├── datetime.rs
│   │   ├── dict.rs
│   │   ├── ellipsis.rs
│   │   ├── float.rs
│   │   ├── frame.rs
│   │   ├── frozenset.rs
│   │   ├── function.rs
│   │   ├── genericalias.rs
│   │   ├── iterator.rs
│   │   ├── list.rs
│   │   ├── mapping.rs
│   │   ├── mappingproxy.rs
│   │   ├── memoryview.rs
│   │   ├── mod.rs
│   │   ├── module.rs
│   │   ├── mutex.rs
│   │   ├── none.rs
│   │   ├── notimplemented.rs
│   │   ├── num.rs
│   │   ├── pysuper.rs
│   │   ├── range.rs
│   │   ├── sequence.rs
│   │   ├── set.rs
│   │   ├── slice.rs
│   │   ├── string.rs
│   │   ├── traceback.rs
│   │   ├── tuple.rs
│   │   ├── typeobject.rs
│   │   └── weakref/
│   │       ├── anyref.rs
│   │       ├── mod.rs
│   │       ├── proxy.rs
│   │       └── reference.rs
│   └── version.rs
└── tests/
    ├── test_anyhow.rs
    ├── test_append_to_inittab.rs
    ├── test_arithmetics.rs
    ├── test_buffer.rs
    ├── test_buffer_protocol.rs
    ├── test_bytes.rs
    ├── test_class_attributes.rs
    ├── test_class_basics.rs
    ├── test_class_comparisons.rs
    ├── test_class_conversion.rs
    ├── test_class_formatting.rs
    ├── test_class_init.rs
    ├── test_class_new.rs
    ├── test_compile_error.rs
    ├── test_coroutine.rs
    ├── test_datetime.rs
    ├── test_datetime_import.rs
    ├── test_declarative_module.rs
    ├── test_default_impls.rs
    ├── test_enum.rs
    ├── test_exceptions.rs
    ├── test_field_cfg.rs
    ├── test_frompy_intopy_roundtrip.rs
    ├── test_frompyobject.rs
    ├── test_gc.rs
    ├── test_getter_setter.rs
    ├── test_inheritance.rs
    ├── test_intopyobject.rs
    ├── test_macro_docs.rs
    ├── test_macros.rs
    ├── test_mapping.rs
    ├── test_methods.rs
    ├── test_module.rs
    ├── test_multiple_pymethods.rs
    ├── test_proto_methods.rs
    ├── test_pybuffer_drop_without_interpreter.rs
    ├── test_pyerr_debug_unformattable.rs
    ├── test_pyfunction.rs
    ├── test_pyself.rs
    ├── test_sequence.rs
    ├── test_serde.rs
    ├── test_static_slots.rs
    ├── test_string.rs
    ├── test_super.rs
    ├── test_text_signature.rs
    ├── test_utils/
    │   └── mod.rs
    ├── test_variable_arguments.rs
    ├── test_various.rs
    └── ui/
        ├── abi3_dict.rs
        ├── abi3_dict.stderr
        ├── abi3_inheritance.rs
        ├── abi3_inheritance.stderr
        ├── abi3_nativetype_inheritance.rs
        ├── abi3_nativetype_inheritance.stderr
        ├── abi3_weakref.rs
        ├── abi3_weakref.stderr
        ├── ambiguous_associated_items.rs
        ├── deprecated_pyfn.rs
        ├── deprecated_pyfn.stderr
        ├── duplicate_pymodule_submodule.rs
        ├── duplicate_pymodule_submodule.stderr
        ├── empty.rs
        ├── forbid_unsafe.rs
        ├── get_set_all.rs
        ├── get_set_all.stderr
        ├── immutable_type.rs
        ├── immutable_type.stderr
        ├── invalid_annotation.rs
        ├── invalid_annotation.stderr
        ├── invalid_annotation_return.rs
        ├── invalid_annotation_return.stderr
        ├── invalid_argument_attributes.rs
        ├── invalid_argument_attributes.stderr
        ├── invalid_async.rs
        ├── invalid_async.stderr
        ├── invalid_base_class.rs
        ├── invalid_base_class.stderr
        ├── invalid_cancel_handle.rs
        ├── invalid_cancel_handle.stderr
        ├── invalid_closure.rs
        ├── invalid_closure.stderr
        ├── invalid_frompy_derive.rs
        ├── invalid_frompy_derive.stderr
        ├── invalid_frozen_pyclass_borrow.rs
        ├── invalid_frozen_pyclass_borrow.stderr
        ├── invalid_intern_arg.rs
        ├── invalid_intern_arg.stderr
        ├── invalid_intopy_derive.rs
        ├── invalid_intopy_derive.stderr
        ├── invalid_intopy_with.rs
        ├── invalid_intopy_with.stderr
        ├── invalid_property_args.rs
        ├── invalid_property_args.stderr
        ├── invalid_proto_pymethods.rs
        ├── invalid_proto_pymethods.stderr
        ├── invalid_pycallargs.rs
        ├── invalid_pycallargs.stderr
        ├── invalid_pyclass_args.rs
        ├── invalid_pyclass_args.stderr
        ├── invalid_pyclass_doc.rs
        ├── invalid_pyclass_doc.stderr
        ├── invalid_pyclass_enum.rs
        ├── invalid_pyclass_enum.stderr
        ├── invalid_pyclass_generic.rs
        ├── invalid_pyclass_generic.stderr
        ├── invalid_pyclass_init.rs
        ├── invalid_pyclass_init.stderr
        ├── invalid_pyclass_item.rs
        ├── invalid_pyclass_item.stderr
        ├── invalid_pyfunction_argument.rs
        ├── invalid_pyfunction_argument.stderr
        ├── invalid_pyfunction_definition.rs
        ├── invalid_pyfunction_definition.stderr
        ├── invalid_pyfunction_signatures.rs
        ├── invalid_pyfunction_signatures.stderr
        ├── invalid_pyfunction_warn.rs
        ├── invalid_pyfunction_warn.stderr
        ├── invalid_pyfunctions.rs
        ├── invalid_pyfunctions.stderr
        ├── invalid_pymethod_enum.rs
        ├── invalid_pymethod_enum.stderr
        ├── invalid_pymethod_names.rs
        ├── invalid_pymethod_names.stderr
        ├── invalid_pymethod_receiver.rs
        ├── invalid_pymethod_receiver.stderr
        ├── invalid_pymethods.rs
        ├── invalid_pymethods.stderr
        ├── invalid_pymethods_buffer.rs
        ├── invalid_pymethods_buffer.stderr
        ├── invalid_pymethods_duplicates.rs
        ├── invalid_pymethods_duplicates.stderr
        ├── invalid_pymethods_warn.rs
        ├── invalid_pymethods_warn.stderr
        ├── invalid_pymodule_args.rs
        ├── invalid_pymodule_args.stderr
        ├── invalid_pymodule_glob.rs
        ├── invalid_pymodule_glob.stderr
        ├── invalid_pymodule_in_root.rs
        ├── invalid_pymodule_in_root.stderr
        ├── invalid_pymodule_trait.rs
        ├── invalid_pymodule_trait.stderr
        ├── invalid_pymodule_two_pymodule_init.rs
        ├── invalid_pymodule_two_pymodule_init.stderr
        ├── invalid_result_conversion.rs
        ├── invalid_result_conversion.stderr
        ├── missing_intopy.rs
        ├── missing_intopy.stderr
        ├── not_send.rs
        ├── not_send.stderr
        ├── not_send2.rs
        ├── not_send2.stderr
        ├── pyclass_generic_enum.rs
        ├── pyclass_generic_enum.stderr
        ├── pyclass_probe.rs
        ├── pyclass_send.rs
        ├── pyclass_send.stderr
        ├── pymodule_missing_docs.rs
        ├── reject_generics.rs
        ├── reject_generics.stderr
        ├── static_ref.rs
        ├── static_ref.stderr
        ├── traverse.rs
        ├── traverse.stderr
        ├── wrong_aspyref_lifetimes.rs
        └── wrong_aspyref_lifetimes.stderr

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: 🐛 Bug Report
description: Create a bug report
type: Bug
body:
  - type: markdown
    attributes:
      value: |
        Thank you for taking the time to fill out this bug report!
        Please fill out the form below...
  - type: textarea
    id: description
    attributes:
      label: Bug Description
      description: Please provide a clear and concise description of what the bug is.
      placeholder: The bug is...
    validations:
      required: true
  - type: textarea
    id: reproduce
    attributes:
      label: Steps to Reproduce
      description: Provide steps to reproduce this bug.
      placeholder: |
        1.
        2.
        3.
    validations:
      required: true
  - type: textarea
    id: debug
    attributes:
      label: Backtrace
      description: If your bug produces a backtrace, please include it here.
      render: shell

  - type: input
    id: os_version
    attributes:
      label: Your operating system and version
    validations:
      required: true
  - type: input
    id: py_version
    attributes:
      label: Your Python version (`python --version`)
      placeholder: ex. Python 3.10.0
    validations:
      required: true
  - type: input
    id: rust_version
    attributes:
      label: Your Rust version (`rustc --version`)
      placeholder: ex. rustc 1.55.0 (c8dfcfe04 2021-09-06)
    validations:
      required: true
  - type: input
    id: pyo3_version
    attributes:
      label: Your PyO3 version
      placeholder: ex. 0.14.0
    validations:
      required: true
  - type: textarea
    id: install_method
    attributes:
      label: How did you install python? Did you use a virtualenv?
      placeholder: |
        apt
        pyenv
        pacman
        brew
        python.org installer
        microsoft store
        etc...
    validations:
      required: true
  - type: textarea
    id: additional-info
    attributes:
      label: Additional Info
      description: Any additional info that you think might be useful or relevant to this bug


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
  - name: ❓ Question
    url: https://github.com/PyO3/pyo3/discussions
    about: Ask and answer questions about PyO3 on Discussions
  - name: 🔧 Troubleshooting
    url: https://github.com/PyO3/pyo3/discussions
    about: For troubleshooting help, see the Discussions
  - name: 👋 Chat
    url: https://discord.gg/33kcChzH7f
    about: Engage with PyO3's users and developers on Discord


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: 💡 Feature request
about: Suggest an idea for this project
type: Feature
---

<!--
Thank you for sharing your idea!

Please describe your idea in depth. If you're not sure what to write, imagine the following:
  - How is this important to you? How would you use it?
  - Can you think of any alternatives?
  - Do you have any ideas about how it can be implemented? Are you willing/able to implement it? Do you need mentoring?
-->


================================================
FILE: .github/actions/fetch-merge-base/action.yml
================================================
name: 'Fetch Merge Base'
description: 'Fetches the merge base between two branches, deepening the git checkout until complete'
inputs:
  base_ref:
    description: 'The base branch reference'
    required: true
  head_ref:
    description: 'The head branch reference'
    required: true
outputs:
  merge_base:
    description: 'The merge base commit SHA'
    value: ${{ steps.fetch_merge_base.outputs.merge_base }}
runs:
  using: "composite"
  steps:
  - name: Fetch Merge Base
    id: fetch_merge_base
    shell: bash
    run: |
      # fetch the merge commit between the PR base and head
      git fetch -u --progress --depth=1 origin "+$BASE_REF:$BASE_REF" "+$HEAD_REF:$HEAD_REF"
      while [ -z "$(git merge-base "$BASE_REF" "$HEAD_REF")" ]; do
        git fetch -u -q --deepen="10" origin "$BASE_REF" "$HEAD_REF";
      done

      MERGE_BASE=$(git merge-base "$BASE_REF" "$HEAD_REF")
      echo "merge_base=$MERGE_BASE" >> $GITHUB_OUTPUT
    env:
      BASE_REF: "${{ inputs.base_ref }}"
      HEAD_REF: "${{ inputs.head_ref }}"


================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "cargo"
    directory: "/"
    schedule:
      interval: "weekly"

  - package-ecosystem: "cargo"
    directory: "/pyo3-benches/"
    schedule:
      interval: "weekly"

  - package-ecosystem: "cargo"
    directory: "/pyo3-ffi-check/"
    schedule:
      interval: "weekly"

  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
    labels:
      # dependabot default labels
      - "dependencies"
      - "github-actions"
      # additional labels
      - "CI-skip-changelog"


================================================
FILE: .github/pull_request_template.md
================================================
Thank you for contributing to PyO3!

By submitting these contributions you agree for them to be dual-licensed under PyO3's [MIT OR Apache-2.0 license](https://github.com/PyO3/pyo3#license).

Please consider adding the following to your pull request:
 - an entry for this PR in newsfragments - see [https://pyo3.rs/main/contributing.html#documenting-changes]
   - or start the PR title with `docs:` if this is a docs-only change to skip the check
   - or start the PR title with `ci:` if this is a ci-only change to skip the check
 - docs to all new functions and / or detail in the guide
 - tests for all new or changed functions

PyO3's CI pipeline will check your pull request, thus make sure you have checked the `Contributing.md` guidelines. To run most of its tests locally, you can run `nox`. See `nox --list-sessions` for a list of supported actions.


================================================
FILE: .github/workflows/benches.yml
================================================
name: benches

on:
  push:
    branches:
      - "main"
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}-benches
  cancel-in-progress: true

env:
  UV_PYTHON: "3.14t"

jobs:
  benchmarks:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: astral-sh/setup-uv@v7
        with:
          # codspeed action needs to be run from within the final Python environment
          activate-environment: true
          save-cache: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rust-src

      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            .
            pyo3-benches
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
          cache-all-crates: "true"
          cache-workspace-crates: "true"

      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-codspeed

      - name: Run the benchmarks
        uses: CodSpeedHQ/action@v4
        with:
          run: uvx nox -s codspeed
          token: ${{ secrets.CODSPEED_TOKEN }}
          mode: simulation


================================================
FILE: .github/workflows/build.yml
================================================
on:
  workflow_call:
    inputs:
      os:
        required: true
        type: string
      python-version:
        required: true
        type: string
      python-architecture:
        required: true
        type: string
      rust:
        required: true
        type: string
      rust-target:
        required: true
        type: string
      MSRV:
        required: true
        type: string
      verbose:
        type: boolean
        default: false

env:
  NOX_DEFAULT_VENV_BACKEND: uv

jobs:
  build:
    continue-on-error: ${{ endsWith(inputs.python-version, '-dev') || contains(fromJSON('["3.7", "3.8"]'), inputs.python-version) || contains(fromJSON('["beta", "nightly"]'), inputs.rust) }}
    runs-on: ${{ inputs.os }}
    if: ${{ !(startsWith(inputs.python-version, 'graalpy') && startsWith(inputs.os, 'windows')) }}
    steps:
      - uses: actions/checkout@v6.0.2
        with:
          # For PRs, we need to run on the real PR head, not the resultant merge of the PR into the target branch.
          #
          # This is necessary for coverage reporting to make sense; we then get exactly the coverage change
          # between the base branch and the real PR head.
          #
          # If it were run on the merge commit the problem is that the coverage potentially does not align
          # with the commit diff, because the merge may affect line numbers.
          ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

      # installs using setup-python do not work for arm macOS 3.9 and below
      - if: ${{ !(inputs.os == 'macos-latest' && contains(fromJSON('["3.7", "3.8", "3.9"]'), inputs.python-version) && inputs.python-architecture == 'x64') }}
        name: Set up Python ${{ inputs.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ inputs.python-version }}
          architecture: ${{ inputs.python-architecture }}
          # PyPy can have FFI changes within Python versions, which creates pain in CI
          check-latest: ${{ startsWith(inputs.python-version, 'pypy') }}

      # workaround for the above, only available for 3.9
      - if: ${{ inputs.os == 'macos-latest' && contains(fromJSON('["3.9"]'), inputs.python-version) && inputs.python-architecture == 'x64' }}
        name: Set up Python ${{ inputs.python-version }}
        uses: astral-sh/setup-uv@v7
        with:
          python-version: cpython-${{ inputs.python-version }}-macos-x86-64
          save-cache: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}

      - name: Install nox
        run: python -m pip install --upgrade pip && pip install nox[uv]

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ inputs.rust }}
          targets: ${{ inputs.rust-target }}
          # rust-src needed to correctly format errors, see #1865
          components: rust-src,llvm-tools-preview

      # On windows 32 bit, we are running on an x64 host, so we need to specifically set the target
      # NB we don't do this for *all* jobs because it breaks coverage of proc macros to have an
      # explicit target set.
      - name: Set Rust target for Windows 32-bit
        if: inputs.os == 'windows-latest' && inputs.python-architecture == 'x86'
        shell: bash
        run: |
          echo "CARGO_BUILD_TARGET=i686-pc-windows-msvc" >> $GITHUB_ENV

      # windows on arm image contains x86-64 libclang
      - name: Install LLVM and Clang
        if: inputs.os == 'windows-11-arm'
        uses: KyleMayes/install-llvm-action@v2
        with:
          # to match windows-2022 images
          version: "18"

      - name: Install zoneinfo backport for Python 3.7 / 3.8
        if: contains(fromJSON('["3.7", "3.8"]'), inputs.python-version)
        run: python -m pip install backports.zoneinfo

      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}

      - if: inputs.os == 'ubuntu-latest'
        name: Prepare LD_LIBRARY_PATH (Ubuntu only)
        run: echo LD_LIBRARY_PATH=${pythonLocation}/lib >> $GITHUB_ENV

      - if: inputs.rust == inputs.MSRV
        name: Prepare MSRV package versions
        run: nox -s set-msrv-package-versions

      - if: inputs.rust != 'stable'
        name: Ignore changed error messages when using trybuild
        run: echo "TRYBUILD=overwrite" >> "$GITHUB_ENV"

      - uses: dorny/paths-filter@v4
        if: ${{ inputs.rust == 'stable' && !startsWith(inputs.python-version, 'graalpy') }}
        id: ffi-changes
        with:
          base: ${{ github.event.merge_group.base_ref }}
          ref: ${{ github.event.merge_group.head_ref }}
          filters: |
            changed:
              - 'pyo3-ffi/**'
              - 'pyo3-ffi-check/**'
              - '.github/workflows/ci.yml'
              - '.github/workflows/build.yml'

      - name: Run pyo3-ffi-check
        # TODO: investigate graalpy failures
        if: ${{ endsWith(inputs.python-version, '-dev') || (steps.ffi-changes.outputs.changed == 'true' && inputs.rust == 'stable' && !startsWith(inputs.python-version, 'graalpy')) }}
        run: nox -s ffi-check

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov

      - name: Prepare coverage environment
        run: |
          cargo llvm-cov clean --workspace --profraw-only
          nox -s set-coverage-env

      - name: Build docs
        run: nox -s docs

      - name: Run Rust tests
        run: nox -s test-rust

      - name: Test python examples and tests
        shell: bash
        run: nox -s test-py
        env:
          CARGO_TARGET_DIR: ${{ github.workspace }}/target

      - name: Generate coverage report
        # needs investigation why llvm-cov fails on windows-11-arm
        continue-on-error: ${{ inputs.os == 'windows-11-arm' }}
        run: cargo llvm-cov
          --package=pyo3
          --package=pyo3-build-config
          --package=pyo3-macros-backend
          --package=pyo3-macros
          --package=pyo3-ffi
          report --codecov --output-path coverage.json

      - name: Upload coverage report
        uses: codecov/codecov-action@v5
        # needs investigation why llvm-cov fails on windows-11-arm
        continue-on-error: ${{ inputs.os == 'windows-11-arm' }}
        with:
          files: coverage.json
          name: ${{ inputs.os }}/${{ inputs.python-version }}/${{ inputs.rust }}
          token: ${{ secrets.CODECOV_TOKEN }}

    env:
      CARGO_TERM_VERBOSE: ${{ inputs.verbose }}
      RUST_BACKTRACE: 1
      RUSTFLAGS: "-D warnings"
      RUSTDOCFLAGS: "-D warnings"


================================================
FILE: .github/workflows/cache-cleanup.yml
================================================
name: CI Cache Cleanup
on:
  pull_request_target:
    types:
      - closed

jobs:
  cleanup:
    runs-on: ubuntu-latest
    permissions:
      actions: write
    steps:
      - name: Cleanup
        run: |
          gh extension install actions/gh-actions-cache

          echo "Fetching list of cache key"
          cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )

          ## Setting this to not fail the workflow while deleting cache keys.
          set +e
          echo "Deleting caches..."
          for cacheKey in $cacheKeysForPR
          do
              gh actions-cache delete -R $REPO -B $BRANCH --confirm -- $cacheKey
          done
          echo "Done"
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          REPO: ${{ github.repository }}
          BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge


================================================
FILE: .github/workflows/changelog.yml
================================================
name: changelog

on:
  pull_request:
    types: [opened, synchronize, labeled, unlabeled, edited]

jobs:
  check:
    name: Check changelog entry
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: '3.14'
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - run: nox -s check-changelog


================================================
FILE: .github/workflows/ci-cache-warmup.yml
================================================
name: CI Cache Warmup

on:
  push:
    branches:
      - main

jobs:
  cross-compilation-windows:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: x86_64-pc-windows-gnu,x86_64-pc-windows-msvc
          components: rust-src
      - uses: actions/cache/restore@v5
        with:
          # https://github.com/PyO3/maturin/discussions/1953
          path: ~/.cache/cargo-xwin
          key: cargo-xwin-cache
      - name: Test cross compile to Windows
        run: |
          set -ex
          sudo apt-get install -y mingw-w64 llvm
          pip install nox
          nox -s test-cross-compilation-windows
      - uses: actions/cache/save@v5
        with:
          path: ~/.cache/cargo-xwin
          key: cargo-xwin-cache


================================================
FILE: .github/workflows/ci.yml
================================================
name: CI

on:
  pull_request:
  merge_group:
    types: [checks_requested]
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  fmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - name: Check python formatting and lints (ruff)
        run: nox -s ruff
      - name: Check rust formatting (rustfmt)
        run: nox -s rustfmt
      - name: Check markdown formatting (rumdl)
        run: nox -s rumdl

  resolve:
    runs-on: ubuntu-latest
    outputs:
      MSRV: ${{ steps.resolve-msrv.outputs.MSRV }}
      verbose: ${{ runner.debug == '1' }}
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - name: resolve MSRV
        id: resolve-msrv
        run: echo MSRV=`python -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["package"]["rust-version"])'` >> $GITHUB_OUTPUT

  semver-checks:
    if: github.event_name == 'pull_request'
    needs: [fmt]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - name: Fetch merge base
        id: fetch_merge_base
        uses: ./.github/actions/fetch-merge-base
        with:
          base_ref: "refs/heads/${{ github.event.pull_request.base.ref }}"
          head_ref: "refs/pull/${{ github.event.pull_request.number }}/merge"
      - uses: obi1kenobi/cargo-semver-checks-action@v2
        with:
          baseline-rev: ${{ steps.fetch_merge_base.outputs.merge_base }}

  check-msrv:
    needs: [fmt, resolve]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ needs.resolve.outputs.MSRV }}
          components: rust-src
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      # This is a smoke test to confirm that CI will run on MSRV (including dev dependencies)
      - name: Check with MSRV package versions
        run: |
          nox -s set-msrv-package-versions
          nox -s check-all

    env:
      CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu

  clippy:
    needs: [fmt]
    runs-on: ubuntu-24.04-arm
    strategy:
      # If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
      fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
      matrix:
        rust: [stable]
        target:
          [
            "aarch64-apple-darwin",
            "x86_64-unknown-linux-gnu",
            "aarch64-unknown-linux-gnu",
            "powerpc64le-unknown-linux-gnu",
            "s390x-unknown-linux-gnu",
            "wasm32-wasip1",
            "x86_64-pc-windows-msvc",
            "i686-pc-windows-msvc",
            "aarch64-pc-windows-msvc",
          ]
        include:
          # Run beta clippy as a way to detect any incoming lints which may affect downstream users
          - rust: beta
            target: "x86_64-unknown-linux-gnu"
    name: clippy/${{ matrix.target }}/${{ matrix.rust }}
    continue-on-error: ${{ matrix.rust != 'stable' }}
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          targets: ${{ matrix.target }}
          components: clippy,rust-src
      - uses: astral-sh/setup-uv@v7
        with:
          save-cache: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - run: uvx nox -s clippy-all
    env:
      CARGO_BUILD_TARGET: ${{ matrix.target }}

  build-pr:
    if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-build-full') && github.event_name == 'pull_request' }}
    name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} rust-${{ matrix.rust }}
    needs: [fmt, resolve]
    uses: ./.github/workflows/build.yml
    with:
      os: ${{ matrix.platform.os }}
      python-version: ${{ matrix.python-version }}
      python-architecture: ${{ matrix.platform.python-architecture }}
      rust: ${{ matrix.rust }}
      rust-target: ${{ matrix.platform.rust-target }}
      MSRV: ${{ needs.resolve.outputs.MSRV }}
      verbose: ${{ needs.resolve.outputs.verbose == 'true' }}
    secrets: inherit
    strategy:
      # If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
      fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
      matrix:
        rust: [stable]
        python-version: ["3.14"]
        platform:
          [
            {
              os: "macos-latest",
              python-architecture: "arm64",
              rust-target: "aarch64-apple-darwin",
            },
            {
              os: "ubuntu-latest",
              python-architecture: "x64",
              rust-target: "x86_64-unknown-linux-gnu",
            },
            {
              os: "ubuntu-24.04-arm",
              python-architecture: "arm64",
              rust-target: "aarch64-unknown-linux-gnu",
            },
            {
              os: "windows-latest",
              python-architecture: "x64",
              rust-target: "x86_64-pc-windows-msvc",
            },
            {
              os: "windows-latest",
              python-architecture: "x86",
              rust-target: "i686-pc-windows-msvc",
            },
            {
              os: "windows-11-arm",
              python-architecture: "arm64",
              rust-target: "aarch64-pc-windows-msvc",
            },
          ]
        include:
          # Test nightly Rust on PRs so that PR authors have a chance to fix nightly
          # failures, as nightly does not block merge.
          - rust: nightly
            python-version: "3.14"
            platform:
              {
                os: "ubuntu-latest",
                python-architecture: "x64",
                rust-target: "x86_64-unknown-linux-gnu",
              }
          # Also test free-threaded Python just for latest Python version, on ubuntu
          # (run for all OSes on build-full)
          - rust: stable
            python-version: "3.14t"
            platform:
              {
                os: "ubuntu-latest",
                python-architecture: "x64",
                rust-target: "x86_64-unknown-linux-gnu",
              }

  build-full:
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} rust-${{ matrix.rust }}
    needs: [fmt, resolve]
    uses: ./.github/workflows/build.yml
    with:
      os: ${{ matrix.platform.os }}
      python-version: ${{ matrix.python-version }}
      python-architecture: ${{ matrix.platform.python-architecture }}
      rust: ${{ matrix.rust }}
      rust-target: ${{ matrix.platform.rust-target }}
      MSRV: ${{ needs.resolve.outputs.MSRV }}
      verbose: ${{ needs.resolve.outputs.verbose == 'true' }}
    secrets: inherit
    strategy:
      # If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
      fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
      matrix:
        rust: [stable]
        python-version:
          [
            "3.7",
            "3.8",
            "3.9",
            "3.10",
            "3.11",
            "3.12",
            "3.13",
            "3.14",
            "3.14t",
            "3.15-dev",
            "3.15t-dev",
            "pypy3.11",
            "graalpy25.0",
          ]
        platform:
          [
            {
              os: "macos-latest",
              python-architecture: "arm64",
              rust-target: "aarch64-apple-darwin",
            },
            {
              os: "ubuntu-latest",
              python-architecture: "x64",
              rust-target: "x86_64-unknown-linux-gnu",
            },
            {
              os: "windows-latest",
              python-architecture: "x64",
              rust-target: "x86_64-pc-windows-msvc",
            },
          ]
        include:
          # Test minimal supported Rust version
          - rust: ${{ needs.resolve.outputs.MSRV }}
            python-version: "3.14"
            platform:
              {
                os: "ubuntu-latest",
                python-architecture: "x64",
                rust-target: "x86_64-unknown-linux-gnu",
              }

          # Test the `nightly` feature
          - rust: nightly
            python-version: "3.14"
            platform:
              {
                os: "ubuntu-latest",
                python-architecture: "x64",
                rust-target: "x86_64-unknown-linux-gnu",
              }

          # Run rust beta to help catch toolchain regressions
          - rust: beta
            python-version: "3.14"
            platform:
              {
                os: "ubuntu-latest",
                python-architecture: "x64",
                rust-target: "x86_64-unknown-linux-gnu",
              }

          # Test 32-bit Windows and x64 macOS only with the latest Python version
          - rust: stable
            python-version: "3.14"
            platform:
              {
                os: "windows-latest",
                python-architecture: "x86",
                rust-target: "i686-pc-windows-msvc",
              }
          - rust: stable
            python-version: "3.14"
            platform:
              {
                os: "macos-latest",
                python-architecture: "x64",
                rust-target: "x86_64-apple-darwin",
              }
          # ubuntu-latest (24.04) no longer supports 3.7, so run on 22.04
          - rust: stable
            python-version: "3.7"
            platform:
              {
                os: "ubuntu-22.04",
                python-architecture: "x64",
                rust-target: "x86_64-unknown-linux-gnu",
              }

          # arm64 macOS Python not available on GitHub Actions until 3.10, test older versions on x64
          - rust: stable
            python-version: "3.7"
            platform:
              {
                os: "macos-15-intel",
                python-architecture: "x64",
                rust-target: "x86_64-apple-darwin",
              }
          - rust: stable
            python-version: "3.8"
            platform:
              {
                os: "macos-15-intel",
                python-architecture: "x64",
                rust-target: "x86_64-apple-darwin",
              }
          - rust: stable
            python-version: "3.9"
            platform:
              {
                os: "macos-15-intel",
                python-architecture: "x64",
                rust-target: "x86_64-apple-darwin",
              }
          # test latest Python on arm64 linux & windows runners
          - rust: stable
            python-version: "3.14"
            platform:
              {
                os: "ubuntu-24.04-arm",
                python-architecture: "arm64",
                rust-target: "aarch64-unknown-linux-gnu",
              }
          - rust: stable
            python-version: "3.14"
            platform:
              {
                os: "windows-11-arm",
                python-architecture: "arm64",
                rust-target: "aarch64-pc-windows-msvc",
              }
        exclude:
          # ubuntu-latest (24.04) no longer supports 3.7
          - python-version: "3.7"
            platform: { os: "ubuntu-latest" }
          # arm64 macOS Python not available on GitHub Actions until 3.10
          - rust: stable
            python-version: "3.7"
            platform:
              {
                os: "macos-latest",
                python-architecture: "arm64",
                rust-target: "aarch64-apple-darwin",
              }
          - rust: stable
            python-version: "3.8"
            platform:
              {
                os: "macos-latest",
                python-architecture: "arm64",
                rust-target: "aarch64-apple-darwin",
              }
          - rust: stable
            python-version: "3.9"
            platform:
              {
                os: "macos-latest",
                python-architecture: "arm64",
                rust-target: "aarch64-apple-darwin",
              }

  valgrind:
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    needs: [fmt]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - uses: dtolnay/rust-toolchain@stable
      - uses: taiki-e/install-action@valgrind
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - run: nox -s test-rust -- release skip-full
    env:
      CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: valgrind --leak-check=no --error-exitcode=1
      RUST_BACKTRACE: 1
      TRYBUILD: overwrite

  careful:
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    needs: [fmt]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: rust-src
      - uses: taiki-e/install-action@cargo-careful
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - run: nox -s test-rust -- careful skip-full
    env:
      RUST_BACKTRACE: 1
      TRYBUILD: overwrite

  docsrs:
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    needs: [fmt]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: rust-src
      - run: cargo rustdoc --lib --no-default-features --features full,jiff-02 -Zunstable-options --config "build.rustdocflags=[\"--cfg\", \"docsrs\"]"

  emscripten:
    name: emscripten
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    needs: [fmt]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: 3.14
        id: setup-python
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: wasm32-unknown-emscripten
          components: rust-src
      - uses: actions/setup-node@v6
        with:
          node-version: 24
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - uses: actions/cache/restore@v5
        id: cache
        with:
          path: |
            .nox/emscripten
          key: emscripten-${{ hashFiles('emscripten/*') }}-${{ hashFiles('noxfile.py') }}-${{ steps.setup-python.outputs.python-path }}
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - name: Build
        if: steps.cache.outputs.cache-hit != 'true'
        run: nox -s build-emscripten
      - name: Test
        run: nox -s test-emscripten
      - uses: actions/cache/save@v5
        if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
        with:
          path: |
            .nox/emscripten
          key: emscripten-${{ hashFiles('emscripten/*') }}-${{ hashFiles('noxfile.py') }}-${{ steps.setup-python.outputs.python-path }}

  wasm32-wasip1:
    name: wasm32-wasip1
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    needs: [fmt]
    runs-on: ubuntu-latest
    env:
      WASI_SDK_PATH: "/opt/wasi-sdk"
      CPYTHON_PATH: "${{ github.workspace }}/wasi/cpython"
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: 3.14
        id: setup-python
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: wasm32-wasip1
          components: rust-src
      - name: "Install wasmtime"
        uses: bytecodealliance/actions/wasmtime/setup@v1
      - name: "Install WASI SDK"
        run: |
          mkdir ${{ env.WASI_SDK_PATH }} && \
          curl -s -S --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-linux.tar.gz | \
          tar --strip-components 1 --directory ${{ env.WASI_SDK_PATH }} --extract --gunzip
          $WASI_SDK_PATH/bin/clang --version
      - uses: actions/cache/restore@v5
        id: cache-wasip1-python
        with:
          path: ${{ env.CPYTHON_PATH }}/cross-build/
          key: wasm32-wasip1-python
      - uses: actions/checkout@v6.0.2
        with:
          repository: python/cpython
          ref: 3.14
          path: ${{ env.CPYTHON_PATH }}
          fetch-depth: 1
      - name: Build
        run: |
          cd ${{ env.CPYTHON_PATH }}
          cat >> Tools/wasm/wasi/config.site-wasm32-wasi <<'EOF'

          # Force-disable POSIX dynamic loading for WASI
          ac_cv_func_dlopen=no
          ac_cv_lib_dl_dlopen=no
          EOF
          python Tools/wasm/wasi build --quiet -- --config-cache
          cp cross-build/wasm32-wasip1/libpython3.14.a \
             cross-build/wasm32-wasip1/Modules/_hacl/libHacl_HMAC.a \
             cross-build/wasm32-wasip1/Modules/_decimal/libmpdec/libmpdec.a \
             cross-build/wasm32-wasip1/Modules/expat/libexpat.a \
             cross-build/wasm32-wasip1/build/lib.wasi-wasm32-3.14/
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - name: Test
        env:
          PYO3_CROSS_LIB_DIR: ${{ env.CPYTHON_PATH }}/cross-build/wasm32-wasip1/build/lib.wasi-wasm32-3.14/
          CARGO_BUILD_TARGET: wasm32-wasip1
          CARGO_TARGET_WASM32_WASIP1_RUNNER: wasmtime run --dir ${{ env.CPYTHON_PATH }}::/ --env PYTHONPATH=/lib
          RUSTFLAGS: >
            -C link-arg=-L${{ env.WASI_SDK_PATH }}/share/wasi-sysroot/lib/wasm32-wasi
            -C link-arg=-lwasi-emulated-signal
            -C link-arg=-lwasi-emulated-process-clocks
            -C link-arg=-lwasi-emulated-getpid
            -C link-arg=-lmpdec
            -C link-arg=-lHacl_HMAC
            -C link-arg=-lexpat
        run: RUSTDOCFLAGS=$RUSTFLAGS cargo test
      - uses: actions/cache/save@v5
        if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
        with:
          path: ${{ env.CPYTHON_PATH }}/cross-build/
          key: ${{ steps.cache-wasip1-python.outputs.cache-primary-key }}

  test-debug:
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    needs: [fmt]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rust-src
      - name: Install python3 standalone debug build with nox
        run: |
          PBS_RELEASE="20241219"
          PBS_PYTHON_VERSION="3.13.1"
          PBS_ARCHIVE="cpython-${PBS_PYTHON_VERSION}+${PBS_RELEASE}-x86_64-unknown-linux-gnu-debug-full.tar.zst"
          wget "https://github.com/indygreg/python-build-standalone/releases/download/${PBS_RELEASE}/${PBS_ARCHIVE}"
          tar -I zstd -xf "${PBS_ARCHIVE}"
          ls -l $(pwd)/python/install/bin
          ls -l $(pwd)/python/install/lib
          echo PATH=$(pwd)/python/install/bin:$PATH >> $GITHUB_ENV
          echo LD_LIBRARY_PATH=$(pwd)/python/install/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV
          echo PYTHONHOME=$(pwd)/python/install >> $GITHUB_ENV
          echo PYO3_PYTHON=$(pwd)/python/install/bin/python3 >> $GITHUB_ENV
      - run: python3 -m sysconfig
      - run: python3 -m pip install --upgrade pip && pip install nox[uv]
      - run: |
          PYO3_CONFIG_FILE=$(mktemp)
          cat > $PYO3_CONFIG_FILE << EOF
          implementation=CPython
          version=3.13
          shared=true
          abi3=false
          lib_name=python3.13d
          lib_dir=${{ github.workspace }}/python/install/lib
          executable=${{ github.workspace }}/python/install/bin/python3
          pointer_width=64
          build_flags=Py_DEBUG,Py_REF_DEBUG
          suppress_build_script_link_lines=false
          EOF
          echo PYO3_CONFIG_FILE=$PYO3_CONFIG_FILE >> $GITHUB_ENV
      - run: python3 -m nox -s test

  test-version-limits:
    needs: [fmt]
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - uses: dtolnay/rust-toolchain@stable
      - run: python3 -m pip install --upgrade pip && pip install nox[uv]
      - run: python3 -m nox -s test-version-limits

  check-feature-powerset:
    needs: [fmt, resolve]
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    runs-on: ubuntu-latest
    name: check-feature-powerset ${{ matrix.rust }}
    strategy:
      # run on stable and MSRV to check that all combinations of features are expected to build fine on our supported
      # range of compilers
      matrix:
        rust: ["stable"]
        include:
          - rust: ${{ needs.resolve.outputs.MSRV }}
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-hack,cargo-minimal-versions
      - run: python3 -m pip install --upgrade pip && pip install nox[uv]
      - run: python3 -m nox -s check-feature-powerset -- ${{ matrix.rust != 'stable' && 'minimal-versions' || '' }}

  test-cross-compilation:
    needs: [fmt]
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    runs-on: ${{ matrix.os }}
    name: test-cross-compilation ${{ matrix.os }} -> ${{ matrix.target }}
    strategy:
      # If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
      fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
      matrix:
        include:
          # ubuntu "cross compile" to itself
          - os: "ubuntu-latest"
            target: "x86_64-unknown-linux-gnu"
            flags: "-i python3.13"
            manylinux: auto
          # ubuntu x86_64 -> aarch64
          - os: "ubuntu-latest"
            target: "aarch64-unknown-linux-gnu"
            flags: "-i python3.13"
            manylinux: auto
          # ubuntu x86_64 -> windows x86_64
          - os: "ubuntu-latest"
            target: "x86_64-pc-windows-gnu"
            # TODO: remove pyo3/generate-import-lib feature when maturin supports cross compiling to Windows without it
            flags: "-i python3.13 --features pyo3/generate-import-lib"
          # windows x86_64 -> aarch64
          - os: "windows-latest"
            target: "aarch64-pc-windows-msvc"
            flags: "-i python3.13 --features pyo3/generate-import-lib"
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: examples/maturin-starter
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
          key: ${{ matrix.target }}
      - name: Setup cross-compiler
        if: ${{ matrix.target == 'x86_64-pc-windows-gnu' }}
        run: sudo apt-get install -y mingw-w64 llvm
      - name: Compile version-specific library
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.target }}
          manylinux: ${{ matrix.manylinux }}
          args: --release -m examples/maturin-starter/Cargo.toml ${{ matrix.flags }}
      - name: Compile abi3 library
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.target }}
          manylinux: ${{ matrix.manylinux }}
          args: --release -m examples/maturin-starter/Cargo.toml --features abi3 ${{ matrix.flags }}

  test-cross-compilation-windows:
    needs: [fmt]
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: x86_64-pc-windows-gnu,x86_64-pc-windows-msvc
          components: rust-src
      # load cache (prepared in ci-cache-warmup.yml)
      - uses: actions/cache/restore@v5
        with:
          path: ~/.cache/cargo-xwin
          key: cargo-xwin-cache
      - name: Test cross compile to Windows
        run: |
          set -ex
          sudo apt-get install -y mingw-w64 llvm
          pip install nox
          nox -s test-cross-compilation-windows

  test-introspection:
    needs: [fmt]
    if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-test-introspection') || contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
    strategy:
      matrix:
        platform:
          [
            {
              os: "macos-latest",
              python-architecture: "arm64",
              rust-target: "aarch64-apple-darwin",
            },
            {
              os: "ubuntu-latest",
              python-architecture: "x64",
              rust-target: "x86_64-unknown-linux-gnu",
            },
            {
              os: "windows-latest",
              python-architecture: "x64",
              rust-target: "x86_64-pc-windows-msvc",
            },
            {
              os: "windows-latest",
              python-architecture: "x86",
              rust-target: "i686-pc-windows-msvc",
            },
          ]
    runs-on: ${{ matrix.platform.os }}
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.platform.rust-target }}
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
          architecture: ${{ matrix.platform.python-architecture }}
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - run: nox -s test-introspection
    env:
      CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}

  test-introspection-pr:
    needs: [fmt]
    if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-build-full') && github.event_name == 'pull_request' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: dtolnay/rust-toolchain@stable
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - run: nox -s test-introspection

  mypy-pytests:
    needs: [fmt]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rust-src
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"
      - run: python -m pip install --upgrade pip && pip install nox[uv]
      - run: nox -s mypy
        working-directory: pytests

  conclusion:
    needs:
      - fmt
      - check-msrv
      - clippy
      - build-pr
      - build-full
      - valgrind
      - careful
      - docsrs
      - emscripten
      - test-debug
      - test-version-limits
      - check-feature-powerset
      - test-cross-compilation
      - test-cross-compilation-windows
      - test-introspection
    if: always()
    runs-on: ubuntu-latest
    steps:
      - name: Result
        run: |
          jq -C <<< "${needs}"
          # Check if all needs were successful or skipped.
          "$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")"
        env:
          needs: ${{ toJson(needs) }}


================================================
FILE: .github/workflows/coverage-pr-base.yml
================================================
# This runs as a separate job because it needs to run on the `pull_request_target` event
# in order to access the CODECOV_TOKEN secret.
#
# This is safe because this doesn't run arbitrary code from PRs.

name: Set Codecov PR base
on:
  # See safety note / doc at the top of this file.
  pull_request_target:

jobs:
  coverage-pr-base:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: '3.14'
      - name: Fetch merge base
        id: fetch_merge_base
        uses: ./.github/actions/fetch-merge-base
        with:
          base_ref: "refs/heads/${{ github.event.pull_request.base.ref }}"
          head_ref: "refs/pull/${{ github.event.pull_request.number }}/head"
      - name: Set PR base on codecov
        run: |
          pip install codecov-cli
          codecovcli pr-base-picking \
            --base-sha ${{ steps.fetch_merge_base.outputs.merge_base }} \
            --pr ${{ github.event.number }} \
            --slug PyO3/pyo3 \
            --token ${{ secrets.CODECOV_TOKEN }} \
            --service github


================================================
FILE: .github/workflows/netlify-build.yml
================================================
name: netlify-build

on:
  push:
    branches:
      - main
  pull_request:
  release:
    types: [published]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  guide-build:
    runs-on: ubuntu-latest
    outputs:
      tag_name: ${{ steps.prepare_tag.outputs.tag_name }}
    steps:
      - uses: actions/checkout@v6.0.2
      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"

      - uses: dtolnay/rust-toolchain@nightly

      - name: Setup mdBook
        uses: taiki-e/install-action@v2
        with:
          tool: mdbook@0.5, mdbook-tabs@0.3, lychee

      - name: Prepare tag
        id: prepare_tag
        run: |
          TAG_NAME="${GITHUB_REF##*/}"
          echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT

      - name: Restore lychee cache
        id: restore-cache
        uses: actions/cache/restore@v5
        with:
          path: .lycheecache
          key: lychee

      # This builds the book in target/guide/.
      - name: Build the guide
        run: |
          python -m pip install --upgrade pip && pip install nox[uv]
          nox -s ${{ github.event_name == 'release' && 'build-guide' || 'check-guide' }}
        env:
          PYO3_VERSION_TAG: ${{ steps.prepare_tag.outputs.tag_name }}
          # allows lychee to get better rate limits from github
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Save lychee cache
        uses: actions/cache/save@v5
        if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
        with:
          path: .lycheecache
          key: ${{ steps.restore-cache.outputs.cache-primary-key }}

      # We store the versioned guides on GitHub's gh-pages branch for convenience
      # (the full gh-pages branch is pulled in the build-netlify-site step)
      - name: Deploy the guide
        if: ${{ github.event_name == 'release' }}
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./target/guide/
          destination_dir: ${{ steps.prepare_tag.outputs.tag_name }}
          full_commit_message: "Upload documentation for ${{ steps.prepare_tag.outputs.tag_name }}"

      - name: Get current PyO3 version
        run: |
          PYO3_VERSION=$(cargo search pyo3 --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"')
          echo "PYO3_VERSION=${PYO3_VERSION}" >> $GITHUB_ENV

      - name: Build the site
        run: |
          python -m pip install --upgrade pip && pip install nox[uv] towncrier requests
          nox -s build-netlify-site -- ${{ (github.ref != 'refs/heads/main' && '--preview') || '' }}

      # Upload the built site as an artifact for deploy workflow to consume
      - name: Upload Build Artifact
        uses: actions/upload-artifact@v7
        with:
          name: site
          path: ./netlify_build


================================================
FILE: .github/workflows/netlify-deploy.yml
================================================
# This runs as a separate job because it needs to run on the `workflow_run` event
# in order to access the netlify secrets.
#
# This is safe because this doesn't run arbitrary code from PRs.

name: netlify-deploy

on:
  workflow_run:
    workflows: ["netlify-build"]
    types:
      - completed

env:
  CARGO_TERM_COLOR: always

jobs:
  deploy:
    runs-on: ubuntu-latest
    if: github.event.workflow_run.conclusion == 'success'
    environment: netlify

    steps:
      - name: Download Build Artifact
        uses: actions/download-artifact@v8
        with:
          name: site
          github-token: ${{ secrets.GITHUB_TOKEN }}
          run-id: ${{ github.event.workflow_run.id }}

      - name: Install netlify-cli
        run: |
          npm install -g netlify-cli

      - name: Deploy to Netlify
        run: |
          ls -la
          DEBUG=* netlify deploy \
              --site ${{ secrets.NETLIFY_SITE_ID }} \
              --auth ${{ secrets.NETLIFY_TOKEN }} \
              ${{ ((github.event.workflow_run.head_repository.full_name == 'PyO3/pyo3') && (github.event.workflow_run.head_branch == 'main') && '--prod') || '' }} \
              --json | tee deploy_output.json

      # credit: https://www.raulmelo.me/en/blog/deploying-netlify-github-actions-guide
      - name: Generate URL Preview
        id: url_preview
        if: ${{ github.event.workflow_run.event == 'pull_request' }}
        run: |
          NETLIFY_PREVIEW_URL=$(jq -r '.deploy_url' deploy_output.json)
          echo "NETLIFY_PREVIEW_URL=$NETLIFY_PREVIEW_URL" >> "$GITHUB_OUTPUT"

      - name: Post Netlify Preview Status to PR
        if: ${{ github.event.workflow_run.event == 'pull_request' }}
        uses: actions/github-script@v8
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            const previewUrl = '${{ steps.url_preview.outputs.NETLIFY_PREVIEW_URL }}';
            const commitSha = '${{ github.event.workflow_run.head_sha }}';

            await github.rest.repos.createCommitStatus({
              owner: context.repo.owner,
              repo: context.repo.repo,
              sha: commitSha,
              state: 'success',
              target_url: previewUrl,
              description: 'click to view Netlify preview deploy',
              context: 'netlify-deploy / preview'
            });


================================================
FILE: .github/workflows/release.yml
================================================
name: Release Rust Crate

on:
  push:
    tags:
      - "v*"
  workflow_dispatch:
    inputs:
      version:
        description: The version to build

jobs:
  release:
    permissions:
      id-token: write

    runs-on: ubuntu-latest
    environment: release
    steps:
      - uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v5.0.1
        with:
          # The tag to build or the tag received by the tag event
          ref: ${{ github.event.inputs.version || github.ref }}
          persist-credentials: false

      - uses: astral-sh/setup-uv@v7
        with:
          save-cache: false

      - uses: rust-lang/crates-io-auth-action@v1
        id: auth

      - name: Publish to crates.io
        run: uvx nox -s publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}


================================================
FILE: .gitignore
================================================
target
Cargo.lock
/doc
/gh-pages
build/
*.py[co]
__pycache__/
.cache
.pytest_cache/
dist/
.tox/
.mypy_cache/
.hypothesis/
.eggs/
venv*
guide/book/
guide/src/LICENSE-APACHE
guide/src/LICENSE-MIT
*.so
*.out
*.egg-info
extensions/stamps/
pip-wheel-metadata
valgrind-python.supp
*.pyd
lcov.info
coverage.json
netlify_build/
.nox/
.vscode/
.lycheecache


================================================
FILE: .netlify/internal_banner.html
================================================
<div id='pyo3-internal-banner'>
    <div style="white-space: nowrap;">
        ⚠️ Internal Docs ⚠️ Not Public API 👉
        <a href='https://pyo3.rs/main/doc/pyo3/index.html' style='color:red;text-decoration:underline;'>
            Official Docs Here
        </a>
    </div>
    <style id="pyo3-noscript-style">
        body {
            padding-top: 2em;
        }
    </style>
    <style>
        #pyo3-internal-banner {
            position: fixed;
            display: flex;
            align-items: center;
            justify-content:
                center;
            z-index: 99999;
            color: red;
            left: 0;
            right: 0;
            top: 0;
            height: 2em;
            border: 3px solid red;
            width: 100%;
            overflow-x: hidden;
            background-color: var(--target-background-color);
        }

        @media (max-width: 700px) {
            #pyo3-internal-banner {
                top: 50px;
                margin-bottom: 10px;
            }
        }
    </style>
</div>
<script>
    // when javascript is active, splice the banner into a "sticky" location
    // inside the doc body for best appearance
    banner = document.getElementById("pyo3-internal-banner")
    banner.style.position = "sticky"
    document.getElementsByTagName("main")[0].prepend(banner)
    document.getElementById("pyo3-noscript-style").remove()
</script>


================================================
FILE: .netlify/redirect.sh
================================================
# Add redirect for each documented version
set +x  # these loops get very spammy and fill the deploy log

for d in netlify_build/v*; do
    version="${d/netlify_build\/v/}"
    echo "/v$version/doc/* https://docs.rs/pyo3/$version/:splat" >> netlify_build/_redirects
    if [ $version != $PYO3_VERSION ]; then
        # for old versions, mark the files in the latest version as the canonical URL
        for file in $(find $d -type f); do
            file_path="${file/$d\//}"
            # remove index.html and/or .html suffix to match the page URL on the
            # final netlfiy site
            url_path="$file_path"
            if [[ $file_path == index.html ]]; then
                url_path=""
            elif [[ $file_path == *.html ]]; then
                url_path="${file_path%.html}"
            fi
            echo "/v$version/$url_path" >> netlify_build/_headers
            if test -f "netlify_build/v$PYO3_VERSION/$file_path"; then
                echo "  Link: <https://pyo3.rs/v$PYO3_VERSION/$url_path>; rel=\"canonical\"" >> netlify_build/_headers
            else
                # this file doesn't exist in the latest guide, don't index it
                echo "  X-Robots-Tag: noindex" >> netlify_build/_headers
            fi
        done
    fi
done

# Add latest redirect
echo "/latest/* /v${PYO3_VERSION}/:splat 302" >> netlify_build/_redirects

# some backwards compatbiility redirects
echo "/latest/building_and_distribution/* /latest/building-and-distribution/:splat 302" >> netlify_build/_redirects
echo "/latest/building-and-distribution/multiple_python_versions/* /latest/building-and-distribution/multiple-python-versions:splat 302" >> netlify_build/_redirects
echo "/latest/function/error_handling/* /latest/function/error-handling/:splat 302" >> netlify_build/_redirects
echo "/latest/getting_started/* /latest/getting-started/:splat 302" >> netlify_build/_redirects
echo "/latest/python_from_rust/* /latest/python-from-rust/:splat 302" >> netlify_build/_redirects
echo "/latest/python_typing_hints/* /latest/python-typing-hints/:splat 302" >> netlify_build/_redirects
echo "/latest/trait_bounds/* /latest/trait-bounds/:splat 302" >> netlify_build/_redirects

## Add landing page redirect
if [ "${CONTEXT}" == "deploy-preview" ]; then
    echo "/ /main/" >> netlify_build/_redirects
else
    echo "/ /v${PYO3_VERSION}/ 302" >> netlify_build/_redirects
fi

set -x

================================================
FILE: .towncrier.template.md
================================================
{% for section_text, section in sections.items() %}{%- if section %}{{section_text}}{% endif -%}

{% if section %}
{% for category in ['packaging', 'added', 'changed', 'removed', 'fixed' ] if category in section %}

### {{ definitions[category]['name'] }}

{% if definitions[category]['showcontent'] %}
{% for text, pull_requests in section[category].items() %}
- {{ text }} {{ pull_requests|join(', ') }}
{% endfor %}
{% else %}
- {{ section[category]['']|join(', ') }}
{% endif %}
{% endfor %}
{% else %}

No significant changes.
{% endif %}

{% endfor %}


================================================
FILE: Architecture.md
================================================
<!-- This file contains a rough overview of the PyO3 codebase. -->
<!-- Please do not make descriptions too specific, so that we can easily -->
<!-- keep this file in sync with the codebase. -->

# PyO3: Architecture

This document roughly describes the high-level architecture of PyO3.
If you want to become familiar with the codebase you are in the right place!

## Overview

PyO3 provides a bridge between Rust and Python, based on the [Python/C API].
Thus, PyO3 has low-level bindings of these API as its core.
On top of that, we have higher-level bindings to operate Python objects safely.
Also, to define Python classes and functions in Rust code, we have `trait PyClass` and a set of
protocol traits (e.g., `PyIterProtocol`) for supporting object protocols (i.e., `__dunder__` methods).
Since implementing `PyClass` requires lots of boilerplate, we have a proc-macro `#[pyclass]`.

To summarize, there are six main parts to the PyO3 codebase.

1. [Low-level bindings of Python/C API.](#1-low-level-bindings-of-python-capi)
   - [`pyo3-ffi`] and [`src/ffi`]
2. [Bindings to Python objects.](#2-bindings-to-python-objects)
   - [`src/instance.rs`] and [`src/types`]
3. [`PyClass` and related functionalities.](#3-pyclass-and-related-functionalities)
   - [`src/pycell.rs`], [`src/pyclass.rs`], and more
4. [Procedural macros to simplify usage for users.](#4-procedural-macros-to-simplify-usage-for-users)
   - [`src/impl_`], [`pyo3-macros`] and [`pyo3-macros-backend`]
5. [`build.rs` and `pyo3-build-config`](#5-buildrs-and-pyo3-build-config)
   - [`build.rs`](https://github.com/PyO3/pyo3/tree/main/build.rs)
   - [`pyo3-build-config`]

## 1. Low-level bindings of Python/C API

[`pyo3-ffi`] contains wrappers of the [Python/C API]. This is currently done by hand rather than
automated tooling because:
  - it gives us best control about how to adapt C conventions to Rust, and
  - there are many Python interpreter versions we support in a single set of files.

We aim to provide straight-forward Rust wrappers resembling the file structure of [`cpython/Include`](https://github.com/python/cpython/tree/main/Include).

We are continuously updating the module to match the latest CPython version which PyO3 supports (i.e. as of time of writing Python 3.13). The tracking issue is [#1289](https://github.com/PyO3/pyo3/issues/1289), and contribution is welcome.

In the [`pyo3-ffi`] crate, there is lots of conditional compilation such as `#[cfg(Py_LIMITED_API)]`,
`#[cfg(Py_3_7)]`, and `#[cfg(PyPy)]`.
`Py_LIMITED_API` corresponds to `#define Py_LIMITED_API` macro in Python/C API.
With `Py_LIMITED_API`, we can build a Python-version-agnostic binary called an
[abi3 wheel](https://pyo3.rs/latest/building-and-distribution.html#py_limited_apiabi3).
`Py_3_7` means that the API is available from Python >= 3.7.
There are also `Py_3_8`, `Py_3_9`, and so on.
`PyPy` means that the API definition is for PyPy.
Those flags are set in [`build.rs`](#6-buildrs-and-pyo3-build-config).

## 2. Bindings to Python objects

[`src/types`] contains bindings to [built-in types](https://docs.python.org/3/library/stdtypes.html)
of Python, such as `dict` and `list`.
For historical reasons, Python's `object` is called `PyAny` in PyO3 and located in [`src/types/any.rs`].

Currently, `PyAny` is a straightforward wrapper of `ffi::PyObject`, defined as:

```rust
#[repr(transparent)]
pub struct PyAny(UnsafeCell<ffi::PyObject>);
```

Concrete Python objects are implemented by wrapping `PyAny`, e.g.,:

```rust
#[repr(transparent)]
pub struct PyDict(PyAny);
```

These types are not intended to be accessed directly, and instead are used through the `Py<T>` and `Bound<T>` smart pointers.

We have some macros in [`src/types/mod.rs`] which make it easier to implement APIs for concrete Python types.

## 3. `PyClass` and related functionalities

[`src/pycell.rs`], [`src/pyclass.rs`], and [`src/type_object.rs`] contain types and
traits to make `#[pyclass]` work.
Also, [`src/pyclass_init.rs`] and [`src/impl_/pyclass.rs`] have related functionalities.

To realize object-oriented programming in C, all Python objects have `ob_base: PyObject` as their
first field in their structure definition. Thanks to this guarantee, casting `*mut A` to `*mut PyObject`
is valid if `A` is a Python object.

To ensure this guarantee, we have a wrapper struct `PyClassObject<T>` in [`src/pycell/impl_.rs`] which is roughly:

```rust
#[repr(C)]
pub struct PyClassObject<T> {
    ob_base: crate::ffi::PyObject,
    inner: T,
}
```

Thus, when copying a Rust struct to a Python object, we first allocate `PyClassObject` on the Python heap and then
move `T` into it.

The primary way to interact with Python objects implemented in Rust is through the `Bound<'py, T>` smart pointer.
By having the `'py` lifetime of the `Python<'py>` token, this ties the lifetime of the `Bound<'py, T>` smart pointer to the lifetime for which the thread is attached to the Python interpreter and allows PyO3 to call Python APIs at maximum efficiency.

`Bound<'py, T>` requires that `T` implements `PyClass`.
This trait is somewhat complex and derives many traits, but the most important one is `PyTypeInfo`
in [`src/type_object.rs`].
`PyTypeInfo` is also implemented for built-in types.
In Python, all objects have their types, and types are also objects of `type`.
For example, you can see `type({})` shows `dict` and `type(type({}))` shows `type` in Python REPL.
`T: PyTypeInfo` implies that `T` has a corresponding type object.

### Protocol methods

Python has some built-in special methods called dunder methods, such as `__iter__`.
They are called "slots" in the [abstract objects layer](https://docs.python.org/3/c-api/abstract.html) in
Python/C API.
We provide a way to implement those protocols similarly, by recognizing special
names in `#[pymethods]`, with a few new ones for slots that can not be
implemented in Python, such as GC support.

## 4. Procedural macros to simplify usage for users.

[`pyo3-macros`] provides five proc-macro APIs: `pymodule`, `pyfunction`, `pyclass`,
`pymethods`, and `#[derive(FromPyObject)]`.
[`pyo3-macros-backend`] has the actual implementations of these APIs.
[`src/impl_`] contains `#[doc(hidden)]` functionality used in code generated by these proc-macros,
such as parsing function arguments.

## 5. `build.rs` and `pyo3-build-config`

PyO3 supports a wide range of OSes, interpreters and use cases. The correct environment must be
detected at build time in order to set up relevant conditional compilation correctly. This logic
is captured in the [`pyo3-build-config`] crate, which is a `build-dependency` of `pyo3` and
`pyo3-macros`, and can also be used by downstream users in the same way.

In [`pyo3-build-config`]'s `build.rs` the build environment is detected and inlined into the crate
as a "config file". This works in all cases except for cross-compiling, where it is necessary to
capture this from the `pyo3` `build.rs` to get some extra environment variables that Cargo doesn't
set for build dependencies.

The `pyo3` `build.rs` also runs some safety checks such as ensuring the Python version detected is
actually supported.

Some of the functionality of `pyo3-build-config`:
- Find the interpreter for build and detect the Python version.
  - We have to set some version flags like `#[cfg(Py_3_7)]`.
  - If the interpreter is PyPy, we set `#[cfg(PyPy)`.
  - If the `PYO3_CONFIG_FILE` environment variable is set then that file's contents will be used
    instead of any detected configuration.
  - If the `PYO3_NO_PYTHON` environment variable is set then the interpreter detection is bypassed
    entirely and only abi3 extensions can be built.
- Check if we are building a Python extension.
  - If we are building an extension (e.g., Python library installable by `pip`),
    we don't link `libpython` on most platforms (to allow for statically-linked Python interpreters).
    The `PYO3_BUILD_EXTENSION_MODULE` environment variable suppresses linking.
- Cross-compiling configuration
  - If `TARGET` architecture and `HOST` architecture differ, we can find cross compile information
    from environment variables (`PYO3_CROSS_LIB_DIR`, `PYO3_CROSS_PYTHON_VERSION` and
    `PYO3_CROSS_PYTHON_IMPLEMENTATION`) or system files.
    When cross compiling extension modules it is often possible to make it work without any
    additional user input.
  - On Windows, `pyo3-ffi` uses Rust's `raw-dylib` linking feature to link against the Python DLL
    directly without needing import libraries (`.lib` files). The build script emits a `pyo3_dll`
    cfg with the target DLL name, and the `extern_libpython!` macro expands to the appropriate
    `#[link(name = "...", kind = "raw-dylib")]` attribute. This enables cross compiling Python
    extensions for Windows without having to install any Windows Python libraries.

<!-- External Links -->

[python/c api]: https://docs.python.org/3/c-api/

<!-- Crates -->

[`pyo3-macros`]: https://github.com/PyO3/pyo3/tree/main/pyo3-macros
[`pyo3-macros-backend`]: https://github.com/PyO3/pyo3/tree/main/pyo3-macros-backend
[`pyo3-build-config`]: https://github.com/PyO3/pyo3/tree/main/pyo3-build-config
[`pyo3-ffi`]: https://github.com/PyO3/pyo3/tree/main/pyo3-ffi

<!-- Directories -->

[`src/class`]: https://github.com/PyO3/pyo3/tree/main/src/class
[`src/ffi`]: https://github.com/PyO3/pyo3/tree/main/src/ffi
[`src/types`]: https://github.com/PyO3/pyo3/tree/main/src/types

<!-- Files -->

[`src/impl_`]: https://github.com/PyO3/pyo3/blob/main/src/impl_
[`src/instance.rs`]: https://github.com/PyO3/pyo3/tree/main/src/instance.rs
[`src/pycell.rs`]: https://github.com/PyO3/pyo3/tree/main/src/pycell.rs
[`src/pyclass.rs`]: https://github.com/PyO3/pyo3/tree/main/src/pyclass.rs
[`src/pyclass_init.rs`]: https://github.com/PyO3/pyo3/tree/main/src/pyclass_init.rs
[`src/pyclass_slot.rs`]: https://github.com/PyO3/pyo3/tree/main/src/pyclass_slot.rs
[`src/type_object.rs`]: https://github.com/PyO3/pyo3/tree/main/src/type_object.rs
[`src/class/methods.rs`]: https://github.com/PyO3/pyo3/tree/main/src/class/methods.rs
[`src/class/impl_.rs`]: https://github.com/PyO3/pyo3/tree/main/src/class/impl_.rs
[`src/types/any.rs`]: https://github.com/PyO3/pyo3/tree/main/src/types/any.rs
[`src/types/mod.rs`]: https://github.com/PyO3/pyo3/tree/main/src/types/mod.rs


================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project will be documented in this file. For help with updating to new
PyO3 versions, please see the [migration guide](https://pyo3.rs/latest/migration.html).

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

To see unreleased changes, please see the [CHANGELOG on the main branch guide](https://pyo3.rs/main/changelog.html).

<!-- towncrier release notes start -->

## [0.28.2] - 2026-02-18

### Fixed

- Fix complex enum `__qualname__` not using python name [#5815](https://github.com/PyO3/pyo3/pull/5815)
- Fix FFI definition `PyType_GetTypeDataSize` (was incorrectly named `PyObject_GetTypeDataSize`). [#5819](https://github.com/PyO3/pyo3/pull/5819)
- Fix memory corruption when subclassing native types with `abi3` feature on Python 3.12+ (newly enabled in PyO3 0.28.0). [#5823](https://github.com/PyO3/pyo3/pull/5823)

## [0.28.1] - 2026-02-14

### Fixed

- Fix `*args` / `**kwargs` support in` experimental-async` feature (regressed in 0.28.0). [#5771](https://github.com/PyO3/pyo3/pull/5771)
- Fix `clippy::declare_interior_mutable_const` warning inside `#[pyclass]` generated code on enums. [#5772](https://github.com/PyO3/pyo3/pull/5772)
- Fix `ambiguous_associated_items` compilation error when deriving `FromPyObject` or using `#[pyclass(from_py_object)]` macro on enums with `Error` variant. [#5784](https://github.com/PyO3/pyo3/pull/5784)
- Fix `__qualname__` for complex `#[pyclass]` enum variants to include the enum name. [#5796](https://github.com/PyO3/pyo3/pull/5796)
- Fix missing `std::sync::atomic::Ordering` import for targets without atomic64. [#5808](https://github.com/PyO3/pyo3/pull/5808)

## [0.28.0] - 2026-02-01

### Packaging

- Bump MSRV to Rust 1.83. [#5531](https://github.com/PyO3/pyo3/pull/5531)
- Bump minimum supported `quote` version to 1.0.37. [#5531](https://github.com/PyO3/pyo3/pull/5531)
- Bump supported GraalPy version to 25.0. [#5542](https://github.com/PyO3/pyo3/pull/5542)
- Drop `memoffset` dependency. [#5545](https://github.com/PyO3/pyo3/pull/5545)
- Support for free-threaded Python is now opt-out rather than opt-in. [#5564](https://github.com/PyO3/pyo3/pull/5564)
- Bump `target-lexicon` dependency to 0.13.3. [#5571](https://github.com/PyO3/pyo3/pull/5571)
- Drop `indoc` and `unindent` dependencies. [#5608](https://github.com/PyO3/pyo3/pull/5608)

### Added

- Add `__init__` support in `#[pymethods]`. [#4951](https://github.com/PyO3/pyo3/pull/4951)
- Expose `PySuper` on PyPy, GraalPy and ABI3 [#4951](https://github.com/PyO3/pyo3/pull/4951)
- Add `PyString::from_fmt` and `py_format!` macro. [#5199](https://github.com/PyO3/pyo3/pull/5199)
- Add `#[pyclass(new = "from_fields")]` option. [#5421](https://github.com/PyO3/pyo3/pull/5421)
- Add `pyo3::buffer::PyUntypedBuffer`, a type-erased form of `PyBuffer<T>`. [#5458](https://github.com/PyO3/pyo3/pull/5458)
- Add `PyBytes::new_with_writer` [#5517](https://github.com/PyO3/pyo3/pull/5517)
- Add `PyClass::NAME`. [#5579](https://github.com/PyO3/pyo3/pull/5579)
- Add `pyo3_build_config::add_libpython_rpath_link_args`. [#5624](https://github.com/PyO3/pyo3/pull/5624)
- Add `PyBackedStr::clone_ref` and `PyBackedBytes::clone_ref` methods. [#5654](https://github.com/PyO3/pyo3/pull/5654)
- Add `PyCapsule::new_with_pointer` and `PyCapsule::new_with_pointer_and_destructor` for creating capsules with raw pointers. [#5689](https://github.com/PyO3/pyo3/pull/5689)
- Add `#[deleter]` attribute to implement property deleters in `#[methods]`. [#5699](https://github.com/PyO3/pyo3/pull/5699)
- Add `IntoPyObject` and `FromPyObject` implementations for `uuid::NonNilUuid`. [#5707](https://github.com/PyO3/pyo3/pull/5707) 
- Add `PyBackedStr::as_str` and `PyBackedStr::as_py_str` methods. [#5723](https://github.com/PyO3/pyo3/pull/5723)
- Add support for subclassing native types (`PyDict`, exceptions, ...) when building for abi3 on Python 3.12+. [#5733](https://github.com/PyO3/pyo3/pull/5733)
- Add support for subclassing `PyList` when building for Python 3.12+. [#5734](https://github.com/PyO3/pyo3/pull/5734)
- FFI definitions:
  - Add FFI definitions `PyEval_GetFrameBuiltins`, `PyEval_GetFrameGlobals` and `PyEval_GetFrameLocals` on Python 3.13 and up. [#5590](https://github.com/PyO3/pyo3/pull/5590)
  - Add FFI definitions `PyObject_New`, `PyObject_NewVar`, `PyObject_GC_Resize`, `PyObject_GC_New`, and `PyObject_GC_NewVar`. [#5591](https://github.com/PyO3/pyo3/pull/5591)
  - Added FFI definitions and an unsafe Rust API wrapping `Py_BEGIN_CRITICAL_SECTION_MUTEX` and `Py_BEGIN_CRITICAL_SECTION_MUTEX2`. [#5642](https://github.com/PyO3/pyo3/pull/5642)
  - Add FFI definition `PyDict_GetItemStringRef` on Python 3.13 and up. [#5659](https://github.com/PyO3/pyo3/pull/5659)
  - Add FFI definition `PyIter_NextItem` on Python 3.14 and up, and `compat::PyIter_NextItem` for older versions. [#5661](https://github.com/PyO3/pyo3/pull/5661)
  - Add FFI definitions `PyThreadState_GetInterpreter` and `PyThreadState_GetID` on Python 3.9+, `PyThreadState_EnterTracing` and `PyThreadState_LeaveTracing` on Python 3.11+, `PyThreadState_GetUnchecked` on Python 3.13+, and `compat::PyThreadState_GetUnchecked`. [#5711](https://github.com/PyO3/pyo3/pull/5711)
  - Add FFI definitions `PyImport_ImportModuleAttr` and `PyImport_ImportModuleAttrString` on Python 3.14+. [#5737](https://github.com/PyO3/pyo3/pull/5737)
  - Add FFI definitions for the `PyABIInfo` and `PyModExport` APIs available in Python 3.15. [#5746](https://github.com/PyO3/pyo3/pull/5746)
- `experimental-inspect`:
  - Emit base classes. [#5331](https://github.com/PyO3/pyo3/pull/5331)
  - Emit `@typing.final` on final classes. [#5552](https://github.com/PyO3/pyo3/pull/5552)
  - Generate nested classes for complex enums. [#5708](https://github.com/PyO3/pyo3/pull/5708)
  - Emit `async` keyword for async functions. [#5731](https://github.com/PyO3/pyo3/pull/5731)

### Changed

- Call `sys.unraisablehook` instead of `PyErr_Print` if panicking on null FFI pointer in `Bound`, `Borrowed` and `Py` constructors. [#5496](https://github.com/PyO3/pyo3/pull/5496)
- Use PEP-489 multi-phase initialization for `#[pymodule]`. [#5525](https://github.com/PyO3/pyo3/pull/5525)
- Deprecate implicit by-value implementation of `FromPyObject` for `#[pyclass]`. [#5550](https://github.com/PyO3/pyo3/pull/5550)
- Deprecate `PyTypeInfo::NAME` and `PyTypeInfo::MODULE`. [#5579](https://github.com/PyO3/pyo3/pull/5579)
- Deprecate `Py<T>::from_{owned,borrowed}[or_{err,opt}]` constructors from raw pointer. [#5585](https://github.com/PyO3/pyo3/pull/5585)
- Deprecate FFI definitions `PyEval_AcquireLock` and `PyEval_ReleaseLock`. [#5590](https://github.com/PyO3/pyo3/pull/5590)
- Relax `'py: 'a` bound in `Py::extract`. [#5594](https://github.com/PyO3/pyo3/pull/5594)
- Add a `T: PyTypeCheck` bound to the `IntoPyObject` implementations on `Bound<T>`, `Borrowed<T>` and `Py<T>`. [#5640](https://github.com/PyO3/pyo3/pull/5640)
- The `with_critical_section` and `with_critical_section2` functions are moved to `pyo3::sync::critical_section`. [#5642](https://github.com/PyO3/pyo3/pull/5642)
- Use `PyIter_NextItem` in `PyIterator::next` implementation. [#5661](https://github.com/PyO3/pyo3/pull/5661)
- `IntoPyObject` for simple enums now uses a singleton value, allowing identity (python `is`) comparisons. [#5665](https://github.com/PyO3/pyo3/pull/5665)
- Allow any `Sequence[int]` in `FromPyObject` on `Cow<[u8]>` and change the error type to `PyErr`. [#5667](https://github.com/PyO3/pyo3/pull/5667)
- `async` pymethods now borrow `self` only for the duration of awaiting the future, not the entire method call. [#5684](https://github.com/PyO3/pyo3/pull/5684)
- Change `CastError` formatted message to directly describe the "is not an instance of" failure condition. [#5693](https://github.com/PyO3/pyo3/pull/5693)
- Add `#[inline]` hints to many methods on `PyBackedStr`. [#5723](https://github.com/PyO3/pyo3/pull/5723)
- Remove redundant internal counters from `BoundSetIterator` and `BoundFrozenSetIterator`. [#5725](https://github.com/PyO3/pyo3/pull/5725)
- Implement `PyIterator::size_hint` on abi3 builds (previously was only on unlimited API builds). [#5727](https://github.com/PyO3/pyo3/pull/5727)
- Deprecate FFI definition `PyImport_ImportModuleNoBlock` (deprecated in Python 3.13). [#5737](https://github.com/PyO3/pyo3/pull/5737)
- `#[new]` can now return arbitrary Python objects. [#5739](https://github.com/PyO3/pyo3/pull/5739)
- `experimental-inspect`:
  - Introduce `TypeHint` and make use of it to encode type hint annotations. [#5438](https://github.com/PyO3/pyo3/pull/5438)
  - Rename `PyType{Info,Check}::TYPE_INFO` into `PyType{Info,Check}::TYPE_HINT`. [#5438](https://github.com/PyO3/pyo3/pull/5438) [#5619](https://github.com/PyO3/pyo3/pull/5619) [#5641](https://github.com/PyO3/pyo3/pull/5641)
  - Fill annotations on function arguments and return values for all types supported natively by PyO3. [#5634](https://github.com/PyO3/pyo3/pull/5634) [#5637](https://github.com/PyO3/pyo3/pull/5637) [#5639](https://github.com/PyO3/pyo3/pull/5639)
  - Use `_typeshed.Incomplete` instead of `typing.Any` as default type hint, to make it easier to spot incomplete trait implementations. [#5744](https://github.com/PyO3/pyo3/pull/5744)
  - Use general Python expression syntax for type hints. [#5671](https://github.com/PyO3/pyo3/pull/5671)

### Removed

- Remove all functionality deprecated in PyO3 0.25 and 0.26. [#5740](https://github.com/PyO3/pyo3/pull/5740)
- FFI definitions:
  - Remove FFI definition `PyEval_GetCallStats` (removed from CPython in Python 3.7). [#5590](https://github.com/PyO3/pyo3/pull/5590)
  - Remove FFI definitions `PyEval_AcquireLock` and `PyEval_ReleaseLock` on Python 3.13 and up. [#5590](https://github.com/PyO3/pyo3/pull/5590)
  - Remove private FFI definitions `_PyObject_New`, `_PyObject_NewVar`, `_PyObject_GC_Resize`, `_PyObject_GC_New`, and `_PyObject_GC_NewVar`. [#5591](https://github.com/PyO3/pyo3/pull/5591)
  - Remove private FFI definitions `_PyDict_SetItem_KnownHash`, `_PyDict_Next`, `_PyDict_NewPresized`, `_PyDict_Contains_KnownHash`, and `_PyDict_Contains`. [#5659](https://github.com/PyO3/pyo3/pull/5659)
  - Remove private FFI definitions `_PyFrameEvalFunction`, `_PyInterpreterState_GetEvalFrameFunc` and `_PyInterpreterState_SetEvalFrameFunc`. [#5711](https://github.com/PyO3/pyo3/pull/5711)
  - Remove private FFI definitions `_PyImport_IsInitialized`, `_PyImport_SetModule`, `_PyImport_SetModuleString`, `_PyImport_AcquireLock`, `_PyImport_ReleaseLock`, `_PyImport_FindBuiltin`, `_PyImport_FindExtensionObject`, `_PyImport_FixupBuiltin`, and `_PyImport_FixupExtensionObject`. [#5737](https://github.com/PyO3/pyo3/pull/5737)

### Fixed

- Fix `PyModuleMethods::add_submodule()` to use the last segment of the submodule name as the attribute name on the parent module instead of using the full name. [#5375](https://github.com/PyO3/pyo3/pull/5375)
- Link with libpython for Cygwin extension modules. [#5571](https://github.com/PyO3/pyo3/pull/5571)
- Link against the limited API DLL for Cygwin when abi3 is used. [#5574](https://github.com/PyO3/pyo3/pull/5574)
- Handle errors in `PyIterator` when calling `size_hint` [#5604](https://github.com/PyO3/pyo3/pull/5604)
- Link with libpython for iOS extension modules. [#5605](https://github.com/PyO3/pyo3/pull/5605)
- Correct `IntoPyObject` output type of `PyBackedStr` to be `PyString`, not `PyAny`. [#5655](https://github.com/PyO3/pyo3/pull/5655)
- Fix `async` functions to return `None` rather than empty tuple `()`. [#5685](https://github.com/PyO3/pyo3/pull/5685)
- Fix compile error when using references to `#[pyclass]` types (e.g. `&MyClass`) as arguments to async `#[pyfunction]`s. [#5725](https://github.com/PyO3/pyo3/pull/5725)
- FFI definitions:
  - Fix FFI definition `PyMemberDescrObject.d_member` to use `PyMemberDef` for Python 3.11+ (was incorrectly `PyGetSetDef`). [#5647](https://github.com/PyO3/pyo3/pull/5647)
  - Mark FFI definition `PyThreadState_GetFrame` available with abi3 in 3.10+. [#5711](https://github.com/PyO3/pyo3/pull/5711)
  - Fix FFI definition `PyImport_GetModule` on PyPy. [#5737](https://github.com/PyO3/pyo3/pull/5737)
- `experimental-inspect`:
  - fix `__new__` return type to be the built object type and not `None`. [#5555](https://github.com/PyO3/pyo3/pull/5555)
  - fix imports of decorators. [#5618](https://github.com/PyO3/pyo3/pull/5618)
  - fix the return type annotation of `PyResult<()>` (must be `None` and not `tuple`) [#5674](https://github.com/PyO3/pyo3/pull/5674)

## [0.27.2] - 2025-11-30

### Changed

- Disable subclassing `PyDict` on GraalPy (unsupported for now, may crash at runtime). [#5653](https://github.com/PyO3/pyo3/pull/5653)

### Fixed

- Fix crash when compiling on Rust 1.92+ with both debug assertions and optimizations enabled. [#5638](https://github.com/PyO3/pyo3/pull/5638)
- Fix FFI definition of `PyDictObject` on PyPy. [#5653](https://github.com/PyO3/pyo3/pull/5653)

## [0.27.1] - 2025-10-21

### Fixed

- Fix `clippy:declare_interior_mutable_const` warning from `#[pyfunction]`. [#5538](https://github.com/PyO3/pyo3/pull/5538)
- Expose `pyo3::types::PySendResult` in public API. [#5539](https://github.com/PyO3/pyo3/pull/5539)

## [0.27.0] - 2025-10-19

### Packaging

- Extend range of supported versions of `hashbrown` optional dependency to include version 0.16. [#5428](https://github.com/PyO3/pyo3/pull/5428)
- Bump optional `num-bigint` dependency minimum version to 0.4.4. [#5471](https://github.com/PyO3/pyo3/pull/5471)
- Test against Python 3.14 final release. [#5499](https://github.com/PyO3/pyo3/pull/5499)
- Drop support for PyPy 3.9 and 3.10. [#5516](https://github.com/PyO3/pyo3/pull/5516)
- Provide a better error message when building an outdated PyO3 for a too-new Python version. [#5519](https://github.com/PyO3/pyo3/pull/5519)

### Added

- Add `FromPyObjectOwned` as convenient trait bound for `FromPyObject` when the data is not borrowed from Python. [#4390](https://github.com/PyO3/pyo3/pull/4390)
- Add `Borrowed::extract`, same as `PyAnyMethods::extract`, but does not restrict the lifetime by deref. [#4390](https://github.com/PyO3/pyo3/pull/4390)
- `experimental-inspect`: basic support for `#[derive(IntoPyObject)]` (no struct fields support yet). [#5365](https://github.com/PyO3/pyo3/pull/5365)
- `experimental-inspect`: support `#[pyo3(get, set)]` and `#[pyclass(get_all, set_all)]`. [#5370](https://github.com/PyO3/pyo3/pull/5370)
- Add `PyTypeCheck::classinfo_object` that returns an object that can be used as parameter in `isinstance` or `issubclass`. [#5387](https://github.com/PyO3/pyo3/pull/5387)
- Implement `PyTypeInfo` on `datetime.*` types even when the limited API is enabled. [#5388](https://github.com/PyO3/pyo3/pull/5388)
- Implement `PyTypeInfo` on `PyIterator`, `PyMapping` and `PySequence`. [#5402](https://github.com/PyO3/pyo3/pull/5402)
- Implement `PyTypeInfo` on `PyCode` when using the stable ABI. [#5403](https://github.com/PyO3/pyo3/pull/5403)
- Implement `PyTypeInfo` on `PyWeakrefReference` when using the stable ABI. [#5404](https://github.com/PyO3/pyo3/pull/5404)
- Add `pyo3::sync::RwLockExt` trait, analogous to `pyo3::sync::MutexExt` for readwrite locks. [#5435](https://github.com/PyO3/pyo3/pull/5435)
- Add `PyString::from_bytes`. [#5437](https://github.com/PyO3/pyo3/pull/5437)
- Implement `AsRef<[u8]>` for `PyBytes`. [#5445](https://github.com/PyO3/pyo3/pull/5445)
- Add `CastError` and `CastIntoError`. [#5468](https://github.com/PyO3/pyo3/pull/5468)
- Add `PyCapsuleMethods::pointer_checked` and `PyCapsuleMethods::is_valid_checked`. [#5474](https://github.com/PyO3/pyo3/pull/5474)
- Add `Borrowed::cast`, `Borrowed::cast_exact` and `Borrowed::cast_unchecked`. [#5475](https://github.com/PyO3/pyo3/pull/5475)
- Add conversions for `jiff::civil::ISOWeekDate`. [#5478](https://github.com/PyO3/pyo3/pull/5478)
- Add conversions for `&Cstr`, `Cstring` and `Cow<Cstr>`. [#5482](https://github.com/PyO3/pyo3/pull/5482)
- add `#[pyclass(skip_from_py_object)]` option, to opt-out of the `FromPyObject: PyClass + Clone` blanket impl. [#5488](https://github.com/PyO3/pyo3/pull/5488)
- Add `PyErr::add_note`. [#5489](https://github.com/PyO3/pyo3/pull/5489)
- Add `FromPyObject` impl for `Cow<Path>` & `Cow<OsStr>`. [#5497](https://github.com/PyO3/pyo3/pull/5497)
- Add `#[pyclass(from_py_object)]` pyclass option, to opt-in to the extraction of pyclasses by value (requires `Clone`). [#5506](https://github.com/PyO3/pyo3/pull/5506)

### Changed

- Rework `FromPyObject` trait for flexibility and performance: [#4390](https://github.com/PyO3/pyo3/pull/4390)
  - Add a second lifetime to `FromPyObject`, to allow borrowing data from Python objects (e.g. `&str` from Python `str`).
  - Replace `extract_bound` with `extract`, which takes `Borrowed<'a, 'py, PyAny>`.
- Optimize `FromPyObject` implementations for `Vec<u8>` and `[u8; N]` from `bytes` and `bytearray`. [#5244](https://github.com/PyO3/pyo3/pull/5244)
- Deprecate `#[pyfn]` attribute. [#5384](https://github.com/PyO3/pyo3/pull/5384)
- Fetch type name dynamically on cast errors instead of using `PyTypeCheck::NAME`. [#5387](https://github.com/PyO3/pyo3/pull/5387)
- Deprecate `PyTypeCheck::NAME` in favour of `PyTypeCheck::classinfo_object` which provides the type information at runtime. [#5387](https://github.com/PyO3/pyo3/pull/5387)
- `PyClassGuard(Mut)` and `PyRef(Mut)` extraction now returns an opaque Rust error [#5413](https://github.com/PyO3/pyo3/pull/5413)
- Fetch type name dynamically when exporting types implementing `PyTypeInfo` with `#[pymodule_use]`. [#5414](https://github.com/PyO3/pyo3/pull/5414)
- Improve `Debug` representation of `PyBuffer<T>`. [#5442](https://github.com/PyO3/pyo3/pull/5442)
- `experimental-inspect`: change the way introspection data is emitted in the binaries to avoid a pointer indirection and simplify parsing. [#5450](https://github.com/PyO3/pyo3/pull/5450)
- Optimize `Py<T>::drop` for the case when attached to the Python interpreter. [#5454](https://github.com/PyO3/pyo3/pull/5454)
- Replace `DowncastError` and `DowncastIntoError` with `CastError` and `CastIntoError`. [#5468](https://github.com/PyO3/pyo3/pull/5468)
- Enable fast-path for 128-bit integer conversions on `GraalPy`. [#5471](https://github.com/PyO3/pyo3/pull/5471)
- Deprecate `PyAnyMethods::downcast` functions in favour of `Bound::cast` functions. [#5472](https://github.com/PyO3/pyo3/pull/5472)
- Make `PyTypeCheck` an `unsafe trait`. [#5473](https://github.com/PyO3/pyo3/pull/5473)
- Deprecate unchecked `PyCapsuleMethods`: `pointer()`, `reference()`, and `is_valid()`. [#5474](https://github.com/PyO3/pyo3/pull/5474)
- Reduce lifetime of return value in `PyCapsuleMethods::reference`. [#5474](https://github.com/PyO3/pyo3/pull/5474)
- `PyCapsuleMethods::name` now returns `CapsuleName` wrapper instead of `&CStr`. [#5474](https://github.com/PyO3/pyo3/pull/5474)
- Deprecate `import_exception_bound` in favour of `import_exception`. [#5480](https://github.com/PyO3/pyo3/pull/5480)
- `PyList::get_item_unchecked`, `PyTuple::get_item_unchecked`, and `PyTuple::get_borrowed_item_unchecked` no longer check for null values at the provided index. [#5494](https://github.com/PyO3/pyo3/pull/5494)
- Allow converting naive datetime into chrono `DateTime<Local>`. [#5507](https://github.com/PyO3/pyo3/pull/5507)

### Removed

- Removed `FromPyObjectBound` trait. [#4390](https://github.com/PyO3/pyo3/pull/4390)

### Fixed

- Fix compilation failure on `wasm32-wasip2`. [#5368](https://github.com/PyO3/pyo3/pull/5368)
- Fix `OsStr` conversion for non-utf8 strings on Windows. [#5444](https://github.com/PyO3/pyo3/pull/5444)
- Fix issue with `cargo vendor` caused by gitignored build artifact `emscripten/pybuilddir.txt`. [#5456](https://github.com/PyO3/pyo3/pull/5456)
- Stop leaking `PyMethodDef` instances inside `#[pyfunction]` macro generated code. [#5459](https://github.com/PyO3/pyo3/pull/5459)
- Don't export definition of FFI struct `PyObjectObFlagsAndRefcnt` on 32-bit Python 3.14 (doesn't exist). [#5499](https://github.com/PyO3/pyo3/pull/5499)
- Fix failure to build for `abi3` interpreters on Windows using maturin's built-in sysconfig in combination with the `generate-import-lib` feature. [#5503](https://github.com/PyO3/pyo3/pull/5503)
- Fix FFI definitions `PyModule_ExecDef` and `PyModule_FromDefAndSpec2` on PyPy. [#5529](https://github.com/PyO3/pyo3/pull/5529)

## [0.26.0] - 2025-08-29

### Packaging

- Bump hashbrown dependency to 0.15. [#5152](https://github.com/PyO3/pyo3/pull/5152)
- Update MSRV to 1.74. [#5171](https://github.com/PyO3/pyo3/pull/5171)
- Set the same maximum supported version for alternative interpreters as for CPython. [#5192](https://github.com/PyO3/pyo3/pull/5192)
- Add optional `bytes` dependency to add conversions for `bytes::Bytes`. [#5252](https://github.com/PyO3/pyo3/pull/5252)
- Publish new crate `pyo3-introspection` to pair with the `experimental-inspect` feature. [#5300](https://github.com/PyO3/pyo3/pull/5300)
- The `PYO3_BUILD_EXTENSION_MODULE` now causes the same effect as the `extension-module` feature. Eventually we expect maturin and setuptools-rust to set this environment variable automatically. Users with their own build systems will need to do the same. [#5343](https://github.com/PyO3/pyo3/pull/5343)

### Added

- Add `#[pyo3(warn(message = "...", category = ...))]` attribute for automatic warnings generation for `#[pyfunction]` and `#[pymethods]`. [#4364](https://github.com/PyO3/pyo3/pull/4364)
- Add `PyMutex`, available on Python 3.13 and newer. [#4523](https://github.com/PyO3/pyo3/pull/4523)
- Add FFI definition `PyMutex_IsLocked`, available on Python 3.14 and newer. [#4523](https://github.com/PyO3/pyo3/pull/4523)
- Add `PyString::from_encoded_object`. [#5017](https://github.com/PyO3/pyo3/pull/5017)
- `experimental-inspect`: add basic input type annotations. [#5089](https://github.com/PyO3/pyo3/pull/5089)
- Add FFI function definitions for `PyFrameObject` from CPython 3.13. [#5154](https://github.com/PyO3/pyo3/pull/5154)
- `experimental-inspect`: tag modules created using `#[pymodule]` or `#[pymodule_init]` functions as incomplete. [#5207](https://github.com/PyO3/pyo3/pull/5207)
- `experimental-inspect`: add basic return type support. [#5208](https://github.com/PyO3/pyo3/pull/5208)
- Add `PyCode::compile` and `PyCodeMethods::run` to create and execute code objects. [#5217](https://github.com/PyO3/pyo3/pull/5217)
- Add `PyOnceLock` type for thread-safe single-initialization. [#5223](https://github.com/PyO3/pyo3/pull/5223)
- Add `PyClassGuard(Mut)` pyclass holders. In the future they will replace `PyRef(Mut)`. [#5233](https://github.com/PyO3/pyo3/pull/5233)
- `experimental-inspect`: allow annotations in `#[pyo3(signature)]` signature attribute. [#5241](https://github.com/PyO3/pyo3/pull/5241)
- Implement `MutexExt` for parking_lot's/lock_api `ReentrantMutex`. [#5258](https://github.com/PyO3/pyo3/pull/5258)
- `experimental-inspect`: support class associated constants. [#5272](https://github.com/PyO3/pyo3/pull/5272)
- Add `Bound::cast` family of functions superseding the `PyAnyMethods::downcast` family. [#5289](https://github.com/PyO3/pyo3/pull/5289)
- Add FFI definitions `Py_Version` and `Py_IsFinalizing`. [#5317](https://github.com/PyO3/pyo3/pull/5317)
- `experimental-inspect`: add output type annotation for `#[pyclass]`. [#5320](https://github.com/PyO3/pyo3/pull/5320)
- `experimental-inspect`: support `#[pyclass(eq, eq_int, ord, hash, str)]`. [#5338](https://github.com/PyO3/pyo3/pull/5338)
- `experimental-inspect`: add basic support for `#[derive(FromPyObject)]` (no struct fields support yet). [#5339](https://github.com/PyO3/pyo3/pull/5339)
- Add `Python::try_attach`. [#5342](https://github.com/PyO3/pyo3/pull/5342)

### Changed

- Use `Py_TPFLAGS_DISALLOW_INSTANTIATION` instead of a `__new__` which always fails for a `#[pyclass]` without a `#[new]` on Python 3.10 and up. [#4568](https://github.com/PyO3/pyo3/pull/4568)
- `PyModule::from_code` now defaults `file_name` to `<string>` if empty. [#4777](https://github.com/PyO3/pyo3/pull/4777)
- Deprecate `PyString::from_object` in favour of `PyString::from_encoded_object`. [#5017](https://github.com/PyO3/pyo3/pull/5017)
- When building with `abi3` for a Python version newer than pyo3 supports, automatically fall back to an abi3 build for the latest supported version. [#5144](https://github.com/PyO3/pyo3/pull/5144)
- Change `is_instance_of` trait bound from `PyTypeInfo` to `PyTypeCheck`. [#5146](https://github.com/PyO3/pyo3/pull/5146)
- Many PyO3 proc macros now report multiple errors instead of only the first one. [#5159](https://github.com/PyO3/pyo3/pull/5159)
- Change `MutexExt` return type to be an associated type. [#5201](https://github.com/PyO3/pyo3/pull/5201)
- Use `PyCallArgs` for `Py::call` and friends so they're equivalent to their `Bound` counterpart. [#5206](https://github.com/PyO3/pyo3/pull/5206)
- Rename `Python::with_gil` to `Python::attach`. [#5209](https://github.com/PyO3/pyo3/pull/5209)
- Rename `Python::allow_threads` to `Python::detach` [#5221](https://github.com/PyO3/pyo3/pull/5221)
- Deprecate `GILOnceCell` type in favour of `PyOnceLock`. [#5223](https://github.com/PyO3/pyo3/pull/5223)
- Rename `pyo3::prepare_freethreaded_python` to `Python::initialize`. [#5247](https://github.com/PyO3/pyo3/pull/5247)
- Convert `PyMemoryError` into/from `io::ErrorKind::OutOfMemory`. [#5256](https://github.com/PyO3/pyo3/pull/5256)
- Deprecate `GILProtected`. [#5285](https://github.com/PyO3/pyo3/pull/5285)
- Move `#[pyclass]` docstring formatting from import time to compile time. [#5286](https://github.com/PyO3/pyo3/pull/5286)
- `Python::attach` will now panic if the Python interpreter is in the process of shutting down. [#5317](https://github.com/PyO3/pyo3/pull/5317)
- Add fast-path to `PyTypeInfo::type_object` for `#[pyclass]` types. [#5324](https://github.com/PyO3/pyo3/pull/5324)
- Deprecate `PyObject` type alias for `Py<PyAny>`. [#5325](https://github.com/PyO3/pyo3/pull/5325)
- Rename `Python::with_gil_unchecked` to `Python::attach_unchecked`. [#5340](https://github.com/PyO3/pyo3/pull/5340)
- Rename `Python::assume_gil_acquired` to `Python::assume_attached`. [#5354](https://github.com/PyO3/pyo3/pull/5354)

### Removed

- Remove FFI definition of internals of `PyFrameObject`. [#5154](https://github.com/PyO3/pyo3/pull/5154)
- Remove `Eq` and `PartialEq` implementations on `PyGetSetDef` FFI definition. [#5196](https://github.com/PyO3/pyo3/pull/5196)
- Remove private FFI definitions `_Py_IsCoreInitialized` and `_Py_InitializeMain`. [#5317](https://github.com/PyO3/pyo3/pull/5317)

### Fixed

- Use critical section in `PyByteArray::to_vec` on freethreaded build to replicate GIL-enabled "soundness". [#4742](https://github.com/PyO3/pyo3/pull/4742)
- Fix precision loss when converting `bigdecimal` into Python. [#5198](https://github.com/PyO3/pyo3/pull/5198)
- Don't treat win7 target as a cross-compilation. [#5210](https://github.com/PyO3/pyo3/pull/5210)
- WASM targets no longer require exception handling support for Python < 3.14. [#5239](https://github.com/PyO3/pyo3/pull/5239)
- Fix segfault when dropping `PyBuffer<T>` after the Python interpreter has been finalized. [#5242](https://github.com/PyO3/pyo3/pull/5242)
- `experimental-inspect`: better automated imports generation. [#5251](https://github.com/PyO3/pyo3/pull/5251)
- `experimental-inspect`: fix introspection of `__richcmp__`, `__concat__`, `__repeat__`, `__inplace_concat__` and `__inplace_repeat__`. [#5273](https://github.com/PyO3/pyo3/pull/5273)
- fixed a leaked borrow, when converting a mutable sub class into a frozen base class using `PyRef::into_super` [#5281](https://github.com/PyO3/pyo3/pull/5281)
- Fix FFI definition `Py_Exit` (never returns, was `()` return value, now `!`). [#5317](https://github.com/PyO3/pyo3/pull/5317)
- `experimental-inspect`: fix handling of module members gated behind `#[cfg(...)]` attributes. [#5318](https://github.com/PyO3/pyo3/pull/5318)

## [0.25.1] - 2025-06-12
### Packaging

- Add support for Windows on ARM64. [#5145](https://github.com/PyO3/pyo3/pull/5145)
- Add `chrono-local` feature for optional conversions for chrono's `Local` timezone & `DateTime<Local>` instances. [#5174](https://github.com/PyO3/pyo3/pull/5174)

### Added

- Add FFI definition `PyBytes_AS_STRING`. [#5121](https://github.com/PyO3/pyo3/pull/5121)
- Add support for module associated consts introspection. [#5150](https://github.com/PyO3/pyo3/pull/5150)

### Changed

- Enable "vectorcall" FFI definitions on GraalPy. [#5121](https://github.com/PyO3/pyo3/pull/5121)
- Use `Py_Is` function on GraalPy [#5121](https://github.com/PyO3/pyo3/pull/5121)

### Fixed

- Report a better compile error for `async` declarations when not using `experimental-async` feature. [#5156](https://github.com/PyO3/pyo3/pull/5156)
- Fix implementation of `FromPyObject` for `uuid::Uuid` on big-endian architectures. [#5161](https://github.com/PyO3/pyo3/pull/5161)
- Fix segmentation faults on 32-bit x86 with Python 3.14. [#5180](https://github.com/PyO3/pyo3/pull/5180)

## [0.25.0] - 2025-05-14

### Packaging

- Support Python 3.14.0b1. [#4811](https://github.com/PyO3/pyo3/pull/4811)
- Bump supported GraalPy version to 24.2. [#5116](https://github.com/PyO3/pyo3/pull/5116)
- Add optional `bigdecimal` dependency to add conversions for `bigdecimal::BigDecimal`. [#5011](https://github.com/PyO3/pyo3/pull/5011)
- Add optional `time` dependency to add conversions for `time` types. [#5057](https://github.com/PyO3/pyo3/pull/5057)
- Remove `cfg-if` dependency. [#5110](https://github.com/PyO3/pyo3/pull/5110)
- Add optional `ordered_float` dependency to add conversions for `ordered_float::NotNan` and `ordered_float::OrderedFloat`. [#5114](https://github.com/PyO3/pyo3/pull/5114)

### Added

- Add initial type stub generation to the `experimental-inspect` feature. [#3977](https://github.com/PyO3/pyo3/pull/3977)
- Add `#[pyclass(generic)]` option to support runtime generic typing. [#4926](https://github.com/PyO3/pyo3/pull/4926)
- Implement `OnceExt` & `MutexExt` for `parking_lot` & `lock_api`. Use the new extension traits by enabling the `arc_lock`, `lock_api`, or `parking_lot` cargo features. [#5044](https://github.com/PyO3/pyo3/pull/5044)
- Implement `From`/`Into` for `Borrowed<T>` -> `Py<T>`. [#5054](https://github.com/PyO3/pyo3/pull/5054)
- Add `PyTzInfo` constructors. [#5055](https://github.com/PyO3/pyo3/pull/5055)
- Add FFI definition `PY_INVALID_STACK_EFFECT`. [#5064](https://github.com/PyO3/pyo3/pull/5064)
- Implement `AsRef<Py<PyAny>>` for `Py<T>`, `Bound<T>` and `Borrowed<T>`. [#5071](https://github.com/PyO3/pyo3/pull/5071)
- Add FFI definition `PyModule_Add` and `compat::PyModule_Add`. [#5085](https://github.com/PyO3/pyo3/pull/5085)
- Add FFI definitions `Py_HashBuffer`, `Py_HashPointer`, and `PyObject_GenericHash`. [#5086](https://github.com/PyO3/pyo3/pull/5086)
- Support `#[pymodule_export]` on `const` items in declarative modules. [#5096](https://github.com/PyO3/pyo3/pull/5096)
- Add `#[pyclass(immutable_type)]` option (on Python 3.14+ with `abi3`, or 3.10+ otherwise) for immutable type objects. [#5101](https://github.com/PyO3/pyo3/pull/5101)
- Support `#[pyo3(rename_all)]` support on `#[derive(IntoPyObject)]`. [#5112](https://github.com/PyO3/pyo3/pull/5112)
- Add `PyRange` wrapper. [#5117](https://github.com/PyO3/pyo3/pull/5117)

### Changed

- Enable use of `datetime` types with `abi3` feature enabled. [#4970](https://github.com/PyO3/pyo3/pull/4970)
- Deprecate `timezone_utc` in favor of `PyTzInfo::utc`. [#5055](https://github.com/PyO3/pyo3/pull/5055)
- Reduce visibility of some CPython implementation details: [#5064](https://github.com/PyO3/pyo3/pull/5064)
  - The FFI definition `PyCodeObject` is now an opaque struct on all Python versions.
  - The FFI definition `PyFutureFeatures` is now only defined up until Python 3.10 (it was present in CPython headers but unused in 3.11 and 3.12).
- Change `PyAnyMethods::is` to take `other: &Bound<T>`. [#5071](https://github.com/PyO3/pyo3/pull/5071)
- Change `Py::is` to take `other: &Py<T>`. [#5071](https://github.com/PyO3/pyo3/pull/5071)
- Change `PyVisit::call` to take `T: Into<Option<&Py<T>>>`. [#5071](https://github.com/PyO3/pyo3/pull/5071)
- Expose `PyDateTime_DATE_GET_TZINFO` and `PyDateTime_TIME_GET_TZINFO` on PyPy 3.10 and later. [#5079](https://github.com/PyO3/pyo3/pull/5079)
- Add `#[track_caller]` to `with_gil` and `with_gil_unchecked`. [#5109](https://github.com/PyO3/pyo3/pull/5109)
- Use `std::thread::park()` instead of `libc::pause()` or `sleep(9999999)`. [#5115](https://github.com/PyO3/pyo3/pull/5115)

### Removed

- Remove all functionality deprecated in PyO3 0.23. [#4982](https://github.com/PyO3/pyo3/pull/4982)
- Remove deprecated `IntoPy` and `ToPyObject` traits. [#5010](https://github.com/PyO3/pyo3/pull/5010)
- Remove private types from `pyo3-ffi` (i.e. starting with `_Py`) which are not referenced by public APIs: `_PyLocalMonitors`, `_Py_GlobalMonitors`, `_PyCoCached`, `_PyCoLineInstrumentationData`, `_PyCoMonitoringData`, `_PyCompilerSrcLocation`, `_PyErr_StackItem`. [#5064](https://github.com/PyO3/pyo3/pull/5064)
- Remove FFI definition `PyCode_GetNumFree` (PyO3 cannot support it due to knowledge of the code object). [#5064](https://github.com/PyO3/pyo3/pull/5064)
- Remove `AsPyPointer` trait. [#5071](https://github.com/PyO3/pyo3/pull/5071)
- Remove support for the deprecated string form of `from_py_with`. [#5097](https://github.com/PyO3/pyo3/pull/5097)
- Remove FFI definitions of private static variables: `_PyMethodWrapper_Type`, `_PyCoroWrapper_Type`, `_PyImport_FrozenBootstrap`, `_PyImport_FrozenStdlib`, `_PyImport_FrozenTest`, `_PyManagedBuffer_Type`, `_PySet_Dummy`, `_PyWeakref_ProxyType`, and `_PyWeakref_CallableProxyType`. [#5105](https://github.com/PyO3/pyo3/pull/5105)
- Remove FFI definitions `PyASCIIObjectState`, `PyUnicode_IS_ASCII`, `PyUnicode_IS_COMPACT`, and `PyUnicode_IS_COMPACT_ASCII` on Python 3.14 and newer. [#5133](https://github.com/PyO3/pyo3/pull/5133)

### Fixed

- Correctly pick up the shared state for conda-based Python installation when reading information from sysconfigdata. [#5037](https://github.com/PyO3/pyo3/pull/5037)
- Fix compile failure with `#[derive(IntoPyObject, FromPyObject)]` when using `#[pyo3()]` options recognised by only one of the two derives. [#5070](https://github.com/PyO3/pyo3/pull/5070)
- Fix various compile errors from missing FFI definitions using certain feature combinations on PyPy and GraalPy. [#5091](https://github.com/PyO3/pyo3/pull/5091)
- Fallback on `backports.zoneinfo` for python <3.9 when converting timezones into python. [#5120](https://github.com/PyO3/pyo3/pull/5120)

## [0.24.2] - 2025-04-21

### Fixed

- Fix `unused_imports` lint of `#[pyfunction]` and `#[pymethods]` expanded in `macro_rules` context. [#5030](https://github.com/PyO3/pyo3/pull/5030)
- Fix size of `PyCodeObject::_co_instrumentation_version` ffi struct member on Python 3.13 for systems where `uintptr_t` is not 64 bits. [#5048](https://github.com/PyO3/pyo3/pull/5048)
- Fix struct-type complex enum variant fields incorrectly exposing raw identifiers as `r#ident` in Python bindings. [#5050](https://github.com/PyO3/pyo3/pull/5050)

## [0.24.1] - 2025-03-31

### Added

- Add `abi3-py313` feature. [#4969](https://github.com/PyO3/pyo3/pull/4969)
- Add `PyAnyMethods::getattr_opt`. [#4978](https://github.com/PyO3/pyo3/pull/4978)
- Add `PyInt::new` constructor for all supported number types (i32, u32, i64, u64, isize, usize). [#4984](https://github.com/PyO3/pyo3/pull/4984)
- Add `pyo3::sync::with_critical_section2`. [#4992](https://github.com/PyO3/pyo3/pull/4992)
- Implement `PyCallArgs` for `Borrowed<'_, 'py, PyTuple>`, `&Bound<'py, PyTuple>`, and `&Py<PyTuple>`. [#5013](https://github.com/PyO3/pyo3/pull/5013)

### Fixed

- Fix `is_type_of` for native types not using same specialized check as `is_type_of_bound`. [#4981](https://github.com/PyO3/pyo3/pull/4981)
- Fix `Probe` class naming issue with `#[pymethods]`. [#4988](https://github.com/PyO3/pyo3/pull/4988)
- Fix compile failure with required `#[pyfunction]` arguments taking `Option<&str>` and `Option<&T>` (for `#[pyclass]` types). [#5002](https://github.com/PyO3/pyo3/pull/5002)
- Fix `PyString::from_object` causing of bounds reads with `encoding` and `errors` parameters which are not nul-terminated. [#5008](https://github.com/PyO3/pyo3/pull/5008)
- Fix compile error when additional options follow after `crate` for `#[pyfunction]`. [#5015](https://github.com/PyO3/pyo3/pull/5015)

## [0.24.0] - 2025-03-09

### Packaging

- Add supported CPython/PyPy versions to cargo package metadata. [#4756](https://github.com/PyO3/pyo3/pull/4756)
- Bump `target-lexicon` dependency to 0.13. [#4822](https://github.com/PyO3/pyo3/pull/4822)
- Add optional `jiff` dependency to add conversions for `jiff` datetime types. [#4823](https://github.com/PyO3/pyo3/pull/4823)
- Add optional `uuid` dependency to add conversions for `uuid::Uuid`. [#4864](https://github.com/PyO3/pyo3/pull/4864)
- Bump minimum supported `inventory` version to 0.3.5. [#4954](https://github.com/PyO3/pyo3/pull/4954)

### Added

- Add `PyIterator::send` method to allow sending values into a python generator. [#4746](https://github.com/PyO3/pyo3/pull/4746)
- Add `PyCallArgs` trait for passing arguments into the Python calling protocol. This enabled using a faster calling convention for certain types, improving performance. [#4768](https://github.com/PyO3/pyo3/pull/4768)
- Add `#[pyo3(default = ...']` option for `#[derive(FromPyObject)]` to set a default value for extracted fields of named structs. [#4829](https://github.com/PyO3/pyo3/pull/4829)
- Add `#[pyo3(into_py_with = ...)]` option for `#[derive(IntoPyObject, IntoPyObjectRef)]`. [#4850](https://github.com/PyO3/pyo3/pull/4850)
- Add FFI definitions `PyThreadState_GetFrame` and `PyFrame_GetBack`. [#4866](https://github.com/PyO3/pyo3/pull/4866)
- Optimize `last` for `BoundListIterator`, `BoundTupleIterator` and `BorrowedTupleIterator`. [#4878](https://github.com/PyO3/pyo3/pull/4878)
- Optimize `Iterator::count()` for `PyDict`, `PyList`, `PyTuple` & `PySet`. [#4878](https://github.com/PyO3/pyo3/pull/4878)
- Optimize `nth`, `nth_back`, `advance_by` and `advance_back_by` for `BoundTupleIterator` [#4897](https://github.com/PyO3/pyo3/pull/4897)
- Add support for `types.GenericAlias` as `pyo3::types::PyGenericAlias`. [#4917](https://github.com/PyO3/pyo3/pull/4917)
- Add `MutextExt` trait to help avoid deadlocks with the GIL while locking a `std::sync::Mutex`. [#4934](https://github.com/PyO3/pyo3/pull/4934)
- Add `#[pyo3(rename_all = "...")]` option for `#[derive(FromPyObject)]`. [#4941](https://github.com/PyO3/pyo3/pull/4941)

### Changed

- Optimize `nth`, `nth_back`, `advance_by` and `advance_back_by` for `BoundListIterator`. [#4810](https://github.com/PyO3/pyo3/pull/4810)
- Use `DerefToPyAny` in blanket implementations of `From<Py<T>>` and `From<Bound<'py, T>>` for `PyObject`. [#4593](https://github.com/PyO3/pyo3/pull/4593)
- Map `io::ErrorKind::IsADirectory`/`NotADirectory` to the corresponding Python exception on Rust 1.83+. [#4747](https://github.com/PyO3/pyo3/pull/4747)
- `PyAnyMethods::call` and friends now require `PyCallArgs` for their positional arguments. [#4768](https://github.com/PyO3/pyo3/pull/4768)
- Expose FFI definitions for `PyObject_Vectorcall(Method)` on the stable abi on 3.12+. [#4853](https://github.com/PyO3/pyo3/pull/4853)
- `#[pyo3(from_py_with = ...)]` now take a path rather than a string literal [#4860](https://github.com/PyO3/pyo3/pull/4860)
- Format Python traceback in impl Debug for PyErr. [#4900](https://github.com/PyO3/pyo3/pull/4900)
- Convert `PathBuf` & `Path` into Python `pathlib.Path` instead of `PyString`. [#4925](https://github.com/PyO3/pyo3/pull/4925)
- Relax parsing of exotic Python versions. [#4949](https://github.com/PyO3/pyo3/pull/4949)
- PyO3 threads now hang instead of `pthread_exit` trying to acquire the GIL when the interpreter is shutting down. This mimics the [Python 3.14](https://github.com/python/cpython/issues/87135) behavior and avoids undefined behavior and crashes. [#4874](https://github.com/PyO3/pyo3/pull/4874)

### Removed

- Remove implementations of `Deref` for `PyAny` and other "native" types. [#4593](https://github.com/PyO3/pyo3/pull/4593)
- Remove implicit default of trailing optional arguments (see #2935) [#4729](https://github.com/PyO3/pyo3/pull/4729)
- Remove the deprecated implicit eq fallback for simple enums. [#4730](https://github.com/PyO3/pyo3/pull/4730)

### Fixed

- Correct FFI definition of `PyIter_Send` to return a `PySendResult`. [#4746](https://github.com/PyO3/pyo3/pull/4746)
- Fix a thread safety issue in the runtime borrow checker used by mutable pyclass instances on the free-threaded build. [#4948](https://github.com/PyO3/pyo3/pull/4948)


## [0.23.5] - 2025-02-22

### Packaging

- Add support for PyPy3.11 [#4760](https://github.com/PyO3/pyo3/pull/4760)

### Fixed

- Fix thread-unsafe implementation of freelist pyclasses on the free-threaded build. [#4902](https://github.com/PyO3/pyo3/pull/4902)
- Re-enable a workaround for situations where CPython incorrectly does not add `__builtins__` to `__globals__` in code executed by `Python::py_run` (was removed in PyO3 0.23.0). [#4921](https://github.com/PyO3/pyo3/pull/4921)

## [0.23.4] - 2025-01-10

### Added

- Add `PyList::locked_for_each`, which uses a critical section to lock the list on the free-threaded build. [#4789](https://github.com/PyO3/pyo3/pull/4789)
- Add `pyo3_build_config::add_python_framework_link_args` build script API to set rpath when using macOS system Python. [#4833](https://github.com/PyO3/pyo3/pull/4833)

### Changed

- Use `datetime.fold` to distinguish ambiguous datetimes when converting to and from `chrono::DateTime<Tz>` (rather than erroring). [#4791](https://github.com/PyO3/pyo3/pull/4791)
- Optimize PyList iteration on the free-threaded build. [#4789](https://github.com/PyO3/pyo3/pull/4789)

### Fixed

- Fix unnecessary internal `py.allow_threads` GIL-switch when attempting to access contents of a `PyErr` which originated from Python (could lead to unintended deadlocks). [#4766](https://github.com/PyO3/pyo3/pull/4766)
- Fix thread-unsafe access of dict internals in `BoundDictIterator` on the free-threaded build. [#4788](https://github.com/PyO3/pyo3/pull/4788)
* Fix unnecessary critical sections in `BoundDictIterator` on the free-threaded build. [#4788](https://github.com/PyO3/pyo3/pull/4788)
- Fix time-of-check to time-of-use issues with list iteration on the free-threaded build. [#4789](https://github.com/PyO3/pyo3/pull/4789)
- Fix `chrono::DateTime<Tz>` to-Python conversion when `Tz` is `chrono_tz::Tz`. [#4790](https://github.com/PyO3/pyo3/pull/4790)
- Fix `#[pyclass]` not being able to be named `Probe`. [#4794](https://github.com/PyO3/pyo3/pull/4794)
- Fix not treating cross-compilation from x64 to aarch64 on Windows as a cross-compile. [#4800](https://github.com/PyO3/pyo3/pull/4800)
- Fix missing struct fields on GraalPy when subclassing builtin classes. [#4802](https://github.com/PyO3/pyo3/pull/4802)
- Fix generating import lib for PyPy when `abi3` feature is enabled. [#4806](https://github.com/PyO3/pyo3/pull/4806)
- Fix generating import lib for python3.13t when `abi3` feature is enabled. [#4808](https://github.com/PyO3/pyo3/pull/4808)
- Fix compile failure for raw identifiers like `r#box` in `derive(FromPyObject)`. [#4814](https://github.com/PyO3/pyo3/pull/4814)
- Fix compile failure for `#[pyclass]` enum variants with more than 12 fields. [#4832](https://github.com/PyO3/pyo3/pull/4832)


## [0.23.3] - 2024-12-03

### Packaging

- Bump optional `python3-dll-a` dependency to 0.2.11. [#4749](https://github.com/PyO3/pyo3/pull/4749)

### Fixed

- Fix unresolved symbol link failures on Windows when compiling for Python 3.13t with `abi3` features enabled. [#4733](https://github.com/PyO3/pyo3/pull/4733)
- Fix unresolved symbol link failures on Windows when compiling for Python 3.13t using the `generate-import-lib` feature. [#4749](https://github.com/PyO3/pyo3/pull/4749)
- Fix compile-time regression in PyO3 0.23.0 where changing `PYO3_CONFIG_FILE` would not reconfigure PyO3 for the new interpreter. [#4758](https://github.com/PyO3/pyo3/pull/4758)

## [0.23.2] - 2024-11-25

### Added

- Add `IntoPyObjectExt` trait. [#4708](https://github.com/PyO3/pyo3/pull/4708)

### Fixed

- Fix compile failures when building for free-threaded Python when the `abi3` or `abi3-pyxx` features are enabled. [#4719](https://github.com/PyO3/pyo3/pull/4719)
- Fix `ambiguous_associated_items` lint error in `#[pyclass]` and `#[derive(IntoPyObject)]` macros. [#4725](https://github.com/PyO3/pyo3/pull/4725)


## [0.23.1] - 2024-11-16

Re-release of 0.23.0 with fixes to docs.rs build.

## [0.23.0] - 2024-11-15

### Packaging

- Drop support for PyPy 3.7 and 3.8. [#4582](https://github.com/PyO3/pyo3/pull/4582)
- Extend range of supported versions of `hashbrown` optional dependency to include version 0.15. [#4604](https://github.com/PyO3/pyo3/pull/4604)
- Bump minimum version of `eyre` optional dependency to 0.6.8. [#4617](https://github.com/PyO3/pyo3/pull/4617)
- Bump minimum version of `hashbrown` optional dependency to 0.14.5. [#4617](https://github.com/PyO3/pyo3/pull/4617)
- Bump minimum version of `indexmap` optional dependency to 2.5.0. [#4617](https://github.com/PyO3/pyo3/pull/4617)
- Bump minimum version of `num-complex` optional dependency to 0.4.6. [#4617](https://github.com/PyO3/pyo3/pull/4617)
- Bump minimum version of `chrono-tz` optional dependency to 0.10. [#4617](https://github.com/PyO3/pyo3/pull/4617)
- Support free-threaded Python 3.13t. [#4588](https://github.com/PyO3/pyo3/pull/4588)

### Added

- Add `IntoPyObject` (fallible) conversion trait to convert from Rust to Python values. [#4060](https://github.com/PyO3/pyo3/pull/4060)
- Add `#[pyclass(str="<format string>")]` option to generate `__str__` based on a `Display` implementation or format string. [#4233](https://github.com/PyO3/pyo3/pull/4233)
- Implement `PartialEq` for `Bound<'py, PyInt>` with `u8`, `u16`, `u32`, `u64`, `u128`, `usize`, `i8`, `i16`, `i32`, `i64`, `i128` and `isize`. [#4317](https://github.com/PyO3/pyo3/pull/4317)
- Implement `PartialEq<f64>` and `PartialEq<f32>` for `Bound<'py, PyFloat>`. [#4348](https://github.com/PyO3/pyo3/pull/4348)
- Add `as_super` and `into_super` methods for `Bound<T: PyClass>`. [#4351](https://github.com/PyO3/pyo3/pull/4351)
- Add FFI definitions `PyCFunctionFast` and `PyCFunctionFastWithKeywords` [#4415](https://github.com/PyO3/pyo3/pull/4415)
- Add FFI definitions for `PyMutex` on Python 3.13 and newer. [#4421](https://github.com/PyO3/pyo3/pull/4421)
- Add `PyDict::locked_for_each` to iterate efficiently on freethreaded Python. [#4439](https://github.com/PyO3/pyo3/pull/4439)
- Add FFI definitions `PyObject_GetOptionalAttr`, `PyObject_GetOptionalAttrString`, `PyObject_HasAttrWithError`, `PyObject_HasAttrStringWithError`, `Py_CONSTANT_*` constants, `Py_GetConstant`, `Py_GetConstantBorrowed`, and `PyType_GetModuleByDef` on Python 3.13 and newer. [#4447](https://github.com/PyO3/pyo3/pull/4447)
- Add FFI definitions for the Python critical section API available on Python 3.13 and newer. [#4477](https://github.com/PyO3/pyo3/pull/4477)
- Add derive macro for `IntoPyObject`. [#4495](https://github.com/PyO3/pyo3/pull/4495)
- Add `Borrowed::as_ptr`. [#4520](https://github.com/PyO3/pyo3/pull/4520)
- Add FFI definition for `PyImport_AddModuleRef`. [#4529](https://github.com/PyO3/pyo3/pull/4529)
- Add `PyAnyMethods::try_iter`. [#4553](https://github.com/PyO3/pyo3/pull/4553)
- Add `pyo3::sync::with_critical_section`, a wrapper around the Python Critical Section API added in Python 3.13. [#4587](https://github.com/PyO3/pyo3/pull/4587)
- Add `#[pymodule(gil_used = false)]` option to declare that a module supports the free-threaded build. [#4588](https://github.com/PyO3/pyo3/pull/4588)
- Add `PyModule::gil_used` method to declare that a module supports the free-threaded build. [#4588](https://github.com/PyO3/pyo3/pull/4588)
- Add FFI definition `PyDateTime_CAPSULE_NAME`. [#4634](https://github.com/PyO3/pyo3/pull/4634)
- Add `PyMappingProxy` type to represent the `mappingproxy` Python class. [#4644](https://github.com/PyO3/pyo3/pull/4644)
- Add FFI definitions `PyList_Extend` and `PyList_Clear`. [#4667](https://github.com/PyO3/pyo3/pull/4667)
- Add derive macro for `IntoPyObjectRef`. [#4674](https://github.com/PyO3/pyo3/pull/4674)
- Add `pyo3::sync::OnceExt` and `pyo3::sync::OnceLockExt` traits. [#4676](https://github.com/PyO3/pyo3/pull/4676)

### Changed

- Prefer `IntoPyObject` over `IntoPy<Py<PyAny>>>` for `#[pyfunction]` and `#[pymethods]` return types. [#4060](https://github.com/PyO3/pyo3/pull/4060)
- Report multiple errors from `#[pyclass]` and `#[pyo3(..)]` attributes. [#4243](https://github.com/PyO3/pyo3/pull/4243)
- Nested declarative `#[pymodule]` are automatically treated as submodules (no `PyInit_` entrypoint is created). [#4308](https://github.com/PyO3/pyo3/pull/4308)
- Deprecate `PyAnyMethods::is_ellipsis` (`Py::is_ellipsis` was deprecated in PyO3 0.20). [#4322](https://github.com/PyO3/pyo3/pull/4322)
- Deprecate `PyLong` in favor of `PyInt`. [#4347](https://github.com/PyO3/pyo3/pull/4347)
- Rename `IntoPyDict::into_py_dict_bound` to `IntoPyDict::into_py_dict`. [#4388](https://github.com/PyO3/pyo3/pull/4388)
- `PyModule::from_code` now expects `&CStr` as arguments instead of `&str`. [#4404](https://github.com/PyO3/pyo3/pull/4404)
- Use "fastcall" Python calling convention for `#[pyfunction]`s when compiling on abi3 for Python 3.10 and up. [#4415](https://github.com/PyO3/pyo3/pull/4415)
- Remove `Copy` and `Clone` from `PyObject` struct FFI definition. [#4434](https://github.com/PyO3/pyo3/pull/4434)
- `Python::eval` and `Python::run` now take a `&CStr` instead of `&str`. [#4435](https://github.com/PyO3/pyo3/pull/4435)
- Deprecate `IPowModulo`, `PyClassAttributeDef`, `PyGetterDef`, `PyMethodDef`, `PyMethodDefType`, and `PySetterDef` from PyO3's public API. [#4441](https://github.com/PyO3/pyo3/pull/4441)
- `IntoPyObject` impls for `Vec<u8>`, `&[u8]`, `[u8; N]`, `Cow<[u8]>` and `SmallVec<[u8; N]>` now convert into Python `bytes` rather than a `list` of integers. [#4442](https://github.com/PyO3/pyo3/pull/4442)
- Emit a compile-time error when attempting to subclass a class that doesn't allow subclassing. [#4453](https://github.com/PyO3/pyo3/pull/4453)
- `IntoPyDict::into_py_dict` is now fallible due to `IntoPyObject` migration. [#4493](https://github.com/PyO3/pyo3/pull/4493)
- The `abi3` feature will now override config files provided via `PYO3_BUILD_CONFIG`. [#4497](https://github.com/PyO3/pyo3/pull/4497)
- Disable the `GILProtected` struct on free-threaded Python. [#4504](https://github.com/PyO3/pyo3/pull/4504)
- Updated FFI definitions for functions and struct fields that have been deprecated or removed from CPython. [#4534](https://github.com/PyO3/pyo3/pull/4534)
- Disable `PyListMethods::get_item_unchecked` on free-threaded Python. [#4539](https://github.com/PyO3/pyo3/pull/4539)
- Add `GILOnceCell::import`. [#4542](https://github.com/PyO3/pyo3/pull/4542)
- Deprecate `PyAnyMethods::iter` in favour of `PyAnyMethods::try_iter`. [#4553](https://github.com/PyO3/pyo3/pull/4553)
- The `#[pyclass]` macro now requires a types to be `Sync`. (Except for `#[pyclass(unsendable)]` types). [#4566](https://github.com/PyO3/pyo3/pull/4566)
- `PyList::new` and `PyTuple::new` are now fallible due to `IntoPyObject` migration. [#4580](https://github.com/PyO3/pyo3/pull/4580)
- `PyErr::matches` is now fallible due to `IntoPyObject` migration. [#4595](https://github.com/PyO3/pyo3/pull/4595)
- Deprecate `ToPyObject` in favour of `IntoPyObject` [#4595](https://github.com/PyO3/pyo3/pull/4595)
- Deprecate `PyWeakrefMethods::get_option`. [#4597](https://github.com/PyO3/pyo3/pull/4597)
- Seal `PyWeakrefMethods` trait. [#4598](https://github.com/PyO3/pyo3/pull/4598)
- Remove `PyNativeTypeInitializer` and `PyObjectInit` from the PyO3 public API. [#4611](https://github.com/PyO3/pyo3/pull/4611)
- Deprecate `IntoPy` in favor of `IntoPyObject` [#4618](https://github.com/PyO3/pyo3/pull/4618)
- Eagerly normalize exceptions in `PyErr::take()` and `PyErr::fetch()` on Python 3.11 and older. [#4655](https://github.com/PyO3/pyo3/pull/4655)
- Move `IntoPy::type_output` to `IntoPyObject::type_output`. [#4657](https://github.com/PyO3/pyo3/pull/4657)
- Change return type of `PyMapping::keys`, `PyMapping::values` and `PyMapping::items` to `Bound<'py, PyList>` instead of `Bound<'py, PySequence>`. [#4661](https://github.com/PyO3/pyo3/pull/4661)
- Complex enums now allow field types that either implement `IntoPyObject` by reference or by value together with `Clone`. This makes `Py<T>` available as field type. [#4694](https://github.com/PyO3/pyo3/pull/4694)


### Removed

- Remove all functionality deprecated in PyO3 0.20. [#4322](https://github.com/PyO3/pyo3/pull/4322)
- Remove all functionality deprecated in PyO3 0.21. [#4323](https://github.com/PyO3/pyo3/pull/4323)
- Deprecate `PyUnicode` in favour of `PyString`. [#4370](https://github.com/PyO3/pyo3/pull/4370)
- Remove deprecated `gil-refs` feature. [#4378](https://github.com/PyO3/pyo3/pull/4378)
- Remove private FFI definitions `_Py_IMMORTAL_REFCNT`, `_Py_IsImmortal`, `_Py_TPFLAGS_STATIC_BUILTIN`, `_Py_Dealloc`, `_Py_IncRef`, `_Py_DecRef`. [#4447](https://github.com/PyO3/pyo3/pull/4447)
- Remove private FFI definitions `_Py_c_sum`, `_Py_c_diff`, `_Py_c_neg`, `_Py_c_prod`, `_Py_c_quot`, `_Py_c_pow`, `_Py_c_abs`. [#4521](https://github.com/PyO3/pyo3/pull/4521)
- Remove `_borrowed` methods of `PyWeakRef` and `PyWeakRefProxy`. [#4528](https://github.com/PyO3/pyo3/pull/4528)
- Removed private FFI definition `_PyErr_ChainExceptions`. [#4534](https://github.com/PyO3/pyo3/pull/4534)

### Fixed

- Fix invalid library search path `lib_dir` when cross-compiling. [#4389](https://github.com/PyO3/pyo3/pull/4389)
- Fix FFI definition `Py_Is` for PyPy on 3.10 to call the function defined by PyPy. [#4447](https://github.com/PyO3/pyo3/pull/4447)
- Fix compile failure when using `#[cfg]` attributes for simple enum variants. [#4509](https://github.com/PyO3/pyo3/pull/4509)
- Fix compiler warning for `non_snake_case` method names inside `#[pymethods]` generated code. [#4567](https://github.com/PyO3/pyo3/pull/4567)
- Fix compile error with `#[derive(FromPyObject)]` generic struct with trait bounds. [#4645](https://github.com/PyO3/pyo3/pull/4645)
- Fix compile error for `#[classmethod]` and `#[staticmethod]` on magic methods. [#4654](https://github.com/PyO3/pyo3/pull/4654)
- Fix compile warning for `unsafe_op_in_unsafe_fn` in generated macro code. [#4674](https://github.com/PyO3/pyo3/pull/4674)
- Fix incorrect deprecation warning for `#[pyclass] enum`s with custom `__eq__` implementation. [#4692](https://github.com/PyO3/pyo3/pull/4692)
- Fix `non_upper_case_globals` lint firing for generated `__match_args__` on complex enums. [#4705](https://github.com/PyO3/pyo3/pull/4705)

## [0.22.5] - 2024-10-15

### Fixed

- Fix regression in 0.22.4 of naming collision in `__clear__` slot and `clear` method generated code. [#4619](https://github.com/PyO3/pyo3/pull/4619)


## [0.22.4] - 2024-10-12

### Added

- Add FFI definition `PyWeakref_GetRef` and `compat::PyWeakref_GetRef`. [#4528](https://github.com/PyO3/pyo3/pull/4528)

### Changed

- Deprecate `_borrowed` methods on `PyWeakRef` and `PyWeakrefProxy` (just use the owning forms). [#4590](https://github.com/PyO3/pyo3/pull/4590)

### Fixed

- Revert removal of private FFI function `_PyLong_NumBits` on Python 3.13 and later. [#4450](https://github.com/PyO3/pyo3/pull/4450)
- Fix `__traverse__` functions for base classes not being called by subclasses created with `#[pyclass(extends = ...)]`. [#4563](https://github.com/PyO3/pyo3/pull/4563)
- Fix regression in 0.22.3 failing compiles under `#![forbid(unsafe_code)]`. [#4574](https://github.com/PyO3/pyo3/pull/4574)
- Fix `create_exception` macro triggering lint and compile errors due to interaction with `gil-refs` feature. [#4589](https://github.com/PyO3/pyo3/pull/4589)
- Workaround possible use-after-free in `_borrowed` methods on `PyWeakRef` and `PyWeakrefProxy` by leaking their contents. [#4590](https://github.com/PyO3/pyo3/pull/4590)
- Fix crash calling `PyType_GetSlot` on static types before Python 3.10. [#4599](https://github.com/PyO3/pyo3/pull/4599)


## [0.22.3] - 2024-09-15

### Added

- Add `pyo3::ffi::compat` namespace with compatibility shims for C API functions added in recent versions of Python.
- Add FFI definition `PyDict_GetItemRef` on Python 3.13 and newer, and `compat::PyDict_GetItemRef` for all versions. [#4355](https://github.com/PyO3/pyo3/pull/4355)
- Add FFI definition `PyList_GetItemRef` on Python 3.13 and newer, and `pyo3_ffi::compat::PyList_GetItemRef` for all versions. [#4410](https://github.com/PyO3/pyo3/pull/4410)
- Add FFI definitions `compat::Py_NewRef` and `compat::Py_XNewRef`. [#4445](https://github.com/PyO3/pyo3/pull/4445)
- Add FFI definitions `compat::PyObject_CallNoArgs` and `compat::PyObject_CallMethodNoArgs`. [#4461](https://github.com/PyO3/pyo3/pull/4461)
- Add `GilOnceCell<Py<T>>::clone_ref`. [#4511](https://github.com/PyO3/pyo3/pull/4511)

### Changed

- Improve error messages for `#[pyfunction]` defined inside `#[pymethods]`. [#4349](https://github.com/PyO3/pyo3/pull/4349)
- Improve performance of calls to Python by using the vectorcall calling convention where possible. [#4456](https://github.com/PyO3/pyo3/pull/4456)
- Mention the type name in the exception message when trying to instantiate a class with no constructor defined. [#4481](https://github.com/PyO3/pyo3/pull/4481)

### Removed

- Remove private FFI definition `_Py_PackageContext`. [#4420](https://github.com/PyO3/pyo3/pull/4420)

### Fixed

- Fix compile failure in declarative `#[pymodule]` under presence of `#![no_implicit_prelude]`. [#4328](https://github.com/PyO3/pyo3/pull/4328)
- Fix use of borrowed reference in `PyDict::get_item` (unsafe in free-threaded Python). [#4355](https://github.com/PyO3/pyo3/pull/4355)
- Fix `#[pyclass(eq)]` macro hygiene issues for structs and enums. [#4359](https://github.com/PyO3/pyo3/pull/4359)
- Fix hygiene/span issues of `#[pyfunction]` and `#[pymethods]` generated code which affected expansion in `macro_rules` context. [#4382](https://github.com/PyO3/pyo3/pull/4382)
- Fix `unsafe_code` lint error in `#[pyclass]` generated code. [#4396](https://github.com/PyO3/pyo3/pull/4396)
- Fix async functions returning a tuple only returning the first element to Python. [#4407](https://github.com/PyO3/pyo3/pull/4407)
- Fix use of borrowed reference in `PyList::get_item` (unsafe in free-threaded Python). [#4410](https://github.com/PyO3/pyo3/pull/4410)
- Correct FFI definition `PyArg_ParseTupleAndKeywords` to take `*const *const c_char` instead of `*mut *mut c_char` on Python 3.13 and up. [#4420](https://github.com/PyO3/pyo3/pull/4420)
- Fix a soundness bug with `PyClassInitializer`: panic if adding subclass to existing instance via `PyClassInitializer::from(Py<BaseClass>).add_subclass(SubClass)`. [#4454](https://github.com/PyO3/pyo3/pull/4454)
- Fix illegal reference counting op inside implementation of `__traverse__` handlers. [#4479](https://github.com/PyO3/pyo3/pull/4479)

## [0.22.2] - 2024-07-17

### Packaging

- Require opt-in to freethreaded Python using the `UNSAFE_PYO3_BUILD_FREE_THREADED=1` environment variable (it is not yet supported by PyO3). [#4327](https://github.com/PyO3/pyo3/pull/4327)

### Changed

- Use FFI function calls for reference counting on all abi3 versions. [#4324](https://github.com/PyO3/pyo3/pull/4324)
- `#[pymodule(...)]` now directly accepts all relevant `#[pyo3(...)]` options. [#4330](https://github.com/PyO3/pyo3/pull/4330)

### Fixed

- Fix compile failure in declarative `#[pymodule]` under presence of `#![no_implicit_prelude]`. [#4328](https://github.com/PyO3/pyo3/pull/4328)
- Fix compile failure due to c-string literals on Rust < 1.79. [#4353](https://github.com/PyO3/pyo3/pull/4353)

## [0.22.1] - 2024-07-06

### Added

- Add `#[pyo3(submodule)]` option for declarative `#[pymodule]`s. [#4301](https://github.com/PyO3/pyo3/pull/4301)
- Implement `PartialEq<bool>` for `Bound<'py, PyBool>`. [#4305](https://github.com/PyO3/pyo3/pull/4305)

### Fixed

- Return `NotImplemented` instead of raising `TypeError` from generated equality method when comparing different types. [#4287](https://github.com/PyO3/pyo3/pull/4287)
- Handle full-path `#[pyo3::prelude::pymodule]` and similar for `#[pyclass]` and `#[pyfunction]` in declarative modules. [#4288](https://github.com/PyO3/pyo3/pull/4288)
- Fix 128-bit int regression on big-endian platforms with Python <3.13. [#4291](https://github.com/PyO3/pyo3/pull/4291)
- Stop generating code that will never be covered with declarative modules. [#4297](https://github.com/PyO3/pyo3/pull/4297)
- Fix invalid deprecation warning for trailing optional on `#[setter]` function. [#4304](https://github.com/PyO3/pyo3/pull/4304)

## [0.22.0] - 2024-06-24

### Packaging

- Update `heck` dependency to 0.5. [#3966](https://github.com/PyO3/pyo3/pull/3966)
- Extend range of supported versions of `chrono-tz` optional dependency to include version 0.10. [#4061](https://github.com/PyO3/pyo3/pull/4061)
- Update MSRV to 1.63. [#4129](https://github.com/PyO3/pyo3/pull/4129)
- Add optional `num-rational` feature to add conversions with Python's `fractions.Fraction`. [#4148](https://github.com/PyO3/pyo3/pull/4148)
- Support Python 3.13. [#4184](https://github.com/PyO3/pyo3/pull/4184)

### Added

- Add `PyWeakref`, `PyWeakrefReference` and `PyWeakrefProxy`. [#3835](https://github.com/PyO3/pyo3/pull/3835)
- Support `#[pyclass]` on enums that have tuple variants. [#4072](https://github.com/PyO3/pyo3/pull/4072)
- Add support for scientific notation in `Decimal` conversion. [#4079](https://github.com/PyO3/pyo3/pull/4079)
- Add `pyo3_disable_reference_pool` conditional compilation flag to avoid the overhead of the global reference pool at the cost of known limitations as explained in the performance section of the guide. [#4095](https://github.com/PyO3/pyo3/pull/4095)
- Add `#[pyo3(constructor = (...))]` to customize the generated constructors for complex enum variants. [#4158](https://github.com/PyO3/pyo3/pull/4158)
- Add `PyType::module`, which always matches Python `__module__`. [#4196](https://github.com/PyO3/pyo3/pull/4196)
- Add `PyType::fully_qualified_name` which matches the "fully qualified name" defined in [PEP 737](https://peps.python.org/pep-0737). [#4196](https://github.com/PyO3/pyo3/pull/4196)
- Add `PyTypeMethods::mro` and `PyTypeMethods::bases`. [#4197](https://github.com/PyO3/pyo3/pull/4197)
- Add `#[pyclass(ord)]` to implement ordering based on `PartialOrd`. [#4202](https://github.com/PyO3/pyo3/pull/4202)
- Implement `ToPyObject` and `IntoPy<PyObject>` for `PyBackedStr` and `PyBackedBytes`. [#4205](https://github.com/PyO3/pyo3/pull/4205)
- Add `#[pyclass(hash)]` option to implement `__hash__` in terms of the `Hash` implementation [#4206](https://github.com/PyO3/pyo3/pull/4206)
- Add `#[pyclass(eq)]` option to generate `__eq__` based on `PartialEq`, and `#[pyclass(eq_int)]` for simple enums to implement equality based on their discriminants. [#4210](https://github.com/PyO3/pyo3/pull/4210)
- Implement `From<Bound<'py, T>>` for `PyClassInitializer<T>`. [#4214](https://github.com/PyO3/pyo3/pull/4214)
- Add `as_super` methods to `PyRef` and `PyRefMut` for accessing the base class by reference. [#4219](https://github.com/PyO3/pyo3/pull/4219)
- Implement `PartialEq<str>` for `Bound<'py, PyString>`. [#4245](https://github.com/PyO3/pyo3/pull/4245)
- Implement `PyModuleMethods::filename` on PyPy. [#4249](https://github.com/PyO3/pyo3/pull/4249)
- Implement `PartialEq<[u8]>` for `Bound<'py, PyBytes>`. [#4250](https://github.com/PyO3/pyo3/pull/4250)
- Add `pyo3_ffi::c_str` macro to create `&'static CStr` on Rust versions which don't have 1.77's `c""` literals. [#4255](https://github.com/PyO3/pyo3/pull/4255)
- Support `bool` conversion with `numpy` 2.0's `numpy.bool` type [#4258](https://github.com/PyO3/pyo3/pull/4258)
- Add `PyAnyMethods::{bitnot, matmul, floor_div, rem, divmod}`. [#4264](https://github.com/PyO3/pyo3/pull/4264)

### Changed

- Change the type of `PySliceIndices::slicelength` and the `length` parameter of `PySlice::indices()`. [#3761](https://github.com/PyO3/pyo3/pull/3761)
- Deprecate implicit default for trailing optional arguments [#4078](https://github.com/PyO3/pyo3/pull/4078)
- `Clone`ing pointers into the Python heap has been moved behind the `py-clone` feature, as it must panic without the GIL being held as a soundness fix. [#4095](https://github.com/PyO3/pyo3/pull/4095)
- Add `#[track_caller]` to all `Py<T>`, `Bound<'py, T>` and `Borrowed<'a, 'py, T>` methods which can panic. [#4098](https://github.com/PyO3/pyo3/pull/4098)
- Change `PyAnyMethods::dir` to be fallible and return `PyResult<Bound<'py, PyList>>` (and similar for `PyAny::dir`). [#4100](https://github.com/PyO3/pyo3/pull/4100)
- The global reference pool (to track pending reference count decrements) is now initialized lazily to avoid the overhead of taking a mutex upon function entry when the functionality is not actually used. [#4178](https://github.com/PyO3/pyo3/pull/4178)
- Emit error messages when using `weakref` or `dict` when compiling for `abi3` for Python older than 3.9. [#4194](https://github.com/PyO3/pyo3/pull/4194)
- Change `PyType::name` to always match Python `__name__`. [#4196](https://github.com/PyO3/pyo3/pull/4196)
- Remove CPython internal ffi call for complex number including: add, sub, mul, div, neg, abs, pow. Added PyAnyMethods::{abs, pos, neg} [#4201](https://github.com/PyO3/pyo3/pull/4201)
- Deprecate implicit integer comparison for simple enums in favor of `#[pyclass(eq_int)]`. [#4210](https://github.com/PyO3/pyo3/pull/4210)
- Set the `module=` attribute of declarative modules' child `#[pymodule]`s and `#[pyclass]`es. [#4213](https://github.com/PyO3/pyo3/pull/4213)
- Set the `module` option for complex enum variants from the value set on the complex enum `module`. [#4228](https://github.com/PyO3/pyo3/pull/4228)
- Respect the Python "limited API" when building for the `abi3` feature on PyPy or GraalPy. [#4237](https://github.com/PyO3/pyo3/pull/4237)
- Optimize code generated by `#[pyo3(get)]` on `#[pyclass]` fields. [#4254](https://github.com/PyO3/pyo3/pull/4254)
- `PyCFunction::new`, `PyCFunction::new_with_keywords` and `PyCFunction::new_closure` now take `&'static CStr` name and doc arguments (previously was `&'static str`). [#4255](https://github.com/PyO3/pyo3/pull/4255)
- The `experimental-declarative-modules` feature is now stabilized and available by default. [#4257](https://github.com/PyO3/pyo3/pull/4257)

### Fixed

- Fix panic when `PYO3_CROSS_LIB_DIR` is set to a missing path. [#4043](https://github.com/PyO3/pyo3/pull/4043)
- Fix a compile error when exporting an exception created with `create_exception!` living in a different Rust module using the `declarative-module` feature. [#4086](https://github.com/PyO3/pyo3/pull/4086)
- Fix FFI definitions of `PY_VECTORCALL_ARGUMENTS_OFFSET` and `PyVectorcall_NARGS` to fix a false-positive assertion. [#4104](https://github.com/PyO3/pyo3/pull/4104)
- Disable `PyUnicode_DATA` on PyPy: not exposed by PyPy. [#4116](https://github.com/PyO3/pyo3/pull/4116)
- Correctly handle `#[pyo3(from_py_with = ...)]` attribute on dunder (`__magic__`) method arguments instead of silently ignoring it. [#4117](https://github.com/PyO3/pyo3/pull/4117)
- Fix a compile error when declaring a standalone function or class method with a Python name that is a Rust keyword. [#4226](https://github.com/PyO3/pyo3/pull/4226)
- Fix declarative modules discarding doc comments on the `mod` node. [#4236](https://github.com/PyO3/pyo3/pull/4236)
- Fix `__dict__` attribute missing for `#[pyclass(dict)]` instances when building for `abi3` on Python 3.9. [#4251](https://github.com/PyO3/pyo3/pull/4251)

## [0.21.2] - 2024-04-16

### Changed

- Deprecate the `PySet::empty()` gil-ref constructor. [#4082](https://github.com/PyO3/pyo3/pull/4082)

### Fixed

- Fix compile error for `async fn` in `#[pymethods]` with a `&self` receiver and more than one additional argument. [#4035](https://github.com/PyO3/pyo3/pull/4035)
- Improve error message for wrong receiver type in `__traverse__`. [#4045](https://github.com/PyO3/pyo3/pull/4045)
- Fix compile error when exporting a `#[pyclass]` living in a different Rust module using the `experimental-declarative-modules` feature. [#4054](https://github.com/PyO3/pyo3/pull/4054)
- Fix `missing_docs` lint triggering on documented `#[pymodule]` functions. [#4067](https://github.com/PyO3/pyo3/pull/4067)
- Fix undefined symbol errors for extension modules on AIX (by linking `libpython`). [#4073](https://github.com/PyO3/pyo3/pull/4073)

## [0.21.1] - 2024-04-01

### Added

- Implement `Send` and `Sync` for `PyBackedStr` and `PyBackedBytes`. [#4007](https://github.com/PyO3/pyo3/pull/4007)
- Implement `Clone`, `Debug`, `PartialEq`, `Eq`, `PartialOrd`, `Ord` and `Hash` implementation for `PyBackedBytes` and `PyBackedStr`, and `Display` for `PyBackedStr`. [#4020](https://github.com/PyO3/pyo3/pull/4020)
- Add `import_exception_bound!` macro to import exception types without generating GIL Ref functionality for them. [#4027](https://github.com/PyO3/pyo3/pull/4027)

### Changed

- Emit deprecation warning for uses of GIL Refs as `#[setter]` function arguments. [#3998](https://github.com/PyO3/pyo3/pull/3998)
- Add `#[inline]` hints on many `Bound` and `Borrowed` methods. [#4024](https://github.com/PyO3/pyo3/pull/4024)

### Fixed

- Handle `#[pyo3(from_py_with = "")]` in `#[setter]` methods [#3995](https://github.com/PyO3/pyo3/pull/3995)
- Allow extraction of `&Bound` in `#[setter]` methods. [#3998](https://github.com/PyO3/pyo3/pull/3998)
- Fix some uncovered code blocks emitted by `#[pymodule]`, `#[pyfunction]` and `#[pyclass]` macros. [#4009](https://github.com/PyO3/pyo3/pull/4009)
- Fix typo in the panic message when a class referenced in `pyo3::import_exception!` does not exist. [#4012](https://github.com/PyO3/pyo3/pull/4012)
- Fix compile error when using an async `#[pymethod]` with a receiver and additional arguments. [#4015](https://github.com/PyO3/pyo3/pull/4015)


## [0.21.0] - 2024-03-25

### Added

- Add support for GraalPy (24.0 and up). [#3247](https://github.com/PyO3/pyo3/pull/3247)
- Add `PyMemoryView` type. [#3514](https://github.com/PyO3/pyo3/pull/3514)
- Allow `async fn` in for `#[pyfunction]` and `#[pymethods]`, with the `experimental-async` feature. [#3540](https://github.com/PyO3/pyo3/pull/3540) [#3588](https://github.com/PyO3/pyo3/pull/3588) [#3599](https://github.com/PyO3/pyo3/pull/3599) [#3931](https://github.com/PyO3/pyo3/pull/3931)
- Implement `PyTypeInfo` for `PyEllipsis`, `PyNone` and `PyNotImplemented`. [#3577](https://github.com/PyO3/pyo3/pull/3577)
- Support `#[pyclass]` on enums that have non-unit variants. [#3582](https://github.com/PyO3/pyo3/pull/3582)
- Support `chrono` feature with `abi3` feature. [#3664](https://github.com/PyO3/pyo3/pull/3664)
- `FromPyObject`, `IntoPy<PyObject>` and `ToPyObject` are implemented on `std::duration::Duration` [#3670](https://github.com/PyO3/pyo3/pull/3670)
- Add `PyString::to_cow`. Add `Py<PyString>::to_str`, `Py<PyString>::to_cow`, and `Py<PyString>::to_string_lossy`, as ways to access Python string data safely beyond the GIL lifetime. [#3677](https://github.com/PyO3/pyo3/pull/3677)
- Add `Bound<T>` and `Borrowed<T>` smart pointers as a new API for accessing Python objects. [#3686](https://github.com/PyO3/pyo3/pull/3686)
- Add `PyNativeType::as_borrowed` to convert "GIL refs" to the new `Bound` smart pointer. [#3692](https://github.com/PyO3/pyo3/pull/3692)
- Add `FromPyObject::extract_bound` method, to migrate `FromPyObject` implementations to the Bound API. [#3706](https://github.com/PyO3/pyo3/pull/3706)
- Add `gil-refs` feature to allow continued use of the deprecated GIL Refs APIs. [#3707](https://github.com/PyO3/pyo3/pull/3707)
- Add methods to `PyAnyMethods` for binary operators (`add`, `sub`, etc.) [#3712](https://github.com/PyO3/pyo3/pull/3712)
- Add `chrono-tz` feature allowing conversion between `chrono_tz::Tz` and `zoneinfo.ZoneInfo` [#3730](https://github.com/PyO3/pyo3/pull/3730)
- Add FFI definition `PyType_GetModuleByDef`. [#3734](https://github.com/PyO3/pyo3/pull/3734)
- Conversion between `std::time::SystemTime` and `datetime.datetime` [#3736](https://github.com/PyO3/pyo3/pull/3736)
- Add `Py::as_any` and `Py::into_any`. [#3785](https://github.com/PyO3/pyo3/pull/3785)
- Add `PyStringMethods::encode_utf8`. [#3801](https://github.com/PyO3/pyo3/pull/3801)
- Add `PyBackedStr` and `PyBackedBytes`, as alternatives to `&str` and `&bytes` where a Python object owns the data. [#3802](https://github.com/PyO3/pyo3/pull/3802) [#3991](https://github.com/PyO3/pyo3/pull/3991)
- Allow `#[pymodule]` macro on Rust `mod` blocks, with the `experimental-declarative-modules` feature. [#3815](https://github.com/PyO3/pyo3/pull/3815)
- Implement `ExactSizeIterator` for `set` and `frozenset` iterators on `abi3` feature. [#3849](https://github.com/PyO3/pyo3/pull/3849)
- Add `Py::drop_ref` to explicitly drop a `Py`` and immediately decrease the Python reference count if the GIL is already held. [#3871](https://github.com/PyO3/pyo3/pull/3871)
- Allow `#[pymodule]` macro on single argument functions that take `&Bound<'_, PyModule>`. [#3905](https://github.com/PyO3/pyo3/pull/3905)
- Implement `FromPyObject` for `Cow<str>`. [#3928](https://github.com/PyO3/pyo3/pull/3928)
- Implement `Default` for `GILOnceCell`. [#3971](https://github.com/PyO3/pyo3/pull/3971)
- Add `PyDictMethods::into_mapping`, `PyListMethods::into_sequence` and `PyTupleMethods::into_sequence`. [#3982](https://github.com/PyO3/pyo3/pull/3982)

### Changed

- `PyDict::from_sequence` now takes a single argument of type `&PyAny` (previously took two arguments `Python` and `PyObject`). [#3532](https://github.com/PyO3/pyo3/pull/3532)
- Deprecate `Py::is_ellipsis` and `PyAny::is_ellipsis` in favour of `any.is(py.Ellipsis())`. [#3577](https://github.com/PyO3/pyo3/pull/3577)
- Split some `PyTypeInfo` functionality into new traits `HasPyGilRef` and `PyTypeCheck`. [#3600](https://github.com/PyO3/pyo3/pull/3600)
- Deprecate `PyTryFrom` and `PyTryInto` traits in favor of `any.downcast()` via the `PyTypeCheck` and `PyTypeInfo` traits. [#3601](https://github.com/PyO3/pyo3/pull/3601)
- Allow async methods to accept `&self`/`&mut self` [#3609](https://github.com/PyO3/pyo3/pull/3609)
- `FromPyObject` for set types now also accept `frozenset` objects as input. [#3632](https://github.com/PyO3/pyo3/pull/3632)
- `FromPyObject` for `bool` now also accepts NumPy's `bool_` as input. [#3638](https://github.com/PyO3/pyo3/pull/3638)
- Add `AsRefSource` associated type to `PyNativeType`. [#3653](https://github.com/PyO3/pyo3/pull/3653)
- Rename `.is_true` to `.is_truthy` on `PyAny` and `Py<PyAny>` to clarify that the test is not based on identity with or equality to the True singleton. [#3657](https://github.com/PyO3/pyo3/pull/3657)
- `PyType::name` is now `PyType::qualname` whereas `PyType::name` efficiently accesses the full name which includes the module name. [#3660](https://github.com/PyO3/pyo3/pull/3660)
- The `Iter(A)NextOutput` types are now deprecated and `__(a)next__` can directly return anything which can be converted into Python objects, i.e. awaitables do not need to be wrapped into `IterANextOutput` or `Option` any more. `Option` can still be used as well and returning `None` will trigger the fast path for `__next__`, stopping iteration without having to raise a `StopIteration` exception. [#3661](https://github.com/PyO3/pyo3/pull/3661)
- Implement `FromPyObject` on `chrono::DateTime<Tz>` for all `Tz`, not just `FixedOffset` and `Utc`. [#3663](https://github.com/PyO3/pyo3/pull/3663)
- Add lifetime parameter to `PyTzInfoAccess` trait. For the deprecated gil-ref API, the trait is now implemented for `&'py PyTime` and `&'py PyDateTime` instead of `PyTime` and `PyDate`. [#3679](https://github.com/PyO3/pyo3/pull/3679)
- Calls to `__traverse__` become no-ops for unsendable pyclasses if on the wrong thread, thereby avoiding hard aborts at the cost of potential leakage. [#3689](https://github.com/PyO3/pyo3/pull/3689)
- Include `PyNativeType` in `pyo3::prelude`. [#3692](https://github.com/PyO3/pyo3/pull/3692)
- Improve performance of `extract::<i64>` (and other integer types) by avoiding call to `__index__()` converting the value to an integer for 3.10+. Gives performance improvement of around 30% for successful extraction. [#3742](https://github.com/PyO3/pyo3/pull/3742)
- Relax bound of `FromPyObject` for `Py<T>` to just `T: PyTypeCheck`. [#3776](https://github.com/PyO3/pyo3/pull/3776)
- `PySet` and `PyFrozenSet` iterators now always iterate the equivalent of `iter(set)`. (A "fast path" with no noticeable performance benefit was removed.) [#3849](https://github.com/PyO3/pyo3/pull/3849)
- Move implementations of `FromPyObject` for `&str`, `Cow<str>`, `&[u8]` and `Cow<[u8]>` onto a temporary trait `FromPyObjectBound` when `gil-refs` feature is deactivated. [#3928](https://github.com/PyO3/pyo3/pull/3928)
- Deprecate `GILPool`, `Python::with_pool`, and `Python::new_pool`. [#3947](https://github.com/PyO3/pyo3/pull/3947)

### Removed

- Remove all functionality deprecated in PyO3 0.19. [#3603](https://github.com/PyO3/pyo3/pull/3603)

### Fixed

- Match PyPy 7.3.14 in removing PyPy-only symbol `Py_MAX_NDIMS` in favour of `PyBUF_MAX_NDIM`. [#3757](https://github.com/PyO3/pyo3/pull/3757)
- Fix segmentation fault using `datetime` types when an invalid `datetime` module is on sys.path. [#3818](https://github.com/PyO3/pyo3/pull/3818)
- Fix `non_local_definitions` lint warning triggered by many PyO3 macros. [#3901](https://github.com/PyO3/pyo3/pull/3901)
- Disable `PyCode` and `PyCode_Type` on PyPy: `PyCode_Type` is not exposed by PyPy. [#3934](https://github.com/PyO3/pyo3/pull/3934)

## [0.21.0-beta.0] - 2024-03-10

Prerelease of PyO3 0.21. See [the GitHub diff](https://github.com/pyo3/pyo3/compare/v0.21.0-beta.0...v0.21.0) for what changed between 0.21.0-beta.0 and the final release.

## [0.20.3] - 2024-02-23

### Packaging

- Add `portable-atomic` dependency. [#3619](https://github.com/PyO3/pyo3/pull/3619)
- Check maximum version of Python at build time and for versions not yet supported require opt-in to the `abi3` stable ABI by the environment variable `PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1`. [#3821](https://github.com/PyO3/pyo3/pull/3821)

### Fixed

- Use `portable-atomic` to support platforms without 64-bit atomics. [#3619](https://github.com/PyO3/pyo3/pull/3619)
- Fix compilation failure with `either` feature enabled without `experimental-inspect` enabled. [#3834](https://github.com/PyO3/pyo3/pull/3834)

## [0.20.2] - 2024-01-04

### Packaging

- Pin `pyo3` and `pyo3-ffi` dependencies on `pyo3-build-config` to require the same patch version, i.e. `pyo3` 0.20.2 requires _exactly_ `pyo3-build-config` 0.20.2. [#3721](https://github.com/PyO3/pyo3/pull/3721)

### Fixed

- Fix compile failure when building `pyo3` 0.20.0 with latest `pyo3-build-config` 0.20.X. [#3724](https://github.com/PyO3/pyo3/pull/3724)
- Fix docs.rs build. [#3722](https://github.com/PyO3/pyo3/pull/3722)

## [0.20.1] - 2023-12-30

### Added

- Add optional `either` feature to add conversions for `either::Either<L, R>` sum type. [#3456](https://github.com/PyO3/pyo3/pull/3456)
- Add optional `smallvec` feature to add conversions for `smallvec::SmallVec`. [#3507](https://github.com/PyO3/pyo3/pull/3507)
- Add `take` and `into_inner` methods to `GILOnceCell` [#3556](https://github.com/PyO3/pyo3/pull/3556)
- `#[classmethod]` methods can now also receive `Py<PyType>` as their first argument. [#3587](https://github.com/PyO3/pyo3/pull/3587)
- `#[pyfunction(pass_module)]` can now also receive `Py<PyModule>` as their first argument. [#3587](https://github.com/PyO3/pyo3/pull/3587)
- Add `traverse` method to `GILProtected`. [#3616](https://github.com/PyO3/pyo3/pull/3616)
- Added `abi3-py312` feature [#3687](https://github.com/PyO3/pyo3/pull/3687)

### Fixed

- Fix minimum version specification for optional `chrono` dependency. [#3512](https://github.com/PyO3/pyo3/pull/3512)
- Silenced new `clippy::unnecessary_fallible_conversions` warning when using a `Py<Self>` `self` receiver. [#3564](https://github.com/PyO3/pyo3/pull/3564)


## [0.20.0] - 2023-10-11

### Packaging

- Dual-license PyO3 under either the Apache 2.0 OR the MIT license. This makes the project GPLv2 compatible. [#3108](https://github.com/PyO3/pyo3/pull/3108)
- Update MSRV to Rust 1.56. [#3208](https://github.com/PyO3/pyo3/pull/3208)
- Bump `indoc` dependency to 2.0 and `unindent` dependency to 0.2. [#3237](https://github.com/PyO3/pyo3/pull/3237)
- Bump `syn` dependency to 2.0. [#3239](https://github.com/PyO3/pyo3/pull/3239)
- Drop support for debug builds of Python 3.7. [#3387](https://github.com/PyO3/pyo3/pull/3387)
- Bump `chrono` optional dependency to require 0.4.25 or newer. [#3427](https://github.com/PyO3/pyo3/pull/3427)
- Support Python 3.12. [#3488](https://github.com/PyO3/pyo3/pull/3488)

### Added

- Support `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__` in `#[pymethods]`. [#3203](https://github.com/PyO3/pyo3/pull/3203)
- Add FFI definition `Py_GETENV`. [#3336](https://github.com/PyO3/pyo3/pull/3336)
- Add `as_ptr` and `into_ptr` inherent methods for `Py`, `PyAny`, `PyRef`, and `PyRefMut`. [#3359](https://github.com/PyO3/pyo3/pull/3359)
- Implement `DoubleEndedIterator` for `PyTupleIterator` and `PyListIterator`. [#3366](https://github.com/PyO3/pyo3/pull/3366)
- Add `#[pyclass(rename_all = "...")]` option: this allows renaming all getters and setters of a struct, or all variants of an enum. Available renaming rules are: `"camelCase"`, `"kebab-case"`, `"lowercase"`, `"PascalCase"`, `"SCREAMING-KEBAB-CASE"`, `"SCREAMING_SNAKE_CASE"`, `"snake_case"`, `"UPPERCASE"`. [#3384](https://github.com/PyO3/pyo3/pull/3384)
- Add FFI definitions `PyObject_GC_IsTracked` and `PyObject_GC_IsFinalized` on Python 3.9 and up (PyPy 3.10 and up). [#3403](https://github.com/PyO3/pyo3/pull/3403)
- Add types for `None`, `Ellipsis`, and `NotImplemented`. [#3408](https://github.com/PyO3/pyo3/pull/3408)
- Add FFI definitions for the `Py_mod_multiple_interpreters` constant and its possible values. [#3494](https://github.com/PyO3/pyo3/pull/3494)
- Add FFI definitions for `PyInterpreterConfig` struct, its constants and `Py_NewInterpreterFromConfig`. [#3502](https://github.com/PyO3/pyo3/pull/3502)

### Changed

- Change `PySet::discard` to return `PyResult<bool>` (previously returned nothing). [#3281](https://github.com/PyO3/pyo3/pull/3281)
- Optimize implementation of `IntoPy` for Rust tuples to Python tuples. [#3321](https://github.com/PyO3/pyo3/pull/3321)
- Change `PyDict::get_item` to no longer suppress arbitrary exceptions (the return type is now `PyResult<Option<&PyAny>>` instead of `Option<&PyAny>`), and deprecate `PyDict::get_item_with_error`. [#3330](https://github.com/PyO3/pyo3/pull/3330)
- Deprecate FFI definitions which are deprecated in Python 3.12. [#3336](https://github.com/PyO3/pyo3/pull/3336)
- `AsPyPointer` is now an `unsafe trait`. [#3358](https://github.com/PyO3/pyo3/pull/3358)
- Accept all `os.PathLike` values in implementation of `FromPyObject` for `PathBuf`. [#3374](https://github.com/PyO3/pyo3/pull/3374)
- Add `__builtins__` to globals in `py.run()` and `py.eval()` if they're missing. [#3378](https://github.com/PyO3/pyo3/pull/3378)
- Optimize implementation of `FromPyObject` for `BigInt` and `BigUint`. [#3379](https://github.com/PyO3/pyo3/pull/3379)
- `PyIterator::from_object` and `PyByteArray::from` now take a single argument of type `&PyAny` (previously took two arguments `Python` and `AsPyPointer`). [#3389](https://github.com/PyO3/pyo3/pull/3389)
- Replace `AsPyPointer` with `AsRef<PyAny>` as a bound in the blanket implementation of `From<&T> for PyObject`. [#3391](https://github.com/PyO3/pyo3/pull/3391)
- Replace blanket `impl IntoPy<PyObject> for &T where T: AsPyPointer` with implementations of `impl IntoPy<PyObject>` for `&PyAny`, `&T where T: AsRef<PyAny>`, and `&Py<T>`. [#3393](https://github.com/PyO3/pyo3/pull/3393)
- Preserve `std::io::Error` kind in implementation of `From<std::io::IntoInnerError>` for `PyErr` [#3396](https://github.com/PyO3/pyo3/pull/3396)
- Try to select a relevant `ErrorKind` in implementation of `From<PyErr>` for `OSError` subclass. [#3397](https://github.com/PyO3/pyo3/pull/3397)
- Retrieve the original `PyErr` in implementation of `From<std::io::Error>` for `PyErr` if the `std::io::Error` has been built using a Python exception (previously would create a new exception wrapping the `std::io::Error`). [#3402](https://github.com/PyO3/pyo3/pull/3402)
- `#[pymodule]` will now return the same module object on repeated import by the same Python interpreter, on Python 3.9 and up. [#3446](https://github.com/PyO3/pyo3/pull/3446)
- Truncate leap-seconds and warn when converting `chrono` types to Python `datetime` types (`datetime` cannot represent leap-seconds). [#3458](https://github.com/PyO3/pyo3/pull/3458)
- `Err` returned from `#[pyfunction]` will now have a non-None `__context__` if called from inside a `catch` block. [#3455](https://github.com/PyO3/pyo3/pull/3455)
- Deprecate undocumented `#[__new__]` form of `#[new]` attribute. [#3505](https://github.com/PyO3/pyo3/pull/3505)

### Removed

- Remove all functionality deprecated in PyO3 0.18, including `#[args]` attribute for `#[pymethods]`. [#3232](https://github.com/PyO3/pyo3/pull/3232)
- Remove `IntoPyPointer` trait in favour of `into_ptr` inherent methods. [#3385](https://github.com/PyO3/pyo3/pull/3385)

### Fixed

- Handle exceptions properly in `PySet::discard`. [#3281](https://github.com/PyO3/pyo3/pull/3281)
- The `PyTupleIterator` type returned by `PyTuple::iter` is now public and hence can be named by downstream crates. [#3366](https://github.com/PyO3/pyo3/pull/3366)
- Linking of `PyOS_FSPath` on PyPy. [#3374](https://github.com/PyO3/pyo3/pull/3374)
- Fix memory leak in `PyTypeBuilder::build`. [#3401](https://github.com/PyO3/pyo3/pull/3401)
- Disable removed FFI definitions `_Py_GetAllocatedBlocks`, `_PyObject_GC_Malloc`, and `_PyObject_GC_Calloc` on Python 3.11 and up. [#3403](https://github.com/PyO3/pyo3/pull/3403)
- Fix `ResourceWarning` and crashes related to GC when running with debug builds of CPython. [#3404](https://github.com/PyO3/pyo3/pull/3404)
- Some-wrapping of `Option<T>` default arguments will no longer re-wrap `Some(T)` or expressions evaluating to `None`. [#3461](https://github.com/PyO3/pyo3/pull/3461)
- Fix `IterNextOutput::Return` not returning a value on PyPy. [#3471](https://github.com/PyO3/pyo3/pull/3471)
- Emit compile errors instead of ignoring macro invocations inside `#[pymethods]` blocks. [#3491](https://github.com/PyO3/pyo3/pull/3491)
- Emit error on invalid arguments to `#[new]`, `#[classmethod]`, `#[staticmethod]`, and `#[classattr]`. [#3484](https://github.com/PyO3/pyo3/pull/3484)
- Disable `PyMarshal_WriteObjectToString` from `PyMarshal_ReadObjectFromString` with the `abi3` feature. [#3490](https://github.com/PyO3/pyo3/pull/3490)
- Fix FFI definitions for `_PyFrameEvalFunction` on Python 3.11 and up (it now receives a `_PyInterpreterFrame` opaque struct). [#3500](https://github.com/PyO3/pyo3/pull/3500)


## [0.19.2] - 2023-08-01

### Added

- Add FFI definitions `PyState_AddModule`, `PyState_RemoveModule` and `PyState_FindModule` for PyPy 3.9 and up. [#3295](https://github.com/PyO3/pyo3/pull/3295)
- Add FFI definitions `_PyObject_CallFunction_SizeT` and `_PyObject_CallMethod_SizeT`. [#3297](https://github.com/PyO3/pyo3/pull/3297)
- Add a "performance" section to the guide collecting performance-related tricks and problems. [#3304](https://github.com/PyO3/pyo3/pull/3304)
- Add `PyErr::Display` for all Python versions, and FFI symbol `PyErr_DisplayException` for Python 3.12. [#3334](https://github.com/PyO3/pyo3/pull/3334)
- Add FFI definition `PyType_GetDict()` for Python 3.12. [#3339](https://github.com/PyO3/pyo3/pull/3339)
- Add `PyAny::downcast_exact`. [#3346](https://github.com/PyO3/pyo3/pull/3346)
- Add `PySlice::full()` to construct a full slice (`::`). [#3353](https://github.com/PyO3/pyo3/pull/3353)

### Changed

- Update `PyErr` for 3.12 betas to avoid deprecated ffi methods. [#3306](https://github.com/PyO3/pyo3/pull/3306)
- Update FFI definitions of `object.h` for Python 3.12.0b4. [#3335](https://github.com/PyO3/pyo3/pull/3335)
- Update `pyo3::ffi` struct definitions to be compatible with 3.12.0b4. [#3342](https://github.com/PyO3/pyo3/pull/3342)
- Optimize conversion of `float` to `f64` (and `PyFloat::value`) on non-abi3 builds. [#3345](https://github.com/PyO3/pyo3/pull/3345)

### Fixed

- Fix timezone conversion bug for FixedOffset datetimes that were being incorrectly converted to and from UTC. [#3269](https://github.com/PyO3/pyo3/pull/3269)
- Fix `SystemError` raised in `PyUnicodeDecodeError_Create` on PyPy 3.10. [#3297](https://github.com/PyO3/pyo3/pull/3297)
- Correct FFI definition `Py_EnterRecursiveCall` to return `c_int` (was incorrectly returning `()`). [#3300](https://github.com/PyO3/pyo3/pull/3300)
- Fix case where `PyErr::matches` and `PyErr::is_instance` returned results inconsistent with `PyErr::get_type`. [#3313](https://github.com/PyO3/pyo3/pull/3313)
- Fix loss of panic message in `PanicException` when unwinding after the exception was "normalized". [#3326](https://github.com/PyO3/pyo3/pull/3326)
- Fix `PyErr::from_value` and `PyErr::into_value` losing traceback on conversion. [#3328](https://github.com/PyO3/pyo3/pull/3328)
- Fix reference counting of immortal objects on Python 3.12.0b4. [#3335](https://github.com/PyO3/pyo3/pull/3335)


## [0.19.1] - 2023-07-03

### Packaging

- Extend range of supported versions of `hashbrown` optional dependency to include version 0.14 [#3258](https://github.com/PyO3/pyo3/pull/3258)
- Extend range of supported versions of `indexmap` optional dependency to include version 2. [#3277](https://github.com/PyO3/pyo3/pull/3277)
- Support PyPy 3.10. [#3289](https://github.com/PyO3/pyo3/pull/3289)

### Added

- Add `pyo3::types::PyFrozenSetBuilder` to allow building a `PyFrozenSet` item by item. [#3156](https://github.com/PyO3/pyo3/pull/3156)
- Add support for converting to and from Python's `ipaddress.IPv4Address`/`ipaddress.IPv6Address` and `std::net::IpAddr`. [#3197](https://github.com/PyO3/pyo3/pull/3197)
- Add support for `num-bigint` feature in combination with `abi3`. [#3198](https://github.com/PyO3/pyo3/pull/3198)
- Add `PyErr_GetRaisedException()`, `PyErr_SetRaisedException()` to FFI definitions for Python 3.12 and later. [#3248](https://github.com/PyO3/pyo3/pull/3248)
- Add `Python::with_pool` which is a safer but more limited alternative to `Python::new_pool`. [#3263](https://github.com/PyO3/pyo3/pull/3263)
- Add `PyDict::get_item_with_error` on PyPy. [#3270](https://github.com/PyO3/pyo3/pull/3270)
- Allow `#[new]` methods may to return `Py<Self>` in order to return existing instances. [#3287](https://github.com/PyO3/pyo3/pull/3287)

### Fixed

- Fix conversion of classes implementing `__complex__` to `Complex` when using `abi3` or PyPy. [#3185](https://github.com/PyO3/pyo3/pull/3185)
- Stop suppressing unrelated exceptions in `PyAny::hasattr`. [#3271](https://github.com/PyO3/pyo3/pull/3271)
- Fix memory leak when creating `PySet` or `PyFrozenSet` or returning types converted into these internally, e.g. `HashSet` or `BTreeSet`. [#3286](https://github.com/PyO3/pyo3/pull/3286)


## [0.19.0] - 2023-05-31

### Packaging

- Correct dependency on syn to version 1.0.85 instead of the incorrect version 1.0.56. [#3152](https://github.com/PyO3/pyo3/pull/3152)

### Added

- Accept `text_signature` option (and automatically generate signature) for `#[new]` in `#[pymethods]`. [#2980](https://github.com/PyO3/pyo3/pull/2980)
- Add support for converting to and from Python's `decimal.Decimal` and `rust_decimal::Decimal`. [#3016](https://github.com/PyO3/pyo3/pull/3016)
- Add `#[pyo3(from_item_all)]` when deriving `FromPyObject` to specify `get_item` as getter for all fields. [#3120](https://github.com/PyO3/pyo3/pull/3120)
- Add `pyo3::exceptions::PyBaseExceptionGroup` for Python 3.11, and corresponding FFI definition `PyExc_BaseExceptionGroup`. [#3141](https://github.com/PyO3/pyo3/pull/3141)
- Accept `#[new]` with `#[classmethod]` to create a constructor which receives a (subtype's) class/`PyType` as its first argument. [#3157](https://github.com/PyO3/pyo3/pull/3157)
- Add `PyClass::get` and `Py::get` for GIL-independent access to classes with `#[pyclass(frozen)]`. [#3158](https://github.com/PyO3/pyo3/pull/3158)
- Add `PyAny::is_exact_instance` and `PyAny::is_exact_instance_of`. [#3161](https://github.com/PyO3/pyo3/pull/3161)

### Changed

- `PyAny::is_instance_of::<T>(obj)` is now equivalent to `T::is_type_of(obj)`, and now returns `bool` instead of `PyResult<bool>`. [#2881](https://github.com/PyO3/pyo3/pull/2881)
- Deprecate `text_signature` option on `#[pyclass]` structs. [#2980](https://github.com/PyO3/pyo3/pull/2980)
- No longer wrap `anyhow::Error`/`eyre::Report` containing a basic `PyErr` without a chain in a `PyRuntimeError`. [#3004](https://github.com/PyO3/pyo3/pull/3004)
- - Change `#[getter]` and `#[setter]` to use a common call "trampoline" to slightly reduce generated code size and compile times. [#3029](https://github.com/PyO3/pyo3/pull/3029)
- Improve default values for str, numbers and bool in automatically-generated `text_signature`. [#3050](https://github.com/PyO3/pyo3/pull/3050)
- Improve default value for `None` in automatically-generated `text_signature`. [#3066](https://github.com/PyO3/pyo3/pull/3066)
- Rename `PySequence::list` and `PySequence::tuple` to `PySequence::to_list` and `PySequence::to_tuple`. (The old names continue to exist as deprecated forms.) [#3111](https://github.com/PyO3/pyo3/pull/3111)
- Extend the lifetime of the GIL token returned by `PyRef::py` and `PyRefMut::py` to match the underlying borrow. [#3131](https://github.com/PyO3/pyo3/pull/3131)
- Safe access to the GIL, for example via `Python::with_gil`, is now locked inside of implementations of the `__traverse__` slot. [#3168](https://github.com/PyO3/pyo3/pull/3168)

### Removed

- Remove all functionality deprecated in PyO3 0.17, most prominently `Python::acquire_gil` is replaced by `Python::with_gil`. [#2981](https://github.com/PyO3/pyo3/pull/2981)

### Fixed

- Correct FFI definitions `PyGetSetDef`, `PyMemberDef`, `PyStructSequence_Field` and `PyStructSequence_Desc` to have `*const c_char` members for `name` and `doc` (not `*mut c_char`). [#3036](https://github.com/PyO3/pyo3/pull/3036)
- Fix panic on `fmt::Display`, instead return `"<unprintable object>"` string and report error via `sys.unraisablehook()` [#3062](https://github.com/PyO3/pyo3/pull/3062)
- Fix a compile error of "temporary value dropped while borrowed" when `#[pyfunction]`s take references into `#[pyclass]`es [#3142](https://github.com/PyO3/pyo3/pull/3142)
- Fix crashes caused by PyO3 applying deferred reference count updates when entering a `__traverse__` implementation. [#3168](https://github.com/PyO3/pyo3/pull/3168)
- Forbid running the `Drop` implementations of unsendable classes on other threads. [#3176](https://github.com/PyO3/pyo3/pull/3176)
- Fix a compile error when `#[pymethods]` items come from somewhere else (for example, as a macro argument) and a custom receiver like `Py<Self>` is used. [#3178](https://github.com/PyO3/pyo3/pull/3178)


## [0.18.3] - 2023-04-13

### Added

- Add `GILProtected<T>` to mediate concurrent access to a value using Python's global interpreter lock (GIL). [#2975](https://github.com/PyO3/pyo3/pull/2975)
- Support `PyASCIIObject` / `PyUnicode` and associated methods on big-endian architectures. [#3015](https://github.com/PyO3/pyo3/pull/3015)
- Add FFI definition `_PyDict_Contains_KnownHash()` for CPython 3.10 and up. [#3088](https://github.com/PyO3/pyo3/pull/3088)

### Fixed

- Fix compile error for `#[pymethods]` and `#[pyfunction]` called "output". [#3022](https://github.com/PyO3/pyo3/pull/3022)
- Fix compile error in generated code for magic methods implemented as a `#[staticmethod]`. [#3055](https://github.com/PyO3/pyo3/pull/3055)
- Fix `is_instance` for `PyDateTime` (would incorrectly check for a `PyDate`). [#3071](https://github.com/PyO3/pyo3/pull/3071)
- Fix upstream deprecation of `PyUnicode_InternImmortal` since Python 3.10. [#3071](https://github.com/PyO3/pyo3/pull/3087)


## [0.18.2] - 2023-03-24

### Packaging

- Disable default features of `chrono` to avoid depending on `time` v0.1.x. [#2939](https://github.com/PyO3/pyo3/pull/2939)

### Added

- Implement `IntoPy<PyObject>`, `ToPyObject` and `FromPyObject` for `Cow<[u8]>` to efficiently handle both `bytes` and `bytearray` objects. [#2899](https://github.com/PyO3/pyo3/pull/2899)
- Implement `IntoPy<PyObject>`, `ToPyObject` and `FromPyObject` for `Cell<T>`. [#3014](https://github.com/PyO3/pyo3/pull/3014)
- Add `PyList::to_tuple()`, as a convenient and efficient conversion from lists to tuples. [#3042](https://github.com/PyO3/pyo3/pull/3042)
- Add `PyTuple::to_list()`, as a convenient and efficient conversion from tuples to lists. [#3044](https://github.com/PyO3/pyo3/pull/3044)

### Changed

- Optimize `PySequence` conversion for `list` and `tuple` inputs. [#2944](https://github.com/PyO3/pyo3/pull/2944)
- Improve exception raised when creating `#[pyclass]` type object fails during module import. [#2947](https://github.com/PyO3/pyo3/pull/2947)
- Optimize `PyMapping` conversion for `dict` inputs. [#2954](https://github.com/PyO3/pyo3/pull/2954)
- Allow `create_exception!` to take a `dotted.module` to place the exception in a submodule. [#2979](https://github.com/PyO3/pyo3/pull/2979)

### Fixed

- Fix a reference counting race condition affecting `PyObject`s cloned in `allow_threads` blocks. [#2952](https://github.com/PyO3/pyo3/pull/2952)
- Fix `clippy::redundant_closure` lint on default arguments in `#[pyo3(signature = (...))]` annotations. [#2990](https://github.com/PyO3/pyo3/pull/2990)
- Fix `non_snake_case` lint on generated code in `#[pyfunction]` macro. [#2993](https://github.com/PyO3/pyo3/pull/2993)
- Fix some FFI definitions for the upcoming PyPy 3.10 release. [#3031](https://github.com/PyO3/pyo3/pull/3031)


## [0.18.1] - 2023-02-07

### Added

- Add `PyErr::write_unraisable()`. [#2889](https://github.com/PyO3/pyo3/pull/2889)
- Add `Python::Ellipsis()` and `PyAny::is_ellipsis()` methods. [#2911](https://github.com/PyO3/pyo3/pull/2911)
- Add `PyDict::update()` and `PyDict::update_if_missing()` methods. [#2912](https://github.com/PyO3/pyo3/pull/2912)

### Changed

- FFI definition `PyIter_Check` on CPython 3.7 is now implemented as `hasattr(type(obj), "__next__")`, which works correctly on all platforms and adds support for `abi3`. [#2914](https://github.com/PyO3/pyo3/pull/2914)
- Warn about unknown config keys in `PYO3_CONFIG_FILE` instead of denying. [#2926](https://github.com/PyO3/pyo3/pull/2926)

### Fixed

- Send errors returned by `__releasebuffer__` to `sys.unraisablehook` rather than causing `SystemError`. [#2886](https://github.com/PyO3/pyo3/pull/2886)
- Fix downcast to `PyIterator` succeeding for Python classes which did not implement `__next__`. [#2914](https://github.com/PyO3/pyo3/pull/2914)
- Fix segfault in `__traverse__` when visiting `None` fields of `Option<T: AsPyPointer>`. [#2921](https://github.com/PyO3/pyo3/pull/2921)
- Fix `#[pymethods(crate = "...")]` option being ignored. [#2923](https://github.com/PyO3/pyo3/pull/2923)
- Link against `pythonXY_d.dll` for debug Python builds on Windows. [#2937](https://github.com/PyO3/pyo3/pull/2937)


## [0.18.0] - 2023-01-17

### Packaging

- Relax `indexmap` optional depecency to allow `>= 1.6, < 2`. [#2849](https://github.com/PyO3/pyo3/pull/2849)
- Relax `hashbrown` optional dependency to allow `>= 0.9, < 0.14`. [#2875](https://github.com/PyO3/pyo3/pull/2875)
- Update `memoffset` dependency to 0.8. [#2875](https://github.com/PyO3/pyo3/pull/2875)

### Added

- Add `GILOnceCell::get_or_try_init` for fallible `GILOnceCell` initialization. [#2398](https://github.com/PyO3/pyo3/pull/2398)
- Add experimental feature `experimental-inspect` with `type_input()` and `type_output()` helpers to get the Python type of any Python-compatible object. [#2490](https://github.com/PyO3/pyo3/pull/2490) [#2882](https://github.com/PyO3/pyo3/pull/2882)
- The `#[pyclass]` macro can now take `get_all` and `set_all` to create getters and setters for every field. [#2692](https://github.com/PyO3/pyo3/pull/2692)
- Add `#[pyo3(signature = (...))]` option for `#[pyfunction]` and `#[pymethods]`. [#2702](https://github.com/PyO3/pyo3/pull/2702)
- `pyo3-build-config`: rebuild when `PYO3_ENVIRONMENT_SIGNATURE` environment variable value changes. [#2727](https://github.com/PyO3/pyo3/pull/2727)
- Add conversions between non-zero int types in `std::num` and Python `int`. [#2730](https://github.com/PyO3/pyo3/pull/2730)
- Add `Py::downcast()` as a companion to `PyAny::downcast()`, as well as `downcast_unchecked()` for both types. [#2734](https://github.com/PyO3/pyo3/pull/2734)
- Add types for all built-in `Warning` classes as well as `PyErr::warn_explicit`. [#2742](https://github.com/PyO3/pyo3/pull/2742)
- Add `abi3-py311` feature. [#2776](https://github.com/PyO3/pyo3/pull/2776)
- Add FFI definition `_PyErr_ChainExceptions()` for CPython. [#2788](https://github.com/PyO3/pyo3/pull/2788)
- Add FFI definitions `PyVectorcall_NARGS` and `PY_VECTORCALL_ARGUMENTS_OFFSET` for PyPy 3.8 and up. [#2811](https://github.com/PyO3/pyo3/pull/2811)
- Add `PyList::get_item_unchecked` for PyPy. [#2827](https://github.com/PyO3/pyo3/pull/2827)

### Changed

- PyO3's macros now emit a much nicer error message if function return values don't implement the required trait(s). [#2664](https://github.com/PyO3/pyo3/pull/2664)
- Use a TypeError, rather than a ValueError, when refusing to treat a str as a Vec. [#2685](https://github.com/PyO3/pyo3/pull/2685)
- Change `PyCFunction::new_closure` to take `name` and `doc` arguments. [#2686](https://github.com/PyO3/pyo3/pull/2686)
- `PyType::is_subclass`, `PyErr::is_instance` and `PyAny::is_instance` now take `&PyAny` instead of `&PyType` arguments, so that they work with objects that pretend to be types using `__subclasscheck__` and `__instancecheck__`. [#2695](https://github.com/PyO3/pyo3/pull/2695)
- Deprecate `#[args]` attribute and passing "args" specification directly to `#[pyfunction]` in favor of the new `#[pyo3(signature = (...))]` option. [#2702](https://github.com/PyO3/pyo3/pull/2702)
- Deprecate required arguments after `Option<T>` arguments to `#[pyfunction]` and `#[pymethods]` without also using `#[pyo3(signature)]` to specify whether the arguments should be required or have defaults. [#2703](https://github.com/PyO3/pyo3/pull/2703)
- Change `#[pyfunction]` and `#[pymethods]` to use a common call "trampoline" to slightly reduce generated code size and compile times. [#2705](https://github.com/PyO3/pyo3/pull/2705)
- `PyAny::cast_as()` and `Py::cast_as()` are now deprecated in favor of `PyAny::downcast()` and the new `Py::downcast()`. [#2734](https://github.com/PyO3/pyo3/pull/2734)
- Relax lifetime bounds on `PyAny::downcast()`. [#2734](https://github.com/PyO3/pyo3/pull/2734)
- Automatically generate `__text_signature__` for all Python functions created using `#[pyfunction]` and `#[pymethods]`. [#2784](https://github.com/PyO3/pyo3/pull/2784)
- Accept any iterator in `PySet::new` and `PyFrozenSet::new`. [#2795](https://github.com/PyO3/pyo3/pull/2795)
- Mixing `#[cfg(...)]` and `#[pyo3(...)]` attributes on `#[pyclass]` struct fields will now work. [#2796](https://github.com/PyO3/pyo3/pull/2796)
- Re-enable `PyFunction` on when building for abi3 or PyPy. [#2838](https://github.com/PyO3/pyo3/pull/2838)
- Improve `derive(FromPyObject)` to use `intern!` when applicable for `#[pyo3(item)]`. [#2879](https://github.com/PyO3/pyo3/pull/2879)

### Removed

- Remove the deprecated `pyproto` feature, `#[pyproto]` macro, and all accompanying APIs. [#2587](https://github.com/PyO3/pyo3/pull/2587)
- Remove all functionality deprecated in PyO3 0.16. [#2843](https://github.com/PyO3/pyo3/pull/2843)

### Fixed

- Disable `PyModule::filename` on PyPy. [#2715](https://github.com/PyO3/pyo3/pull/2715)
- `PyCodeObject` is now once again defined with fields on Python 3.7. [#2726](https://github.com/PyO3/pyo3/pull/2726)
- Raise a `TypeError` if `#[new]` pymethods with no arguments receive arguments when called from Python. [#2749](https://github.com/PyO3/pyo3/pull/2749)
- Use the `NOARGS` argument calling convention for methods that have a single `py: Python` argument (as a performance optimization). [#2760](https://github.com/PyO3/pyo3/pull/2760)
- Fix truncation of `isize` values to `c_long` in `PySlice::new`. [#2769](https://github.com/PyO3/pyo3/pull/2769)
- Fix soundness issue with FFI definition `PyUnicodeDecodeError_Create` on PyPy leading to indeterminate behavior (typically a `TypeError`). [#2772](https://github.com/PyO3/pyo3/pull/2772)
- Allow functions taking `**kwargs` to accept keyword arguments which share a name with a positional-only argument (as permitted by PEP 570). [#2800](https://github.com/PyO3/pyo3/pull/2800)
- Fix unresolved symbol for `PyObject_Vectorcall` on PyPy 3.9 and up. [#2811](https://github.com/PyO3/pyo3/pull/2811)
- Fix memory leak in `PyCFunction::new_closure`. [#2842](https://github.com/PyO3/pyo3/pull/2842)


## [0.17.3] - 2022-11-01

### Packaging

- Support Python 3.11. (Previous versions of PyO3 0.17 have been tested against Python 3.11 release candidates and are expected to be compatible, this is the first version tested against Python 3.11.0.) [#2708](https://github.com/PyO3/pyo3/pull/2708)

### Added

- Implemented `ExactSizeIterator` for `PyListIterator`, `PyDictIterator`, `PySetIterator` and `PyFrozenSetIterator`. [#2676](https://github.com/PyO3/pyo3/pull/2676)

### Fixed

- Fix regression of `impl FromPyObject for [T; N]` no longer accepting types passing `PySequence_Check`, e.g. NumPy arrays, since version 0.17.0. This the same fix that was applied `impl FromPyObject for Vec<T>` in version 0.17.1 extended to fixed-size arrays. [#2675](https://github.com/PyO3/pyo3/pull/2675)
- Fix UB in `FunctionDescription::extract_arguments_fastcall` due to creating slices from a null pointer. [#2687](https://github.com/PyO3/pyo3/pull/2687)


## [0.17.2] - 2022-10-04

### Packaging

- Added optional `chrono` feature to convert `chrono` types into types in the `datetime` module. [#2612](https://github.com/PyO3/pyo3/pull/2612)

### Added

- Add support for `num-bigint` feature on `PyPy`. [#2626](https://github.com/PyO3/pyo3/pull/2626)

### Fixed

- Correctly implement `__richcmp__` for enums, fixing `__ne__` returning always returning `True`. [#2622](https://github.com/PyO3/pyo3/pull/2622)
- Fix compile error since 0.17.0 with `Option<&SomePyClass>` argument with a default. [#2630](https://github.com/PyO3/pyo3/pull/2630)
- Fix regression of `impl FromPyObject for Vec<T>` no longer accepting types passing `PySequence_Check`, e.g. NumPy arrays, since 0.17.0. [#2631](https://github.com/PyO3/pyo3/pull/2631)

## [0.17.1] - 2022-08-28

### Fixed

- Fix visibility of `PyDictItems`, `PyDictKeys`, and `PyDictValues` types added in PyO3 0.17.0.
- Fix compile failure when using `#[pyo3(from_py_with = "...")]` attribute on an argument of type `Option<T>`. [#2592](https://github.com/PyO3/pyo3/pull/2592)
- Fix clippy `redundant-closure` lint on `**kwargs` arguments for `#[pyfunction]` and `#[pymethods]`. [#2595](https://github.com/PyO3/pyo3/pull/2595)

## [0.17.0] - 2022-08-23

### Packaging

- Update inventory dependency to `0.3` (the `multiple-pymethods` feature now requires Rust 1.62 for correctness). [#2492](https://github.com/PyO3/pyo3/pull/2492)

### Added

- Add `timezone_utc`. [#1588](https://github.com/PyO3/pyo3/pull/1588)
- Implement `ToPyObject` for `[T; N]`. [#2313](https://github.com/PyO3/pyo3/pull/2313)
- Add `PyDictKeys`, `PyDictValues` and `PyDictItems` Rust types. [#2358](https://github.com/PyO3/pyo3/pull/2358)
- Add `append_to_inittab`. [#2377](https://github.com/PyO3/pyo3/pull/2377)
- Add FFI definition `PyFrame_GetCode`. [#2406](https://github.com/PyO3/pyo3/pull/2406)
- Add `PyCode` and `PyFrame` high level objects. [#2408](https://github.com/PyO3/pyo3/pull/2408)
- Add FFI definitions `Py_fstring_input`, `sendfunc`, and `_PyErr_StackItem`. [#2423](https://github.com/PyO3/pyo3/pull/2423)
- Add `PyDateTime::new_with_fold`, `PyTime::new_with_fold`, `PyTime::get_fold`, and `PyDateTime::get_fold` for PyPy. [#2428](https://github.com/PyO3/pyo3/pull/2428)
- Add `#[pyclass(frozen)]`. [#2448](https://github.com/PyO3/pyo3/pull/2448)
- Accept `#[pyo3(name)]` on enum variants. [#2457](https://github.com/PyO3/pyo3/pull/2457)
- Add `CompareOp::matches` to implement `__richcmp__` as the result of a Rust `std::cmp::Ordering` comparison. [#2460](https://github.com/PyO3/pyo3/pull/2460)
- Add `PySuper` type. [#2486](https://github.com/PyO3/pyo3/pull/2486)
- Support PyPy on Windows with the `generate-import-lib` feature. [#2506](https://github.com/PyO3/pyo3/pull/2506)
- Add FFI definitions `Py_EnterRecursiveCall` and `Py_LeaveRecursiveCall`. [#2511](https://github.com/PyO3/pyo3/pull/2511)
- Add `PyDict::get_item_with_error`. [#2536](https://github.com/PyO3/pyo3/pull/2536)
- Add `#[pyclass(sequence)]` option. [#2567](https://github.com/PyO3/pyo3/pull/2567)

### Changed

- Change datetime constructors taking a `tzinfo` to take `Option<&PyTzInfo>` instead of `Option<&PyObject>`: `PyDateTime::new`, `PyDateTime::new_with_fold`, `PyTime::new`, and `PyTime::new_with_fold`. [#1588](https://github.com/PyO3/pyo3/pull/1588)
- Move `PyTypeObject::type_object` method to the `PyTypeInfo` trait, and deprecate the `PyTypeObject` trait. [#2287](https://github.com/PyO3/pyo3/pull/2287)
- Methods of `Py` and `PyAny` now accept `impl IntoPy<Py<PyString>>` rather than just `&str` to allow use of the `intern!` macro. [#2312](https://github.com/PyO3/pyo3/pull/2312)
- Change the deprecated `pyproto` feature to be opt-in instead of opt-out. [#2322](https://github.com/PyO3/pyo3/pull/2322)
- Emit better error messages when `#[pyfunction]` return types do not implement `IntoPy`. [#2326](https://github.com/PyO3/pyo3/pull/2326)
- Require `T: IntoPy` for `impl<T, const N: usize> IntoPy<PyObject> for [T; N]` instead of `T: ToPyObject`. [#2326](https://github.com/PyO3/pyo3/pull/2326)
- Deprecate the `ToBorrowedObject` trait. [#2333](https://github.com/PyO3/pyo3/pull/2333)
- Iterators over `PySet` and `PyDict` will now panic if the underlying collection is mutated during the iteration. [#2380](https://github.com/PyO3/pyo3/pull/2380)
- Iterators over `PySet` and `PyDict` will now panic if the underlying collection is mutated during the iteration. [#2380](https://github.com/PyO3/pyo3/pull/2380)
- Allow `#[classattr]` methods to be fallible. [#2385](https://github.com/PyO3/pyo3/pull/2385)
- Prevent multiple `#[pymethods]` with the same name for a single `#[pyclass]`. [#2399](https://github.com/PyO3/pyo3/pull/2399)
- Fixup `lib_name` when using `PYO3_CONFIG_FILE`. [#2404](https://github.com/PyO3/pyo3/pull/2404)
- Add a message to the `ValueError` raised by the `#[derive(FromPyObject)]` implementation for a tuple struct. [#2414](https://github.com/PyO3/pyo3/pull/2414)
- Allow `#[classattr]` methods to take `Python` argument. [#2456](https://github.com/PyO3/pyo3/pull/2456)
- Rework `PyCapsule` type to resolve soundness issues: [#2485](https://github.com/PyO3/pyo3/pull/2485)
  - `PyCapsule::new` and `PyCapsule::new_with_destructor` now take `name: Option<CString>` instead of `&CStr`.
  - The destructor `F` in `PyCapsule::new_with_destructor` must now be `Send`.
  - `PyCapsule::get_context` deprecated in favor of `PyCapsule::context` which doesn't take a `py: Python<'_>` argument.
  - `PyCapsule::set_context` no longer takes a `py: Python<'_>` argument.
  - `PyCapsule::name` now returns `PyResult<Option<&CStr>>` instead of `&CStr`.
- `FromPyObject::extract` for `Vec<T>` no longer accepts Python `str` inputs. [#2500](https://github.com/PyO3/pyo3/pull/2500)
- Ensure each `#[pymodule]` is only initialized once. [#2523](https://github.com/PyO3/pyo3/pull/2523)
- `pyo3_build_config::add_extension_module_link_args` now also emits linker arguments for `wasm32-unknown-emscripten`. [#2538](https://github.com/PyO3/pyo3/pull/2538)
- Type checks for `PySequence` and `PyMapping` now require inputs to inherit from (or register with) `collections.abc.Sequence` and `collections.abc.Mapping` respectively. [#2477](https://github.com/PyO3/pyo3/pull/2477)
- Disable `PyFunction` on when building for abi3 or PyPy. [#2542](https://github.com/PyO3/pyo3/pull/2542)
- Deprecate `Python::acquire_gil`. [#2549](https://github.com/PyO3/pyo3/pull/2549)

### Removed

- Remove all functionality deprecated in PyO3 0.15. [#2283](https://github.com/PyO3/pyo3/pull/2283)
- Make the `Dict`, `WeakRef` and `BaseNativeType` members of the `PyClass` private implementation details. [#2572](https://github.com/PyO3/pyo3/pull/2572)

### Fixed

- Enable incorrectly disabled FFI definition `PyThreadState_DeleteCurrent`. [#2357](https://github.com/PyO3/pyo3/pull/2357)
- Fix `wrap_pymodule` interactions with name resolution rules: it no longer "sees through" glob imports of `use submodule::*` when `submodule::submodule` is a `#[pymodule]`. [#2363](https://github.com/PyO3/pyo3/pull/2363)
- Correct FFI definition `PyEval_EvalCodeEx` to take `*const *mut PyObject` array arguments instead of `*mut *mut PyObject`. [#2368](https://github.com/PyO3/pyo3/pull/2368)
- Fix "raw-ident" structs (e.g. `#[pyclass] struct r#RawName`) incorrectly having `r#` at the start of the class name created in Python. [#2395](https://github.com/PyO3/pyo3/pull/2395)
- Correct FFI definition `Py_tracefunc` to be `unsafe extern "C" fn` (was previously safe). [#2407](https://github.com/PyO3/pyo3/pull/2407)
- Fix compile failure with `#[pyo3(from_py_with = "...")]` annotations on a field in a `#[derive(FromPyObject)]` struct. [#2414](https://github.com/PyO3/pyo3/pull/2414)
- Fix FFI definitions `_PyDateTime_BaseTime` and `_PyDateTime_BaseDateTime` lacking leading underscores in their names. [#2421](https://github.com/PyO3/pyo3/pull/2421)
- Remove FFI definition `PyArena` on Python 3.10 and up. [#2421](https://github.com/PyO3/pyo3/pull/2421)
- Fix FFI definition `PyCompilerFlags` missing member `cf_feature_version` on Python 3.8 and up. [#2423](https://github.com/PyO3/pyo3/pull/2423)
- Fix FFI definition `PyAsyncMethods` missing member `am_send` on Python 3.10 and up. [#2423](https://github.com/PyO3/pyo3/pull/2423)
- Fix FFI definition `PyGenObject` having multiple incorrect members on various Python versions. [#2423](https://github.com/PyO3/pyo3/pull/2423)
- Fix FFI definition `PySyntaxErrorObject` missing members `end_lineno` and `end_offset` on Python 3.10 and up. [#2423](https://github.com/PyO3/pyo3/pull/2423)
- Fix FFI definition `PyHeapTypeObject` missing member `ht_module` on Python 3.9 and up. [#2423](https://github.com/PyO3/pyo3/pull/2423)
- Fix FFI definition `PyFrameObject` having multiple incorrect members on various Python versions. [#2424](https://github.com/PyO3/pyo3/pull/2424) [#2434](https://github.com/PyO3/pyo3/pull/2434)
- Fix FFI definition `PyTypeObject` missing deprecated field `tp_print` on Python 3.8. [#2428](https://github.com/PyO3/pyo3/pull/2428)
- Fix FFI definitions `PyDateTime_CAPI`. `PyDateTime_Date`, `PyASCIIObject`, `PyBaseExceptionObject`, `PyListObject`, and `PyTypeObject` on PyPy. [#2428](https://github.com/PyO3/pyo3/pull/2428)
- Fix FFI definition `_inittab` field `initfunc` typo'd as `initfun`. [#2431](https://github.com/PyO3/pyo3/pull/2431)
- Fix FFI definitions `_PyDateTime_BaseTime` and `_PyDateTime_BaseDateTime` incorrectly having `fold` member. [#2432](https://github.com/PyO3/pyo3/pull/2432)
- Fix FFI definitions `PyTypeObject`. `PyHeapTypeObject`, and `PyCFunctionObject` having incorrect members on PyPy 3.9. [#2433](https://github.com/PyO3/pyo3/pull/2433)
- Fix FFI definition `PyGetSetDef` to have `*const c_char` for `doc` member (not `*mut c_char`). [#2439](https://github.com/PyO3/pyo3/pull/2439)
- Fix `#[pyo3(from_py_with = "...")]` being ignored for 1-element tuple structs and transparent structs. [#2440](https://github.com/PyO3/pyo3/pull/2440)
- Use `memoffset` to avoid UB when computing `PyCell` layout. [#2450](https://github.com/PyO3/pyo3/pull/2450)
- Fix incorrect enum names being returned by the generated `repr` for enums renamed by `#[pyclass(name = "...")]` [#2457](https://github.com/PyO3/pyo3/pull/2457)
- Fix `PyObject_CallNoArgs` incorrectly being available when building for abi3 on Python 3.9. [#2476](https://github.com/PyO3/pyo3/pull/2476)
- Fix several clippy warnings generated by `#[pyfunction]` arguments. [#2503](https://github.com/PyO3/pyo3/pull/2503)

## [0.16.6] - 2022-08-23

### Changed

- Fix soundness issues with `PyCapsule` type with select workarounds. Users are encourage to upgrade to PyO3 0.17 at their earliest convenience which contains API breakages which fix the issues in a long-term fashion. [#2522](https://github.com/PyO3/pyo3/pull/2522)
  - `PyCapsule::new` and `PyCapsule::new_with_destructor` now take ownership of a copy of the `name` to resolve a possible use-after-free.
  - `PyCapsule::name` now returns an empty `CStr` instead of dereferencing a null pointer if the capsule has no name.
  - The destructor `F` in `PyCapsule::new_with_destructor` will never be called if the capsule is deleted from a thread other than the one which the capsule was created in (a warning will be emitted).
- Panics during drop of panic payload caught by PyO3 will now abort. [#2544](https://github.com/PyO3/pyo3/pull/2544)

## [0.16.5] - 2022-05-15

### Added

- Add an experimental `generate-import-lib` feature to support auto-generating non-abi3 python import libraries for Windows targets. [#2364](https://github.com/PyO3/pyo3/pull/2364)
- Add FFI definition `Py_ExitStatusException`. [#2374](https://github.com/PyO3/pyo3/pull/2374)

### Changed

- Deprecate experimental `generate-abi3-import-lib` feature in favor of the new `generate-import-lib` feature. [#2364](https://github.com/PyO3/pyo3/pull/2364)

### Fixed

- Added missing `warn_default_encoding` field to `PyConfig` on 3.10+. The previously missing field could result in incorrect behavior or crashes. [#2370](https://github.com/PyO3/pyo3/pull/2370)
- Fixed order of `pathconfig_warnings` and `program_name` fields of `PyConfig` on 3.10+. Previously, the order of the fields was swapped and this could lead to incorrect behavior or crashes. [#2370](https://github.com/PyO3/pyo3/pull/2370)

## [0.16.4] - 2022-04-14

### Added

- Add `PyTzInfoAccess` trait for safe access to time zone information. [#2263](https://github.com/PyO3/pyo3/pull/2263)
- Add an experimental `generate-abi3-import-lib` feature to auto-generate `python3.dll` import libraries for Windows. [#2282](https://github.com/PyO3/pyo3/pull/2282)
- Add FFI definitions for `PyDateTime_BaseTime` and `PyDateTime_BaseDateTime`. [#2294](https://github.com/PyO3/pyo3/pull/2294)

### Changed

- Improved performance of failing calls to `FromPyObject::extract` which is common when functions accept multiple distinct types. [#2279](https://github.com/PyO3/pyo3/pull/2279)
- Default to "m" ABI tag when choosing `libpython` link name for CPython 3.7 on Unix. [#2288](https://github.com/PyO3/pyo3/pull/2288)
- Allow to compile "abi3" extensions without a working build host Python interpreter. [#2293](https://github.com/PyO3/pyo3/pull/2293)

### Fixed

- Crates depending on PyO3 can collect code coverage via LLVM instrumentation using stable Rust. [#2286](https://github.com/PyO3/pyo3/pull/2286)
- Fix segfault when calling FFI methods `PyDateTime_DATE_GET_TZINFO` or `PyDateTime_TIME_GET_TZINFO` on `datetime` or `time` without a tzinfo. [#2289](https://github.com/PyO3/pyo3/pull/2289)
- Fix directory names starting with the letter `n` breaking serialization of the interpreter configuration on Windows since PyO3 0.16.3. [#2299](https://github.com/PyO3/pyo3/pull/2299)

## [0.16.3] - 2022-04-05

### Packaging

- Extend `parking_lot` dependency supported versions to include 0.12. [#2239](https://github.com/PyO3/pyo3/pull/2239)

### Added

- Add methods to `pyo3_build_config::InterpreterConfig` to run Python scripts using the configured executable. [#2092](https://github.com/PyO3/pyo3/pull/2092)
- Add `as_bytes` method to `Py<PyBytes>`. [#2235](https://github.com/PyO3/pyo3/pull/2235)
- Add FFI definitions for `PyType_FromModuleAndSpec`, `PyType_GetModule`, `PyType_GetModuleState` and `PyModule_AddType`. [#2250](https://github.com/PyO3/pyo3/pull/2250)
- Add `pyo3_build_config::cross_compiling_from_to` as a helper to detect when PyO3 is cross-compiling. [#2253](https://github.com/PyO3/pyo3/pull/2253)
- Add `#[pyclass(mapping)]` option to leave sequence slots empty in container implementations. [#2265](https://github.com/PyO3/pyo3/pull/2265)
- Add `PyString::intern` to enable usage of the Python's built-in string interning. [#2268](https://github.com/PyO3/pyo3/pull/2268)
- Add `intern!` macro which can be used to amortize the cost of creating Python strings by storing them inside a `GILOnceCell`. [#2269](https://github.com/PyO3/pyo3/pull/2269)
- Add `PYO3_CROSS_PYTHON_IMPLEMENTATION` environment variable for selecting the default cross Python implementation. [#2272](https://github.com/PyO3/pyo3/pull/2272)

### Changed

- Allow `#[pyo3(crate = "...", text_signature = "...")]` options to be used directly in `#[pyclass(crate = "...", text_signature = "...")]`. [#2234](https://github.com/PyO3/pyo3/pull/2234)
- Make `PYO3_CROSS_LIB_DIR` environment variable optional when cross compiling. [#2241](https://github.com/PyO3/pyo3/pull/2241)
- Mark `METH_FASTCALL` calling convention as limited API on Python 3.10. [#2250](https://github.com/PyO3/pyo3/pull/2250)
- Deprecate `pyo3_build_config::cross_compiling` in favor of `pyo3_build_config::cross_compiling_from_to`. [#2253](https://github.com/PyO3/pyo3/pull/2253)

### Fixed

- Fix `abi3-py310` feature: use Python 3.10 ABI when available instead of silently falling back to the 3.9 ABI. [#2242](https://github.com/PyO3/pyo3/pull/2242)
- Use shared linking mode when cross compiling against a [Framework bundle](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html) for macOS. [#2233](https://github.com/PyO3/pyo3/pull/2233)
- Fix panic during compilation when `PYO3_CROSS_LIB_DIR` is set for some host/target combinations. [#2232](https://github.com/PyO3/pyo3/pull/2232)
- Correct dependency version for `syn` to require minimal patch version 1.0.56. [#2240](https://github.com/PyO3/pyo3/pull/2240)

## [0.16.2] - 2022-03-15

### Packaging

- Warn when modules are imported on PyPy 3.7 versions older than PyPy 7.3.8, as they are known to have binary compatibility issues. [#2217](https://github.com/PyO3/pyo3/pull/2217)
- Ensure build script of `pyo3-ffi` runs before that of `pyo3` to fix cross compilation. [#2224](https://github.com/PyO3/pyo3/pull/2224)

## [0.16.1] - 2022-03-05

### Packaging

- Extend `hashbrown` optional dependency supported versions to include 0.12. [#2197](https://github.com/PyO3/pyo3/pull/2197)

### Fixed

- Fix incorrect platform detection for Windows in `pyo3-build-config`. [#2198](https://github.com/PyO3/pyo3/pull/2198)
- Fix regression from 0.16 preventing cross compiling to aarch64 macOS. [#2201](https://github.com/PyO3/pyo3/pull/2201)

## [0.16.0] - 2022-02-27

### Packaging

- Update MSRV to Rust 1.48. [#2004](https://github.com/PyO3/pyo3/pull/2004)
- Update `indoc` optional dependency to 1.0. [#2004](https://github.com/PyO3/pyo3/pull/2004)
- Drop support for Python 3.6, remove `abi3-py36` feature. [#2006](https://github.com/PyO3/pyo3/pull/2006)
- `pyo3-build-config` no longer enables the `resolve-config` feature by default. [#2008](https://github.com/PyO3/pyo3/pull/2008)
- Update `inventory` optional dependency to 0.2. [#2019](https://github.com/PyO3/pyo3/pull/2019)
- Drop `paste` dependency. [#2081](https://github.com/PyO3/pyo3/pull/2081)
- The bindings found in `pyo3::ffi` are now a re-export of a separate `pyo3-ffi` crate. [#2126](https://github.com/PyO3/pyo3/pull/2126)
- Support PyPy 3.9. [#2143](https://github.com/PyO3/pyo3/pull/2143)

### Added

- Add `PyCapsule` type exposing the [Capsule API](https://docs.python.org/3/c-api/capsule.html#capsules). [#1980](https://github.com/PyO3/pyo3/pull/1980)
- Add `pyo3_build_config::Sysconfigdata` and supporting APIs. [#1996](https://github.com/PyO3/pyo3/pull/1996)
- Add `Py::setattr` method. [#2009](https://github.com/PyO3/pyo3/pull/2009)
- Add `#[pyo3(crate = "some::path")]` option to all attribute macros (except the deprecated `#[pyproto]`). [#2022](https://github.com/PyO3/pyo3/pull/2022)
- Enable `create_exception!` macro to take an optional docstring. [#2027](https://github.com/PyO3/pyo3/pull/2027)
- Enable `#[pyclass]` for fieldless (aka C-like) enums. [#2034](https://github.com/PyO3/pyo3/pull/2034)
- Add buffer magic methods `__getbuffer__` and `__releasebuffer__` to `#[pymethods]`. [#2067](https://github.com/PyO3/pyo3/pull/2067)
- Add support for paths in `wrap_pyfunction` and `wrap_pymodule`. [#2081](https://github.com/PyO3/pyo3/pull/2081)
- Enable `wrap_pyfunction!` to wrap a `#[pyfunction]` implemented in a different Rust module or crate. [#2091](https://github.com/PyO3/pyo3/pull/2091)
- Add `PyAny::contains` method (`in` operator for `PyAny`). [#2115](https://github.com/PyO3/pyo3/pull/2115)
- Add `PyMapping::contains` method (`in` operator for `PyMapping`). [#2133](https://github.com/PyO3/pyo3/pull/2133)
- Add garbage collection magic magic methods `__traverse__` and `__clear__` to `#[pymethods]`. [#2159](https://github.com/PyO3/pyo3/pull/2159)
- Add support for `from_py_with` on struct tuples and enums to override the default from-Python conversion. [#2181](https://github.com/PyO3/pyo3/pull/2181)
- Add `eq`, `ne`, `lt`, `le`, `gt`, `ge` methods to `PyAny` that wrap `rich_compare`. [#2175](https://github.com/PyO3/pyo3/pull/2175)
- Add `Py::is` and `PyAny::is` methods to check for object identity. [#2183](https://github.com/PyO3/pyo3/pull/2183)
- Add support for the `__getattribute__` magic method. [#2187](https://github.com/PyO3/pyo3/pull/2187)

### Changed

- `PyType::is_subclass`, `PyErr::is_instance` and `PyAny::is_instance` now operate run-time type object instead of a type known at compile-time. The old behavior is still available as `PyType::is_subclass_of`, `PyErr::is_instance_of` and `PyAny::is_instance_of`.  [#1985](https://github.com/PyO3/pyo3/pull/1985)
- Rename some methods on `PyErr` (the old names are just marked deprecated for now): [#2026](https://github.com/PyO3/pyo3/pull/2026)
  - `pytype` -> `get_type`
  - `pvalue` -> `value` (and deprecate equivalent `instance`)
  - `ptraceback` -> `traceback`
  - `from_in
Download .txt
gitextract_jnohosl3/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.md
│   ├── actions/
│   │   └── fetch-merge-base/
│   │       └── action.yml
│   ├── dependabot.yml
│   ├── pull_request_template.md
│   └── workflows/
│       ├── benches.yml
│       ├── build.yml
│       ├── cache-cleanup.yml
│       ├── changelog.yml
│       ├── ci-cache-warmup.yml
│       ├── ci.yml
│       ├── coverage-pr-base.yml
│       ├── netlify-build.yml
│       ├── netlify-deploy.yml
│       └── release.yml
├── .gitignore
├── .netlify/
│   ├── internal_banner.html
│   └── redirect.sh
├── .towncrier.template.md
├── Architecture.md
├── CHANGELOG.md
├── CITATION.cff
├── Cargo.toml
├── Code-of-Conduct.md
├── Contributing.md
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── Releasing.md
├── assets/
│   └── script.py
├── build.rs
├── codecov.yml
├── emscripten/
│   ├── .gitignore
│   ├── Makefile
│   └── runner.py
├── examples/
│   ├── Cargo.toml
│   ├── README.md
│   ├── decorator/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── pyproject.toml
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── src/
│   │   │   └── lib.rs
│   │   └── tests/
│   │       ├── example.py
│   │       └── test_.py
│   ├── getitem/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── pyproject.toml
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── src/
│   │   │   └── lib.rs
│   │   └── tests/
│   │       └── test_getitem.py
│   ├── maturin-starter/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── pyproject.toml
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── maturin_starter/
│   │   │   └── __init__.py
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── src/
│   │   │   ├── lib.rs
│   │   │   └── submodule.rs
│   │   └── tests/
│   │       ├── test_maturin_starter.py
│   │       └── test_submodule.py
│   ├── plugin/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── plugin_api/
│   │   │   │   └── Cargo.toml
│   │   │   └── pre-script.rhai
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── plugin_api/
│   │   │   ├── Cargo.toml
│   │   │   ├── noxfile.py
│   │   │   ├── pyproject.toml
│   │   │   ├── src/
│   │   │   │   └── lib.rs
│   │   │   └── tests/
│   │   │       ├── test_Gadget.py
│   │   │       └── test_import.py
│   │   ├── python_plugin/
│   │   │   ├── gadget_init_plugin.py
│   │   │   └── rng.py
│   │   └── src/
│   │       └── main.rs
│   ├── setuptools-rust-starter/
│   │   ├── .template/
│   │   │   ├── Cargo.toml
│   │   │   ├── pre-script.rhai
│   │   │   └── setup.cfg
│   │   ├── Cargo.toml
│   │   ├── MANIFEST.in
│   │   ├── README.md
│   │   ├── cargo-generate.toml
│   │   ├── noxfile.py
│   │   ├── pyproject.toml
│   │   ├── requirements-dev.txt
│   │   ├── setuptools_rust_starter/
│   │   │   └── __init__.py
│   │   ├── src/
│   │   │   ├── lib.rs
│   │   │   └── submodule.rs
│   │   └── tests/
│   │       ├── test_setuptools_rust_starter.py
│   │       └── test_submodule.py
│   └── word-count/
│       ├── .template/
│       │   ├── Cargo.toml
│       │   ├── pre-script.rhai
│       │   └── pyproject.toml
│       ├── Cargo.toml
│       ├── MANIFEST.in
│       ├── README.md
│       ├── cargo-generate.toml
│       ├── noxfile.py
│       ├── pyproject.toml
│       ├── src/
│       │   └── lib.rs
│       ├── tests/
│       │   └── test_word_count.py
│       └── word_count/
│           └── __init__.py
├── guide/
│   ├── book.toml
│   ├── pyclass-parameters.md
│   ├── pyo3_version.py
│   ├── src/
│   │   ├── SUMMARY.md
│   │   ├── advanced.md
│   │   ├── async-await.md
│   │   ├── building-and-distribution/
│   │   │   └── multiple-python-versions.md
│   │   ├── building-and-distribution.md
│   │   ├── changelog.md
│   │   ├── class/
│   │   │   ├── call.md
│   │   │   ├── numeric.md
│   │   │   ├── object.md
│   │   │   ├── protocols.md
│   │   │   └── thread-safety.md
│   │   ├── class.md
│   │   ├── contributing.md
│   │   ├── conversions/
│   │   │   ├── tables.md
│   │   │   └── traits.md
│   │   ├── conversions.md
│   │   ├── debugging.md
│   │   ├── ecosystem/
│   │   │   ├── async-await.md
│   │   │   ├── logging.md
│   │   │   └── tracing.md
│   │   ├── ecosystem.md
│   │   ├── exception.md
│   │   ├── faq.md
│   │   ├── features.md
│   │   ├── free-threading.md
│   │   ├── function/
│   │   │   ├── error-handling.md
│   │   │   └── signature.md
│   │   ├── function-calls.md
│   │   ├── function.md
│   │   ├── getting-started.md
│   │   ├── index.md
│   │   ├── migration.md
│   │   ├── module.md
│   │   ├── parallelism.md
│   │   ├── performance.md
│   │   ├── python-from-rust/
│   │   │   ├── calling-existing-code.md
│   │   │   └── function-calls.md
│   │   ├── python-from-rust.md
│   │   ├── python-typing-hints.md
│   │   ├── rust-from-python.md
│   │   ├── trait-bounds.md
│   │   ├── type-stub.md
│   │   └── types.md
│   └── theme/
│       ├── tabs.css
│       └── tabs.js
├── newsfragments/
│   ├── .gitignore
│   ├── 5349.added.md
│   ├── 5349.changed.md
│   ├── 5668.added.md
│   ├── 5668.fixed.md
│   ├── 5668.removed.md
│   ├── 5753.changed.md
│   ├── 5770.added.md
│   ├── 5782.added.md
│   ├── 5797.changed.md
│   ├── 5803.changed.md
│   ├── 5809.packaging.md
│   ├── 5824.changed.md
│   ├── 5828.added.md
│   ├── 5830.changed.md
│   ├── 5837.fixed.md
│   ├── 5839.changed.md
│   ├── 5841.changed.md
│   ├── 5847.fixed.md
│   ├── 5849.added.md
│   ├── 5857.added.md
│   ├── 5865.packaging.md
│   ├── 5866.changed.md
│   ├── 5883.changed.md
│   ├── 5887.added.md
│   ├── 5891.added.md
│   ├── 5893.removed.md
│   ├── 5896.changed.md
│   └── 5897.changed.md
├── noxfile.py
├── pyo3-benches/
│   ├── Cargo.toml
│   ├── benches/
│   │   ├── bench_any.rs
│   │   ├── bench_attach.rs
│   │   ├── bench_bigint.rs
│   │   ├── bench_call.rs
│   │   ├── bench_comparisons.rs
│   │   ├── bench_critical_sections.rs
│   │   ├── bench_decimal.rs
│   │   ├── bench_dict.rs
│   │   ├── bench_err.rs
│   │   ├── bench_extract.rs
│   │   ├── bench_frompyobject.rs
│   │   ├── bench_intern.rs
│   │   ├── bench_intopyobject.rs
│   │   ├── bench_list.rs
│   │   ├── bench_py.rs
│   │   ├── bench_pyclass.rs
│   │   ├── bench_pystring_from_fmt.rs
│   │   ├── bench_set.rs
│   │   └── bench_tuple.rs
│   └── build.rs
├── pyo3-build-config/
│   ├── Cargo.toml
│   ├── build.rs
│   └── src/
│       ├── errors.rs
│       ├── impl_.rs
│       └── lib.rs
├── pyo3-ffi/
│   ├── ACKNOWLEDGEMENTS
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   ├── examples/
│   │   ├── README.md
│   │   ├── sequential/
│   │   │   ├── .template/
│   │   │   │   ├── Cargo.toml
│   │   │   │   ├── pre-script.rhai
│   │   │   │   └── pyproject.toml
│   │   │   ├── Cargo.toml
│   │   │   ├── MANIFEST.in
│   │   │   ├── README.md
│   │   │   ├── build.rs
│   │   │   ├── cargo-generate.toml
│   │   │   ├── noxfile.py
│   │   │   ├── pyproject.toml
│   │   │   ├── src/
│   │   │   │   ├── id.rs
│   │   │   │   ├── lib.rs
│   │   │   │   └── module.rs
│   │   │   └── tests/
│   │   │       ├── test.rs
│   │   │       └── test_.py
│   │   └── string-sum/
│   │       ├── .template/
│   │       │   ├── Cargo.toml
│   │       │   ├── pre-script.rhai
│   │       │   └── pyproject.toml
│   │       ├── Cargo.toml
│   │       ├── MANIFEST.in
│   │       ├── README.md
│   │       ├── build.rs
│   │       ├── cargo-generate.toml
│   │       ├── noxfile.py
│   │       ├── pyproject.toml
│   │       ├── src/
│   │       │   └── lib.rs
│   │       └── tests/
│   │           └── test_.py
│   └── src/
│       ├── abstract_.rs
│       ├── bltinmodule.rs
│       ├── boolobject.rs
│       ├── bytearrayobject.rs
│       ├── bytesobject.rs
│       ├── ceval.rs
│       ├── codecs.rs
│       ├── compat/
│       │   ├── mod.rs
│       │   ├── py_3_10.rs
│       │   ├── py_3_13.rs
│       │   ├── py_3_14.rs
│       │   ├── py_3_15.rs
│       │   └── py_3_9.rs
│       ├── compile.rs
│       ├── complexobject.rs
│       ├── context.rs
│       ├── cpython/
│       │   ├── abstract_.rs
│       │   ├── bytesobject.rs
│       │   ├── ceval.rs
│       │   ├── code.rs
│       │   ├── compile.rs
│       │   ├── complexobject.rs
│       │   ├── critical_section.rs
│       │   ├── descrobject.rs
│       │   ├── dictobject.rs
│       │   ├── floatobject.rs
│       │   ├── frameobject.rs
│       │   ├── funcobject.rs
│       │   ├── genobject.rs
│       │   ├── import.rs
│       │   ├── initconfig.rs
│       │   ├── listobject.rs
│       │   ├── lock.rs
│       │   ├── longobject.rs
│       │   ├── methodobject.rs
│       │   ├── mod.rs
│       │   ├── object.rs
│       │   ├── objimpl.rs
│       │   ├── pydebug.rs
│       │   ├── pyerrors.rs
│       │   ├── pyframe.rs
│       │   ├── pyhash.rs
│       │   ├── pylifecycle.rs
│       │   ├── pymem.rs
│       │   ├── pystate.rs
│       │   ├── pythonrun.rs
│       │   ├── tupleobject.rs
│       │   ├── unicodeobject.rs
│       │   └── weakrefobject.rs
│       ├── datetime.rs
│       ├── descrobject.rs
│       ├── dictobject.rs
│       ├── enumobject.rs
│       ├── fileobject.rs
│       ├── fileutils.rs
│       ├── floatobject.rs
│       ├── genericaliasobject.rs
│       ├── impl_/
│       │   ├── macros.rs
│       │   └── mod.rs
│       ├── import.rs
│       ├── intrcheck.rs
│       ├── iterobject.rs
│       ├── lib.rs
│       ├── listobject.rs
│       ├── longobject.rs
│       ├── marshal.rs
│       ├── memoryobject.rs
│       ├── methodobject.rs
│       ├── modsupport.rs
│       ├── moduleobject.rs
│       ├── object.rs
│       ├── objimpl.rs
│       ├── osmodule.rs
│       ├── pyarena.rs
│       ├── pybuffer.rs
│       ├── pycapsule.rs
│       ├── pyerrors.rs
│       ├── pyframe.rs
│       ├── pyhash.rs
│       ├── pylifecycle.rs
│       ├── pymem.rs
│       ├── pyport.rs
│       ├── pystate.rs
│       ├── pystrtod.rs
│       ├── pythonrun.rs
│       ├── pytypedefs.rs
│       ├── rangeobject.rs
│       ├── refcount.rs
│       ├── setobject.rs
│       ├── sliceobject.rs
│       ├── structmember.rs
│       ├── structseq.rs
│       ├── sysmodule.rs
│       ├── traceback.rs
│       ├── tupleobject.rs
│       ├── typeslots.rs
│       ├── unicodeobject.rs
│       ├── warnings.rs
│       └── weakrefobject.rs
├── pyo3-ffi-check/
│   ├── Cargo.toml
│   ├── README.md
│   ├── build.rs
│   ├── macro/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── src/
│   │   └── main.rs
│   └── wrapper.h
├── pyo3-introspection/
│   ├── Cargo.toml
│   ├── src/
│   │   ├── introspection.rs
│   │   ├── lib.rs
│   │   ├── model.rs
│   │   └── stubs.rs
│   └── tests/
│       └── test.rs
├── pyo3-macros/
│   ├── Cargo.toml
│   └── src/
│       └── lib.rs
├── pyo3-macros-backend/
│   ├── Cargo.toml
│   └── src/
│       ├── attributes.rs
│       ├── combine_errors.rs
│       ├── derive_attributes.rs
│       ├── frompyobject.rs
│       ├── intopyobject.rs
│       ├── introspection.rs
│       ├── konst.rs
│       ├── lib.rs
│       ├── method.rs
│       ├── module.rs
│       ├── params.rs
│       ├── py_expr.rs
│       ├── pyclass.rs
│       ├── pyfunction/
│       │   └── signature.rs
│       ├── pyfunction.rs
│       ├── pyimpl.rs
│       ├── pymethod.rs
│       ├── quotes.rs
│       └── utils.rs
├── pyo3-runtime/
│   ├── README.md
│   ├── pyproject.toml
│   ├── src/
│   │   └── pyo3_runtime/
│   │       └── __init__.py
│   └── tests/
│       └── __init__.py
├── pyproject.toml
├── pytests/
│   ├── Cargo.toml
│   ├── MANIFEST.in
│   ├── MODULE_DOC.md
│   ├── README.md
│   ├── build.rs
│   ├── conftest.py
│   ├── noxfile.py
│   ├── pyproject.toml
│   ├── src/
│   │   ├── awaitable.rs
│   │   ├── buf_and_str.rs
│   │   ├── comparisons.rs
│   │   ├── consts.rs
│   │   ├── datetime.rs
│   │   ├── dict_iter.rs
│   │   ├── enums.rs
│   │   ├── exception.rs
│   │   ├── lib.rs
│   │   ├── misc.rs
│   │   ├── objstore.rs
│   │   ├── othermod.rs
│   │   ├── path.rs
│   │   ├── pyclasses.rs
│   │   ├── pyfunctions.rs
│   │   ├── sequence.rs
│   │   └── subclassing.rs
│   ├── stubs/
│   │   ├── __init__.pyi
│   │   ├── awaitable.pyi
│   │   ├── buf_and_str.pyi
│   │   ├── comparisons.pyi
│   │   ├── consts.pyi
│   │   ├── datetime.pyi
│   │   ├── dict_iter.pyi
│   │   ├── enums.pyi
│   │   ├── exception.pyi
│   │   ├── misc.pyi
│   │   ├── objstore.pyi
│   │   ├── othermod.pyi
│   │   ├── path.pyi
│   │   ├── pyclasses.pyi
│   │   ├── pyfunctions.pyi
│   │   ├── sequence.pyi
│   │   └── subclassing.pyi
│   └── tests/
│       ├── test_awaitable.py
│       ├── test_buf_and_str.py
│       ├── test_comparisons.py
│       ├── test_datetime.py
│       ├── test_dict_iter.py
│       ├── test_enums.py
│       ├── test_enums_match.py
│       ├── test_hammer_attaching_in_thread.py
│       ├── test_misc.py
│       ├── test_objstore.py
│       ├── test_othermod.py
│       ├── test_path.py
│       ├── test_pyclasses.py
│       ├── test_pyfunctions.py
│       ├── test_sequence.py
│       └── test_subclassing.py
├── src/
│   ├── buffer.rs
│   ├── byteswriter.rs
│   ├── call.rs
│   ├── conversion.rs
│   ├── conversions/
│   │   ├── anyhow.rs
│   │   ├── bigdecimal.rs
│   │   ├── bytes.rs
│   │   ├── chrono.rs
│   │   ├── chrono_tz.rs
│   │   ├── either.rs
│   │   ├── eyre.rs
│   │   ├── hashbrown.rs
│   │   ├── indexmap.rs
│   │   ├── jiff.rs
│   │   ├── mod.rs
│   │   ├── num_bigint.rs
│   │   ├── num_complex.rs
│   │   ├── num_rational.rs
│   │   ├── ordered_float.rs
│   │   ├── rust_decimal.rs
│   │   ├── serde.rs
│   │   ├── smallvec.rs
│   │   ├── std/
│   │   │   ├── array.rs
│   │   │   ├── cell.rs
│   │   │   ├── cstring.rs
│   │   │   ├── ipaddr.rs
│   │   │   ├── map.rs
│   │   │   ├── mod.rs
│   │   │   ├── num.rs
│   │   │   ├── option.rs
│   │   │   ├── osstr.rs
│   │   │   ├── path.rs
│   │   │   ├── set.rs
│   │   │   ├── slice.rs
│   │   │   ├── string.rs
│   │   │   ├── time.rs
│   │   │   └── vec.rs
│   │   ├── time.rs
│   │   └── uuid.rs
│   ├── coroutine/
│   │   ├── cancel.rs
│   │   └── waker.rs
│   ├── coroutine.rs
│   ├── err/
│   │   ├── cast_error.rs
│   │   ├── downcast_error.rs
│   │   ├── err_state.rs
│   │   ├── impls.rs
│   │   └── mod.rs
│   ├── exceptions.rs
│   ├── ffi/
│   │   ├── mod.rs
│   │   └── tests.rs
│   ├── ffi_ptr_ext.rs
│   ├── fmt.rs
│   ├── impl_/
│   │   ├── callback.rs
│   │   ├── concat.rs
│   │   ├── coroutine.rs
│   │   ├── deprecated.rs
│   │   ├── exceptions.rs
│   │   ├── extract_argument.rs
│   │   ├── freelist.rs
│   │   ├── frompyobject.rs
│   │   ├── introspection.rs
│   │   ├── panic.rs
│   │   ├── pycell.rs
│   │   ├── pyclass/
│   │   │   ├── assertions.rs
│   │   │   ├── doc.rs
│   │   │   ├── lazy_type_object.rs
│   │   │   └── probes.rs
│   │   ├── pyclass.rs
│   │   ├── pyclass_init.rs
│   │   ├── pyfunction.rs
│   │   ├── pymethods.rs
│   │   ├── pymodule.rs
│   │   ├── trampoline.rs
│   │   ├── unindent.rs
│   │   └── wrap.rs
│   ├── impl_.rs
│   ├── inspect.rs
│   ├── instance.rs
│   ├── internal/
│   │   ├── get_slot.rs
│   │   └── state.rs
│   ├── internal.rs
│   ├── internal_tricks.rs
│   ├── interpreter_lifecycle.rs
│   ├── lib.rs
│   ├── macros.rs
│   ├── marker.rs
│   ├── marshal.rs
│   ├── panic.rs
│   ├── prelude.rs
│   ├── py_result_ext.rs
│   ├── pybacked.rs
│   ├── pycell/
│   │   └── impl_.rs
│   ├── pycell.rs
│   ├── pyclass/
│   │   ├── create_type_object.rs
│   │   ├── gc.rs
│   │   └── guard.rs
│   ├── pyclass.rs
│   ├── pyclass_init.rs
│   ├── sealed.rs
│   ├── sync/
│   │   ├── critical_section.rs
│   │   └── once_lock.rs
│   ├── sync.rs
│   ├── test_utils.rs
│   ├── tests/
│   │   ├── hygiene/
│   │   │   ├── misc.rs
│   │   │   ├── mod.rs
│   │   │   ├── pyclass.rs
│   │   │   ├── pyfunction.rs
│   │   │   ├── pymethods.rs
│   │   │   └── pymodule.rs
│   │   └── mod.rs
│   ├── type_object.rs
│   ├── types/
│   │   ├── any.rs
│   │   ├── boolobject.rs
│   │   ├── bytearray.rs
│   │   ├── bytes.rs
│   │   ├── capsule.rs
│   │   ├── code.rs
│   │   ├── complex.rs
│   │   ├── datetime.rs
│   │   ├── dict.rs
│   │   ├── ellipsis.rs
│   │   ├── float.rs
│   │   ├── frame.rs
│   │   ├── frozenset.rs
│   │   ├── function.rs
│   │   ├── genericalias.rs
│   │   ├── iterator.rs
│   │   ├── list.rs
│   │   ├── mapping.rs
│   │   ├── mappingproxy.rs
│   │   ├── memoryview.rs
│   │   ├── mod.rs
│   │   ├── module.rs
│   │   ├── mutex.rs
│   │   ├── none.rs
│   │   ├── notimplemented.rs
│   │   ├── num.rs
│   │   ├── pysuper.rs
│   │   ├── range.rs
│   │   ├── sequence.rs
│   │   ├── set.rs
│   │   ├── slice.rs
│   │   ├── string.rs
│   │   ├── traceback.rs
│   │   ├── tuple.rs
│   │   ├── typeobject.rs
│   │   └── weakref/
│   │       ├── anyref.rs
│   │       ├── mod.rs
│   │       ├── proxy.rs
│   │       └── reference.rs
│   └── version.rs
└── tests/
    ├── test_anyhow.rs
    ├── test_append_to_inittab.rs
    ├── test_arithmetics.rs
    ├── test_buffer.rs
    ├── test_buffer_protocol.rs
    ├── test_bytes.rs
    ├── test_class_attributes.rs
    ├── test_class_basics.rs
    ├── test_class_comparisons.rs
    ├── test_class_conversion.rs
    ├── test_class_formatting.rs
    ├── test_class_init.rs
    ├── test_class_new.rs
    ├── test_compile_error.rs
    ├── test_coroutine.rs
    ├── test_datetime.rs
    ├── test_datetime_import.rs
    ├── test_declarative_module.rs
    ├── test_default_impls.rs
    ├── test_enum.rs
    ├── test_exceptions.rs
    ├── test_field_cfg.rs
    ├── test_frompy_intopy_roundtrip.rs
    ├── test_frompyobject.rs
    ├── test_gc.rs
    ├── test_getter_setter.rs
    ├── test_inheritance.rs
    ├── test_intopyobject.rs
    ├── test_macro_docs.rs
    ├── test_macros.rs
    ├── test_mapping.rs
    ├── test_methods.rs
    ├── test_module.rs
    ├── test_multiple_pymethods.rs
    ├── test_proto_methods.rs
    ├── test_pybuffer_drop_without_interpreter.rs
    ├── test_pyerr_debug_unformattable.rs
    ├── test_pyfunction.rs
    ├── test_pyself.rs
    ├── test_sequence.rs
    ├── test_serde.rs
    ├── test_static_slots.rs
    ├── test_string.rs
    ├── test_super.rs
    ├── test_text_signature.rs
    ├── test_utils/
    │   └── mod.rs
    ├── test_variable_arguments.rs
    ├── test_various.rs
    └── ui/
        ├── abi3_dict.rs
        ├── abi3_dict.stderr
        ├── abi3_inheritance.rs
        ├── abi3_inheritance.stderr
        ├── abi3_nativetype_inheritance.rs
        ├── abi3_nativetype_inheritance.stderr
        ├── abi3_weakref.rs
        ├── abi3_weakref.stderr
        ├── ambiguous_associated_items.rs
        ├── deprecated_pyfn.rs
        ├── deprecated_pyfn.stderr
        ├── duplicate_pymodule_submodule.rs
        ├── duplicate_pymodule_submodule.stderr
        ├── empty.rs
        ├── forbid_unsafe.rs
        ├── get_set_all.rs
        ├── get_set_all.stderr
        ├── immutable_type.rs
        ├── immutable_type.stderr
        ├── invalid_annotation.rs
        ├── invalid_annotation.stderr
        ├── invalid_annotation_return.rs
        ├── invalid_annotation_return.stderr
        ├── invalid_argument_attributes.rs
        ├── invalid_argument_attributes.stderr
        ├── invalid_async.rs
        ├── invalid_async.stderr
        ├── invalid_base_class.rs
        ├── invalid_base_class.stderr
        ├── invalid_cancel_handle.rs
        ├── invalid_cancel_handle.stderr
        ├── invalid_closure.rs
        ├── invalid_closure.stderr
        ├── invalid_frompy_derive.rs
        ├── invalid_frompy_derive.stderr
        ├── invalid_frozen_pyclass_borrow.rs
        ├── invalid_frozen_pyclass_borrow.stderr
        ├── invalid_intern_arg.rs
        ├── invalid_intern_arg.stderr
        ├── invalid_intopy_derive.rs
        ├── invalid_intopy_derive.stderr
        ├── invalid_intopy_with.rs
        ├── invalid_intopy_with.stderr
        ├── invalid_property_args.rs
        ├── invalid_property_args.stderr
        ├── invalid_proto_pymethods.rs
        ├── invalid_proto_pymethods.stderr
        ├── invalid_pycallargs.rs
        ├── invalid_pycallargs.stderr
        ├── invalid_pyclass_args.rs
        ├── invalid_pyclass_args.stderr
        ├── invalid_pyclass_doc.rs
        ├── invalid_pyclass_doc.stderr
        ├── invalid_pyclass_enum.rs
        ├── invalid_pyclass_enum.stderr
        ├── invalid_pyclass_generic.rs
        ├── invalid_pyclass_generic.stderr
        ├── invalid_pyclass_init.rs
        ├── invalid_pyclass_init.stderr
        ├── invalid_pyclass_item.rs
        ├── invalid_pyclass_item.stderr
        ├── invalid_pyfunction_argument.rs
        ├── invalid_pyfunction_argument.stderr
        ├── invalid_pyfunction_definition.rs
        ├── invalid_pyfunction_definition.stderr
        ├── invalid_pyfunction_signatures.rs
        ├── invalid_pyfunction_signatures.stderr
        ├── invalid_pyfunction_warn.rs
        ├── invalid_pyfunction_warn.stderr
        ├── invalid_pyfunctions.rs
        ├── invalid_pyfunctions.stderr
        ├── invalid_pymethod_enum.rs
        ├── invalid_pymethod_enum.stderr
        ├── invalid_pymethod_names.rs
        ├── invalid_pymethod_names.stderr
        ├── invalid_pymethod_receiver.rs
        ├── invalid_pymethod_receiver.stderr
        ├── invalid_pymethods.rs
        ├── invalid_pymethods.stderr
        ├── invalid_pymethods_buffer.rs
        ├── invalid_pymethods_buffer.stderr
        ├── invalid_pymethods_duplicates.rs
        ├── invalid_pymethods_duplicates.stderr
        ├── invalid_pymethods_warn.rs
        ├── invalid_pymethods_warn.stderr
        ├── invalid_pymodule_args.rs
        ├── invalid_pymodule_args.stderr
        ├── invalid_pymodule_glob.rs
        ├── invalid_pymodule_glob.stderr
        ├── invalid_pymodule_in_root.rs
        ├── invalid_pymodule_in_root.stderr
        ├── invalid_pymodule_trait.rs
        ├── invalid_pymodule_trait.stderr
        ├── invalid_pymodule_two_pymodule_init.rs
        ├── invalid_pymodule_two_pymodule_init.stderr
        ├── invalid_result_conversion.rs
        ├── invalid_result_conversion.stderr
        ├── missing_intopy.rs
        ├── missing_intopy.stderr
        ├── not_send.rs
        ├── not_send.stderr
        ├── not_send2.rs
        ├── not_send2.stderr
        ├── pyclass_generic_enum.rs
        ├── pyclass_generic_enum.stderr
        ├── pyclass_probe.rs
        ├── pyclass_send.rs
        ├── pyclass_send.stderr
        ├── pymodule_missing_docs.rs
        ├── reject_generics.rs
        ├── reject_generics.stderr
        ├── static_ref.rs
        ├── static_ref.stderr
        ├── traverse.rs
        ├── traverse.stderr
        ├── wrong_aspyref_lifetimes.rs
        └── wrong_aspyref_lifetimes.stderr
Download .txt
Showing preview only (692K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (8440 symbols across 472 files)

FILE: assets/script.py
  class Blah (line 4) | class Blah:

FILE: build.rs
  function ensure_auto_initialize_ok (line 8) | fn ensure_auto_initialize_ok(interpreter_config: &InterpreterConfig) -> ...
  function configure_pyo3 (line 35) | fn configure_pyo3() -> Result<()> {
  function main (line 52) | fn main() {

FILE: examples/decorator/noxfile.py
  function python (line 5) | def python(session: nox.Session):

FILE: examples/decorator/src/lib.rs
  type PyCounter (line 9) | pub struct PyCounter {
    method __new__ (line 27) | fn __new__(wraps: Py<PyAny>) -> Self {
    method count (line 35) | fn count(&self) -> u64 {
    method __call__ (line 40) | fn __call__(
  function decorator (line 61) | pub fn decorator(module: &Bound<'_, PyModule>) -> PyResult<()> {

FILE: examples/decorator/tests/example.py
  function say_hello (line 5) | def say_hello():

FILE: examples/decorator/tests/test_.py
  function test_no_args (line 4) | def test_no_args():
  function test_arg (line 17) | def test_arg():
  function test_default_arg (line 30) | def test_default_arg():
  function test_discussion_2598 (line 44) | def test_discussion_2598():

FILE: examples/getitem/noxfile.py
  function python (line 5) | def python(session: nox.Session):

FILE: examples/getitem/src/lib.rs
  type IntOrSlice (line 7) | enum IntOrSlice<'py> {
  type ExampleContainer (line 13) | struct ExampleContainer {
    method new (line 21) | fn new() -> Self {
    method __getitem__ (line 25) | fn __getitem__(&self, key: &Bound<'_, PyAny>) -> PyResult<i32> {
    method __setitem__ (line 61) | fn __setitem__(&self, idx: IntOrSlice, value: u32) -> PyResult<()> {
  function example (line 79) | fn example(m: &Bound<'_, PyModule>) -> PyResult<()> {

FILE: examples/getitem/tests/test_getitem.py
  function test_simple (line 5) | def test_simple():

FILE: examples/maturin-starter/maturin_starter/__init__.py
  class PythonClass (line 11) | class PythonClass:
    method __init__ (line 12) | def __init__(self, value: int) -> None:

FILE: examples/maturin-starter/noxfile.py
  function python (line 5) | def python(session):

FILE: examples/maturin-starter/src/lib.rs
  type ExampleClass (line 8) | struct ExampleClass {
    method new (line 16) | pub fn new(value: i32) -> Self {
  function maturin_starter (line 23) | fn maturin_starter(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<...

FILE: examples/maturin-starter/src/submodule.rs
  type SubmoduleClass (line 4) | struct SubmoduleClass {}
    method __new__ (line 9) | pub fn __new__() -> Self {
    method greeting (line 13) | pub fn greeting(&self) -> &'static str {
  function submodule (line 19) | pub fn submodule(m: &Bound<'_, PyModule>) -> PyResult<()> {

FILE: examples/maturin-starter/tests/test_maturin_starter.py
  function test_python_class (line 4) | def test_python_class() -> None:
  function test_example_class (line 9) | def test_example_class() -> None:
  function test_doc (line 14) | def test_doc() -> None:

FILE: examples/maturin-starter/tests/test_submodule.py
  function test_submodule_class (line 4) | def test_submodule_class() -> None:

FILE: examples/plugin/plugin_api/noxfile.py
  function python (line 5) | def python(session):

FILE: examples/plugin/plugin_api/src/lib.rs
  type Gadget (line 5) | pub struct Gadget {
    method new (line 15) | fn new() -> Self {
    method push (line 22) | fn push(&mut self, v: usize) {
  function plugin_api (line 29) | pub fn plugin_api(m: &Bound<'_, PyModule>) -> PyResult<()> {

FILE: examples/plugin/plugin_api/tests/test_Gadget.py
  function gadget (line 5) | def gadget():
  function test_creation (line 12) | def test_creation(gadget):
  function test_property (line 16) | def test_property(gadget):
  function test_push (line 21) | def test_push(gadget):

FILE: examples/plugin/plugin_api/tests/test_import.py
  function test_import (line 1) | def test_import():

FILE: examples/plugin/python_plugin/gadget_init_plugin.py
  function start (line 5) | def start():

FILE: examples/plugin/python_plugin/rng.py
  function get_random_number (line 1) | def get_random_number():

FILE: examples/plugin/src/main.rs
  function main (line 5) | fn main() -> Result<(), Box<dyn std::error::Error>> {

FILE: examples/setuptools-rust-starter/noxfile.py
  function python (line 6) | def python(session: nox.Session):

FILE: examples/setuptools-rust-starter/setuptools_rust_starter/__init__.py
  class PythonClass (line 11) | class PythonClass:
    method __init__ (line 12) | def __init__(self, value: int) -> None:

FILE: examples/setuptools-rust-starter/src/lib.rs
  type ExampleClass (line 8) | struct ExampleClass {
    method new (line 16) | pub fn new(value: i32) -> Self {
  function _setuptools_rust_starter (line 23) | fn _setuptools_rust_starter(py: Python<'_>, m: &Bound<'_, PyModule>) -> ...

FILE: examples/setuptools-rust-starter/src/submodule.rs
  type SubmoduleClass (line 4) | struct SubmoduleClass {}
    method __new__ (line 9) | pub fn __new__() -> Self {
    method greeting (line 13) | pub fn greeting(&self) -> &'static str {
  function submodule (line 19) | pub fn submodule(m: &Bound<'_, PyModule>) -> PyResult<()> {

FILE: examples/setuptools-rust-starter/tests/test_setuptools_rust_starter.py
  function test_python_class (line 4) | def test_python_class() -> None:
  function test_example_class (line 9) | def test_example_class() -> None:
  function test_doc (line 14) | def test_doc() -> None:

FILE: examples/setuptools-rust-starter/tests/test_submodule.py
  function test_submodule_class (line 4) | def test_submodule_class() -> None:

FILE: examples/word-count/noxfile.py
  function test (line 7) | def test(session: nox.Session):
  function bench (line 14) | def bench(session: nox.Session):

FILE: examples/word-count/src/lib.rs
  function search (line 6) | fn search(contents: &str, needle: &str) -> usize {
  function search_sequential (line 15) | fn search_sequential(contents: &str, needle: &str) -> usize {
  function search_sequential_detached (line 20) | fn search_sequential_detached(py: Python<'_>, contents: &str, needle: &s...
  function count_line (line 25) | fn count_line(line: &str, needle: &str) -> usize {
  function word_count (line 36) | fn word_count(m: &Bound<'_, PyModule>) -> PyResult<()> {

FILE: examples/word-count/tests/test_word_count.py
  function contents (line 8) | def contents() -> str:
  function test_word_count_rust_parallel (line 35) | def test_word_count_rust_parallel(benchmark, contents):
  function test_word_count_rust_sequential (line 40) | def test_word_count_rust_sequential(benchmark, contents):
  function test_word_count_python_sequential (line 45) | def test_word_count_python_sequential(benchmark, contents):
  function run_rust_sequential_twice (line 50) | def run_rust_sequential_twice(
  function test_word_count_rust_sequential_twice_with_threads (line 60) | def test_word_count_rust_sequential_twice_with_threads(benchmark, conten...

FILE: examples/word-count/word_count/__init__.py
  function search_py (line 11) | def search_py(contents: str, needle: str) -> int:

FILE: guide/pyo3_version.py
  function replace_item_content (line 31) | def replace_item_content(item):

FILE: noxfile.py
  function _get_output (line 53) | def _get_output(*args: str) -> str:
  function _parse_supported_interpreter_version (line 57) | def _parse_supported_interpreter_version(
  function _supported_interpreter_versions (line 71) | def _supported_interpreter_versions(
  function test (line 95) | def test(session: nox.Session) -> None:
  function test_rust (line 101) | def test_rust(session: nox.Session):
  function test_py (line 150) | def test_py(session: nox.Session) -> None:
  function coverage (line 159) | def coverage(session: nox.Session) -> None:
  function set_coverage_env (line 167) | def set_coverage_env(session: nox.Session) -> None:
  function generate_coverage_report (line 175) | def generate_coverage_report(session: nox.Session) -> None:
  function rustfmt (line 199) | def rustfmt(session: nox.Session):
  function ruff (line 206) | def ruff(session: nox.Session):
  function rumdl (line 213) | def rumdl(session: nox.Session):
  function clippy (line 224) | def clippy(session: nox.Session) -> bool:
  function _clippy (line 229) | def _clippy(session: nox.Session, *, env: Dict[str, str] = None) -> bool:
  function _clippy_additional_workspaces (line 250) | def _clippy_additional_workspaces(session: nox.Session) -> bool:
  function bench (line 273) | def bench(session: nox.Session) -> bool:
  function codspeed (line 278) | def codspeed(session: nox.Session) -> bool:
  function clippy_all (line 290) | def clippy_all(session: nox.Session) -> None:
  function check_all (line 305) | def check_all(session: nox.Session) -> None:
  function publish (line 331) | def publish(session: nox.Session) -> None:
  function contributors (line 341) | def contributors(session: nox.Session) -> None:
  class EmscriptenInfo (line 389) | class EmscriptenInfo:
    method __init__ (line 390) | def __init__(self):
  function build_emscripten (line 408) | def build_emscripten(session: nox.Session):
  function test_emscripten (line 424) | def test_emscripten(session: nox.Session):
  function test_cross_compilation_windows (line 469) | def test_cross_compilation_windows(session: nox.Session):
  function docs (line 532) | def docs(session: nox.Session, nightly: bool = False, internal: bool = F...
  function build_guide (line 576) | def build_guide(session: nox.Session):
  function build_netlify_site (line 595) | def build_netlify_site(session: nox.Session):
  function _build_netlify_redirects (line 644) | def _build_netlify_redirects(preview: bool) -> None:
  function _url_path_from_file_path (line 708) | def _url_path_from_file_path(file_path: str) -> str:
  function _url_and_file_paths (line 718) | def _url_and_file_paths(url_path: str, file_path: str) -> Tuple[str, str]:
  function check_guide (line 727) | def check_guide(session: nox.Session):
  function format_guide (line 794) | def format_guide(session: nox.Session):
  function _format_ffi_extern (line 843) | def _format_ffi_extern(session: nox.Session, *, check: bool = False):
  function format_ffi_extern (line 964) | def format_ffi_extern(session: nox.Session):
  function address_sanitizer (line 969) | def address_sanitizer(session: nox.Session):
  function check_changelog (line 995) | def check_changelog(session: nox.Session):
  function set_msrv_package_versions (line 1039) | def set_msrv_package_versions(session: nox.Session):
  function ffi_check (line 1098) | def ffi_check(session: nox.Session):
  function test_version_limits (line 1105) | def test_version_limits(session: nox.Session):
  function _check_raw_dylib_macro (line 1166) | def _check_raw_dylib_macro(session: nox.Session):
  function _raw_dylib_x86_private_functions (line 1239) | def _raw_dylib_x86_private_functions() -> Set[str]:
  function _iter_extern_libpython_blocks (line 1268) | def _iter_extern_libpython_blocks(source: str) -> Iterator[str]:
  function _cfg_attr_is_non_cpython_only (line 1293) | def _cfg_attr_is_non_cpython_only(attr: str) -> bool:
  function check_feature_powerset (line 1313) | def check_feature_powerset(session: nox.Session):
  function update_ui_tests (line 1405) | def update_ui_tests(session: nox.Session):
  function test_introspection (line 1415) | def test_introspection(session: nox.Session):
  function _build_docs_for_ffi_check (line 1447) | def _build_docs_for_ffi_check(session: nox.Session) -> None:
  function _get_rust_info (line 1455) | def _get_rust_info() -> Tuple[str, ...]:
  function get_rust_version (line 1461) | def get_rust_version() -> Tuple[int, int, int, List[str]]:
  function is_rust_nightly (line 1470) | def is_rust_nightly() -> bool:
  function _get_rust_default_target (line 1477) | def _get_rust_default_target() -> str:
  function _get_feature_sets (line 1484) | def _get_feature_sets() -> Tuple[Optional[str], ...]:
  function _get_coverage_env (line 1504) | def _get_coverage_env() -> Dict[str, str]:
  function _run (line 1523) | def _run(session: nox.Session, *args: str, **kwargs: Any) -> None:
  function _run_cargo (line 1545) | def _run_cargo(
  function _run_cargo_test (line 1555) | def _run_cargo_test(
  function _run_cargo_publish (line 1583) | def _run_cargo_publish(session: nox.Session, *, package: str) -> None:
  function _run_cargo_set_package_version (line 1587) | def _run_cargo_set_package_version(
  function _for_all_version_configs (line 1600) | def _for_all_version_configs(
  class _ConfigFile (line 1619) | class _ConfigFile:
    method __init__ (line 1620) | def __init__(self, config_file) -> None:
    method set (line 1623) | def set(
    method name (line 1645) | def name(self) -> str:
  function _config_file (line 1650) | def _config_file() -> Iterator[_ConfigFile]:
  function _is_github_actions (line 1656) | def _is_github_actions() -> bool:

FILE: pyo3-benches/benches/bench_any.rs
  type ObjectType (line 12) | enum ObjectType {
  function find_object_type (line 30) | fn find_object_type(obj: &Bound<'_, PyAny>) -> ObjectType {
  function bench_identify_object_type (line 64) | fn bench_identify_object_type(b: &mut Bencher<'_>) {
  function bench_collect_generic_iterator (line 74) | fn bench_collect_generic_iterator(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 88) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_attach.rs
  function bench_clean_attach (line 5) | fn bench_clean_attach(b: &mut Bencher<'_>) {
  function bench_dirty_attach (line 10) | fn bench_dirty_attach(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 16) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_bigint.rs
  function extract_bigint_extract_fail (line 9) | fn extract_bigint_extract_fail(bench: &mut Bencher<'_>) {
  function extract_bigint_small (line 20) | fn extract_bigint_small(bench: &mut Bencher<'_>) {
  function extract_bigint_big_negative (line 28) | fn extract_bigint_big_negative(bench: &mut Bencher<'_>) {
  function extract_bigint_big_positive (line 36) | fn extract_bigint_big_positive(bench: &mut Bencher<'_>) {
  function extract_bigint_huge_negative (line 44) | fn extract_bigint_huge_negative(bench: &mut Bencher<'_>) {
  function extract_bigint_huge_positive (line 52) | fn extract_bigint_huge_positive(bench: &mut Bencher<'_>) {
  function criterion_benchmark (line 60) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_call.rs
  function bench_call_0 (line 16) | fn bench_call_0(b: &mut Bencher<'_>) {
  function bench_call_1 (line 30) | fn bench_call_1(b: &mut Bencher<'_>) {
  function bench_call (line 49) | fn bench_call(b: &mut Bencher<'_>) {
  function bench_call_one_arg (line 71) | fn bench_call_one_arg(b: &mut Bencher<'_>) {
  function bench_call_method_0 (line 86) | fn bench_call_method_0(b: &mut Bencher<'_>) {
  function bench_call_method_1 (line 107) | fn bench_call_method_1(b: &mut Bencher<'_>) {
  function bench_call_method (line 135) | fn bench_call_method(b: &mut Bencher<'_>) {
  function bench_call_method_one_arg (line 164) | fn bench_call_method_one_arg(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 188) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_comparisons.rs
  type OrderedDunderMethods (line 6) | struct OrderedDunderMethods(i64);
    method __lt__ (line 10) | fn __lt__(&self, other: &Self) -> bool {
    method __le__ (line 14) | fn __le__(&self, other: &Self) -> bool {
    method __eq__ (line 18) | fn __eq__(&self, other: &Self) -> bool {
    method __ne__ (line 22) | fn __ne__(&self, other: &Self) -> bool {
    method __gt__ (line 26) | fn __gt__(&self, other: &Self) -> bool {
    method __ge__ (line 30) | fn __ge__(&self, other: &Self) -> bool {
  type OrderedRichcmp (line 37) | struct OrderedRichcmp(i64);
    method __richcmp__ (line 41) | fn __richcmp__(&self, other: &Self, op: CompareOp) -> bool {
  function bench_ordered_dunder_methods (line 46) | fn bench_ordered_dunder_methods(b: &mut Bencher<'_>) {
  function bench_ordered_richcmp (line 55) | fn bench_ordered_richcmp(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 64) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_critical_sections.rs
  function create_cs (line 7) | fn create_cs(b: &mut Bencher<'_>) {
  function create_cs2 (line 16) | fn create_cs2(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 26) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_decimal.rs
  function decimal_via_extract (line 9) | fn decimal_via_extract(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 27) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_dict.rs
  function iter_dict (line 9) | fn iter_dict(b: &mut Bencher<'_>) {
  function dict_new (line 26) | fn dict_new(b: &mut Bencher<'_>) {
  function dict_get_item (line 38) | fn dict_get_item(b: &mut Bencher<'_>) {
  function extract_hashmap (line 59) | fn extract_hashmap(b: &mut Bencher<'_>) {
  function extract_btreemap (line 71) | fn extract_btreemap(b: &mut Bencher<'_>) {
  function extract_hashbrown_map (line 83) | fn extract_hashbrown_map(b: &mut Bencher<'_>) {
  function mapping_from_dict (line 95) | fn mapping_from_dict(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 106) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_err.rs
  function err_new_restore_and_fetch (line 5) | fn err_new_restore_and_fetch(b: &mut Bencher<'_>) {
  function err_new_without_gil (line 14) | fn err_new_without_gil(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 18) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_extract.rs
  function extract_str_extract_success (line 10) | fn extract_str_extract_success(bench: &mut Bencher<'_>) {
  function extract_str_extract_fail (line 18) | fn extract_str_extract_fail(bench: &mut Bencher<'_>) {
  function extract_str_cast_success (line 30) | fn extract_str_cast_success(bench: &mut Bencher<'_>) {
  function extract_str_cast_fail (line 41) | fn extract_str_cast_fail(bench: &mut Bencher<'_>) {
  function extract_int_extract_success (line 52) | fn extract_int_extract_success(bench: &mut Bencher<'_>) {
  function extract_int_extract_fail (line 60) | fn extract_int_extract_fail(bench: &mut Bencher<'_>) {
  function extract_int_cast_success (line 71) | fn extract_int_cast_success(bench: &mut Bencher<'_>) {
  function extract_int_cast_fail (line 82) | fn extract_int_cast_fail(bench: &mut Bencher<'_>) {
  function extract_float_extract_success (line 93) | fn extract_float_extract_success(bench: &mut Bencher<'_>) {
  function extract_float_extract_fail (line 101) | fn extract_float_extract_fail(bench: &mut Bencher<'_>) {
  function extract_float_cast_success (line 112) | fn extract_float_cast_success(bench: &mut Bencher<'_>) {
  function extract_float_cast_fail (line 123) | fn extract_float_cast_fail(bench: &mut Bencher<'_>) {
  function criterion_benchmark (line 134) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_frompyobject.rs
  type ManyTypes (line 12) | enum ManyTypes {
  function enum_from_pyobject (line 18) | fn enum_from_pyobject(b: &mut Bencher<'_>) {
  function list_via_cast (line 26) | fn list_via_cast(b: &mut Bencher<'_>) {
  function list_via_extract (line 34) | fn list_via_extract(b: &mut Bencher<'_>) {
  function not_a_list_via_cast (line 42) | fn not_a_list_via_cast(b: &mut Bencher<'_>) {
  function not_a_list_via_extract (line 50) | fn not_a_list_via_extract(b: &mut Bencher<'_>) {
  type ListOrNotList (line 59) | enum ListOrNotList<'a> {
  function not_a_list_via_extract_enum (line 64) | fn not_a_list_via_extract_enum(b: &mut Bencher<'_>) {
  function bench_vec_from_py_bytes (line 76) | fn bench_vec_from_py_bytes(b: &mut Bencher<'_>, data: &[u8]) {
  function vec_bytes_from_py_bytes_small (line 84) | fn vec_bytes_from_py_bytes_small(b: &mut Bencher<'_>) {
  function vec_bytes_from_py_bytes_medium (line 88) | fn vec_bytes_from_py_bytes_medium(b: &mut Bencher<'_>) {
  function vec_bytes_from_py_bytes_large (line 93) | fn vec_bytes_from_py_bytes_large(b: &mut Bencher<'_>) {
  function bench_vec_from_py_bytearray (line 98) | fn bench_vec_from_py_bytearray(b: &mut Bencher<'_>, data: &[u8]) {
  function vec_bytes_from_py_bytearray_small (line 106) | fn vec_bytes_from_py_bytearray_small(b: &mut Bencher<'_>) {
  function vec_bytes_from_py_bytearray_medium (line 110) | fn vec_bytes_from_py_bytearray_medium(b: &mut Bencher<'_>) {
  function vec_bytes_from_py_bytearray_large (line 115) | fn vec_bytes_from_py_bytearray_large(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 120) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_intern.rs
  function getattr_direct (line 9) | fn getattr_direct(b: &mut Bencher<'_>) {
  function getattr_intern (line 17) | fn getattr_intern(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 25) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_intopyobject.rs
  function bench_bytes_new (line 9) | fn bench_bytes_new(b: &mut Bencher<'_>, data: &[u8]) {
  function bytes_new_small (line 15) | fn bytes_new_small(b: &mut Bencher<'_>) {
  function bytes_new_medium (line 19) | fn bytes_new_medium(b: &mut Bencher<'_>) {
  function bytes_new_large (line 24) | fn bytes_new_large(b: &mut Bencher<'_>) {
  function bench_bytes_into_pyobject (line 29) | fn bench_bytes_into_pyobject(b: &mut Bencher<'_>, data: &[u8]) {
  function byte_slice_into_pyobject_small (line 35) | fn byte_slice_into_pyobject_small(b: &mut Bencher<'_>) {
  function byte_slice_into_pyobject_medium (line 39) | fn byte_slice_into_pyobject_medium(b: &mut Bencher<'_>) {
  function byte_slice_into_pyobject_large (line 44) | fn byte_slice_into_pyobject_large(b: &mut Bencher<'_>) {
  function vec_into_pyobject (line 49) | fn vec_into_pyobject(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 56) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_list.rs
  function iter_list (line 8) | fn iter_list(b: &mut Bencher<'_>) {
  function list_new (line 22) | fn list_new(b: &mut Bencher<'_>) {
  function list_get_item (line 29) | fn list_get_item(b: &mut Bencher<'_>) {
  function list_nth (line 42) | fn list_nth(b: &mut Bencher<'_>) {
  function list_nth_back (line 55) | fn list_nth_back(b: &mut Bencher<'_>) {
  function list_get_item_unchecked (line 69) | fn list_get_item_unchecked(b: &mut Bencher<'_>) {
  function sequence_from_list (line 84) | fn sequence_from_list(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 92) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_py.rs
  function drop_many_objects (line 13) | fn drop_many_objects(b: &mut Bencher<'_>) {
  function drop_many_objects_without_gil (line 23) | fn drop_many_objects_without_gil(b: &mut Bencher<'_>) {
  function drop_many_objects_multiple_threads (line 35) | fn drop_many_objects_multiple_threads(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 103) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_pyclass.rs
  type MyClass (line 8) | struct MyClass {
    method new (line 16) | fn new(elements: Vec<i32>) -> Self {
    method __call__ (line 20) | fn __call__(&mut self, new_element: i32) -> usize {
    method __str__ (line 26) | fn __str__(&self) -> &'static str {
  function first_time_init (line 31) | pub fn first_time_init(b: &mut Bencher<'_>) {
  function bench_pyclass (line 42) | pub fn bench_pyclass(c: &mut Criterion) {
  function bench_first_time_init (line 79) | fn bench_first_time_init(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_pystring_from_fmt.rs
  function format_simple (line 5) | fn format_simple(b: &mut Bencher<'_>) {
  function format_complex (line 13) | fn format_complex(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 22) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_set.rs
  function set_new (line 10) | fn set_new(b: &mut Bencher<'_>) {
  function iter_set (line 20) | fn iter_set(b: &mut Bencher<'_>) {
  function extract_hashset (line 34) | fn extract_hashset(b: &mut Bencher<'_>) {
  function extract_btreeset (line 42) | fn extract_btreeset(b: &mut Bencher<'_>) {
  function extract_hashbrown_set (line 50) | fn extract_hashbrown_set(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 58) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/benches/bench_tuple.rs
  function iter_tuple (line 8) | fn iter_tuple(b: &mut Bencher<'_>) {
  function tuple_new (line 22) | fn tuple_new(b: &mut Bencher<'_>) {
  function tuple_get_item (line 29) | fn tuple_get_item(b: &mut Bencher<'_>) {
  function tuple_get_item_unchecked (line 43) | fn tuple_get_item_unchecked(b: &mut Bencher<'_>) {
  function tuple_get_borrowed_item (line 58) | fn tuple_get_borrowed_item(b: &mut Bencher<'_>) {
  function tuple_get_borrowed_item_unchecked (line 76) | fn tuple_get_borrowed_item_unchecked(b: &mut Bencher<'_>) {
  function sequence_from_tuple (line 94) | fn sequence_from_tuple(b: &mut Bencher<'_>) {
  function tuple_new_list (line 102) | fn tuple_new_list(b: &mut Bencher<'_>) {
  function tuple_to_list (line 110) | fn tuple_to_list(b: &mut Bencher<'_>) {
  function tuple_into_pyobject (line 118) | fn tuple_into_pyobject(b: &mut Bencher<'_>) {
  function tuple_nth (line 128) | fn tuple_nth(b: &mut Bencher<'_>) {
  function tuple_nth_back (line 141) | fn tuple_nth_back(b: &mut Bencher<'_>) {
  function criterion_benchmark (line 154) | fn criterion_benchmark(c: &mut Criterion) {

FILE: pyo3-benches/build.rs
  function main (line 1) | fn main() {

FILE: pyo3-build-config/build.rs
  function configure (line 17) | fn configure(interpreter_config: Option<InterpreterConfig>, name: &str) ...
  function generate_build_configs (line 32) | fn generate_build_configs() -> Result<()> {
  function main (line 49) | fn main() {

FILE: pyo3-build-config/src/errors.rs
  type Error (line 35) | pub struct Error {
    method report (line 45) | pub fn report(&self) -> ErrorReport<'_> {
    method fmt (line 51) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    method source (line 57) | fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
    method from (line 81) | fn from(value: String) -> Self {
    method from (line 90) | fn from(value: &str) -> Self {
    method from (line 96) | fn from(value: std::convert::Infallible) -> Self {
  type ErrorReport (line 42) | pub struct ErrorReport<'a>(&'a Error);
  function fmt (line 63) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type Result (line 101) | pub type Result<T, E = Error> = std::result::Result<T, E>;
  type Context (line 103) | pub trait Context<T> {
    method context (line 104) | fn context(self, message: impl Into<String>) -> Result<T>;
    method with_context (line 105) | fn with_context(self, message: impl FnOnce() -> String) -> Result<T>;
  function context (line 112) | fn context(self, message: impl Into<String>) -> Result<T> {
  function with_context (line 119) | fn with_context(self, message: impl FnOnce() -> String) -> Result<T> {
  function error_report (line 132) | fn error_report() {

FILE: pyo3-build-config/src/impl_.rs
  constant MINIMUM_SUPPORTED_VERSION (line 29) | pub(crate) const MINIMUM_SUPPORTED_VERSION: PythonVersion = PythonVersio...
  constant MINIMUM_SUPPORTED_VERSION_PYPY (line 31) | pub(crate) const MINIMUM_SUPPORTED_VERSION_PYPY: PythonVersion = PythonV...
  constant MAXIMUM_SUPPORTED_VERSION_PYPY (line 35) | pub(crate) const MAXIMUM_SUPPORTED_VERSION_PYPY: PythonVersion = PythonV...
  constant MINIMUM_SUPPORTED_VERSION_GRAALPY (line 41) | const MINIMUM_SUPPORTED_VERSION_GRAALPY: PythonVersion = PythonVersion {
  constant ABI3_MAX_MINOR (line 47) | pub(crate) const ABI3_MAX_MINOR: u8 = 14;
  function cargo_env_var (line 57) | pub fn cargo_env_var(var: &str) -> Option<String> {
  function env_var (line 63) | pub fn env_var(var: &str) -> Option<OsString> {
  function target_triple_from_env (line 79) | pub fn target_triple_from_env() -> Triple {
  type InterpreterConfig (line 94) | pub struct InterpreterConfig {
    method build_script_outputs (line 180) | pub fn build_script_outputs(&self) -> Vec<String> {
    method from_interpreter (line 214) | pub fn from_interpreter(interpreter: impl AsRef<Path>) -> Result<Self> {
    method from_sysconfigdata (line 384) | pub fn from_sysconfigdata(sysconfigdata: &Sysconfigdata) -> Result<Sel...
    method from_pyo3_config_file_env (line 457) | pub(super) fn from_pyo3_config_file_env() -> Option<Result<Self>> {
    method from_path (line 483) | pub fn from_path(path: impl AsRef<Path>) -> Result<Self> {
    method from_cargo_dep_env (line 492) | pub fn from_cargo_dep_env() -> Option<Result<Self>> {
    method from_reader (line 498) | pub fn from_reader(reader: impl Read) -> Result<Self> {
    method apply_default_lib_name_to_config_file (line 587) | pub(crate) fn apply_default_lib_name_to_config_file(&mut self, target:...
    method to_cargo_dep_env (line 610) | pub fn to_cargo_dep_env(&self) -> Result<()> {
    method to_writer (line 619) | pub fn to_writer(&self, mut writer: impl Write) -> Result<()> {
    method run_python_script (line 667) | pub fn run_python_script(&self, script: &str) -> Result<String> {
    method run_python_script_with_envs (line 681) | pub fn run_python_script_with_envs<I, K, V>(&self, script: &str, envs:...
    method is_free_threaded (line 694) | pub fn is_free_threaded(&self) -> bool {
    method fixup_for_abi3_version (line 700) | fn fixup_for_abi3_version(&mut self, abi3_version: Option<PythonVersio...
  type PythonVersion (line 730) | pub struct PythonVersion {
    constant PY315 (line 736) | pub const PY315: Self = PythonVersion {
    constant PY313 (line 740) | pub const PY313: Self = PythonVersion {
    constant PY312 (line 744) | pub const PY312: Self = PythonVersion {
    constant PY310 (line 748) | const PY310: Self = PythonVersion {
    constant PY37 (line 752) | const PY37: Self = PythonVersion { major: 3, minor: 7 };
  method fmt (line 756) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type Err (line 762) | type Err = crate::errors::Error;
  method from_str (line 764) | fn from_str(value: &str) -> Result<Self, Self::Err> {
  type PythonImplementation (line 780) | pub enum PythonImplementation {
    method is_pypy (line 788) | pub fn is_pypy(self) -> bool {
    method is_graalpy (line 793) | pub fn is_graalpy(self) -> bool {
    method from_soabi (line 798) | pub fn from_soabi(soabi: &str) -> Result<Self> {
  method fmt (line 812) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type Err (line 822) | type Err = Error;
  method from_str (line 823) | fn from_str(s: &str) -> Result<Self> {
  function have_python_interpreter (line 837) | fn have_python_interpreter() -> bool {
  function is_abi3 (line 844) | fn is_abi3() -> bool {
  function get_abi3_version (line 852) | pub fn get_abi3_version() -> Option<PythonVersion> {
  function is_extension_module (line 865) | pub fn is_extension_module() -> bool {
  function is_linking_libpython_for_target (line 873) | pub fn is_linking_libpython_for_target(target: &Triple) -> bool {
  function require_libdir_for_target (line 888) | fn require_libdir_for_target(target: &Triple) -> bool {
  type CrossCompileConfig (line 903) | pub struct CrossCompileConfig {
    method try_from_env_vars_host_target (line 925) | fn try_from_env_vars_host_target(
    method is_cross_compiling_from_to (line 951) | fn is_cross_compiling_from_to(host: &Triple, target: &Triple) -> bool {
    method lib_dir_string (line 981) | fn lib_dir_string(&self) -> Option<String> {
  type CrossCompileEnvVars (line 989) | struct CrossCompileEnvVars {
    method from_env (line 1004) | fn from_env() -> Self {
    method any (line 1014) | fn any(&self) -> bool {
    method parse_version (line 1023) | fn parse_version(&self) -> Result<(Option<PythonVersion>, Option<Strin...
    method parse_implementation (line 1045) | fn parse_implementation(&self) -> Result<Option<PythonImplementation>> {
    method lib_dir_path (line 1066) | fn lib_dir_path(&self) -> Result<Option<PathBuf>> {
  function cross_compiling_from_to (line 1094) | pub fn cross_compiling_from_to(
  function cross_compiling_from_cargo_env (line 1108) | pub fn cross_compiling_from_cargo_env() -> Result<Option<CrossCompileCon...
  type BuildFlag (line 1118) | pub enum BuildFlag {
  method fmt (line 1129) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type Err (line 1138) | type Err = std::convert::Infallible;
  method from_str (line 1139) | fn from_str(s: &str) -> Result<Self, Self::Err> {
  type BuildFlags (line 1165) | pub struct BuildFlags(pub HashSet<BuildFlag>);
    constant ALL (line 1168) | const ALL: [BuildFlag; 4] = [
    method new (line 1175) | pub fn new() -> Self {
    method from_sysconfigdata (line 1179) | fn from_sysconfigdata(config_map: &Sysconfigdata) -> Self {
    method from_interpreter (line 1193) | fn from_interpreter(interpreter: impl AsRef<Path>) -> Result<Self> {
    method fixup (line 1230) | fn fixup(mut self) -> Self {
  method fmt (line 1240) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type Err (line 1255) | type Err = std::convert::Infallible;
  method from_str (line 1257) | fn from_str(value: &str) -> Result<Self, Self::Err> {
  function parse_script_output (line 1266) | fn parse_script_output(output: &str) -> HashMap<String, String> {
  type Sysconfigdata (line 1279) | pub struct Sysconfigdata(HashMap<String, String>);
    method get_value (line 1282) | pub fn get_value<S: AsRef<str>>(&self, k: S) -> Option<&str> {
    method new (line 1287) | fn new() -> Self {
    method insert (line 1292) | fn insert<S: Into<String>>(&mut self, k: S, v: S) {
  function parse_sysconfigdata (line 1304) | pub fn parse_sysconfigdata(sysconfigdata_path: impl AsRef<Path>) -> Resu...
  function starts_with (line 1326) | fn starts_with(entry: &DirEntry, pat: &str) -> bool {
  function ends_with (line 1330) | fn ends_with(entry: &DirEntry, pat: &str) -> bool {
  function find_sysconfigdata (line 1340) | fn find_sysconfigdata(cross: &CrossCompileConfig) -> Result<Option<PathB...
  function find_all_sysconfigdata (line 1404) | pub fn find_all_sysconfigdata(cross: &CrossCompileConfig) -> Result<Vec<...
  function is_pypy_lib_dir (line 1434) | fn is_pypy_lib_dir(path: &str, v: &Option<PythonVersion>) -> bool {
  function is_graalpy_lib_dir (line 1443) | fn is_graalpy_lib_dir(path: &str, v: &Option<PythonVersion>) -> bool {
  function is_cpython_lib_dir (line 1452) | fn is_cpython_lib_dir(path: &str, v: &Option<PythonVersion>) -> bool {
  function search_lib_dir (line 1462) | fn search_lib_dir(path: impl AsRef<Path>, cross: &CrossCompileConfig) ->...
  function cross_compile_from_sysconfigdata (line 1532) | fn cross_compile_from_sysconfigdata(
  function default_cross_compile (line 1555) | fn default_cross_compile(cross_compile_config: &CrossCompileConfig) -> R...
  function default_abi3_config (line 1609) | fn default_abi3_config(host: &Triple, version: PythonVersion) -> Result<...
  function load_cross_compile_config (line 1651) | fn load_cross_compile_config(
  constant WINDOWS_ABI3_LIB_NAME (line 1673) | const WINDOWS_ABI3_LIB_NAME: &str = "python3";
  constant WINDOWS_ABI3_DEBUG_LIB_NAME (line 1674) | const WINDOWS_ABI3_DEBUG_LIB_NAME: &str = "python3_d";
  function default_lib_name_for_target (line 1678) | fn default_lib_name_for_target(
  function default_lib_name_windows (line 1700) | fn default_lib_name_windows(
  function default_lib_name_unix (line 1744) | fn default_lib_name_unix(
  function run_python_script (line 1782) | fn run_python_script(interpreter: &Path, script: &str) -> Result<String> {
  function run_python_script_with_envs (line 1788) | fn run_python_script_with_envs<I, K, V>(interpreter: &Path, script: &str...
  function venv_interpreter (line 1822) | fn venv_interpreter(virtual_env: &OsStr, windows: bool) -> PathBuf {
  function conda_env_interpreter (line 1830) | fn conda_env_interpreter(conda_prefix: &OsStr, windows: bool) -> PathBuf {
  function get_env_interpreter (line 1838) | fn get_env_interpreter() -> Option<PathBuf> {
  function find_interpreter (line 1862) | pub fn find_interpreter() -> Result<PathBuf> {
  function get_host_interpreter (line 1893) | fn get_host_interpreter(abi3_version: Option<PythonVersion>) -> Result<I...
  function make_cross_compile_config (line 1907) | pub fn make_cross_compile_config() -> Result<Option<InterpreterConfig>> {
  function make_interpreter_config (line 1922) | pub fn make_interpreter_config() -> Result<InterpreterConfig> {
  function escape (line 1953) | fn escape(bytes: &[u8]) -> String {
  function unescape (line 1966) | fn unescape(escaped: &str) -> Vec<u8> {
  function test_config_file_roundtrip (line 1993) | fn test_config_file_roundtrip() {
  function test_config_file_roundtrip_with_escaping (line 2044) | fn test_config_file_roundtrip_with_escaping() {
  function test_config_file_defaults (line 2068) | fn test_config_file_defaults() {
  function test_config_file_unknown_keys (line 2090) | fn test_config_file_unknown_keys() {
  function build_flags_default (line 2113) | fn build_flags_default() {
  function build_flags_from_sysconfigdata (line 2118) | fn build_flags_from_sysconfigdata() {
  function build_flags_fixup (line 2148) | fn build_flags_fixup() {
  function parse_script_output (line 2163) | fn parse_script_output() {
  function config_from_interpreter (line 2172) | fn config_from_interpreter() {
  function config_from_empty_sysconfigdata (line 2180) | fn config_from_empty_sysconfigdata() {
  function config_from_sysconfigdata (line 2186) | fn config_from_sysconfigdata() {
  function config_from_sysconfigdata_framework (line 2216) | fn config_from_sysconfigdata_framework() {
  function windows_hardcoded_abi3_compile (line 2273) | fn windows_hardcoded_abi3_compile() {
  function unix_hardcoded_abi3_compile (line 2297) | fn unix_hardcoded_abi3_compile() {
  function windows_hardcoded_cross_compile (line 2321) | fn windows_hardcoded_cross_compile() {
  function mingw_hardcoded_cross_compile (line 2356) | fn mingw_hardcoded_cross_compile() {
  function unix_hardcoded_cross_compile (line 2391) | fn unix_hardcoded_cross_compile() {
  function pypy_hardcoded_cross_compile (line 2426) | fn pypy_hardcoded_cross_compile() {
  function default_lib_name_windows (line 2463) | fn default_lib_name_windows() {
  function default_lib_name_unix (line 2664) | fn default_lib_name_unix() {
  function parse_cross_python_version (line 2796) | fn parse_cross_python_version() {
  function interpreter_version_reduced_to_abi3 (line 2847) | fn interpreter_version_reduced_to_abi3() {
  function abi3_version_cannot_be_higher_than_interpreter (line 2870) | fn abi3_version_cannot_be_higher_than_interpreter() {
  function parse_sysconfigdata (line 2901) | fn parse_sysconfigdata() {
  function test_venv_interpreter (line 2954) | fn test_venv_interpreter() {
  function test_conda_env_interpreter (line 2967) | fn test_conda_env_interpreter() {
  function test_not_cross_compiling_from_to (line 2980) | fn test_not_cross_compiling_from_to() {
  function test_is_cross_compiling_from_to (line 3032) | fn test_is_cross_compiling_from_to() {
  function test_run_python_script (line 3042) | fn test_run_python_script() {
  function test_run_python_script_with_envs (line 3053) | fn test_run_python_script_with_envs() {
  function test_build_script_outputs_base (line 3067) | fn test_build_script_outputs_base() {
  function test_build_script_outputs_abi3 (line 3114) | fn test_build_script_outputs_abi3() {
  function test_build_script_outputs_gil_disabled (line 3157) | fn test_build_script_outputs_gil_disabled() {
  function test_build_script_outputs_debug (line 3194) | fn test_build_script_outputs_debug() {
  function test_find_sysconfigdata_in_invalid_lib_dir (line 3222) | fn test_find_sysconfigdata_in_invalid_lib_dir() {
  function test_from_pyo3_config_file_env_rebuild (line 3243) | fn test_from_pyo3_config_file_env_rebuild() {
  function test_apply_default_lib_name_to_config_file (line 3251) | fn test_apply_default_lib_name_to_config_file() {

FILE: pyo3-build-config/src/lib.rs
  function use_pyo3_cfgs (line 46) | pub fn use_pyo3_cfgs() {
  function add_extension_module_link_args (line 63) | pub fn add_extension_module_link_args() {
  function _add_extension_module_link_args (line 71) | fn _add_extension_module_link_args(
  function add_libpython_rpath_link_args (line 103) | pub fn add_libpython_rpath_link_args() {
  function _add_libpython_rpath_link_args (line 113) | fn _add_libpython_rpath_link_args(
  function add_python_framework_link_args (line 134) | pub fn add_python_framework_link_args() {
  function _add_python_framework_link_args (line 145) | fn _add_python_framework_link_args(
  function get (line 162) | pub fn get() -> &'static InterpreterConfig {
  function config_from_pyo3_config_file_env (line 191) | fn config_from_pyo3_config_file_env() -> Option<InterpreterConfig> {
  constant HOST_CONFIG (line 212) | const HOST_CONFIG: &str = include_str!(concat!(env!("OUT_DIR"), "/pyo3-b...
  function resolve_cross_compile_config_path (line 221) | fn resolve_cross_compile_config_path() -> Option<PathBuf> {
  function print_feature_cfg (line 231) | fn print_feature_cfg(minor_version_required: u32, cfg: &str) {
  function print_feature_cfgs (line 249) | pub fn print_feature_cfgs() {
  function print_expected_cfgs (line 259) | pub fn print_expected_cfgs() {
  type BuildConfigSource (line 320) | pub enum BuildConfigSource {
  type BuildConfig (line 329) | pub struct BuildConfig {
  function resolve_build_config (line 343) | pub fn resolve_build_config(target: &Triple) -> Result<BuildConfig> {
  type MaximumVersionExceeded (line 388) | pub struct MaximumVersionExceeded {
    method new (line 393) | pub fn new(
    method add_help (line 413) | pub fn add_help(&mut self, help: &str) {
    method finish (line 418) | pub fn finish(self) -> String {
  function rustc_minor_version (line 424) | fn rustc_minor_version() -> Option<u32> {
  function extension_module_link_args (line 443) | fn extension_module_link_args() {
  function python_framework_link_args (line 487) | fn python_framework_link_args() {
  function test_maximum_version_exceeded_formatting (line 532) | fn test_maximum_version_exceeded_formatting() {

FILE: pyo3-ffi-check/build.rs
  type ParseCallbacks (line 5) | struct ParseCallbacks;
    method item_name (line 11) | fn item_name(&self, _original_item_name: &str) -> Option<String> {
  function main (line 22) | fn main() {

FILE: pyo3-ffi-check/macro/src/lib.rs
  function for_all_structs (line 9) | pub fn for_all_structs(input: proc_macro::TokenStream) -> proc_macro::To...
  function get_doc_dir (line 70) | fn get_doc_dir() -> PathBuf {
  function for_all_fields (line 86) | pub fn for_all_fields(input: proc_macro::TokenStream) -> proc_macro::Tok...

FILE: pyo3-ffi-check/src/main.rs
  function main (line 3) | fn main() {

FILE: pyo3-ffi/build.rs
  type SupportedVersions (line 12) | struct SupportedVersions {
  constant SUPPORTED_VERSIONS_CPYTHON (line 17) | const SUPPORTED_VERSIONS_CPYTHON: SupportedVersions = SupportedVersions {
  constant SUPPORTED_VERSIONS_PYPY (line 25) | const SUPPORTED_VERSIONS_PYPY: SupportedVersions = SupportedVersions {
  constant SUPPORTED_VERSIONS_GRAALPY (line 33) | const SUPPORTED_VERSIONS_GRAALPY: SupportedVersions = SupportedVersions {
  function ensure_python_version (line 41) | fn ensure_python_version(interpreter_config: &InterpreterConfig) -> Resu...
  function ensure_target_pointer_width (line 149) | fn ensure_target_pointer_width(interpreter_config: &InterpreterConfig) -...
  function emit_link_config (line 171) | fn emit_link_config(build_config: &BuildConfig) -> Result<()> {
  function configure_pyo3 (line 221) | fn configure_pyo3() -> Result<()> {
  function print_config_and_exit (line 256) | fn print_config_and_exit(config: &InterpreterConfig) {
  function main (line 265) | fn main() {

FILE: pyo3-ffi/examples/sequential/build.rs
  function main (line 1) | fn main() {

FILE: pyo3-ffi/examples/sequential/noxfile.py
  function python (line 6) | def python(session):

FILE: pyo3-ffi/examples/sequential/src/id.rs
  type PyId (line 9) | pub struct PyId {
  type Id (line 17) | pub struct Id(u64);
    method new (line 20) | fn new() -> Self {
  function id_new (line 25) | unsafe extern "C" fn id_new(
  function id_repr (line 52) | unsafe extern "C" fn id_repr(slf: *mut PyObject) -> *mut PyObject {
  function id_int (line 59) | unsafe extern "C" fn id_int(slf: *mut PyObject) -> *mut PyObject {
  function id_richcompare (line 65) | unsafe extern "C" fn id_richcompare(

FILE: pyo3-ffi/examples/sequential/src/lib.rs
  function PyInit_sequential (line 13) | pub unsafe extern "C" fn PyInit_sequential() -> *mut PyObject {
  function PyModExport_sequential (line 20) | pub unsafe extern "C" fn PyModExport_sequential() -> *mut PyModuleDef_Sl...

FILE: pyo3-ffi/examples/sequential/src/module.rs
  constant SEQUENTIAL_SLOTS_LEN (line 21) | const SEQUENTIAL_SLOTS_LEN: usize =
  function sequential_exec (line 81) | unsafe extern "C" fn sequential_exec(module: *mut PyObject) -> c_int {
  function sequential_traverse (line 94) | unsafe extern "C" fn sequential_traverse(
  function sequential_clear (line 109) | unsafe extern "C" fn sequential_clear(module: *mut PyObject) -> c_int {
  function sequential_free (line 115) | unsafe extern "C" fn sequential_free(module: *mut c_void) {
  type sequential_state (line 120) | struct sequential_state {

FILE: pyo3-ffi/examples/sequential/tests/test.rs
  type State (line 15) | struct State(*mut PyThreadState);
  function lets_go_fast (line 20) | fn lets_go_fast() -> Result<(), String> {
  function fetch (line 101) | unsafe fn fetch() -> String {
  function run_code (line 120) | fn run_code() -> Result<u64, String> {

FILE: pyo3-ffi/examples/sequential/tests/test_.py
  function test_make_some (line 5) | def test_make_some():
  function test_args (line 11) | def test_args():
  function test_cmp (line 16) | def test_cmp():

FILE: pyo3-ffi/examples/string-sum/build.rs
  function main (line 1) | fn main() {

FILE: pyo3-ffi/examples/string-sum/noxfile.py
  function python (line 5) | def python(session: nox.Session):

FILE: pyo3-ffi/examples/string-sum/src/lib.rs
  constant SLOTS_LEN (line 37) | const SLOTS_LEN: usize =
  function PyInit_string_sum (line 82) | pub unsafe extern "C" fn PyInit_string_sum() -> *mut PyObject {
  function PyModExport_string_sum (line 89) | pub unsafe extern "C" fn PyModExport_string_sum() -> *mut PyModuleDef_Sl...
  function parse_arg_as_i32 (line 95) | unsafe fn parse_arg_as_i32(obj: *mut PyObject, n_arg: usize) -> Option<i...
  function raise_overflowerror (line 125) | unsafe fn raise_overflowerror(obj: *mut PyObject) {
  function sum_as_string (line 143) | pub unsafe extern "C" fn sum_as_string(

FILE: pyo3-ffi/examples/string-sum/tests/test_.py
  function test_sum (line 5) | def test_sum():
  function test_err1 (line 12) | def test_err1():
  function test_err2 (line 21) | def test_err2():
  function test_overflow1 (line 30) | def test_overflow1():
  function test_overflow2 (line 37) | def test_overflow2():

FILE: pyo3-ffi/src/abstract_.rs
  function PyObject_DelAttrString (line 12) | pub unsafe fn PyObject_DelAttrString(o: *mut PyObject, attr_name: *const...
  function PyObject_DelAttr (line 21) | pub unsafe fn PyObject_DelAttr(o: *mut PyObject, attr_name: *mut PyObjec...
  constant PY_VECTORCALL_ARGUMENTS_OFFSET (line 83) | pub const PY_VECTORCALL_ARGUMENTS_OFFSET: size_t =
  function PyObject_Length (line 110) | pub unsafe fn PyObject_Length(o: *mut PyObject) -> Py_ssize_t {
  function PyIter_Check (line 139) | pub unsafe fn PyIter_Check(o: *mut PyObject) -> c_int {
  function PyIndex_Check (line 206) | pub unsafe fn PyIndex_Check(o: *mut PyObject) -> c_int {
  function PySequence_Length (line 268) | pub unsafe fn PySequence_Length(o: *mut PyObject) -> Py_ssize_t {
  function PySequence_In (line 309) | pub unsafe fn PySequence_In(o: *mut PyObject, value: *mut PyObject) -> c...
  function PyMapping_Length (line 332) | pub unsafe fn PyMapping_Length(o: *mut PyObject) -> Py_ssize_t {
  function PyMapping_DelItemString (line 337) | pub unsafe fn PyMapping_DelItemString(o: *mut PyObject, key: *mut c_char...
  function PyMapping_DelItem (line 342) | pub unsafe fn PyMapping_DelItem(o: *mut PyObject, key: *mut PyObject) ->...

FILE: pyo3-ffi/src/boolobject.rs
  function PyBool_Check (line 7) | pub unsafe fn PyBool_Check(op: *mut PyObject) -> c_int {
  function Py_False (line 26) | pub unsafe fn Py_False() -> *mut PyObject {
  function Py_True (line 34) | pub unsafe fn Py_True() -> *mut PyObject {
  function Py_IsTrue (line 42) | pub unsafe fn Py_IsTrue(x: *mut PyObject) -> c_int {
  function Py_IsFalse (line 47) | pub unsafe fn Py_IsFalse(x: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/bytearrayobject.rs
  type PyByteArrayObject (line 7) | pub struct PyByteArrayObject {
  function PyByteArray_Check (line 31) | pub unsafe fn PyByteArray_Check(op: *mut PyObject) -> c_int {
  function PyByteArray_CheckExact (line 36) | pub unsafe fn PyByteArray_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/bytesobject.rs
  function PyBytes_Check (line 12) | pub unsafe fn PyBytes_Check(op: *mut PyObject) -> c_int {
  function PyBytes_CheckExact (line 17) | pub unsafe fn PyBytes_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/ceval.rs
  function PyEval_CallObject (line 40) | pub unsafe fn PyEval_CallObject(func: *mut PyObject, arg: *mut PyObject)...

FILE: pyo3-ffi/src/compat/py_3_15.rs
  type PyBytesWriter (line 132) | pub struct PyBytesWriter {
  function _PyBytesWriter_Resize_impl (line 140) | unsafe fn _PyBytesWriter_Resize_impl(

FILE: pyo3-ffi/src/compile.rs
  constant Py_single_input (line 3) | pub const Py_single_input: c_int = 256;
  constant Py_file_input (line 4) | pub const Py_file_input: c_int = 257;
  constant Py_eval_input (line 5) | pub const Py_eval_input: c_int = 258;
  constant Py_func_type_input (line 7) | pub const Py_func_type_input: c_int = 345;
  constant Py_fstring_input (line 10) | pub const Py_fstring_input: c_int = 800;

FILE: pyo3-ffi/src/complexobject.rs
  function PyComplex_Check (line 10) | pub unsafe fn PyComplex_Check(op: *mut PyObject) -> c_int {
  function PyComplex_CheckExact (line 15) | pub unsafe fn PyComplex_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/context.rs
  function PyContext_CheckExact (line 14) | pub unsafe fn PyContext_CheckExact(op: *mut PyObject) -> c_int {
  function PyContextVar_CheckExact (line 19) | pub unsafe fn PyContextVar_CheckExact(op: *mut PyObject) -> c_int {
  function PyContextToken_CheckExact (line 24) | pub unsafe fn PyContextToken_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/cpython/abstract_.rs
  constant _PY_FASTCALL_SMALL_STACK (line 23) | const _PY_FASTCALL_SMALL_STACK: size_t = 5;
  constant PY_VECTORCALL_ARGUMENTS_OFFSET (line 45) | const PY_VECTORCALL_ARGUMENTS_OFFSET: size_t =
  function PyVectorcall_NARGS (line 50) | pub unsafe fn PyVectorcall_NARGS(n: size_t) -> Py_ssize_t {
  function PyVectorcall_Function (line 57) | pub unsafe fn PyVectorcall_Function(callable: *mut PyObject) -> Option<v...
  function _PyObject_VectorcallTstate (line 72) | pub unsafe fn _PyObject_VectorcallTstate(
  function PyObject_Vectorcall (line 96) | pub unsafe fn PyObject_Vectorcall(
  function _PyObject_FastCallTstate (line 132) | pub unsafe fn _PyObject_FastCallTstate(
  function _PyObject_FastCall (line 143) | pub unsafe fn _PyObject_FastCall(
  function _PyObject_CallNoArg (line 153) | pub unsafe fn _PyObject_CallNoArg(func: *mut PyObject) -> *mut PyObject {
  function PyObject_CallOneArg (line 171) | pub unsafe fn PyObject_CallOneArg(func: *mut PyObject, arg: *mut PyObjec...
  function PyObject_CallMethodNoArgs (line 182) | pub unsafe fn PyObject_CallMethodNoArgs(
  function PyObject_CallMethodOneArg (line 196) | pub unsafe fn PyObject_CallMethodOneArg(
  function PyObject_CheckBuffer (line 228) | pub unsafe fn PyObject_CheckBuffer(o: *mut PyObject) -> c_int {
  constant PY_ITERSEARCH_COUNT (line 289) | pub const PY_ITERSEARCH_COUNT: c_int = 1;
  constant PY_ITERSEARCH_INDEX (line 290) | pub const PY_ITERSEARCH_INDEX: c_int = 2;
  constant PY_ITERSEARCH_CONTAINS (line 291) | pub const PY_ITERSEARCH_CONTAINS: c_int = 3;

FILE: pyo3-ffi/src/cpython/bytesobject.rs
  type PyBytesObject (line 11) | pub struct PyBytesObject {
  function PyBytes_AS_STRING (line 31) | pub unsafe fn PyBytes_AS_STRING(op: *mut PyObject) -> *const c_char {

FILE: pyo3-ffi/src/cpython/code.rs
  constant CO_OPTIMIZED (line 36) | pub const CO_OPTIMIZED: c_int = 0x0001;
  constant CO_NEWLOCALS (line 37) | pub const CO_NEWLOCALS: c_int = 0x0002;
  constant CO_VARARGS (line 38) | pub const CO_VARARGS: c_int = 0x0004;
  constant CO_VARKEYWORDS (line 39) | pub const CO_VARKEYWORDS: c_int = 0x0008;
  constant CO_NESTED (line 40) | pub const CO_NESTED: c_int = 0x0010;
  constant CO_GENERATOR (line 41) | pub const CO_GENERATOR: c_int = 0x0020;
  constant CO_NOFREE (line 47) | pub const CO_NOFREE: c_int = 0x0040;
  constant CO_COROUTINE (line 50) | pub const CO_COROUTINE: c_int = 0x0080;
  constant CO_ITERABLE_COROUTINE (line 51) | pub const CO_ITERABLE_COROUTINE: c_int = 0x0100;
  constant CO_ASYNC_GENERATOR (line 52) | pub const CO_ASYNC_GENERATOR: c_int = 0x0200;
  constant CO_FUTURE_DIVISION (line 54) | pub const CO_FUTURE_DIVISION: c_int = 0x2000;
  constant CO_FUTURE_ABSOLUTE_IMPORT (line 55) | pub const CO_FUTURE_ABSOLUTE_IMPORT: c_int = 0x4000;
  constant CO_FUTURE_WITH_STATEMENT (line 56) | pub const CO_FUTURE_WITH_STATEMENT: c_int = 0x8000;
  constant CO_FUTURE_PRINT_FUNCTION (line 57) | pub const CO_FUTURE_PRINT_FUNCTION: c_int = 0x1_0000;
  constant CO_FUTURE_UNICODE_LITERALS (line 58) | pub const CO_FUTURE_UNICODE_LITERALS: c_int = 0x2_0000;
  constant CO_FUTURE_BARRY_AS_BDFL (line 60) | pub const CO_FUTURE_BARRY_AS_BDFL: c_int = 0x4_0000;
  constant CO_FUTURE_GENERATOR_STOP (line 61) | pub const CO_FUTURE_GENERATOR_STOP: c_int = 0x8_0000;
  constant CO_MAXBLOCKS (line 65) | pub const CO_MAXBLOCKS: usize = 20;
  function PyCode_Check (line 74) | pub unsafe fn PyCode_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/cpython/compile.rs
  type PyCompilerFlags (line 27) | pub struct PyCompilerFlags {
  type PyFutureFeatures (line 43) | pub struct PyFutureFeatures {
  constant FUTURE_NESTED_SCOPES (line 50) | pub const FUTURE_NESTED_SCOPES: &str = "nested_scopes";
  constant FUTURE_GENERATORS (line 51) | pub const FUTURE_GENERATORS: &str = "generators";
  constant FUTURE_DIVISION (line 52) | pub const FUTURE_DIVISION: &str = "division";
  constant FUTURE_ABSOLUTE_IMPORT (line 53) | pub const FUTURE_ABSOLUTE_IMPORT: &str = "absolute_import";
  constant FUTURE_WITH_STATEMENT (line 54) | pub const FUTURE_WITH_STATEMENT: &str = "with_statement";
  constant FUTURE_PRINT_FUNCTION (line 55) | pub const FUTURE_PRINT_FUNCTION: &str = "print_function";
  constant FUTURE_UNICODE_LITERALS (line 56) | pub const FUTURE_UNICODE_LITERALS: &str = "unicode_literals";
  constant FUTURE_BARRY_AS_BDFL (line 57) | pub const FUTURE_BARRY_AS_BDFL: &str = "barry_as_FLUFL";
  constant FUTURE_GENERATOR_STOP (line 58) | pub const FUTURE_GENERATOR_STOP: &str = "generator_stop";
  constant FUTURE_ANNOTATIONS (line 59) | pub const FUTURE_ANNOTATIONS: &str = "annotations";
  constant PY_INVALID_STACK_EFFECT (line 89) | pub const PY_INVALID_STACK_EFFECT: c_int = INT_MAX;

FILE: pyo3-ffi/src/cpython/complexobject.rs
  type Py_complex (line 6) | pub struct Py_complex {
  type PyComplexObject (line 20) | pub struct PyComplexObject {

FILE: pyo3-ffi/src/cpython/critical_section.rs
  type PyCriticalSection (line 7) | pub struct PyCriticalSection {
  type PyCriticalSection2 (line 14) | pub struct PyCriticalSection2 {

FILE: pyo3-ffi/src/cpython/descrobject.rs
  type wrapperfunc (line 7) | pub type wrapperfunc = Option<
  type wrapperfunc_kwds (line 15) | pub type wrapperfunc_kwds = Option<
  type wrapperbase (line 25) | pub struct wrapperbase {
  constant PyWrapperFlag_KEYWORDS (line 35) | pub const PyWrapperFlag_KEYWORDS: c_int = 1;
  type PyDescrObject (line 38) | pub struct PyDescrObject {
  type PyMethodDescrObject (line 49) | pub struct PyMethodDescrObject {
  type PyMemberDescrObject (line 57) | pub struct PyMemberDescrObject {
  type PyGetSetDescrObject (line 66) | pub struct PyGetSetDescrObject {
  type PyWrapperDescrObject (line 72) | pub struct PyWrapperDescrObject {

FILE: pyo3-ffi/src/cpython/dictobject.rs
  type PyDictObject (line 16) | pub struct PyDictObject {
  type PyDictObject (line 37) | pub struct PyDictObject {

FILE: pyo3-ffi/src/cpython/floatobject.rs
  type PyFloatObject (line 7) | pub struct PyFloatObject {
  function _PyFloat_CAST (line 13) | pub unsafe fn _PyFloat_CAST(op: *mut PyObject) -> *mut PyFloatObject {
  function PyFloat_AS_DOUBLE (line 19) | pub unsafe fn PyFloat_AS_DOUBLE(op: *mut PyObject) -> c_double {

FILE: pyo3-ffi/src/cpython/frameobject.rs
  type PyFrameState (line 13) | pub type PyFrameState = c_char;
  type PyTryBlock (line 18) | pub struct PyTryBlock {

FILE: pyo3-ffi/src/cpython/funcobject.rs
  type PyFunctionObject (line 6) | pub struct PyFunctionObject {
  type PyFunctionObject (line 26) | pub struct PyFunctionObject {
  type PyFunctionObject (line 52) | pub struct PyFunctionObject {
  type PyFunctionObject (line 58) | pub struct PyFunctionObject {
  function PyFunction_Check (line 70) | pub unsafe fn PyFunction_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/cpython/genobject.rs
  type PyGenObject (line 9) | pub struct PyGenObject {
  function PyGen_Check (line 47) | pub unsafe fn PyGen_Check(op: *mut PyObject) -> c_int {
  function PyGen_CheckExact (line 52) | pub unsafe fn PyGen_CheckExact(op: *mut PyObject) -> c_int {
  function PyCoro_CheckExact (line 77) | pub unsafe fn PyCoro_CheckExact(op: *mut PyObject) -> c_int {
  function PyAsyncGen_CheckExact (line 96) | pub unsafe fn PyAsyncGen_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/cpython/import.rs
  type _inittab (line 11) | pub struct _inittab {
  type _frozen (line 27) | pub struct _frozen {

FILE: pyo3-ffi/src/cpython/initconfig.rs
  type _PyStatus_TYPE (line 9) | pub enum _PyStatus_TYPE {
  type PyStatus (line 17) | pub struct PyStatus {
  type PyWideStringList (line 38) | pub struct PyWideStringList {
  type PyPreConfig (line 56) | pub struct PyPreConfig {
  type PyConfig (line 82) | pub struct PyConfig {

FILE: pyo3-ffi/src/cpython/listobject.rs
  type PyListObject (line 7) | pub struct PyListObject {
  type PyListObject (line 14) | pub struct PyListObject {
  function PyList_GET_ITEM (line 25) | pub unsafe fn PyList_GET_ITEM(op: *mut PyObject, i: Py_ssize_t) -> *mut ...
  function PyList_SET_ITEM (line 32) | pub unsafe fn PyList_SET_ITEM(op: *mut PyObject, i: Py_ssize_t, v: *mut ...
  function PyList_GET_SIZE (line 38) | pub unsafe fn PyList_GET_SIZE(op: *mut PyObject) -> Py_ssize_t {

FILE: pyo3-ffi/src/cpython/lock.rs
  type PyMutex (line 7) | pub struct PyMutex {
    method new (line 14) | pub const fn new() -> PyMutex {

FILE: pyo3-ffi/src/cpython/longobject.rs
  constant Py_ASNATIVEBYTES_DEFAULTS (line 16) | pub const Py_ASNATIVEBYTES_DEFAULTS: c_int = -1;
  constant Py_ASNATIVEBYTES_BIG_ENDIAN (line 18) | pub const Py_ASNATIVEBYTES_BIG_ENDIAN: c_int = 0;
  constant Py_ASNATIVEBYTES_LITTLE_ENDIAN (line 20) | pub const Py_ASNATIVEBYTES_LITTLE_ENDIAN: c_int = 1;
  constant Py_ASNATIVEBYTES_NATIVE_ENDIAN (line 22) | pub const Py_ASNATIVEBYTES_NATIVE_ENDIAN: c_int = 3;
  constant Py_ASNATIVEBYTES_UNSIGNED_BUFFER (line 24) | pub const Py_ASNATIVEBYTES_UNSIGNED_BUFFER: c_int = 4;
  constant Py_ASNATIVEBYTES_REJECT_NEGATIVE (line 26) | pub const Py_ASNATIVEBYTES_REJECT_NEGATIVE: c_int = 8;

FILE: pyo3-ffi/src/cpython/methodobject.rs
  type PyCMethodObject (line 7) | pub struct PyCMethodObject {
  function PyCMethod_CheckExact (line 17) | pub unsafe fn PyCMethod_CheckExact(op: *mut PyObject) -> c_int {
  function PyCMethod_Check (line 22) | pub unsafe fn PyCMethod_Check(op: *mut PyObject) -> c_int {
  function PyCFunction_GET_FUNCTION (line 28) | pub unsafe fn PyCFunction_GET_FUNCTION(func: *mut PyObject) -> PyMethodD...
  function PyCFunction_GET_SELF (line 37) | pub unsafe fn PyCFunction_GET_SELF(func: *mut PyObject) -> *mut PyObject {
  function PyCFunction_GET_FLAGS (line 50) | pub unsafe fn PyCFunction_GET_FLAGS(func: *mut PyObject) -> c_int {
  function PyCFunction_GET_CLASS (line 59) | pub unsafe fn PyCFunction_GET_CLASS(func: *mut PyObject) -> *mut PyTypeO...

FILE: pyo3-ffi/src/cpython/object.rs
  type Py_buffer (line 30) | pub struct Py_buffer {
    method new (line 53) | pub const fn new() -> Self {
  type getbufferproc (line 76) | pub type getbufferproc = unsafe extern "C" fn(
  type releasebufferproc (line 81) | pub type releasebufferproc =
  constant PyBUF_MAX_NDIM (line 85) | pub const PyBUF_MAX_NDIM: c_int = if cfg!(PyPy) { 36 } else { 64 };
  constant PyBUF_SIMPLE (line 88) | pub const PyBUF_SIMPLE: c_int = 0;
  constant PyBUF_WRITABLE (line 89) | pub const PyBUF_WRITABLE: c_int = 0x0001;
  constant PyBUF_WRITEABLE (line 91) | pub const PyBUF_WRITEABLE: c_int = PyBUF_WRITABLE;
  constant PyBUF_FORMAT (line 92) | pub const PyBUF_FORMAT: c_int = 0x0004;
  constant PyBUF_ND (line 93) | pub const PyBUF_ND: c_int = 0x0008;
  constant PyBUF_STRIDES (line 94) | pub const PyBUF_STRIDES: c_int = 0x0010 | PyBUF_ND;
  constant PyBUF_C_CONTIGUOUS (line 95) | pub const PyBUF_C_CONTIGUOUS: c_int = 0x0020 | PyBUF_STRIDES;
  constant PyBUF_F_CONTIGUOUS (line 96) | pub const PyBUF_F_CONTIGUOUS: c_int = 0x0040 | PyBUF_STRIDES;
  constant PyBUF_ANY_CONTIGUOUS (line 97) | pub const PyBUF_ANY_CONTIGUOUS: c_int = 0x0080 | PyBUF_STRIDES;
  constant PyBUF_INDIRECT (line 98) | pub const PyBUF_INDIRECT: c_int = 0x0100 | PyBUF_STRIDES;
  constant PyBUF_CONTIG (line 100) | pub const PyBUF_CONTIG: c_int = PyBUF_ND | PyBUF_WRITABLE;
  constant PyBUF_CONTIG_RO (line 101) | pub const PyBUF_CONTIG_RO: c_int = PyBUF_ND;
  constant PyBUF_STRIDED (line 103) | pub const PyBUF_STRIDED: c_int = PyBUF_STRIDES | PyBUF_WRITABLE;
  constant PyBUF_STRIDED_RO (line 104) | pub const PyBUF_STRIDED_RO: c_int = PyBUF_STRIDES;
  constant PyBUF_RECORDS (line 106) | pub const PyBUF_RECORDS: c_int = PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_...
  constant PyBUF_RECORDS_RO (line 107) | pub const PyBUF_RECORDS_RO: c_int = PyBUF_STRIDES | PyBUF_FORMAT;
  constant PyBUF_FULL (line 109) | pub const PyBUF_FULL: c_int = PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FO...
  constant PyBUF_FULL_RO (line 110) | pub const PyBUF_FULL_RO: c_int = PyBUF_INDIRECT | PyBUF_FORMAT;
  constant PyBUF_READ (line 112) | pub const PyBUF_READ: c_int = 0x100;
  constant PyBUF_WRITE (line 113) | pub const PyBUF_WRITE: c_int = 0x200;
  type PyNumberMethods (line 121) | pub struct PyNumberMethods {
  type PySequenceMethods (line 162) | pub struct PySequenceMethods {
  type PyMappingMethods (line 177) | pub struct PyMappingMethods {
  type sendfunc (line 184) | pub type sendfunc = unsafe extern "C" fn(
  type PyAsyncMethods (line 192) | pub struct PyAsyncMethods {
  type PyBufferProcs (line 202) | pub struct PyBufferProcs {
  type printfunc (line 207) | pub type printfunc =
  type PyTypeObject (line 212) | pub struct PyTypeObject {
  type _specialization_cache (line 288) | struct _specialization_cache {
  type PyHeapTypeObject (line 297) | pub struct PyHeapTypeObject {
  method default (line 323) | fn default() -> Self {
  function PyHeapType_GET_MEMBERS (line 330) | pub unsafe fn PyHeapType_GET_MEMBERS(etype: *mut PyHeapTypeObject) -> *m...

FILE: pyo3-ffi/src/cpython/objimpl.rs
  type PyObjectArenaAllocator (line 21) | pub struct PyObjectArenaAllocator {
  method default (line 30) | fn default() -> Self {
  function PyObject_IS_GC (line 47) | pub unsafe fn PyObject_IS_GC(o: *mut PyObject) -> c_int {
  function PyType_SUPPORTS_WEAKREFS (line 62) | pub unsafe fn PyType_SUPPORTS_WEAKREFS(t: *mut PyTypeObject) -> c_int {
  function PyObject_GET_WEAKREFS_LISTPTR (line 67) | pub unsafe fn PyObject_GET_WEAKREFS_LISTPTR(o: *mut PyObject) -> *mut *m...

FILE: pyo3-ffi/src/cpython/pydebug.rs
  function Py_GETENV (line 64) | pub unsafe fn Py_GETENV(name: *const c_char) -> *mut c_char {

FILE: pyo3-ffi/src/cpython/pyerrors.rs
  type PyBaseExceptionObject (line 7) | pub struct PyBaseExceptionObject {
  type PySyntaxErrorObject (line 28) | pub struct PySyntaxErrorObject {
  type PyImportErrorObject (line 56) | pub struct PyImportErrorObject {
  type PyUnicodeErrorObject (line 77) | pub struct PyUnicodeErrorObject {
  type PySystemExitObject (line 98) | pub struct PySystemExitObject {
  type PyOSErrorObject (line 115) | pub struct PyOSErrorObject {
  type PyStopIterationObject (line 137) | pub struct PyStopIterationObject {

FILE: pyo3-ffi/src/cpython/pyframe.rs
  function PyFrame_Check (line 20) | pub unsafe fn PyFrame_Check(op: *mut PyObject) -> c_int {
  function PyFrameLocalsProxy_Check (line 26) | pub unsafe fn PyFrameLocalsProxy_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/cpython/pyhash.rs
  type PyHash_FuncDef (line 13) | pub struct PyHash_FuncDef {
  method default (line 24) | fn default() -> Self {

FILE: pyo3-ffi/src/cpython/pylifecycle.rs
  constant PyInterpreterConfig_DEFAULT_GIL (line 31) | pub const PyInterpreterConfig_DEFAULT_GIL: c_int = 0;
  constant PyInterpreterConfig_SHARED_GIL (line 33) | pub const PyInterpreterConfig_SHARED_GIL: c_int = 1;
  constant PyInterpreterConfig_OWN_GIL (line 35) | pub const PyInterpreterConfig_OWN_GIL: c_int = 2;
  type PyInterpreterConfig (line 39) | pub struct PyInterpreterConfig {
  constant _PyInterpreterConfig_INIT (line 50) | pub const _PyInterpreterConfig_INIT: PyInterpreterConfig = PyInterpreter...
  constant _PyInterpreterConfig_LEGACY_CHECK_MULTI_INTERP_EXTENSIONS (line 62) | const _PyInterpreterConfig_LEGACY_CHECK_MULTI_INTERP_EXTENSIONS: c_int =
  constant _PyInterpreterConfig_LEGACY_INIT (line 66) | pub const _PyInterpreterConfig_LEGACY_INIT: PyInterpreterConfig = PyInte...

FILE: pyo3-ffi/src/cpython/pymem.rs
  type PyMemAllocatorDomain (line 22) | pub enum PyMemAllocatorDomain {
  type PyMemAllocatorEx (line 32) | pub struct PyMemAllocatorEx {

FILE: pyo3-ffi/src/cpython/pystate.rs
  type Py_tracefunc (line 8) | pub type Py_tracefunc = unsafe extern "C" fn(
  constant PyTrace_CALL (line 15) | pub const PyTrace_CALL: c_int = 0;
  constant PyTrace_EXCEPTION (line 16) | pub const PyTrace_EXCEPTION: c_int = 1;
  constant PyTrace_LINE (line 17) | pub const PyTrace_LINE: c_int = 2;
  constant PyTrace_RETURN (line 18) | pub const PyTrace_RETURN: c_int = 3;
  constant PyTrace_C_CALL (line 19) | pub const PyTrace_C_CALL: c_int = 4;
  constant PyTrace_C_EXCEPTION (line 20) | pub const PyTrace_C_EXCEPTION: c_int = 5;
  constant PyTrace_C_RETURN (line 21) | pub const PyTrace_C_RETURN: c_int = 6;
  constant PyTrace_OPCODE (line 22) | pub const PyTrace_OPCODE: c_int = 7;
  type _PyErr_StackItem (line 34) | pub(crate) struct _PyErr_StackItem {

FILE: pyo3-ffi/src/cpython/pythonrun.rs
  function Py_CompileString (line 139) | pub unsafe fn Py_CompileString(string: *const c_char, p: *const c_char, ...
  function Py_CompileStringFlags (line 145) | pub unsafe fn Py_CompileStringFlags(

FILE: pyo3-ffi/src/cpython/tupleobject.rs
  type PyTupleObject (line 8) | pub struct PyTupleObject {
  function PyTuple_GET_SIZE (line 23) | pub unsafe fn PyTuple_GET_SIZE(op: *mut PyObject) -> Py_ssize_t {
  function PyTuple_GET_ITEM (line 29) | pub unsafe fn PyTuple_GET_ITEM(op: *mut PyObject, i: Py_ssize_t) -> *mut...
  function PyTuple_SET_ITEM (line 36) | pub unsafe fn PyTuple_SET_ITEM(op: *mut PyObject, i: Py_ssize_t, v: *mut...

FILE: pyo3-ffi/src/cpython/unicodeobject.rs
  type BitfieldUnit (line 36) | struct BitfieldUnit<Storage> {
  function new (line 43) | pub const fn new(storage: Storage) -> Self {
  function get_bit (line 54) | fn get_bit(&self, index: usize) -> bool {
  function set_bit (line 68) | fn set_bit(&mut self, index: usize, val: bool) {
  function get (line 86) | fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
  function set (line 105) | fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
  constant STATE_INTERNED_INDEX (line 123) | const STATE_INTERNED_INDEX: usize = 0;
  constant STATE_INTERNED_WIDTH (line 125) | const STATE_INTERNED_WIDTH: u8 = 2;
  constant STATE_KIND_INDEX (line 128) | const STATE_KIND_INDEX: usize = STATE_INTERNED_WIDTH as usize;
  constant STATE_KIND_WIDTH (line 130) | const STATE_KIND_WIDTH: u8 = 3;
  constant STATE_COMPACT_INDEX (line 133) | const STATE_COMPACT_INDEX: usize = (STATE_INTERNED_WIDTH + STATE_KIND_WI...
  constant STATE_COMPACT_WIDTH (line 135) | const STATE_COMPACT_WIDTH: u8 = 1;
  constant STATE_ASCII_INDEX (line 138) | const STATE_ASCII_INDEX: usize =
  constant STATE_ASCII_WIDTH (line 141) | const STATE_ASCII_WIDTH: u8 = 1;
  constant STATE_STATICALLY_ALLOCATED_INDEX (line 144) | const STATE_STATICALLY_ALLOCATED_INDEX: usize =
  constant STATE_STATICALLY_ALLOCATED_WIDTH (line 147) | const STATE_STATICALLY_ALLOCATED_WIDTH: u8 = 1;
  constant STATE_READY_INDEX (line 150) | const STATE_READY_INDEX: usize =
  constant STATE_READY_WIDTH (line 153) | const STATE_READY_WIDTH: u8 = 1;
  type PyASCIIObjectState (line 166) | struct PyASCIIObjectState {
    method interned (line 176) | unsafe fn interned(&self) -> c_uint {
    method set_interned (line 184) | unsafe fn set_interned(&mut self, val: c_uint) {
    method kind (line 191) | unsafe fn kind(&self) -> c_uint {
    method set_kind (line 196) | unsafe fn set_kind(&mut self, val: c_uint) {
    method compact (line 203) | unsafe fn compact(&self) -> c_uint {
    method set_compact (line 208) | unsafe fn set_compact(&mut self, val: c_uint) {
    method ascii (line 215) | unsafe fn ascii(&self) -> c_uint {
    method set_ascii (line 220) | unsafe fn set_ascii(&mut self, val: c_uint) {
    method statically_allocated (line 228) | unsafe fn statically_allocated(&self) -> c_uint {
    method set_statically_allocated (line 237) | unsafe fn set_statically_allocated(&mut self, val: c_uint) {
    method ready (line 248) | unsafe fn ready(&self) -> c_uint {
    method set_ready (line 254) | unsafe fn set_ready(&mut self, val: c_uint) {
    method from (line 264) | fn from(value: u32) -> Self {
  function from (line 275) | fn from(value: PyASCIIObjectState) -> Self {
  type PyASCIIObject (line 281) | pub struct PyASCIIObject {
    method interned (line 321) | pub unsafe fn interned(&self) -> c_uint {
    method set_interned (line 332) | pub unsafe fn set_interned(&mut self, val: c_uint) {
    method kind (line 344) | pub unsafe fn kind(&self) -> c_uint {
    method set_kind (line 354) | pub unsafe fn set_kind(&mut self, val: c_uint) {
    method compact (line 364) | pub unsafe fn compact(&self) -> c_uint {
    method set_compact (line 372) | pub unsafe fn set_compact(&mut self, val: c_uint) {
    method ascii (line 382) | pub unsafe fn ascii(&self) -> c_uint {
    method set_ascii (line 391) | pub unsafe fn set_ascii(&mut self, val: c_uint) {
    method ready (line 402) | pub unsafe fn ready(&self) -> c_uint {
    method set_ready (line 411) | pub unsafe fn set_ready(&mut self, val: c_uint) {
    method statically_allocated (line 422) | pub unsafe fn statically_allocated(&self) -> c_uint {
    method set_statically_allocated (line 431) | pub unsafe fn set_statically_allocated(&mut self, val: c_uint) {
  type PyCompactUnicodeObject (line 439) | pub struct PyCompactUnicodeObject {
  type PyUnicodeObject (line 456) | pub struct PyUnicodeObject {
  constant SSTATE_NOT_INTERNED (line 471) | pub const SSTATE_NOT_INTERNED: c_uint = 0;
  constant SSTATE_INTERNED_MORTAL (line 472) | pub const SSTATE_INTERNED_MORTAL: c_uint = 1;
  constant SSTATE_INTERNED_IMMORTAL (line 473) | pub const SSTATE_INTERNED_IMMORTAL: c_uint = 2;
  constant SSTATE_INTERNED_IMMORTAL_STATIC (line 475) | pub const SSTATE_INTERNED_IMMORTAL_STATIC: c_uint = 3;
  function PyUnicode_IS_ASCII (line 479) | pub unsafe fn PyUnicode_IS_ASCII(op: *mut PyObject) -> c_uint {
  function PyUnicode_IS_COMPACT (line 489) | pub unsafe fn PyUnicode_IS_COMPACT(op: *mut PyObject) -> c_uint {
  function PyUnicode_IS_COMPACT_ASCII (line 495) | pub unsafe fn PyUnicode_IS_COMPACT_ASCII(op: *mut PyObject) -> c_uint {
  constant PyUnicode_WCHAR_KIND (line 501) | pub const PyUnicode_WCHAR_KIND: c_uint = 0;
  constant PyUnicode_1BYTE_KIND (line 503) | pub const PyUnicode_1BYTE_KIND: c_uint = 1;
  constant PyUnicode_2BYTE_KIND (line 504) | pub const PyUnicode_2BYTE_KIND: c_uint = 2;
  constant PyUnicode_4BYTE_KIND (line 505) | pub const PyUnicode_4BYTE_KIND: c_uint = 4;
  function PyUnicode_1BYTE_DATA (line 509) | pub unsafe fn PyUnicode_1BYTE_DATA(op: *mut PyObject) -> *mut Py_UCS1 {
  function PyUnicode_2BYTE_DATA (line 515) | pub unsafe fn PyUnicode_2BYTE_DATA(op: *mut PyObject) -> *mut Py_UCS2 {
  function PyUnicode_4BYTE_DATA (line 521) | pub unsafe fn PyUnicode_4BYTE_DATA(op: *mut PyObject) -> *mut Py_UCS4 {
  function PyUnicode_KIND (line 533) | pub unsafe fn PyUnicode_KIND(op: *mut PyObject) -> c_uint {
  function _PyUnicode_COMPACT_DATA (line 543) | pub unsafe fn _PyUnicode_COMPACT_DATA(op: *mut PyObject) -> *mut c_void {
  function _PyUnicode_NONCOMPACT_DATA (line 553) | pub unsafe fn _PyUnicode_NONCOMPACT_DATA(op: *mut PyObject) -> *mut c_vo...
  function PyUnicode_DATA (line 561) | pub unsafe fn PyUnicode_DATA(op: *mut PyObject) -> *mut c_void {
  function PyUnicode_GET_LENGTH (line 584) | pub unsafe fn PyUnicode_GET_LENGTH(op: *mut PyObject) -> Py_ssize_t {
  function PyUnicode_IS_READY (line 594) | pub unsafe fn PyUnicode_IS_READY(_op: *mut PyObject) -> c_uint {
  function PyUnicode_IS_READY (line 601) | pub unsafe fn PyUnicode_IS_READY(op: *mut PyObject) -> c_uint {
  function PyUnicode_READY (line 607) | pub unsafe fn PyUnicode_READY(_op: *mut PyObject) -> c_int {
  function PyUnicode_READY (line 613) | pub unsafe fn PyUnicode_READY(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/cpython/weakrefobject.rs
  type _PyWeakReference (line 3) | pub struct _PyWeakReference {

FILE: pyo3-ffi/src/datetime.rs
  constant _PyDateTime_DATE_DATASIZE (line 20) | const _PyDateTime_DATE_DATASIZE: usize = 4;
  constant _PyDateTime_TIME_DATASIZE (line 21) | const _PyDateTime_TIME_DATASIZE: usize = 6;
  constant _PyDateTime_DATETIME_DATASIZE (line 22) | const _PyDateTime_DATETIME_DATASIZE: usize = 10;
  type PyDateTime_Delta (line 27) | pub struct PyDateTime_Delta {
  type _PyDateTime_BaseTime (line 43) | pub struct _PyDateTime_BaseTime {
  type PyDateTime_Time (line 53) | pub struct PyDateTime_Time {
  type PyDateTime_Date (line 72) | pub struct PyDateTime_Date {
  type _PyDateTime_BaseDateTime (line 86) | pub struct _PyDateTime_BaseDateTime {
  type PyDateTime_DateTime (line 96) | pub struct PyDateTime_DateTime {
  function PyDateTime_GET_YEAR (line 119) | pub unsafe fn PyDateTime_GET_YEAR(o: *mut PyObject) -> c_int {
  function PyDateTime_GET_MONTH (line 129) | pub unsafe fn PyDateTime_GET_MONTH(o: *mut PyObject) -> c_int {
  function PyDateTime_GET_DAY (line 138) | pub unsafe fn PyDateTime_GET_DAY(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_HOUR (line 197) | pub unsafe fn PyDateTime_DATE_GET_HOUR(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_MINUTE (line 205) | pub unsafe fn PyDateTime_DATE_GET_MINUTE(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_SECOND (line 213) | pub unsafe fn PyDateTime_DATE_GET_SECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_MICROSECOND (line 221) | pub unsafe fn PyDateTime_DATE_GET_MICROSECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_FOLD (line 229) | pub unsafe fn PyDateTime_DATE_GET_FOLD(o: *mut PyObject) -> c_uchar {
  function PyDateTime_DATE_GET_TZINFO (line 238) | pub unsafe fn PyDateTime_DATE_GET_TZINFO(o: *mut PyObject) -> *mut PyObj...
  function PyDateTime_TIME_GET_HOUR (line 247) | pub unsafe fn PyDateTime_TIME_GET_HOUR(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_MINUTE (line 255) | pub unsafe fn PyDateTime_TIME_GET_MINUTE(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_SECOND (line 263) | pub unsafe fn PyDateTime_TIME_GET_SECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_MICROSECOND (line 271) | pub unsafe fn PyDateTime_TIME_GET_MICROSECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_FOLD (line 279) | pub unsafe fn PyDateTime_TIME_GET_FOLD(o: *mut PyObject) -> c_uchar {
  function PyDateTime_TIME_GET_TZINFO (line 288) | pub unsafe fn PyDateTime_TIME_GET_TZINFO(o: *mut PyObject) -> *mut PyObj...
  function PyDateTime_DELTA_GET_DAYS (line 316) | pub unsafe fn PyDateTime_DELTA_GET_DAYS(o: *mut PyObject) -> c_int {
  function PyDateTime_DELTA_GET_SECONDS (line 328) | pub unsafe fn PyDateTime_DELTA_GET_SECONDS(o: *mut PyObject) -> c_int {
  function PyDateTime_DELTA_GET_MICROSECONDS (line 340) | pub unsafe fn PyDateTime_DELTA_GET_MICROSECONDS(o: *mut PyObject) -> c_i...
  function _get_attr (line 348) | pub unsafe fn _get_attr(obj: *mut PyObject, field: &std::ffi::CStr) -> c...
  function PyDateTime_GET_YEAR (line 360) | pub unsafe fn PyDateTime_GET_YEAR(o: *mut PyObject) -> c_int {
  function PyDateTime_GET_MONTH (line 366) | pub unsafe fn PyDateTime_GET_MONTH(o: *mut PyObject) -> c_int {
  function PyDateTime_GET_DAY (line 372) | pub unsafe fn PyDateTime_GET_DAY(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_HOUR (line 378) | pub unsafe fn PyDateTime_DATE_GET_HOUR(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_MINUTE (line 384) | pub unsafe fn PyDateTime_DATE_GET_MINUTE(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_SECOND (line 390) | pub unsafe fn PyDateTime_DATE_GET_SECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_MICROSECOND (line 396) | pub unsafe fn PyDateTime_DATE_GET_MICROSECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_FOLD (line 402) | pub unsafe fn PyDateTime_DATE_GET_FOLD(o: *mut PyObject) -> c_int {
  function PyDateTime_DATE_GET_TZINFO (line 408) | pub unsafe fn PyDateTime_DATE_GET_TZINFO(o: *mut PyObject) -> *mut PyObj...
  function PyDateTime_TIME_GET_HOUR (line 416) | pub unsafe fn PyDateTime_TIME_GET_HOUR(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_MINUTE (line 422) | pub unsafe fn PyDateTime_TIME_GET_MINUTE(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_SECOND (line 428) | pub unsafe fn PyDateTime_TIME_GET_SECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_MICROSECOND (line 434) | pub unsafe fn PyDateTime_TIME_GET_MICROSECOND(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_FOLD (line 440) | pub unsafe fn PyDateTime_TIME_GET_FOLD(o: *mut PyObject) -> c_int {
  function PyDateTime_TIME_GET_TZINFO (line 446) | pub unsafe fn PyDateTime_TIME_GET_TZINFO(o: *mut PyObject) -> *mut PyObj...
  function PyDateTime_DELTA_GET_DAYS (line 454) | pub unsafe fn PyDateTime_DELTA_GET_DAYS(o: *mut PyObject) -> c_int {
  function PyDateTime_DELTA_GET_SECONDS (line 460) | pub unsafe fn PyDateTime_DELTA_GET_SECONDS(o: *mut PyObject) -> c_int {
  function PyDateTime_DELTA_GET_MICROSECONDS (line 466) | pub unsafe fn PyDateTime_DELTA_GET_MICROSECONDS(o: *mut PyObject) -> c_i...
  type PyDateTime_CAPI (line 518) | pub struct PyDateTime_CAPI {
  constant PyDateTime_CAPSULE_NAME (line 593) | pub const PyDateTime_CAPSULE_NAME: &CStr = c"datetime.datetime_CAPI";
  function PyDateTimeAPI (line 601) | pub unsafe fn PyDateTimeAPI() -> *mut PyDateTime_CAPI {
  function PyDateTime_IMPORT (line 606) | pub unsafe fn PyDateTime_IMPORT() {
  function PyDateTime_TimeZone_UTC (line 631) | pub unsafe fn PyDateTime_TimeZone_UTC() -> *mut PyObject {
  function PyDate_Check (line 642) | pub unsafe fn PyDate_Check(op: *mut PyObject) -> c_int {
  function PyDate_CheckExact (line 648) | pub unsafe fn PyDate_CheckExact(op: *mut PyObject) -> c_int {
  function PyDateTime_Check (line 654) | pub unsafe fn PyDateTime_Check(op: *mut PyObject) -> c_int {
  function PyDateTime_CheckExact (line 660) | pub unsafe fn PyDateTime_CheckExact(op: *mut PyObject) -> c_int {
  function PyTime_Check (line 666) | pub unsafe fn PyTime_Check(op: *mut PyObject) -> c_int {
  function PyTime_CheckExact (line 672) | pub unsafe fn PyTime_CheckExact(op: *mut PyObject) -> c_int {
  function PyDelta_Check (line 678) | pub unsafe fn PyDelta_Check(op: *mut PyObject) -> c_int {
  function PyDelta_CheckExact (line 684) | pub unsafe fn PyDelta_CheckExact(op: *mut PyObject) -> c_int {
  function PyTZInfo_Check (line 690) | pub unsafe fn PyTZInfo_Check(op: *mut PyObject) -> c_int {
  function PyTZInfo_CheckExact (line 696) | pub unsafe fn PyTZInfo_CheckExact(op: *mut PyObject) -> c_int {
  function PyTimeZone_FromOffset (line 707) | pub unsafe fn PyTimeZone_FromOffset(offset: *mut PyObject) -> *mut PyObj...
  function PyTimeZone_FromOffsetAndName (line 711) | pub unsafe fn PyTimeZone_FromOffsetAndName(
  function PyDateTime_FromTimestamp (line 719) | pub unsafe fn PyDateTime_FromTimestamp(args: *mut PyObject) -> *mut PyOb...
  function PyDate_FromTimestamp (line 725) | pub unsafe fn PyDate_FromTimestamp(args: *mut PyObject) -> *mut PyObject {
  type PyDateTimeAPISingleton (line 746) | struct PyDateTimeAPISingleton {

FILE: pyo3-ffi/src/descrobject.rs
  type getter (line 7) | pub type getter = unsafe extern "C" fn(slf: *mut PyObject, closure: *mut...
  type setter (line 8) | pub type setter =
  type PyGetSetDef (line 18) | pub struct PyGetSetDef {
  method default (line 27) | fn default() -> PyGetSetDef {
  type PyMemberDef (line 77) | pub struct PyMemberDef {
  method default (line 86) | fn default() -> PyMemberDef {
  constant Py_T_SHORT (line 98) | pub const Py_T_SHORT: c_int = 0;
  constant Py_T_INT (line 99) | pub const Py_T_INT: c_int = 1;
  constant Py_T_LONG (line 100) | pub const Py_T_LONG: c_int = 2;
  constant Py_T_FLOAT (line 101) | pub const Py_T_FLOAT: c_int = 3;
  constant Py_T_DOUBLE (line 102) | pub const Py_T_DOUBLE: c_int = 4;
  constant Py_T_STRING (line 103) | pub const Py_T_STRING: c_int = 5;
  constant _Py_T_OBJECT (line 105) | pub const _Py_T_OBJECT: c_int = 6;
  constant Py_T_CHAR (line 106) | pub const Py_T_CHAR: c_int = 7;
  constant Py_T_BYTE (line 107) | pub const Py_T_BYTE: c_int = 8;
  constant Py_T_UBYTE (line 108) | pub const Py_T_UBYTE: c_int = 9;
  constant Py_T_USHORT (line 109) | pub const Py_T_USHORT: c_int = 10;
  constant Py_T_UINT (line 110) | pub const Py_T_UINT: c_int = 11;
  constant Py_T_ULONG (line 111) | pub const Py_T_ULONG: c_int = 12;
  constant Py_T_STRING_INPLACE (line 112) | pub const Py_T_STRING_INPLACE: c_int = 13;
  constant Py_T_BOOL (line 113) | pub const Py_T_BOOL: c_int = 14;
  constant Py_T_OBJECT_EX (line 114) | pub const Py_T_OBJECT_EX: c_int = 16;
  constant Py_T_LONGLONG (line 115) | pub const Py_T_LONGLONG: c_int = 17;
  constant Py_T_ULONGLONG (line 116) | pub const Py_T_ULONGLONG: c_int = 18;
  constant Py_T_PYSSIZET (line 117) | pub const Py_T_PYSSIZET: c_int = 19;
  constant _Py_T_NONE (line 119) | pub const _Py_T_NONE: c_int = 20;
  constant Py_READONLY (line 122) | pub const Py_READONLY: c_int = 1;
  constant Py_AUDIT_READ (line 124) | pub const Py_AUDIT_READ: c_int = 2;
  constant _Py_WRITE_RESTRICTED (line 126) | pub const _Py_WRITE_RESTRICTED: c_int = 4;
  constant Py_RELATIVE_OFFSET (line 127) | pub const Py_RELATIVE_OFFSET: c_int = 8;

FILE: pyo3-ffi/src/dictobject.rs
  function PyDict_Check (line 11) | pub unsafe fn PyDict_Check(op: *mut PyObject) -> c_int {
  function PyDict_CheckExact (line 16) | pub unsafe fn PyDict_CheckExact(op: *mut PyObject) -> c_int {
  function PyDictKeys_Check (line 91) | pub unsafe fn PyDictKeys_Check(op: *mut PyObject) -> c_int {
  function PyDictValues_Check (line 96) | pub unsafe fn PyDictValues_Check(op: *mut PyObject) -> c_int {
  function PyDictItems_Check (line 101) | pub unsafe fn PyDictItems_Check(op: *mut PyObject) -> c_int {
  function PyDictViewSet_Check (line 106) | pub unsafe fn PyDictViewSet_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/fileobject.rs
  constant PY_STDIOTEXTMODE (line 4) | pub const PY_STDIOTEXTMODE: &str = "b";

FILE: pyo3-ffi/src/floatobject.rs
  function PyFloat_Check (line 14) | pub unsafe fn PyFloat_Check(op: *mut PyObject) -> c_int {
  function PyFloat_CheckExact (line 19) | pub unsafe fn PyFloat_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/impl_/mod.rs
  type GetAtomicCULong (line 3) | pub struct GetAtomicCULong<const WIDTH: usize>();
  type AtomicCULongType (line 5) | pub trait AtomicCULongType {
    type Type (line 9) | type Type = std::sync::atomic::AtomicU32;
    type Type (line 12) | type Type = std::sync::atomic::AtomicU64;
  type TYPE (line 15) | pub type TYPE =
  type AtomicCULong (line 22) | pub type AtomicCULong = atomic_c_ulong::TYPE;

FILE: pyo3-ffi/src/import.rs
  function PyImport_ImportModuleEx (line 61) | pub unsafe fn PyImport_ImportModuleEx(

FILE: pyo3-ffi/src/iterobject.rs
  function PySeqIter_Check (line 10) | pub unsafe fn PySeqIter_Check(op: *mut PyObject) -> c_int {
  function PyCallIter_Check (line 20) | pub unsafe fn PyCallIter_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/lib.rs
  function _cstr_from_utf8_with_nul_checked (line 417) | pub const fn _cstr_from_utf8_with_nul_checked(s: &str) -> &std::ffi::CStr {

FILE: pyo3-ffi/src/listobject.rs
  function PyList_Check (line 13) | pub unsafe fn PyList_Check(op: *mut PyObject) -> c_int {
  function PyList_CheckExact (line 18) | pub unsafe fn PyList_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/longobject.rs
  function PyLong_Check (line 9) | pub unsafe fn PyLong_Check(op: *mut PyObject) -> c_int {
  function PyLong_CheckExact (line 14) | pub unsafe fn PyLong_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/memoryobject.rs
  function PyMemoryView_Check (line 13) | pub unsafe fn PyMemoryView_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/methodobject.rs
  type PyCFunctionObject (line 8) | pub struct PyCFunctionObject {
  function PyCFunction_CheckExact (line 25) | pub unsafe fn PyCFunction_CheckExact(op: *mut PyObject) -> c_int {
  function PyCFunction_Check (line 31) | pub unsafe fn PyCFunction_Check(op: *mut PyObject) -> c_int {
  function PyCFunction_Check (line 37) | pub unsafe fn PyCFunction_Check(op: *mut PyObject) -> c_int {
  type PyCFunction (line 41) | pub type PyCFunction =
  type PyCFunctionFast (line 45) | pub type PyCFunctionFast = unsafe extern "C" fn(
  type _PyCFunctionFast (line 53) | pub type _PyCFunctionFast = PyCFunctionFast;
  type PyCFunctionWithKeywords (line 55) | pub type PyCFunctionWithKeywords = unsafe extern "C" fn(
  type PyCFunctionFastWithKeywords (line 62) | pub type PyCFunctionFastWithKeywords = unsafe extern "C" fn(
  type _PyCFunctionFastWithKeywords (line 71) | pub type _PyCFunctionFastWithKeywords = PyCFunctionFastWithKeywords;
  type PyCMethod (line 74) | pub type PyCMethod = unsafe extern "C" fn(
  type PyMethodDef (line 103) | pub struct PyMethodDef {
    method zeroed (line 111) | pub const fn zeroed() -> PyMethodDef {
  method default (line 124) | fn default() -> PyMethodDef {
  method as_ptr (line 179) | pub fn as_ptr(&self) -> *mut c_void {
  method is_null (line 183) | pub fn is_null(&self) -> bool {
  method zeroed (line 187) | pub const fn zeroed() -> PyMethodDefPointer {
  method eq (line 195) | fn eq(&self, other: &Self) -> bool {
  method fmt (line 201) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  constant _ (line 207) | const _: () =
  function PyCFunction_New (line 225) | pub unsafe fn PyCFunction_New(ml: *mut PyMethodDef, slf: *mut PyObject) ...
  function PyCFunction_NewEx (line 231) | pub unsafe fn PyCFunction_NewEx(
  constant METH_VARARGS (line 251) | pub const METH_VARARGS: c_int = 0x0001;
  constant METH_KEYWORDS (line 252) | pub const METH_KEYWORDS: c_int = 0x0002;
  constant METH_NOARGS (line 254) | pub const METH_NOARGS: c_int = 0x0004;
  constant METH_O (line 255) | pub const METH_O: c_int = 0x0008;
  constant METH_CLASS (line 260) | pub const METH_CLASS: c_int = 0x0010;
  constant METH_STATIC (line 261) | pub const METH_STATIC: c_int = 0x0020;
  constant METH_COEXIST (line 268) | pub const METH_COEXIST: c_int = 0x0040;
  constant METH_FASTCALL (line 273) | pub const METH_FASTCALL: c_int = 0x0080;
  constant METH_METHOD (line 278) | pub const METH_METHOD: c_int = 0x0200;

FILE: pyo3-ffi/src/modsupport.rs
  constant Py_CLEANUP_SUPPORTED (line 80) | pub const Py_CLEANUP_SUPPORTED: i32 = 0x2_0000;
  constant PYTHON_API_VERSION (line 82) | pub const PYTHON_API_VERSION: i32 = 1013;
  constant PYTHON_ABI_VERSION (line 83) | pub const PYTHON_ABI_VERSION: i32 = 3;
  function PyModule_Create (line 92) | pub unsafe fn PyModule_Create(module: *mut PyModuleDef) -> *mut PyObject {
  function PyModule_FromDefAndSpec (line 115) | pub unsafe fn PyModule_FromDefAndSpec(def: *mut PyModuleDef, spec: *mut ...
  type PyABIInfo (line 129) | pub struct PyABIInfo {
  constant PyABIInfo_STABLE (line 137) | pub const PyABIInfo_STABLE: u16 = 0x0001;
  constant PyABIInfo_GIL (line 139) | pub const PyABIInfo_GIL: u16 = 0x0002;
  constant PyABIInfo_FREETHREADED (line 141) | pub const PyABIInfo_FREETHREADED: u16 = 0x0004;
  constant PyABIInfo_INTERNAL (line 143) | pub const PyABIInfo_INTERNAL: u16 = 0x0008;
  constant PyABIInfo_FREETHREADING_AGNOSTIC (line 146) | pub const PyABIInfo_FREETHREADING_AGNOSTIC: u16 = PyABIInfo_GIL | PyABII...
  constant _PyABIInfo_DEFAULT_FLAG_STABLE (line 154) | const _PyABIInfo_DEFAULT_FLAG_STABLE: u16 = PyABIInfo_STABLE;
  constant _PyABIInfo_DEFAULT_FLAG_STABLE (line 156) | const _PyABIInfo_DEFAULT_FLAG_STABLE: u16 = 0;
  constant _PyABIInfo_DEFAULT_FLAG_FT (line 161) | const _PyABIInfo_DEFAULT_FLAG_FT: u16 = PyABIInfo_FREETHREADED;
  constant _PyABIInfo_DEFAULT_FLAG_FT (line 163) | const _PyABIInfo_DEFAULT_FLAG_FT: u16 = PyABIInfo_GIL;
  constant _PyABIInfo_DEFAULT_FLAG_INTERNAL (line 167) | const _PyABIInfo_DEFAULT_FLAG_INTERNAL: u16 = 0;
  constant PyABIInfo_DEFAULT_FLAGS (line 170) | pub const PyABIInfo_DEFAULT_FLAGS: u16 =
  constant _PyABIInfo_DEFAULT (line 175) | pub const _PyABIInfo_DEFAULT: PyABIInfo = PyABIInfo {

FILE: pyo3-ffi/src/moduleobject.rs
  function PyModule_Check (line 12) | pub unsafe fn PyModule_Check(op: *mut PyObject) -> c_int {
  function PyModule_CheckExact (line 17) | pub unsafe fn PyModule_CheckExact(op: *mut PyObject) -> c_int {
  type PyModuleDef_Base (line 53) | pub struct PyModuleDef_Base {
  constant PyModuleDef_HEAD_INIT (line 65) | pub const PyModuleDef_HEAD_INIT: PyModuleDef_Base = PyModuleDef_Base {
  type PyModuleDef_Slot (line 74) | pub struct PyModuleDef_Slot {
  method default (line 80) | fn default() -> PyModuleDef_Slot {
  constant Py_mod_create (line 88) | pub const Py_mod_create: c_int = 1;
  constant Py_mod_exec (line 89) | pub const Py_mod_exec: c_int = 2;
  constant Py_mod_multiple_interpreters (line 91) | pub const Py_mod_multiple_interpreters: c_int = 3;
  constant Py_mod_gil (line 93) | pub const Py_mod_gil: c_int = 4;
  constant Py_mod_abi (line 95) | pub const Py_mod_abi: c_int = 5;
  constant Py_mod_name (line 97) | pub const Py_mod_name: c_int = 6;
  constant Py_mod_doc (line 99) | pub const Py_mod_doc: c_int = 7;
  constant Py_mod_state_size (line 101) | pub const Py_mod_state_size: c_int = 8;
  constant Py_mod_methods (line 103) | pub const Py_mod_methods: c_int = 9;
  constant Py_mod_state_traverse (line 105) | pub const Py_mod_state_traverse: c_int = 10;
  constant Py_mod_state_clear (line 107) | pub const Py_mod_state_clear: c_int = 11;
  constant Py_mod_state_free (line 109) | pub const Py_mod_state_free: c_int = 12;
  constant Py_mod_token (line 111) | pub const Py_mod_token: c_int = 13;
  constant Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED (line 120) | pub const Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED: *mut c_void = 0 as...
  constant Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED (line 122) | pub const Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED: *mut c_void = 1 as *mu...
  constant Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (line 124) | pub const Py_MOD_PER_INTERPRETER_GIL_SUPPORTED: *mut c_void = 2 as *mut ...
  constant Py_MOD_GIL_USED (line 131) | pub const Py_MOD_GIL_USED: *mut c_void = 0 as *mut c_void;
  constant Py_MOD_GIL_NOT_USED (line 133) | pub const Py_MOD_GIL_NOT_USED: *mut c_void = 1 as *mut c_void;
  type PyModuleDef (line 152) | pub struct PyModuleDef {

FILE: pyo3-ffi/src/object.rs
  type PyObjectObFlagsAndRefcnt (line 29) | pub struct PyObjectObFlagsAndRefcnt {
  type PyObjectObFlagsAndRefcnt (line 45) | pub struct PyObjectObFlagsAndRefcnt {
  type Aligner (line 56) | struct Aligner(c_char);
  type PyObjectObRefcnt (line 83) | pub type PyObjectObRefcnt = Py_ssize_t;
    method fmt (line 77) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  constant _PyObject_MIN_ALIGNMENT (line 85) | const _PyObject_MIN_ALIGNMENT: usize = 4;
  type PyObject (line 97) | pub struct PyObject {
  constant _ (line 119) | const _: () = assert!(std::mem::align_of::<PyObject>() >= _PyObject_MIN_...
  constant PyObject_HEAD_INIT (line 125) | pub const PyObject_HEAD_INIT: PyObject = PyObject {
  type PyVarObject (line 157) | pub struct PyVarObject {
  function Py_Is (line 171) | pub unsafe fn Py_Is(x: *mut PyObject, y: *mut PyObject) -> c_int {
  function Py_TYPE (line 199) | pub unsafe fn Py_TYPE(ob: *mut PyObject) -> *mut PyTypeObject {
  function Py_SIZE (line 222) | pub unsafe fn Py_SIZE(ob: *mut PyObject) -> Py_ssize_t {
  function Py_IS_TYPE (line 234) | pub unsafe fn Py_IS_TYPE(ob: *mut PyObject, tp: *mut PyTypeObject) -> c_...
  type unaryfunc (line 242) | pub type unaryfunc = unsafe extern "C" fn(*mut PyObject) -> *mut PyObject;
  type binaryfunc (line 243) | pub type binaryfunc = unsafe extern "C" fn(*mut PyObject, *mut PyObject)...
  type ternaryfunc (line 244) | pub type ternaryfunc =
  type inquiry (line 246) | pub type inquiry = unsafe extern "C" fn(*mut PyObject) -> c_int;
  type lenfunc (line 247) | pub type lenfunc = unsafe extern "C" fn(*mut PyObject) -> Py_ssize_t;
  type ssizeargfunc (line 248) | pub type ssizeargfunc = unsafe extern "C" fn(*mut PyObject, Py_ssize_t) ...
  type ssizessizeargfunc (line 249) | pub type ssizessizeargfunc =
  type ssizeobjargproc (line 251) | pub type ssizeobjargproc = unsafe extern "C" fn(*mut PyObject, Py_ssize_...
  type ssizessizeobjargproc (line 252) | pub type ssizessizeobjargproc =
  type objobjargproc (line 254) | pub type objobjargproc = unsafe extern "C" fn(*mut PyObject, *mut PyObje...
  type objobjproc (line 256) | pub type objobjproc = unsafe extern "C" fn(*mut PyObject, *mut PyObject)...
  type visitproc (line 257) | pub type visitproc = unsafe extern "C" fn(object: *mut PyObject, arg: *m...
  type traverseproc (line 258) | pub type traverseproc =
  type freefunc (line 261) | pub type freefunc = unsafe extern "C" fn(*mut c_void);
  type destructor (line 262) | pub type destructor = unsafe extern "C" fn(*mut PyObject);
  type getattrfunc (line 263) | pub type getattrfunc = unsafe extern "C" fn(*mut PyObject, *mut c_char) ...
  type getattrofunc (line 264) | pub type getattrofunc = unsafe extern "C" fn(*mut PyObject, *mut PyObjec...
  type setattrfunc (line 265) | pub type setattrfunc = unsafe extern "C" fn(*mut PyObject, *mut c_char, ...
  type setattrofunc (line 266) | pub type setattrofunc = unsafe extern "C" fn(*mut PyObject, *mut PyObjec...
  type reprfunc (line 267) | pub type reprfunc = unsafe extern "C" fn(*mut PyObject) -> *mut PyObject;
  type hashfunc (line 268) | pub type hashfunc = unsafe extern "C" fn(*mut PyObject) -> Py_hash_t;
  type richcmpfunc (line 269) | pub type richcmpfunc = unsafe extern "C" fn(*mut PyObject, *mut PyObject...
  type getiterfunc (line 270) | pub type getiterfunc = unsafe extern "C" fn(*mut PyObject) -> *mut PyObj...
  type iternextfunc (line 271) | pub type iternextfunc = unsafe extern "C" fn(*mut PyObject) -> *mut PyOb...
  type descrgetfunc (line 272) | pub type descrgetfunc =
  type descrsetfunc (line 274) | pub type descrsetfunc = unsafe extern "C" fn(*mut PyObject, *mut PyObjec...
  type initproc (line 275) | pub type initproc = unsafe extern "C" fn(*mut PyObject, *mut PyObject, *...
  type newfunc (line 276) | pub type newfunc =
  type allocfunc (line 278) | pub type allocfunc = unsafe extern "C" fn(*mut PyTypeObject, Py_ssize_t)...
  type vectorcallfunc (line 281) | pub type vectorcallfunc = unsafe extern "C" fn(
  type PyType_Slot (line 290) | pub struct PyType_Slot {
  method default (line 296) | fn default() -> PyType_Slot {
  type PyType_Spec (line 303) | pub struct PyType_Spec {
  method default (line 312) | fn default() -> PyType_Spec {
  function PyObject_TypeCheck (line 381) | pub unsafe fn PyObject_TypeCheck(ob: *mut PyObject, tp: *mut PyTypeObjec...
  constant Py_PRINT_RAW (line 512) | pub const Py_PRINT_RAW: c_int = 1;
  constant Py_TPFLAGS_MANAGED_WEAKREF (line 518) | pub const Py_TPFLAGS_MANAGED_WEAKREF: c_ulong = 1 << 3;
  constant Py_TPFLAGS_MANAGED_DICT (line 521) | pub const Py_TPFLAGS_MANAGED_DICT: c_ulong = 1 << 4;
  constant Py_TPFLAGS_SEQUENCE (line 524) | pub const Py_TPFLAGS_SEQUENCE: c_ulong = 1 << 5;
  constant Py_TPFLAGS_MAPPING (line 527) | pub const Py_TPFLAGS_MAPPING: c_ulong = 1 << 6;
  constant Py_TPFLAGS_DISALLOW_INSTANTIATION (line 530) | pub const Py_TPFLAGS_DISALLOW_INSTANTIATION: c_ulong = 1 << 7;
  constant Py_TPFLAGS_IMMUTABLETYPE (line 533) | pub const Py_TPFLAGS_IMMUTABLETYPE: c_ulong = 1 << 8;
  constant Py_TPFLAGS_HEAPTYPE (line 536) | pub const Py_TPFLAGS_HEAPTYPE: c_ulong = 1 << 9;
  constant Py_TPFLAGS_BASETYPE (line 539) | pub const Py_TPFLAGS_BASETYPE: c_ulong = 1 << 10;
  constant Py_TPFLAGS_HAVE_VECTORCALL (line 543) | pub const Py_TPFLAGS_HAVE_VECTORCALL: c_ulong = 1 << 11;
  constant Py_TPFLAGS_READY (line 547) | pub const Py_TPFLAGS_READY: c_ulong = 1 << 12;
  constant Py_TPFLAGS_READYING (line 550) | pub const Py_TPFLAGS_READYING: c_ulong = 1 << 13;
  constant Py_TPFLAGS_HAVE_GC (line 553) | pub const Py_TPFLAGS_HAVE_GC: c_ulong = 1 << 14;
  constant Py_TPFLAGS_HAVE_STACKLESS_EXTENSION (line 555) | const Py_TPFLAGS_HAVE_STACKLESS_EXTENSION: c_ulong = 0;
  constant Py_TPFLAGS_METHOD_DESCRIPTOR (line 558) | pub const Py_TPFLAGS_METHOD_DESCRIPTOR: c_ulong = 1 << 17;
  constant Py_TPFLAGS_VALID_VERSION_TAG (line 560) | pub const Py_TPFLAGS_VALID_VERSION_TAG: c_ulong = 1 << 19;
  constant Py_TPFLAGS_IS_ABSTRACT (line 563) | pub const Py_TPFLAGS_IS_ABSTRACT: c_ulong = 1 << 20;
  constant Py_TPFLAGS_ITEMS_AT_END (line 567) | pub const Py_TPFLAGS_ITEMS_AT_END: c_ulong = 1 << 23;
  constant Py_TPFLAGS_LONG_SUBCLASS (line 570) | pub const Py_TPFLAGS_LONG_SUBCLASS: c_ulong = 1 << 24;
  constant Py_TPFLAGS_LIST_SUBCLASS (line 571) | pub const Py_TPFLAGS_LIST_SUBCLASS: c_ulong = 1 << 25;
  constant Py_TPFLAGS_TUPLE_SUBCLASS (line 572) | pub const Py_TPFLAGS_TUPLE_SUBCLASS: c_ulong = 1 << 26;
  constant Py_TPFLAGS_BYTES_SUBCLASS (line 573) | pub const Py_TPFLAGS_BYTES_SUBCLASS: c_ulong = 1 << 27;
  constant Py_TPFLAGS_UNICODE_SUBCLASS (line 574) | pub const Py_TPFLAGS_UNICODE_SUBCLASS: c_ulong = 1 << 28;
  constant Py_TPFLAGS_DICT_SUBCLASS (line 575) | pub const Py_TPFLAGS_DICT_SUBCLASS: c_ulong = 1 << 29;
  constant Py_TPFLAGS_BASE_EXC_SUBCLASS (line 576) | pub const Py_TPFLAGS_BASE_EXC_SUBCLASS: c_ulong = 1 << 30;
  constant Py_TPFLAGS_TYPE_SUBCLASS (line 577) | pub const Py_TPFLAGS_TYPE_SUBCLASS: c_ulong = 1 << 31;
  constant Py_TPFLAGS_DEFAULT (line 579) | pub const Py_TPFLAGS_DEFAULT: c_ulong = if cfg!(Py_3_10) {
  constant Py_TPFLAGS_HAVE_FINALIZE (line 585) | pub const Py_TPFLAGS_HAVE_FINALIZE: c_ulong = 1;
  constant Py_TPFLAGS_HAVE_VERSION_TAG (line 586) | pub const Py_TPFLAGS_HAVE_VERSION_TAG: c_ulong = 1 << 18;
  constant Py_CONSTANT_NONE (line 589) | pub const Py_CONSTANT_NONE: c_uint = 0;
  constant Py_CONSTANT_FALSE (line 591) | pub const Py_CONSTANT_FALSE: c_uint = 1;
  constant Py_CONSTANT_TRUE (line 593) | pub const Py_CONSTANT_TRUE: c_uint = 2;
  constant Py_CONSTANT_ELLIPSIS (line 595) | pub const Py_CONSTANT_ELLIPSIS: c_uint = 3;
  constant Py_CONSTANT_NOT_IMPLEMENTED (line 597) | pub const Py_CONSTANT_NOT_IMPLEMENTED: c_uint = 4;
  constant Py_CONSTANT_ZERO (line 599) | pub const Py_CONSTANT_ZERO: c_uint = 5;
  constant Py_CONSTANT_ONE (line 601) | pub const Py_CONSTANT_ONE: c_uint = 6;
  constant Py_CONSTANT_EMPTY_STR (line 603) | pub const Py_CONSTANT_EMPTY_STR: c_uint = 7;
  constant Py_CONSTANT_EMPTY_BYTES (line 605) | pub const Py_CONSTANT_EMPTY_BYTES: c_uint = 8;
  constant Py_CONSTANT_EMPTY_TUPLE (line 607) | pub const Py_CONSTANT_EMPTY_TUPLE: c_uint = 9;
  function Py_None (line 628) | pub unsafe fn Py_None() -> *mut PyObject {
  function Py_IsNone (line 640) | pub unsafe fn Py_IsNone(x: *mut PyObject) -> c_int {
  function Py_NotImplemented (line 656) | pub unsafe fn Py_NotImplemented() -> *mut PyObject {
  constant Py_LT (line 670) | pub const Py_LT: c_int = 0;
  constant Py_LE (line 671) | pub const Py_LE: c_int = 1;
  constant Py_EQ (line 672) | pub const Py_EQ: c_int = 2;
  constant Py_NE (line 673) | pub const Py_NE: c_int = 3;
  constant Py_GT (line 674) | pub const Py_GT: c_int = 4;
  constant Py_GE (line 675) | pub const Py_GE: c_int = 5;
  type PySendResult (line 680) | pub enum PySendResult {
  function PyType_HasFeature (line 689) | pub unsafe fn PyType_HasFeature(ty: *mut PyTypeObject, feature: c_ulong)...
  function PyType_FastSubclass (line 703) | pub unsafe fn PyType_FastSubclass(t: *mut PyTypeObject, f: c_ulong) -> c...
  function PyType_Check (line 708) | pub unsafe fn PyType_Check(op: *mut PyObject) -> c_int {
  function PyType_CheckExact (line 715) | pub unsafe fn PyType_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/objimpl.rs
  function PyObject_New (line 42) | pub unsafe fn PyObject_New<T>(typeobj: *mut PyTypeObject) -> *mut T {
  function PyObject_NewVar (line 49) | pub unsafe fn PyObject_NewVar<T>(typeobj: *mut PyTypeObject, n: Py_ssize...
  function PyType_IS_GC (line 73) | pub unsafe fn PyType_IS_GC(t: *mut PyTypeObject) -> c_int {
  function PyObject_GC_Resize (line 82) | pub unsafe fn PyObject_GC_Resize<T>(op: *mut PyObject, n: Py_ssize_t) ->...
  function PyObject_GC_New (line 103) | pub unsafe fn PyObject_GC_New<T>(typeobj: *mut PyTypeObject) -> *mut T {
  function PyObject_GC_NewVar (line 108) | pub unsafe fn PyObject_GC_NewVar<T>(typeobj: *mut PyTypeObject, n: Py_ss...

FILE: pyo3-ffi/src/pybuffer.rs
  type Py_buffer (line 8) | pub struct Py_buffer {
    method new (line 31) | pub const fn new() -> Self {
  type getbufferproc (line 54) | pub type getbufferproc = unsafe extern "C" fn(*mut PyObject, *mut crate:...
  type releasebufferproc (line 55) | pub type releasebufferproc = unsafe extern "C" fn(*mut PyObject, *mut cr...
  constant PyBUF_MAX_NDIM (line 106) | pub const PyBUF_MAX_NDIM: usize = 64;
  constant PyBUF_SIMPLE (line 109) | pub const PyBUF_SIMPLE: c_int = 0;
  constant PyBUF_WRITABLE (line 110) | pub const PyBUF_WRITABLE: c_int = 0x0001;
  constant PyBUF_WRITEABLE (line 112) | pub const PyBUF_WRITEABLE: c_int = PyBUF_WRITABLE;
  constant PyBUF_FORMAT (line 113) | pub const PyBUF_FORMAT: c_int = 0x0004;
  constant PyBUF_ND (line 114) | pub const PyBUF_ND: c_int = 0x0008;
  constant PyBUF_STRIDES (line 115) | pub const PyBUF_STRIDES: c_int = 0x0010 | PyBUF_ND;
  constant PyBUF_C_CONTIGUOUS (line 116) | pub const PyBUF_C_CONTIGUOUS: c_int = 0x0020 | PyBUF_STRIDES;
  constant PyBUF_F_CONTIGUOUS (line 117) | pub const PyBUF_F_CONTIGUOUS: c_int = 0x0040 | PyBUF_STRIDES;
  constant PyBUF_ANY_CONTIGUOUS (line 118) | pub const PyBUF_ANY_CONTIGUOUS: c_int = 0x0080 | PyBUF_STRIDES;
  constant PyBUF_INDIRECT (line 119) | pub const PyBUF_INDIRECT: c_int = 0x0100 | PyBUF_STRIDES;
  constant PyBUF_CONTIG (line 121) | pub const PyBUF_CONTIG: c_int = PyBUF_ND | PyBUF_WRITABLE;
  constant PyBUF_CONTIG_RO (line 122) | pub const PyBUF_CONTIG_RO: c_int = PyBUF_ND;
  constant PyBUF_STRIDED (line 124) | pub const PyBUF_STRIDED: c_int = PyBUF_STRIDES | PyBUF_WRITABLE;
  constant PyBUF_STRIDED_RO (line 125) | pub const PyBUF_STRIDED_RO: c_int = PyBUF_STRIDES;
  constant PyBUF_RECORDS (line 127) | pub const PyBUF_RECORDS: c_int = PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_...
  constant PyBUF_RECORDS_RO (line 128) | pub const PyBUF_RECORDS_RO: c_int = PyBUF_STRIDES | PyBUF_FORMAT;
  constant PyBUF_FULL (line 130) | pub const PyBUF_FULL: c_int = PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FO...
  constant PyBUF_FULL_RO (line 131) | pub const PyBUF_FULL_RO: c_int = PyBUF_INDIRECT | PyBUF_FORMAT;
  constant PyBUF_READ (line 133) | pub const PyBUF_READ: c_int = 0x100;
  constant PyBUF_WRITE (line 134) | pub const PyBUF_WRITE: c_int = 0x200;

FILE: pyo3-ffi/src/pycapsule.rs
  type PyCapsule_Destructor (line 9) | pub type PyCapsule_Destructor = unsafe extern "C" fn(o: *mut PyObject);
  function PyCapsule_CheckExact (line 12) | pub unsafe fn PyCapsule_CheckExact(ob: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/pyerrors.rs
  function PyExceptionClass_Check (line 81) | pub unsafe fn PyExceptionClass_Check(x: *mut PyObject) -> c_int {
  function PyExceptionInstance_Check (line 88) | pub unsafe fn PyExceptionInstance_Check(x: *mut PyObject) -> c_int {
  function PyExceptionInstance_Class (line 94) | pub unsafe fn PyExceptionInstance_Class(x: *mut PyObject) -> *mut PyObje...
  function PyUnicodeDecodeError_Create (line 100) | pub unsafe fn PyUnicodeDecodeError_Create(

FILE: pyo3-ffi/src/pyhash.rs
  constant _PyHASH_MULTIPLIER (line 17) | pub const _PyHASH_MULTIPLIER: c_ulong = 1000003;
  constant Py_HASH_EXTERNAL (line 25) | pub const Py_HASH_EXTERNAL: c_int = 0;
  constant Py_HASH_SIPHASH24 (line 26) | pub const Py_HASH_SIPHASH24: c_int = 1;
  constant Py_HASH_FNV (line 27) | pub const Py_HASH_FNV: c_int = 2;
  constant Py_HASH_SIPHASH13 (line 29) | pub const Py_HASH_SIPHASH13: c_int = 3;

FILE: pyo3-ffi/src/pylifecycle.rs
  type PyOS_sighandler_t (line 87) | type PyOS_sighandler_t = unsafe extern "C" fn(arg1: c_int);

FILE: pyo3-ffi/src/pyport.rs
  constant INT_MAX (line 4) | pub const INT_MAX: std::ffi::c_int = 2147483647;
  type PY_UINT32_T (line 6) | pub type PY_UINT32_T = u32;
  type PY_UINT64_T (line 7) | pub type PY_UINT64_T = u64;
  type PY_INT32_T (line 9) | pub type PY_INT32_T = i32;
  type PY_INT64_T (line 10) | pub type PY_INT64_T = i64;
  type Py_uintptr_t (line 12) | pub type Py_uintptr_t = ::libc::uintptr_t;
  type Py_intptr_t (line 13) | pub type Py_intptr_t = ::libc::intptr_t;
  type Py_ssize_t (line 14) | pub type Py_ssize_t = ::libc::ssize_t;
  type Py_hash_t (line 16) | pub type Py_hash_t = Py_ssize_t;
  type Py_uhash_t (line 17) | pub type Py_uhash_t = ::libc::size_t;
  constant PY_SSIZE_T_MIN (line 19) | pub const PY_SSIZE_T_MIN: Py_ssize_t = Py_ssize_t::MIN;
  constant PY_SSIZE_T_MAX (line 20) | pub const PY_SSIZE_T_MAX: Py_ssize_t = Py_ssize_t::MAX;
  constant PY_BIG_ENDIAN (line 23) | pub const PY_BIG_ENDIAN: usize = 1;
  constant PY_LITTLE_ENDIAN (line 25) | pub const PY_LITTLE_ENDIAN: usize = 0;
  constant PY_BIG_ENDIAN (line 28) | pub const PY_BIG_ENDIAN: usize = 0;
  constant PY_LITTLE_ENDIAN (line 30) | pub const PY_LITTLE_ENDIAN: usize = 1;

FILE: pyo3-ffi/src/pystate.rs
  constant MAX_CO_EXTRA_USERS (line 13) | pub const MAX_CO_EXTRA_USERS: c_int = 255;
  function PyThreadState_GET (line 52) | pub unsafe fn PyThreadState_GET() -> *mut PyThreadState {
  type PyGILState_STATE (line 77) | pub enum PyGILState_STATE {
  type HangThread (line 83) | struct HangThread;
  method drop (line 87) | fn drop(&mut self) {
  function PyGILState_Ensure (line 117) | pub unsafe extern "C" fn PyGILState_Ensure() -> PyGILState_STATE {

FILE: pyo3-ffi/src/pystrtod.rs
  constant Py_DTSF_SIGN (line 25) | pub const Py_DTSF_SIGN: c_int = 0x01;
  constant Py_DTSF_ADD_DOT_0 (line 26) | pub const Py_DTSF_ADD_DOT_0: c_int = 0x02;
  constant Py_DTSF_ALT (line 27) | pub const Py_DTSF_ALT: c_int = 0x04;
  constant Py_DTST_FINITE (line 30) | pub const Py_DTST_FINITE: c_int = 0;
  constant Py_DTST_INFINITE (line 31) | pub const Py_DTST_INFINITE: c_int = 1;
  constant Py_DTST_NAN (line 32) | pub const Py_DTST_NAN: c_int = 2;

FILE: pyo3-ffi/src/pythonrun.rs
  function Py_CompileString (line 25) | pub unsafe fn Py_CompileString(string: *const c_char, p: *const c_char, ...
  constant PYOS_STACK_MARGIN (line 47) | pub const PYOS_STACK_MARGIN: c_int = 2048;
  function PyParser_SimpleParseString (line 62) | pub unsafe fn PyParser_SimpleParseString(s: *const c_char, b: c_int) -> ...
  function PyParser_SimpleParseFile (line 70) | pub unsafe fn PyParser_SimpleParseFile(fp: *mut FILE, s: *const c_char, ...

FILE: pyo3-ffi/src/rangeobject.rs
  function PyRange_Check (line 12) | pub unsafe fn PyRange_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/refcount.rs
  constant _Py_STATICALLY_ALLOCATED_FLAG (line 18) | const _Py_STATICALLY_ALLOCATED_FLAG: c_int = 1 << 7;
  constant _Py_STATICALLY_ALLOCATED_FLAG (line 20) | pub(crate) const _Py_STATICALLY_ALLOCATED_FLAG: c_int = 1 << 2;
  constant _Py_IMMORTAL_REFCNT (line 23) | const _Py_IMMORTAL_REFCNT: Py_ssize_t = {
  constant _Py_IMMORTAL_INITIAL_REFCNT (line 35) | const _Py_IMMORTAL_INITIAL_REFCNT: Py_ssize_t = {
  constant _Py_STATIC_IMMORTAL_INITIAL_REFCNT (line 44) | const _Py_STATIC_IMMORTAL_INITIAL_REFCNT: Py_ssize_t = {
  constant _Py_IMMORTAL_MINIMUM_REFCNT (line 54) | const _Py_IMMORTAL_MINIMUM_REFCNT: Py_ssize_t = ((1 as c_long) << (30 as...
  constant _Py_STATIC_IMMORTAL_MINIMUM_REFCNT (line 57) | const _Py_STATIC_IMMORTAL_MINIMUM_REFCNT: Py_ssize_t =
  constant _Py_IMMORTAL_INITIAL_REFCNT (line 61) | const _Py_IMMORTAL_INITIAL_REFCNT: Py_ssize_t = c_uint::MAX as Py_ssize_t;
  constant _Py_IMMORTAL_REFCNT_LOCAL (line 64) | pub(crate) const _Py_IMMORTAL_REFCNT_LOCAL: u32 = u32::MAX;
  constant _Py_REF_SHARED_SHIFT (line 67) | const _Py_REF_SHARED_SHIFT: isize = 2;
  function Py_REFCNT (line 84) | pub unsafe fn Py_REFCNT(ob: *mut PyObject) -> Py_ssize_t {
  function _Py_IsImmortal (line 121) | unsafe fn _Py_IsImmortal(op: *mut PyObject) -> c_int {
  function Py_INCREF (line 178) | pub unsafe fn Py_INCREF(op: *mut PyObject) {
  function Py_DECREF (line 254) | pub unsafe fn Py_DECREF(op: *mut PyObject) {
  function Py_CLEAR (line 323) | pub unsafe fn Py_CLEAR(op: *mut *mut PyObject) {
  function Py_XINCREF (line 332) | pub unsafe fn Py_XINCREF(op: *mut PyObject) {
  function Py_XDECREF (line 339) | pub unsafe fn Py_XDECREF(op: *mut PyObject) {
  function Py_NewRef (line 360) | pub unsafe fn Py_NewRef(obj: *mut PyObject) -> *mut PyObject {
  function Py_XNewRef (line 368) | pub unsafe fn Py_XNewRef(obj: *mut PyObject) -> *mut PyObject {

FILE: pyo3-ffi/src/setobject.rs
  constant PySet_MINSIZE (line 7) | pub const PySet_MINSIZE: usize = 8;
  type setentry (line 12) | pub struct setentry {
  type PySetObject (line 20) | pub struct PySetObject {
  function PySet_GET_SIZE (line 35) | pub unsafe fn PySet_GET_SIZE(so: *mut PyObject) -> Py_ssize_t {
  function PyFrozenSet_CheckExact (line 90) | pub unsafe fn PyFrozenSet_CheckExact(ob: *mut PyObject) -> c_int {
  function PyFrozenSet_Check (line 102) | pub unsafe fn PyFrozenSet_Check(ob: *mut PyObject) -> c_int {
  function PyAnySet_CheckExact (line 115) | pub unsafe fn PyAnySet_CheckExact(ob: *mut PyObject) -> c_int {
  function PyAnySet_Check (line 120) | pub unsafe fn PyAnySet_Check(ob: *mut PyObject) -> c_int {
  function PySet_CheckExact (line 128) | pub unsafe fn PySet_CheckExact(op: *mut PyObject) -> c_int {
  function PySet_Check (line 140) | pub unsafe fn PySet_Check(ob: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/sliceobject.rs
  function Py_Ellipsis (line 15) | pub unsafe fn Py_Ellipsis() -> *mut PyObject {
  type PySliceObject (line 24) | pub struct PySliceObject {
  function PySlice_Check (line 41) | pub unsafe fn PySlice_Check(op: *mut PyObject) -> c_int {
  function PySlice_GetIndicesEx (line 67) | pub unsafe fn PySlice_GetIndicesEx(

FILE: pyo3-ffi/src/structmember.rs
  constant READ_RESTRICTED (line 31) | pub const READ_RESTRICTED: c_int = 2;
  constant PY_WRITE_RESTRICTED (line 32) | pub const PY_WRITE_RESTRICTED: c_int = 4;
  constant RESTRICTED (line 33) | pub const RESTRICTED: c_int = READ_RESTRICTED | PY_WRITE_RESTRICTED;

FILE: pyo3-ffi/src/structseq.rs
  type PyStructSequence_Field (line 8) | pub struct PyStructSequence_Field {
  type PyStructSequence_Desc (line 15) | pub struct PyStructSequence_Desc {
  type PyStructSequence (line 43) | pub type PyStructSequence = crate::PyTupleObject;
  function PyStructSequence_SET_ITEM (line 47) | pub unsafe fn PyStructSequence_SET_ITEM(op: *mut PyObject, i: Py_ssize_t...
  function PyStructSequence_GET_ITEM (line 53) | pub unsafe fn PyStructSequence_GET_ITEM(op: *mut PyObject, i: Py_ssize_t...

FILE: pyo3-ffi/src/traceback.rs
  function PyTraceBack_Check (line 22) | pub unsafe fn PyTraceBack_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/tupleobject.rs
  function PyTuple_Check (line 12) | pub unsafe fn PyTuple_Check(op: *mut PyObject) -> c_int {
  function PyTuple_CheckExact (line 17) | pub unsafe fn PyTuple_CheckExact(op: *mut PyObject) -> c_int {

FILE: pyo3-ffi/src/typeslots.rs
  constant Py_bf_getbuffer (line 3) | pub const Py_bf_getbuffer: c_int = 1;
  constant Py_bf_releasebuffer (line 4) | pub const Py_bf_releasebuffer: c_int = 2;
  constant Py_mp_ass_subscript (line 5) | pub const Py_mp_ass_subscript: c_int = 3;
  constant Py_mp_length (line 6) | pub const Py_mp_length: c_int = 4;
  constant Py_mp_subscript (line 7) | pub const Py_mp_subscript: c_int = 5;
  constant Py_nb_absolute (line 8) | pub const Py_nb_absolute: c_int = 6;
  constant Py_nb_add (line 9) | pub const Py_nb_add: c_int = 7;
  constant Py_nb_and (line 10) | pub const Py_nb_and: c_int = 8;
  constant Py_nb_bool (line 11) | pub const Py_nb_bool: c_int = 9;
  constant Py_nb_divmod (line 12) | pub const Py_nb_divmod: c_int = 10;
  constant Py_nb_float (line 13) | pub const Py_nb_float: c_int = 11;
  constant Py_nb_floor_divide (line 14) | pub const Py_nb_floor_divide: c_int = 12;
  constant Py_nb_index (line 15) | pub const Py_nb_index: c_int = 13;
  constant Py_nb_inplace_add (line 16) | pub const Py_nb_inplace_add: c_int = 14;
  constant Py_nb_inplace_and (line 17) | pub const Py_nb_inplace_and: c_int = 15;
  constant Py_nb_inplace_floor_divide (line 18) | pub const Py_nb_inplace_floor_divide: c_int = 16;
  constant Py_nb_inplace_lshift (line 19) | pub const Py_nb_inplace_lshift: c_int = 17;
  constant Py_nb_inplace_multiply (line 20) | pub const Py_nb_inplace_multiply: c_int = 18;
  constant Py_nb_inplace_or (line 21) | pub const Py_nb_inplace_or: c_int = 19;
  constant Py_nb_inplace_power (line 22) | pub const Py_nb_inplace_power: c_int = 20;
  constant Py_nb_inplace_remainder (line 23) | pub const Py_nb_inplace_remainder: c_int = 21;
  constant Py_nb_inplace_rshift (line 24) | pub const Py_nb_inplace_rshift: c_int = 22;
  constant Py_nb_inplace_subtract (line 25) | pub const Py_nb_inplace_subtract: c_int = 23;
  constant Py_nb_inplace_true_divide (line 26) | pub const Py_nb_inplace_true_divide: c_int = 24;
  constant Py_nb_inplace_xor (line 27) | pub const Py_nb_inplace_xor: c_int = 25;
  constant Py_nb_int (line 28) | pub const Py_nb_int: c_int = 26;
  constant Py_nb_invert (line 29) | pub const Py_nb_invert: c_int = 27;
  constant Py_nb_lshift (line 30) | pub const Py_nb_lshift: c_int = 28;
  constant Py_nb_multiply (line 31) | pub const Py_nb_multiply: c_int = 29;
  constant Py_nb_negative (line 32) | pub const Py_nb_negative: c_int = 30;
  constant Py_nb_or (line 33) | pub const Py_nb_or: c_int = 31;
  constant Py_nb_positive (line 34) | pub const Py_nb_positive: c_int = 32;
  constant Py_nb_power (line 35) | pub const Py_nb_power: c_int = 33;
  constant Py_nb_remainder (line 36) | pub const Py_nb_remainder: c_int = 34;
  constant Py_nb_rshift (line 37) | pub const Py_nb_rshift: c_int = 35;
  constant Py_nb_subtract (line 38) | pub const Py_nb_subtract: c_int = 36;
  constant Py_nb_true_divide (line 39) | pub const Py_nb_true_divide: c_int = 37;
  constant Py_nb_xor (line 40) | pub const Py_nb_xor: c_int = 38;
  constant Py_sq_ass_item (line 41) | pub const Py_sq_ass_item: c_int = 39;
  constant Py_sq_concat (line 42) | pub const Py_sq_concat: c_int = 40;
  constant Py_sq_contains (line 43) | pub const Py_sq_contains: c_int = 41;
  constant Py_sq_inplace_concat (line 44) | pub const Py_sq_inplace_concat: c_int = 42;
  constant Py_sq_inplace_repeat (line 45) | pub const Py_sq_inplace_repeat: c_int = 43;
  constant Py_sq_item (line 46) | pub const Py_sq_item: c_int = 44;
  constant Py_sq_length (line 47) | pub const Py_sq_length: c_int = 45;
  constant Py_sq_repeat (line 48) | pub const Py_sq_repeat: c_int = 46;
  constant Py_tp_alloc (line 49) | pub const Py_tp_alloc: c_int = 47;
  constant Py_tp_base (line 50) | pub const Py_tp_base: c_int = 48;
  constant Py_tp_bases (line 51) | pub const Py_tp_bases: c_int = 49;
  constant Py_tp_call (line 52) | pub const Py_tp_call: c_int = 50;
  constant Py_tp_clear (line 53) | pub const Py_tp_clear: c_int = 51;
  constant Py_tp_dealloc (line 54) | pub const Py_tp_dealloc: c_int = 52;
  constant Py_tp_del (line 55) | pub const Py_tp_del: c_int = 53;
  constant Py_tp_descr_get (line 56) | pub const Py_tp_descr_get: c_int = 54;
  constant Py_tp_descr_set (line 57) | pub const Py_tp_descr_set: c_int = 55;
  constant Py_tp_doc (line 58) | pub const Py_tp_doc: c_int = 56;
  constant Py_tp_getattr (line 59) | pub const Py_tp_getattr: c_int = 57;
  constant Py_tp_getattro (line 60) | pub const Py_tp_getattro: c_int = 58;
  constant Py_tp_hash (line 61) | pub const Py_tp_hash: c_int = 59;
  constant Py_tp_init (line 62) | pub const Py_tp_init: c_int = 60;
  constant Py_tp_is_gc (line 63) | pub const Py_tp_is_gc: c_int = 61;
  constant Py_tp_iter (line 64) | pub const Py_tp_iter: c_int = 62;
  constant Py_tp_iternext (line 65) | pub const Py_tp_iternext: c_int = 63;
  constant Py_tp_methods (line 66) | pub const Py_tp_methods: c_int = 64;
  constant Py_tp_new (line 67) | pub const Py_tp_new: c_int = 65;
  constant Py_tp_repr (line 68) | pub const Py_tp_repr: c_int = 66;
  constant Py_tp_richcompare (line 69) | pub const Py_tp_richcompare: c_int = 67;
  constant Py_tp_setattr (line 70) | pub const Py_tp_setattr: c_int = 68;
  constant Py_tp_setattro (line 71) | pub const Py_tp_setattro: c_int = 69;
  constant Py_tp_str (line 72) | pub const Py_tp_str: c_int = 70;
  constant Py_tp_traverse (line 73) | pub const Py_tp_traverse: c_int = 71;
  constant Py_tp_members (line 74) | pub const Py_tp_members: c_int = 72;
  constant Py_tp_getset (line 75) | pub const Py_tp_getset: c_int = 73;
  constant Py_tp_free (line 76) | pub const Py_tp_free: c_int = 74;
  constant Py_nb_matrix_multiply (line 77) | pub const Py_nb_matrix_multiply: c_int = 75;
  constant Py_nb_inplace_matrix_multiply (line 78) | pub const Py_nb_inplace_matrix_multiply: c_int = 76;
  constant Py_am_await (line 79) | pub const Py_am_await: c_int = 77;
  constant Py_am_aiter (line 80) | pub const Py_am_aiter: c_int = 78;
  constant Py_am_anext (line 81) | pub const Py_am_anext: c_int = 79;
  constant Py_tp_finalize (line 82) | pub const Py_tp_finalize: c_int = 80;

FILE: pyo3-ffi/src/unicodeobject.rs
  type Py_UNICODE (line 11) | pub type Py_UNICODE = wchar_t;
  type Py_UCS4 (line 13) | pub type Py_UCS4 = u32;
  type Py_UCS2 (line 14) | pub type Py_UCS2 = u16;
  type Py_UCS1 (line 15) | pub type Py_UCS1 = u8;
  function PyUnicode_Check (line 33) | pub unsafe fn PyUnicode_Check(op: *mut PyObject) -> c_int {
  function PyUnicode_CheckExact (line 39) | pub unsafe fn PyUnicode_CheckExact(op: *mut PyObject) -> c_int {
  constant Py_UNICODE_REPLACEMENT_CHARACTER (line 43) | pub const Py_UNICODE_REPLACEMENT_CHARACTER: Py_UCS4 = 0xFFFD;

FILE: pyo3-ffi/src/weakrefobject.rs
  function PyWeakref_CheckRef (line 32) | pub unsafe fn PyWeakref_CheckRef(op: *mut PyObject) -> c_int {
  function PyWeakref_CheckRefExact (line 38) | pub unsafe fn PyWeakref_CheckRefExact(op: *mut PyObject) -> c_int {
  function PyWeakref_CheckProxy (line 44) | pub unsafe fn PyWeakref_CheckProxy(op: *mut PyObject) -> c_int {
  function PyWeakref_Check (line 50) | pub unsafe fn PyWeakref_Check(op: *mut PyObject) -> c_int {

FILE: pyo3-introspection/src/introspection.rs
  function introspect_cdylib (line 23) | pub fn introspect_cdylib(library_path: impl AsRef<Path>, main_module_nam...
  function parse_chunks (line 29) | fn parse_chunks(chunks: &[Chunk], main_module_name: &str) -> Result<Modu...
  function convert_module (line 80) | fn convert_module(
  type Members (line 121) | type Members = (Vec<Module>, Vec<Class>, Vec<Function>, Vec<Attribute>);
  function convert_members (line 124) | fn convert_members<'a>(
  function convert_class (line 234) | fn convert_class(
  function convert_function (line 271) | fn convert_function(
  function convert_argument (line 319) | fn convert_argument(
  function convert_variable_length_argument (line 336) | fn convert_variable_length_argument(
  function convert_attribute (line 349) | fn convert_attribute(
  function convert_expr (line 368) | fn convert_expr(expr: &ChunkExpr, type_hint_for_annotation_id: &HashMap<...
  function introspection_id_to_type_hint_for_root_module (line 425) | fn introspection_id_to_type_hint_for_root_module(
  function find_introspection_chunks_in_binary_object (line 533) | fn find_introspection_chunks_in_binary_object(path: &Path) -> Result<Vec...
  function find_introspection_chunks_in_elf (line 564) | fn find_introspection_chunks_in_elf(elf: &Elf<'_>, library_content: &[u8...
  function find_introspection_chunks_in_macho (line 580) | fn find_introspection_chunks_in_macho(
  function find_introspection_chunks_in_pe (line 619) | fn find_introspection_chunks_in_pe(pe: &PE<'_>, library_content: &[u8]) ...
  function deserialize_chunk (line 632) | fn deserialize_chunk(
  function is_introspection_symbol (line 659) | fn is_introspection_symbol(name: &str) -> bool {
  type Chunk (line 667) | enum Chunk {
  type ChunkArguments (line 720) | struct ChunkArguments {
  type ChunkArgument (line 734) | struct ChunkArgument {
  type ChunkExpr (line 744) | enum ChunkExpr {
  type ChunkConstant (line 772) | pub enum ChunkConstant {
  type ChunkOperator (line 783) | pub enum ChunkOperator {

FILE: pyo3-introspection/src/model.rs
  type Module (line 2) | pub struct Module {
  type Class (line 13) | pub struct Class {
  type Function (line 25) | pub struct Function {
  type Attribute (line 37) | pub struct Attribute {
  type Arguments (line 47) | pub struct Arguments {
  type Argument (line 61) | pub struct Argument {
  type VariableLengthArgument (line 71) | pub struct VariableLengthArgument {
  type Expr (line 81) | pub enum Expr {
  type Constant (line 106) | pub enum Constant {
  type Operator (line 123) | pub enum Operator {

FILE: pyo3-introspection/src/stubs.rs
  function module_stub_files (line 15) | pub fn module_stub_files(module: &Module) -> HashMap<PathBuf, String> {
  function add_module_stub_files (line 21) | fn add_module_stub_files(
  function module_stubs (line 49) | fn module_stubs(module: &Module, parents: &[&str]) -> String {
  function class_stubs (line 123) | fn class_stubs(class: &Class, imports: &Imports) -> String {
  function function_stubs (line 177) | fn function_stubs(function: &Function, imports: &Imports, class_name: Op...
  function attribute_stubs (line 246) | fn attribute_stubs(attribute: &Attribute, imports: &Imports) -> String {
  function argument_stub (line 267) | fn argument_stub(argument: &Argument, imports: &Imports) -> String {
  function variable_length_argument_stub (line 284) | fn variable_length_argument_stub(argument: &VariableLengthArgument, impo...
  type Imports (line 295) | struct Imports {
    method create (line 310) | fn create(module: &Module, module_parents: &[&str]) -> Self {
    method serialize_expr (line 405) | fn serialize_expr(&self, expr: &Expr, buffer: &mut String) {
    method serialize_elts (line 492) | fn serialize_elts(&self, elts: &[Expr], buffer: &mut String) {
  type ElementsUsedInAnnotations (line 503) | struct ElementsUsedInAnnotations {
    method new (line 509) | fn new() -> Self {
    method walk_module (line 515) | fn walk_module(&mut self, module: &Module) {
    method walk_class (line 537) | fn walk_class(&mut self, class: &Class) {
    method walk_attribute (line 555) | fn walk_attribute(&mut self, attribute: &Attribute) {
    method walk_function (line 561) | fn walk_function(&mut self, function: &Function) {
    method walk_expr (line 592) | fn walk_expr(&mut self, expr: &Expr) {
  function function_stubs_with_variable_length (line 634) | fn function_stubs_with_variable_length() {
  function function_stubs_without_variable_length (line 680) | fn function_stubs_without_variable_length() {
  function test_function_async (line 722) | fn test_function_async() {
  function test_import (line 744) | fn test_import() {

FILE: pyo3-introspection/tests/test.rs
  function pytests_stubs (line 11) | fn pytests_stubs() -> Result<()> {
  function add_dir_files (line 63) | fn add_dir_files(
  function format_with_ruff (line 86) | fn format_with_ruff(code: &str) -> Result<String> {

FILE: pyo3-macros-backend/src/attributes.rs
  function take_int (line 61) | fn take_int(read: &mut &str, tracker: &mut usize) -> String {
  function take_ident (line 78) | fn take_ident(read: &mut &str, tracker: &mut usize) -> Ident {
  function parse_shorthand_format (line 101) | fn parse_shorthand_format(fmt: LitStr) -> Result<(LitStr, Vec<Member>)> {
  type StringFormatter (line 161) | pub struct StringFormatter {
  method parse (line 167) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 174) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type KeywordAttribute (line 181) | pub struct KeywordAttribute<K, V> {
  type OptionalKeywordAttribute (line 187) | pub struct OptionalKeywordAttribute<K, V> {
  type LitStrValue (line 195) | pub struct LitStrValue<T>(pub T);
  method parse (line 198) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 205) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type NameLitStr (line 212) | pub struct NameLitStr(pub Ident);
  method parse (line 215) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 226) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type RenamingRule (line 233) | pub enum RenamingRule {
  type RenamingRuleLitStr (line 246) | pub struct RenamingRuleLitStr {
  method parse (line 252) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 275) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type TextSignatureAttributeValue (line 282) | pub enum TextSignatureAttributeValue {
  method parse (line 289) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 307) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type NewImplTypeAttributeValue (line 316) | pub enum NewImplTypeAttributeValue {
  method parse (line 322) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 333) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type ExtendsAttribute (line 342) | pub type ExtendsAttribute = KeywordAttribute<kw::extends, Path>;
  type FreelistAttribute (line 343) | pub type FreelistAttribute = KeywordAttribute<kw::freelist, Box<Expr>>;
  type ModuleAttribute (line 344) | pub type ModuleAttribute = KeywordAttribute<kw::module, LitStr>;
  type NameAttribute (line 345) | pub type NameAttribute = KeywordAttribute<kw::name, NameLitStr>;
  type RenameAllAttribute (line 346) | pub type RenameAllAttribute = KeywordAttribute<kw::rename_all, RenamingR...
  type StrFormatterAttribute (line 347) | pub type StrFormatterAttribute = OptionalKeywordAttribute<kw::str, Strin...
  type TextSignatureAttribute (line 348) | pub type TextSignatureAttribute = KeywordAttribute<kw::text_signature, T...
  type NewImplTypeAttribute (line 349) | pub type NewImplTypeAttribute = KeywordAttribute<kw::new, NewImplTypeAtt...
  type SubmoduleAttribute (line 350) | pub type SubmoduleAttribute = kw::submodule;
  type GILUsedAttribute (line 351) | pub type GILUsedAttribute = KeywordAttribute<kw::gil_used, LitBool>;
  method parse (line 354) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 363) | fn to_tokens(&self, tokens: &mut TokenStream) {
  method parse (line 371) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 382) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type FromPyWithAttribute (line 391) | pub type FromPyWithAttribute = KeywordAttribute<kw::from_py_with, ExprPa...
  type IntoPyWithAttribute (line 392) | pub type IntoPyWithAttribute = KeywordAttribute<kw::into_py_with, ExprPa...
  type DefaultAttribute (line 394) | pub type DefaultAttribute = OptionalKeywordAttribute<Token![default], Ex...
  type CrateAttribute (line 397) | pub type CrateAttribute = KeywordAttribute<Token![crate], LitStrValue<Pa...
  function get_pyo3_options (line 399) | pub fn get_pyo3_options<T: Parse>(attr: &syn::Attribute) -> Result<Optio...
  function take_attributes (line 414) | pub fn take_attributes(
  function take_pyo3_options (line 429) | pub fn take_pyo3_options<T: Parse>(attrs: &mut Vec<syn::Attribute>) -> R...

FILE: pyo3-macros-backend/src/combine_errors.rs
  type CombineErrors (line 1) | pub(crate) trait CombineErrors: Iterator {
    method try_combine_syn_errors (line 3) | fn try_combine_syn_errors(self) -> syn::Result<Vec<Self::Ok>>;
    type Ok (line 10) | type Ok = T;
    method try_combine_syn_errors (line 12) | fn try_combine_syn_errors(self) -> syn::Result<Vec<Self::Ok>> {

FILE: pyo3-macros-backend/src/derive_attributes.rs
  type ContainerAttribute (line 11) | pub enum ContainerAttribute {
  method parse (line 25) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  type ContainerAttributes (line 48) | pub struct ContainerAttributes {
    method from_attrs (line 62) | pub fn from_attrs(attrs: &[Attribute]) -> Result<Self> {
    method set_option (line 75) | fn set_option(&mut self, option: ContainerAttribute) -> syn::Result<()> {
  type FieldGetter (line 100) | pub enum FieldGetter {
    method span (line 106) | pub fn span(&self) -> Span {
  type FieldAttribute (line 114) | pub enum FieldAttribute {
  method parse (line 122) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  type FieldAttributes (line 171) | pub struct FieldAttributes {
    method from_attrs (line 180) | pub fn from_attrs(attrs: &[Attribute]) -> Result<Self> {
    method set_option (line 193) | fn set_option(&mut self, option: FieldAttribute) -> syn::Result<()> {

FILE: pyo3-macros-backend/src/frompyobject.rs
  type Enum (line 14) | struct Enum<'a> {
  function new (line 24) | fn new(
  function build (line 62) | fn build(&self, ctx: &Ctx) -> TokenStream {
  function input_type (line 103) | fn input_type(&self) -> PyExpr {
  type NamedStructField (line 112) | struct NamedStructField<'a> {
  type TupleStructField (line 120) | struct TupleStructField {
  type ContainerType (line 128) | enum ContainerType<'a> {
  type Container (line 153) | struct Container<'a> {
  function new (line 164) | fn new(fields: &'a Fields, path: syn::Path, options: ContainerAttributes...
  function name (line 280) | fn name(&self) -> String {
  function build (line 292) | fn build(&self, ctx: &Ctx) -> TokenStream {
  function build_newtype_struct (line 305) | fn build_newtype_struct(
  function build_tuple_struct (line 354) | fn build_tuple_struct(&self, struct_fields: &[TupleStructField], ctx: &C...
  function build_struct (line 386) | fn build_struct(&self, struct_fields: &[NamedStructField<'_>], ctx: &Ctx...
  function input_type (line 460) | fn input_type(&self) -> PyExpr {
  function field_input_type (line 482) | fn field_input_type(from_py_with: &Option<FromPyWithAttribute>, ty: &syn...
  function verify_and_get_lifetime (line 492) | fn verify_and_get_lifetime(generics: &syn::Generics) -> Result<Option<&s...
  function build_derive_from_pyobject (line 510) | pub fn build_derive_from_pyobject(tokens: &DeriveInput) -> Result<TokenS...

FILE: pyo3-macros-backend/src/intopyobject.rs
  type ItemOption (line 12) | struct ItemOption(Option<syn::Lit>);
  type IntoPyObjectTypes (line 14) | enum IntoPyObjectTypes {
  type IntoPyObjectImpl (line 23) | struct IntoPyObjectImpl {
  type NamedStructField (line 28) | struct NamedStructField<'a> {
  type TupleStructField (line 35) | struct TupleStructField<'a> {
  type ContainerType (line 43) | enum ContainerType<'a> {
  type Container (line 66) | struct Container<'a, const REF: bool> {
  function new (line 77) | fn new(
  function match_pattern (line 188) | fn match_pattern(&self) -> TokenStream {
  function build (line 216) | fn build(&self, ctx: &Ctx) -> IntoPyObjectImpl {
  function build_newtype_struct (line 226) | fn build_newtype_struct(&self, field: &syn::Field, ctx: &Ctx) -> IntoPyO...
  function build_struct (line 248) | fn build_struct(&self, fields: &[NamedStructField<'_>], ctx: &Ctx) -> In...
  function build_tuple_struct (line 308) | fn build_tuple_struct(&self, fields: &[TupleStructField<'_>], ctx: &Ctx)...
  function output_type (line 363) | fn output_type(&self) -> PyExpr {
  function field_output_type (line 385) | fn field_output_type(into_py_with: &Option<IntoPyWithAttribute>, ty: &sy...
  type Enum (line 396) | struct Enum<'a, const REF: bool> {
  function new (line 405) | fn new(data_enum: &'a DataEnum, ident: &'a Ident) -> Result<Self> {
  function build (line 435) | fn build(&self, ctx: &Ctx) -> IntoPyObjectImpl {
  function output_type (line 470) | fn output_type(&self) -> PyExpr {
  function verify_and_get_lifetime (line 480) | fn verify_and_get_lifetime(generics: &syn::Generics) -> Option<&syn::Lif...
  function build_derive_into_pyobject (line 485) | pub fn build_derive_into_pyobject<const REF: bool>(tokens: &DeriveInput)...

FILE: pyo3-macros-backend/src/introspection.rs
  function module_introspection_code (line 28) | pub fn module_introspection_code<'a>(
  function class_introspection_code (line 61) | pub fn class_introspection_code(
  function function_introspection_code (line 100) | pub fn function_introspection_code(
  function attribute_introspection_code (line 167) | pub fn attribute_introspection_code(
  function arguments_introspection_data (line 219) | fn arguments_introspection_data<'a>(
  function argument_introspection_data (line 324) | fn argument_introspection_data<'a>(
  type IntrospectionNode (line 350) | enum IntrospectionNode<'a> {
  function emit (line 361) | fn emit(self, pyo3_crate_path: &PyO3CratePath) -> TokenStream {
  function add_to_serialization (line 370) | fn add_to_serialization(
  function from (line 454) | fn from(element: PyExpr) -> Self {
  function serialize_type_hint (line 459) | fn serialize_type_hint(hint: TokenStream, pyo3_crate_path: &PyO3CratePat...
  type AttributedIntrospectionNode (line 472) | struct AttributedIntrospectionNode<'a> {
  function from (line 478) | fn from(node: IntrospectionNode<'a>) -> Self {
  function from (line 487) | fn from(node: PyExpr) -> Self {
  type ConcatenationBuilder (line 493) | pub struct ConcatenationBuilder {
    method push_tokens (line 499) | pub fn push_tokens(&mut self, token_stream: TokenStream) {
    method push_str (line 509) | pub fn push_str(&mut self, value: &str) {
    method push_str_to_escape (line 513) | fn push_str_to_escape(&mut self, value: &str) {
    method into_token_stream (line 531) | pub fn into_token_stream(self, pyo3_crate_path: &PyO3CratePath) -> Tok...
    method into_static (line 552) | fn into_static(self, pyo3_crate_path: &PyO3CratePath, ident: Ident) ->...
  type ConcatenationBuilderElement (line 574) | enum ConcatenationBuilderElement {
  method to_tokens (line 580) | fn to_tokens(&self, tokens: &mut TokenStream) {
  function introspection_id_const (line 589) | pub fn introspection_id_const() -> TokenStream {
  function unique_element_id (line 597) | pub fn unique_element_id() -> u64 {
  function ident_to_type (line 606) | fn ident_to_type(ident: &Ident) -> Cow<'static, Type> {
  function escape_json_string (line 616) | fn escape_json_string(value: &str) -> String {

FILE: pyo3-macros-backend/src/konst.rs
  type ConstSpec (line 16) | pub struct ConstSpec {
    method python_name (line 28) | pub fn python_name(&self) -> Cow<'_, Ident> {
    method null_terminated_python_name (line 37) | pub fn null_terminated_python_name(&self) -> LitCStr {
  type ConstAttributes (line 43) | pub struct ConstAttributes {
    method from_attrs (line 64) | pub fn from_attrs(attrs: &mut Vec<syn::Attribute>) -> syn::Result<Self> {
    method set_name (line 93) | fn set_name(&mut self, name: NameAttribute) -> Result<()> {
  type PyO3ConstAttribute (line 48) | pub enum PyO3ConstAttribute {
  method parse (line 53) | fn parse(input: ParseStream<'_>) -> Result<Self> {

FILE: pyo3-macros-backend/src/method.rs
  type RegularArg (line 26) | pub struct RegularArg<'a> {
  type VarargsArg (line 38) | pub struct VarargsArg<'a> {
  type KwargsArg (line 47) | pub struct KwargsArg<'a> {
  type CancelHandleArg (line 55) | pub struct CancelHandleArg<'a> {
  type PyArg (line 61) | pub struct PyArg<'a> {
  type FnArg (line 67) | pub enum FnArg<'a> {
  function name (line 76) | pub fn name(&self) -> &syn::Ident {
  function ty (line 86) | pub fn ty(&self) -> &'a syn::Type {
  function from_py_with (line 100) | pub fn from_py_with(&self) -> Option<&FromPyWithAttribute> {
  function to_varargs_mut (line 108) | pub fn to_varargs_mut(&mut self) -> Result<&mut Self> {
  function to_kwargs_mut (line 130) | pub fn to_kwargs_mut(&mut self) -> Result<&mut Self> {
  function parse (line 153) | pub fn parse(arg: &'a mut syn::FnArg) -> Result<Self> {
  function handle_argument_error (line 204) | fn handle_argument_error(pat: &syn::Pat) -> syn::Error {
  type FnType (line 219) | pub enum FnType {
    method skip_first_rust_argument_in_python_signature (line 239) | pub fn skip_first_rust_argument_in_python_signature(&self) -> bool {
    method signature_attribute_allowed (line 251) | pub fn signature_attribute_allowed(&self) -> bool {
    method self_arg (line 262) | pub fn self_arg(
  type SelfType (line 311) | pub enum SelfType {
    method receiver (line 345) | pub fn receiver(
  type ExtractErrorMode (line 324) | pub enum ExtractErrorMode {
    method handle_error (line 330) | pub fn handle_error(self, extract: TokenStream, ctx: &Ctx) -> TokenStr...
  type CallingConvention (line 413) | pub enum CallingConvention {
    method from_signature (line 424) | pub fn from_signature(signature: &FunctionSignature<'_>) -> Self {
  type FnSpec (line 436) | pub struct FnSpec<'a> {
  function parse_method_receiver (line 451) | pub fn parse_method_receiver(arg: &syn::FnArg, non_null: bool) -> Result...
  function parse (line 479) | pub fn parse(
  function null_terminated_python_name (line 531) | pub fn null_terminated_python_name(&self) -> LitCStr {
  function parse_fn_type (line 537) | fn parse_fn_type(
  function get_wrapper_function (line 671) | pub fn get_wrapper_function(
  function get_methoddef (line 918) | pub fn get_methoddef(
  function get_doc (line 954) | pub fn get_doc(&self, attrs: &[syn::Attribute]) -> Option<PythonDoc> {
  function text_signature_call_signature (line 963) | pub fn text_signature_call_signature(&self) -> Option<String> {
  type MethodTypeAttribute (line 983) | enum MethodTypeAttribute {
    method span (line 994) | fn span(&self) -> Span {
    method parse_if_matching_attribute (line 1011) | fn parse_if_matching_attribute(attr: &syn::Attribute) -> Result<Option...
  method fmt (line 1080) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  function parse_method_attributes (line 1093) | fn parse_method_attributes(attrs: &mut Vec<syn::Attribute>) -> Result<Ve...
  constant IMPL_TRAIT_ERR (line 1109) | const IMPL_TRAIT_ERR: &str = "Python functions cannot have `impl Trait` ...
  constant RECEIVER_BY_VALUE_ERR (line 1110) | const RECEIVER_BY_VALUE_ERR: &str =
  function ensure_signatures_on_valid_method (line 1114) | fn ensure_signatures_on_valid_method(

FILE: pyo3-macros-backend/src/module.rs
  type PyModuleOptions (line 35) | pub struct PyModuleOptions {
    method take_pyo3_options (line 56) | fn take_pyo3_options(&mut self, attrs: &mut Vec<syn::Attribute>) -> Re...
    method add_attributes (line 60) | fn add_attributes(
  method parse (line 44) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  function pymodule_module_impl (line 98) | pub fn pymodule_module_impl(
  function pymodule_function_impl (line 439) | pub fn pymodule_function_impl(
  function module_initialization (line 511) | fn module_initialization(
  function process_functions_in_module (line 586) | fn process_functions_in_module(options: &PyModuleOptions, func: &mut syn...
  type PyFnArgs (line 619) | pub struct PyFnArgs {
  method parse (line 625) | fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
  function get_pyfn_attr (line 647) | fn get_pyfn_attr(attrs: &mut Vec<syn::Attribute>) -> syn::Result<Option<...
  function get_cfg_attributes (line 672) | fn get_cfg_attributes(attrs: &[syn::Attribute]) -> Vec<syn::Attribute> {
  function find_and_remove_attribute (line 680) | fn find_and_remove_attribute(attrs: &mut Vec<syn::Attribute>, ident: &st...
  function eq (line 694) | fn eq(&self, other: &syn::Ident) -> bool {
  function set_module_attribute (line 702) | fn set_module_attribute(attrs: &mut Vec<syn::Attribute>, module_name: &s...
  function has_pyo3_module_declared (line 706) | fn has_pyo3_module_declared<T: Parse>(
  type PyModulePyO3Option (line 725) | enum PyModulePyO3Option {
  method parse (line 734) | fn parse(input: ParseStream<'_>) -> Result<Self> {

FILE: pyo3-macros-backend/src/params.rs
  type Holders (line 12) | pub struct Holders {
    method new (line 17) | pub fn new() -> Self {
    method push_holder (line 23) | pub fn push_holder(&mut self, span: Span) -> syn::Ident {
    method init_holders (line 29) | pub fn init_holders(&self, ctx: &Ctx) -> TokenStream {
  function is_forwarded_args (line 40) | pub fn is_forwarded_args(signature: &FunctionSignature<'_>) -> bool {
  function impl_arg_params (line 47) | pub fn impl_arg_params(
  function impl_arg_param (line 184) | fn impl_arg_param(
  function impl_regular_arg_param (line 233) | pub(crate) fn impl_regular_arg_param(

FILE: pyo3-macros-backend/src/py_expr.rs
  type PyExpr (line 14) | pub enum PyExpr {
    method builtin (line 70) | pub fn builtin(name: impl Into<Cow<'static, str>>) -> Self {
    method module_attr (line 75) | pub fn module_attr(
    method from_from_py_object (line 85) | pub fn from_from_py_object(t: Type, self_type: Option<&Type>) -> Self {
    method from_into_py_object (line 92) | pub fn from_into_py_object(t: Type, self_type: Option<&Type>) -> Self {
    method from_argument_type (line 99) | pub fn from_argument_type(t: Type, self_type: Option<&Type>) -> Self {
    method from_return_type (line 106) | pub fn from_return_type(t: Type, self_type: Option<&Type>) -> Self {
    method from_type (line 113) | pub fn from_type(t: Type, self_type: Option<&Type>) -> Self {
    method attribute (line 118) | pub fn attribute(value: Self, attr: impl Into<Cow<'static, str>>) -> S...
    method union (line 126) | pub fn union(left: Self, right: Self) -> Self {
    method subscript (line 135) | pub fn subscript(value: Self, slice: Self) -> Self {
    method tuple (line 143) | pub fn tuple(elts: impl IntoIterator<Item = Self>) -> Self {
    method constant_from_expression (line 149) | pub fn constant_from_expression(expr: &Expr) -> Self {
    method str_constant (line 168) | pub fn str_constant(value: impl Into<String>) -> Self {
    method ellipsis (line 173) | pub fn ellipsis() -> Self {
    method to_introspection_token_stream (line 177) | pub fn to_introspection_token_stream(&self, pyo3_crate_path: &PyO3Crat...
  type PyOperator (line 47) | pub enum PyOperator {
  type PyConstant (line 53) | pub enum PyConstant {
  function clean_type (line 267) | fn clean_type(mut t: Type, self_type: Option<&Type>) -> Type {
  function elide_lifetimes (line 279) | fn elide_lifetimes(ty: &mut Type) {
  function replace_self (line 292) | fn replace_self(ty: &mut Type, self_target: &Type) {

FILE: pyo3-macros-backend/src/pyclass.rs
  type PyClassKind (line 43) | pub enum PyClassKind {
  type PyClassArgs (line 50) | pub struct PyClassArgs {
    method parse (line 56) | fn parse(input: ParseStream<'_>, kind: PyClassKind) -> Result<Self> {
    method parse_struct_args (line 63) | pub fn parse_struct_args(input: ParseStream<'_>) -> syn::Result<Self> {
    method parse_enum_args (line 67) | pub fn parse_enum_args(input: ParseStream<'_>) -> syn::Result<Self> {
  type PyClassPyO3Options (line 73) | pub struct PyClassPyO3Options {
    method take_pyo3_options (line 201) | pub fn take_pyo3_options(&mut self, attrs: &mut Vec<syn::Attribute>) -...
    method set_option (line 207) | fn set_option(&mut self, option: PyClassPyO3Option) -> syn::Result<()> {
  type PyClassPyO3Option (line 101) | pub enum PyClassPyO3Option {
  method parse (line 130) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method parse (line 189) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  function build_py_class (line 265) | pub fn build_py_class(
  type Annotated (line 348) | enum Annotated<X, Y> {
  function span (line 354) | fn span(&self) -> Span {
  type FieldPyO3Options (line 363) | struct FieldPyO3Options {
    method take_pyo3_options (line 391) | fn take_pyo3_options(attrs: &mut Vec<syn::Attribute>) -> Result<Self> {
  type FieldPyO3Option (line 369) | enum FieldPyO3Option {
  method parse (line 376) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  function get_class_python_name (line 422) | fn get_class_python_name<'a>(cls: &'a Ident, args: &'a PyClassArgs) -> C...
  function get_class_type_hint (line 431) | fn get_class_type_hint(cls: &Ident, args: &PyClassArgs, ctx: &Ctx) -> To...
  function impl_class (line 459) | fn impl_class(
  type PyClassEnum (line 552) | enum PyClassEnum<'a> {
  function new (line 558) | fn new(enum_: &'a mut syn::ItemEnum) -> syn::Result<Self> {
  function build_py_enum (line 574) | pub fn build_py_enum(
  type PyClassSimpleEnum (line 599) | struct PyClassSimpleEnum<'a> {
  function new (line 608) | fn new(enum_: &'a mut syn::ItemEnum) -> syn::Result<Self> {
  type PyClassComplexEnum (line 665) | struct PyClassComplexEnum<'a> {
  function new (line 671) | fn new(enum_: &'a mut syn::ItemEnum) -> syn::Result<Self> {
  type PyClassEnumVariant (line 748) | enum PyClassEnumVariant<'a> {
  type EnumVariant (line 754) | trait EnumVariant {
    method get_ident (line 755) | fn get_ident(&self) -> &syn::Ident;
    method get_options (line 756) | fn get_options(&self) -> &EnumVariantPyO3Options;
    method get_attrs (line 757) | fn get_attrs(&self) -> &[syn::Attribute];
    method get_python_name (line 759) | fn get_python_name(&self, args: &PyClassArgs) -> Cow<'_, syn::Ident> {
    method get_ident (line 777) | fn get_ident(&self) -> &syn::Ident {
    method get_options (line 784) | fn get_options(&self) -> &EnumVariantPyO3Options {
    method get_attrs (line 791) | fn get_attrs(&self) -> &[syn::Attribute] {
    method get_ident (line 807) | fn get_ident(&self) -> &syn::Ident {
    method get_options (line 811) | fn get_options(&self) -> &EnumVariantPyO3Options {
    method get_attrs (line 815) | fn get_attrs(&self) -> &[syn::Attribute] {
  type PyClassEnumUnitVariant (line 800) | struct PyClassEnumUnitVariant<'a> {
  type PyClassEnumStructVariant (line 821) | struct PyClassEnumStructVariant<'a> {
  function python_name (line 829) | fn python_name(&self) -> Cow<'_, syn::Ident> {
  type PyClassEnumTupleVariant (line 838) | struct PyClassEnumTupleVariant<'a> {
  function python_name (line 846) | fn python_name(&self) -> Cow<'_, syn::Ident> {
  type PyClassEnumVariantNamedField (line 855) | struct PyClassEnumVariantNamedField<'a> {
  type PyClassEnumVariantUnnamedField (line 862) | struct PyClassEnumVariantUnnamedField<'a> {
  type EnumVariantPyO3Options (line 870) | struct EnumVariantPyO3Options {
    method take_pyo3_options (line 894) | fn take_pyo3_options(attrs: &mut Vec<syn::Attribute>) -> Result<Self> {
    method set_option (line 904) | fn set_option(&mut self, option: EnumVariantPyO3Option) -> syn::Result...
  type EnumVariantPyO3Option (line 875) | enum EnumVariantPyO3Option {
  method parse (line 881) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  type PyFmtName (line 927) | pub enum PyFmtName {
  function implement_py_formatting (line 932) | fn implement_py_formatting(
  function implement_pyclass_str (line 979) | fn implement_pyclass_str(
  function impl_enum (line 993) | fn impl_enum(
  function impl_simple_enum (line 1014) | fn impl_simple_enum(
  function impl_complex_enum (line 1195) | fn impl_complex_enum(
  function impl_complex_enum_variant_cls (line 1379) | fn impl_complex_enum_variant_cls(
  function impl_complex_enum_variant_match_args (line 1395) | fn impl_complex_enum_variant_match_args(
  function impl_complex_enum_struct_variant_cls (line 1446) | fn impl_complex_enum_struct_variant_cls(
  function impl_complex_enum_tuple_variant_field_getters (line 1531) | fn impl_complex_enum_tuple_variant_field_getters(
  function impl_complex_enum_tuple_variant_len (line 1592) | fn impl_complex_enum_tuple_variant_len(
  function impl_complex_enum_tuple_variant_getitem (line 1623) | fn impl_complex_enum_tuple_variant_getitem(
  function impl_complex_enum_tuple_variant_cls (line 1673) | fn impl_complex_enum_tuple_variant_cls(
  function gen_complex_enum_variant_class_ident (line 1751) | fn gen_complex_enum_variant_class_ident(enum_: &Ident, variant: &Ident) ...
  function impl_complex_enum_variant_qualname (line 1755) | fn impl_complex_enum_variant_qualname(
  type FunctionIntrospectionData (line 1784) | struct FunctionIntrospectionData<'a> {
  function generate (line 1793) | fn generate(self, ctx: &Ctx, cls: &syn::Type) -> TokenStream {
  function generate_protocol_slot (line 1817) | fn generate_protocol_slot(
  function generate_default_protocol_slot (line 1837) | fn generate_default_protocol_slot(
  function simple_enum_default_methods (line 1862) | fn simple_enum_default_methods<'a>(
  function complex_enum_default_methods (line 1912) | fn complex_enum_default_methods<'a>(
  function gen_complex_enum_variant_attr (line 1944) | pub fn gen_complex_enum_variant_attr(
  function complex_enum_variant_new (line 1977) | fn complex_enum_variant_new<'a>(
  function complex_enum_struct_variant_new (line 1992) | fn complex_enum_struct_variant_new<'a>(
  function complex_enum_tuple_variant_new (line 2059) | fn complex_enum_tuple_variant_new<'a>(
  function complex_enum_variant_field_getter (line 2124) | fn complex_enum_variant_field_getter(
  function descriptors_to_items (line 2172) | fn descriptors_to_items(
  function impl_pytypeinfo (line 2283) | fn impl_pytypeinfo(cls: &Ident, attr: &PyClassArgs, ctx: &Ctx) -> TokenS...
  function pyclass_richcmp_arms (line 2320) | fn pyclass_richcmp_arms(
  function pyclass_richcmp_simple_enum (line 2372) | fn pyclass_richcmp_simple_enum(
  function pyclass_richcmp (line 2467) | fn pyclass_richcmp(
  function pyclass_hash (line 2528) | fn pyclass_hash(
  function pyclass_new_impl (line 2568) | fn pyclass_new_impl<'a>(
  function pyclass_class_getitem (line 2657) | fn pyclass_class_getitem(
  type PyClassImplsBuilder (line 2701) | struct PyClassImplsBuilder<'a> {
  function new (line 2714) | fn new(
  function doc (line 2733) | fn doc(self, doc: PythonDoc) -> Self {
  function impl_pyclass (line 2740) | fn impl_pyclass(&self, ctx: &Ctx) -> TokenStream {
  function impl_into_py (line 2760) | fn impl_into_py(&self, ctx: &Ctx) -> TokenStream {
  function impl_pyclassimpl (line 2786) | fn impl_pyclassimpl(&self, ctx: &Ctx) -> Result<TokenStream> {
  function impl_add_to_module (line 3071) | fn impl_add_to_module(&self, ctx: &Ctx) -> TokenStream {
  function impl_freelist (line 3082) | fn impl_freelist(&self, ctx: &Ctx) -> TokenStream {
  function freelist_slots (line 3100) | fn freelist_slots(&self, ctx: &Ctx) -> Vec<TokenStream> {
  function impl_introspection (line 3125) | fn impl_introspection(&self, ctx: &Ctx, parent: Option<&Ident>) -> Token...
  function impl_introspection (line 3157) | fn impl_introspection(&self, _ctx: &Ctx, _parent: Option<&Ident>) -> Tok...
  function define_inventory_class (line 3162) | fn define_inventory_class(inventory_class_name: &syn::Ident, ctx: &Ctx) ...
  function generate_cfg_check (line 3185) | fn generate_cfg_check(variants: &[PyClassEnumUnitVariant<'_>], cls: &syn...
  function get_conversion_type_hint (line 3216) | fn get_conversion_type_hint(
  constant UNIQUE_GET (line 3228) | const UNIQUE_GET: &str = "`get` may only be specified once";
  constant UNIQUE_SET (line 3229) | const UNIQUE_SET: &str = "`set` may only be specified once";
  constant UNIQUE_NAME (line 3230) | const UNIQUE_NAME: &str = "`name` may only be specified once";
  constant DUPE_SET (line 3232) | const DUPE_SET: &str = "useless `set` - the struct is already annotated ...
  constant DUPE_GET (line 3233) | const DUPE_GET: &str = "useless `get` - the struct is already annotated ...
  constant UNIT_GET (line 3234) | const UNIT_GET: &str =
  constant UNIT_SET (line 3236) | const UNIT_SET: &str =
  constant USELESS_NAME (line 3239) | const USELESS_NAME: &str = "`name` is useless without `get` or `set`";

FILE: pyo3-macros-backend/src/pyfunction.rs
  type PyFunctionArgPyO3Attributes (line 32) | pub struct PyFunctionArgPyO3Attributes {
    method from_attrs (line 57) | pub fn from_attrs(attrs: &mut Vec<syn::Attribute>) -> syn::Result<Self> {
  type PyFunctionArgPyO3Attribute (line 37) | enum PyFunctionArgPyO3Attribute {
  method parse (line 43) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  type PyFunctionWarningMessageAttribute (line 95) | type PyFunctionWarningMessageAttribute = KeywordAttribute<attributes::kw...
  type PyFunctionWarningCategoryAttribute (line 96) | type PyFunctionWarningCategoryAttribute = KeywordAttribute<attributes::k...
  type PyFunctionWarningAttribute (line 98) | pub struct PyFunctionWarningAttribute {
  type PyFunctionWarningCategory (line 105) | pub enum PyFunctionWarningCategory {
  type PyFunctionWarning (line 112) | pub struct PyFunctionWarning {
    method from (line 119) | fn from(value: PyFunctionWarningAttribute) -> Self {
  type WarningFactory (line 132) | pub trait WarningFactory {
    method build_py_warning (line 133) | fn build_py_warning(&self, ctx: &Ctx) -> TokenStream;
    method span (line 134) | fn span(&self) -> Span;
    method build_py_warning (line 138) | fn build_py_warning(&self, ctx: &Ctx) -> TokenStream {
    method span (line 159) | fn span(&self) -> Span {
    method build_py_warning (line 165) | fn build_py_warning(&self, ctx: &Ctx) -> TokenStream {
    method span (line 173) | fn span(&self) -> Span {
  method parse (line 182) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  method to_tokens (line 223) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type PyFunctionOptions (line 239) | pub struct PyFunctionOptions {
    method from_attrs (line 290) | pub fn from_attrs(attrs: &mut Vec<syn::Attribute>) -> syn::Result<Self> {
    method add_attributes (line 296) | pub fn add_attributes(
  method parse (line 249) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  type PyFunctionOption (line 259) | pub enum PyFunctionOption {
  method parse (line 269) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  function build_py_function (line 327) | pub fn build_py_function(
  function impl_wrap_pyfunction (line 337) | pub fn impl_wrap_pyfunction(

FILE: pyo3-macros-backend/src/pyfunction/signature.rs
  type Signature (line 19) | pub struct Signature {
  method parse (line 26) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 44) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type SignatureItemArgument (line 55) | pub struct SignatureItemArgument {
  type SignatureItemPosargsSep (line 62) | pub struct SignatureItemPosargsSep {
  type SignatureItemVarargsSep (line 67) | pub struct SignatureItemVarargsSep {
  type SignatureItemVarargs (line 72) | pub struct SignatureItemVarargs {
  type SignatureItemKwargs (line 79) | pub struct SignatureItemKwargs {
  type SignatureItem (line 86) | pub enum SignatureItem {
  method parse (line 95) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 125) | fn to_tokens(&self, tokens: &mut TokenStream) {
  method parse (line 137) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 155) | fn to_tokens(&self, tokens: &mut TokenStream) {
  method parse (line 169) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 177) | fn to_tokens(&self, tokens: &mut TokenStream) {
  method parse (line 183) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 197) | fn to_tokens(&self, tokens: &mut TokenStream) {
  method parse (line 204) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 218) | fn to_tokens(&self, tokens: &mut TokenStream) {
  method parse (line 226) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 234) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type PyTypeAnnotation (line 240) | pub struct PyTypeAnnotation(syn::LitStr);
    method as_type_hint (line 256) | pub fn as_type_hint(&self) -> PyExpr {
  method parse (line 243) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
  method to_tokens (line 249) | fn to_tokens(&self, tokens: &mut TokenStream) {
  type SignatureAttribute (line 261) | pub type SignatureAttribute = KeywordAttribute<kw::signature, Signature>;
  type ConstructorAttribute (line 262) | pub type ConstructorAttribute = KeywordAttribute<kw::constructor, Signat...
    method into_signature (line 265) | pub fn into_signature(self) -> SignatureAttribute {
  type PythonSignature (line 274) | pub struct PythonSignature {
    method has_no_args (line 286) | pub fn has_no_args(&self) -> bool {
    method required_positional_parameters (line 293) | pub fn required_positional_parameters(&self) -> usize {
  type FunctionSignature (line 302) | pub struct FunctionSignature<'a> {
  type ParseState (line 308) | pub enum ParseState {
    method add_argument (line 320) | fn add_argument(
    method add_varargs (line 350) | fn add_varargs(
    method add_kwargs (line 370) | fn add_kwargs(
    method finish_pos_only_args (line 387) | fn finish_pos_only_args(
    method finish_pos_args (line 410) | fn finish_pos_args(&mut self, signature: &PythonSignature, span: Span)...
  function from_arguments_and_attribute (line 427) | pub fn from_arguments_and_attribute(
  function from_arguments (line 587) | pub fn from_arguments(arguments: Vec<FnArg<'a>>) -> Self {
  function text_signature (line 607) | pub fn text_signature(&self, self_argument: Option<&str>) -> String {

FILE: pyo3-macros-backend/src/pyimpl.rs
  type PyClassMethodsType (line 33) | pub enum PyClassMethodsType {
  type PyImplPyO3Option (line 38) | enum PyImplPyO3Option {
  method parse (line 43) | fn parse(input: ParseStream<'_>) -> Result<Self> {
  type PyImplOptions (line 54) | pub struct PyImplOptions {
    method from_attrs (line 59) | pub fn from_attrs(attrs: &mut Vec<syn::Attribute>) -> Result<Self> {
    method set_crate (line 71) | fn set_crate(&mut self, path: CrateAttribute) -> Result<()> {
  function build_py_methods (line 82) | pub fn build_py_methods(
  function check_pyfunction (line 99) | fn check_pyfunction(pyo3_path: &PyO3CratePath, meth: &mut ImplItemFn) ->...
  function impl_methods (line 118) | pub fn impl_methods(
  function gen_py_const (line 239) | pub fn gen_py_const(cls: &syn::Type, spec: &ConstSpec, ctx: &Ctx) -> Met...
  function impl_py_methods (line 282) | fn impl_py_methods(
  function add_shared_proto_slots (line 305) | fn add_shared_proto_slots(
  function submit_methods_inventory (line 363) | fn submit_methods_inventory(
  function get_cfg_attributes (line 378) | pub(crate) fn get_cfg_attributes(attrs: &[syn::Attribute]) -> Vec<&syn::...
  function method_introspection_code (line 386) | pub fn method_introspection_code(

FILE: pyo3-macros-backend/src/pymethod.rs
  type MethodAndMethodDef (line 23) | pub struct MethodAndMethodDef {
    method add_introspection (line 32) | pub fn add_introspection(&mut self, data: TokenStream) {
  type MethodAndSlotDef (line 43) | pub struct MethodAndSlotDef {
    method add_introspection (line 52) | pub fn add_introspection(&mut self, data: TokenStream) {
  type GeneratedPyMethod (line 62) | pub enum GeneratedPyMethod {
  type PyMethod (line 68) | pub struct PyMethod<'a> {
  type PyMethodKind (line 74) | enum PyMethodKind {
    method from_name (line 80) | fn from_name(name: &str) -> Self {
  type PyMethodProtoKind (line 184) | enum PyMethodProtoKind {
  function parse (line 193) | pub fn parse(
  function is_returning_not_implemented_on_extraction_error (line 213) | pub fn is_returning_not_implemented_on_extraction_error(&self) -> bool {
  function is_proto_method (line 231) | pub fn is_proto_method(name: &str) -> bool {
  function gen_py_method (line 238) | pub fn gen_py_method(
  function check_generic (line 316) | pub fn check_generic(sig: &syn::Signature) -> syn::Result<()> {
  function ensure_function_options_valid (line 328) | fn ensure_function_options_valid(options: &PyFunctionOptions) -> syn::Re...
  function ensure_no_forbidden_protocol_attributes (line 335) | fn ensure_no_forbidden_protocol_attributes(
  function impl_py_method_def (line 368) | pub fn impl_py_method_def(
  function impl_call_slot (line 394) | fn impl_call_slot(cls: &syn::Type, spec: &FnSpec<'_>, ctx: &Ctx) -> Resu...
  function impl_traverse_slot (line 411) | fn impl_traverse_slot(
  function impl_clear_slot (line 468) | fn impl_clear_slot(cls: &syn::Type, spec: &FnSpec<'_>, ctx: &Ctx) -> syn...
  function impl_py_class_attribute (line 514) | pub(crate) fn impl_py_class_attribute(
  function impl_call_setter (line 566) | fn impl_call_setter(
  function impl_py_setter_def (line 596) | pub fn impl_py_setter_def(
  function impl_call_getter (line 752) | fn impl_call_getter(
  function impl_py_getter_def (line 777) | pub fn impl_py_getter_def(
  function impl_py_deleter_def (line 884) | pub fn impl_py_deleter_def(
  function impl_call_deleter (line 927) | fn impl_call_deleter(
  function split_off_python_arg (line 954) | fn split_off_python_arg<'a, 'b>(args: &'a [FnArg<'b>]) -> (Option<&'a Py...
  type PropertyType (line 961) | pub enum PropertyType<'a> {
  function null_terminated_python_name (line 976) | fn null_terminated_python_name(&self) -> Result<LitCStr> {
  function doc (line 992) | fn doc(&self) -> Option<Cow<'_, PythonDoc>> {
  constant __NEW__ (line 1002) | pub const __NEW__: SlotDef = SlotDef::new("Py_tp_new", "newfunc");
  constant __INIT__ (line 1003) | pub const __INIT__: SlotDef = SlotDef::new("Py_tp_init", "initproc");
  constant __STR__ (line 1004) | pub const __STR__: SlotDef = SlotDef::new("Py_tp_str", "reprfunc");
  constant __REPR__ (line 1005) | pub const __REPR__: SlotDef = SlotDef::new("Py_tp_repr", "reprfunc");
  constant __HASH__ (line 1006) | pub const __HASH__: SlotDef =
  constant __RICHCMP__ (line 1010) | pub const __RICHCMP__: SlotDef = SlotDef::new("Py_tp_richcompare", "rich...
  constant __GET__ (line 1012) | const __GET__: SlotDef = SlotDef::new("Py_tp_descr_get", "descrgetfunc");
  constant __ITER__ (line 1013) | const __ITER__: SlotDef = SlotDef::new("Py_tp_iter", "getiterfunc");
  constant __NEXT__ (line 1014) | const __NEXT__: SlotDef = SlotDef::new("Py_tp_iternext", "iternextfunc")
  constant __AWAIT__ (line 1019) | const __AWAIT__: SlotDef = SlotDef::new("Py_am_await", "unaryfunc");
  constant __AITER__ (line 1020) | const __AITER__: SlotDef = SlotDef::new("Py_am_aiter", "unaryfunc");
  constant __ANEXT__ (line 1021) | const __ANEXT__: SlotDef = SlotDef::new("Py_am_anext", "unaryfunc").retu...
  constant __LEN__ (line 1027) | pub const __LEN__: SlotDef = SlotDef::new("Py_mp_length", "lenfunc");
  constant __CONTAINS__ (line 1028) | const __CONTAINS__: SlotDef = SlotDef::new("Py_sq_contains", "objobjproc");
  constant __CONCAT__ (line 1029) | const __CONCAT__: SlotDef = SlotDef::new("Py_sq_concat", "binaryfunc");
  constant __REPEAT__ (line 1030) | const __REPEAT__: SlotDef = SlotDef::new("Py_sq_repeat", "ssizeargfunc");
  constant __INPLACE_CONCAT__ (line 1031) | const __INPLACE_CONCAT__: SlotDef = SlotDef::new("Py_sq_concat", "binary...
  constant __INPLACE_REPEAT__ (line 1032) | const __INPLACE_REPEAT__: SlotDef = SlotDef::new("Py_sq_repeat", "ssizea...
  constant __GETITEM__ (line 1033) | pub const __GETITEM__: SlotDef = SlotDef::new("Py_mp_subscript", "binary...
  constant __POS__ (line 1035) | const __POS__: SlotDef = SlotDef::new("Py_nb_positive", "unaryfunc");
  constant __NEG__ (line 1036) | const __NEG__: SlotDef = SlotDef::new("Py_nb_negative", "unaryfunc");
  constant __ABS__ (line 1037) | const __ABS__: SlotDef = SlotDef::new("Py_nb_absolute", "unaryfunc");
  constant __INVERT__ (line 1038) | const __INVERT__: SlotDef = SlotDef::new("Py_nb_invert", "unaryfunc");
  constant __INDEX__ (line 1039) | const __INDEX__: SlotDef = SlotDef::new("Py_nb_index", "unaryfunc");
  constant __INT__ (line 1040) | pub const __INT__: SlotDef = SlotDef::new("Py_nb_int", "unaryfunc");
  constant __FLOAT__ (line 1041) | const __FLOAT__: SlotDef = SlotDef::new("Py_nb_float", "unaryfunc");
  constant __BOOL__ (line 1042) | const __BOOL__: SlotDef = SlotDef::new("Py_nb_bool", "inquiry");
  constant __IADD__ (line 1044) | const __IADD__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inplac...
  constant __ISUB__ (line 1045) | const __ISUB__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inplac...
  constant __IMUL__ (line 1046) | const __IMUL__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inplac...
  constant __IMATMUL__ (line 1047) | const __IMATMUL__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inp...
  constant __ITRUEDIV__ (line 1048) | const __ITRUEDIV__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_in...
  constant __IFLOORDIV__ (line 1049) | const __IFLOORDIV__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_i...
  constant __IMOD__ (line 1050) | const __IMOD__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inplac...
  constant __ILSHIFT__ (line 1051) | const __ILSHIFT__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inp...
  constant __IRSHIFT__ (line 1052) | const __IRSHIFT__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inp...
  constant __IAND__ (line 1053) | const __IAND__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inplac...
  constant __IXOR__ (line 1054) | const __IXOR__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inplac...
  constant __IOR__ (line 1055) | const __IOR__: SlotDef = SlotDef::binary_inplace_operator("Py_nb_inplace...
  constant __IPOW__ (line 1057) | const __IPOW__: SlotDef = SlotDef::new("Py_nb_inplace_power", "ipowfunc")
  constant __GETBUFFER__ (line 1061) | const __GETBUFFER__: SlotDef = SlotDef::new("Py_bf_getbuffer", "getbuffe...
  constant __RELEASEBUFFER__ (line 1062) | const __RELEASEBUFFER__: SlotDef =
  constant __CLEAR__ (line 1064) | const __CLEAR__: SlotDef = SlotDef::new("Py_tp_clear", "inquiry");
  type Ty (line 1067) | enum Ty {
    method ffi_type (line 1081) | fn ffi_type(self, ctx: &Ctx) -> TokenStream {
    method extract (line 1099) | fn extract(
  constant REF_FROM_PTR (line 1173) | const REF_FROM_PTR: StaticIdent = StaticIdent::new("ref_from_ptr");
  constant REF_FROM_NON_NULL (line 1174) | const REF_FROM_NON_NULL: StaticIdent = StaticIdent::new("ref_from_non_nu...
  constant CAST_FUNCTION_ARGUMENT (line 1176) | const CAST_FUNCTION_ARGUMENT: StaticIdent = StaticIdent::new("cast_funct...
  constant CAST_NON_NULL_FUNCTION_ARGUMENT (line 1177) | const CAST_NON_NULL_FUNCTION_ARGUMENT: StaticIdent =
  function extract_object (line 1180) | fn extract_object(
  type ReturnMode (line 1225) | enum ReturnMode {
    method return_call_output (line 1232) | fn return_call_output(&self, call: TokenStream, ctx: &Ctx) -> TokenStr...
  type SlotDef (line 1261) | pub struct SlotDef {
    method new (line 1280) | const fn new(slot: &'static str, func_ty: &'static str) -> Self {
    method binary_inplace_operator (line 1339) | const fn binary_inplace_operator(slot: &'static str) -> Self {
    method return_conversion (line 1345) | const fn return_conversion(mut self, return_conversion: TokenGenerator...
    method return_specialized_conversion (line 1350) | const fn return_specialized_conversion(
    method extract_error_mode (line 1359) | const fn extract_error_mode(mut self, extract_error_mode: ExtractError...
    method return_self (line 1364) | const fn return_self(mut self) -> Self {
    method require_unsafe (line 1369) | const fn require_unsafe(mut self) -> Self {
    method generate_type_slot (line 1374) | pub fn generate_type_slot(
  type SlotCallingConvention (line 1271) | enum SlotCallingConvention {
  function generate_method_body (line 1439) | fn generate_method_body(
  type SlotFragmentDef (line 1571) | struct SlotFragmentDef {
    method new (line 1579) | const fn new(fragment: &'static str, arguments: &'static [Ty]) -> Self {
    method binary_operator (line 1589) | const fn binary_operator(fragment: &'static str) -> Self {
    method extract_error_mode (line 1598) | const fn extract_error_mode(mut self, extract_error_mode: ExtractError...
    method ret_ty (line 1603) | const fn ret_ty(mut self, ret_ty: Ty) -> Self {
    method generate_pyproto_fragment (line 1608) | fn generate_pyproto_fragment(
  type MethodBody (line 1669) | pub struct MethodBody {
  constant __GETATTRIBUTE__ (line 1675) | const __GETATTRIBUTE__: SlotFragmentDef =
  constant __GETATTR__ (line 1677) | const __GETATTR__: SlotFragmentDef =
  constant __SETATTR__ (line 1679) | const __SETATTR__: SlotFragmentDef =
  constant __DELATTR__ (line 1681) | const __DELATTR__: SlotFragmentDef = SlotFragmentDef::new("__delattr__",...
  constant __SET__ (line 1682) | const __SET__: SlotFragmentDef = SlotFragmentDef::new("__set__", &[Ty::O...
  constant __DELETE__ (line 1683) | const __DELETE__: SlotFragmentDef = SlotFragmentDef::new("__delete__", &...
  constant __SETITEM__ (line 1684) | const __SETITEM__: SlotFragmentDef =
  constant __DELITEM__ (line 1686) | const __DELITEM__: SlotFragmentDef = SlotFragmentDef::new("__delitem__",...
  constant __ADD__ (line 1688) | const __ADD__: SlotFragmentDef = SlotFragmentDef::binary_operator("__add...
  constant __RADD__ (line 1689) | const __RADD__: SlotFragmentDef = SlotFragmentDef::binary_operator("__ra...
  constant __SUB__ (line 1690) | const __SUB__: SlotFragmentDef = SlotFragmentDef::binary_operator("__sub...
  constant __RSUB__ (line 1691) | const __RSUB__: SlotFragmentDef = SlotFragmentDef::binary_operator("__rs...
  constant __MUL__ (line 1692) | const __MUL__: SlotFragmentDef = SlotFragmentDef::binary_operator("__mul...
  constant __RMUL__ (line 1693) | const __RMUL__: SlotFragmentDef = SlotFragmentDef::binary_operator("__rm...
  constant __MATMUL__ (line 1694) | const __MATMUL__: SlotFragmentDef = SlotFragmentDef::binary_operator("__...
  constant __RMATMUL__ (line 1695) | const __RMATMUL__: SlotFragmentDef = SlotFragmentDef::binary_operator("_...
  constant __FLOORDIV__ (line 1696) | const __FLOORDIV__: SlotFragmentDef = SlotFragmentDef::binary_operator("...
  constant __RFLOORDIV__ (line 1697) | const __RFLOORDIV__: SlotFragmentDef = SlotFragmentDef::binary_operator(...
  constant __TRUEDIV__ (line 1698) | const __TRUEDIV__: SlotFragmentDef = SlotFragmentDef::binary_operator("_...
  constant __RTRUEDIV__ (line 1699) | const __RTRUEDIV__: SlotFragmentDef = SlotFragmentDef::binary_operator("...
  constant __DIVMOD__ (line 1700) | const __DIVMOD__: SlotFragmentDef = SlotFragmentDef::binary_operator("__...
  constant __RDIVMOD__ (line 1701) | const __RDIVMOD__: SlotFragmentDef = SlotFragmentDef::binary_operator("_...
  constant __MOD__ (line 1702) | const __MOD__: SlotFragmentDef = SlotFragmentDef::binary_operator("__mod...
  constant __RMOD__ (line 1703) | const __RMOD__: SlotFragmentDef = SlotFragmentDef::binary_operator("__rm...
  constant __LSHIFT__ (line 1704) | const __LSHIFT__: SlotFragmentDef = SlotFragmentDef::binary_operator("__...
  constant __RLSHIFT__ (line 1705) | const __RLSHIFT__: SlotFragmentDef = SlotFragmentDef::binary_operator("_...
  constant __RSHIFT__ (line 1706) | const __RSHIFT__: SlotFragmentDef = SlotFragmentDef::binary_operator("__...
  constant __RRSHIFT__ (line 1707) | const __RRSHIFT__: SlotFragmentDef = SlotFragmentDef::binary_operator("_...
  constant __AND__ (line 1708) | const __AND__: SlotFragmentDef = SlotFragmentDef::binary_operator("__and...
  constant __RAND__ (line 1709) | const __RAND__: SlotFragmentDef = SlotFragmentDef::binary_operator("__ra...
  constant __XOR__ (line 1710) | const __XOR__: SlotFragmentDef = SlotFragmentDef::binary_operator("__xor...
  constant __RXOR__ (line 1711) | const __RXOR__: SlotFragmentDef = SlotFragmentDef::binary_operator("__rx...
  constant __OR__ (line 1712) | const __OR__: SlotFragmentDef = SlotFragmentDef::binary_operator("__or__");
  constant __ROR__ (line 1713) | const __ROR__: SlotFragmentDef = SlotFragmentDef::binary_operator("__ror...
  constant __POW__ (line 1715) | const __POW__: SlotFragmentDef = SlotFragmentDef::new("__pow__", &[Ty::O...
  constant __RPOW__ (line 1718) | const __RPOW__: SlotFragmentDef = SlotFragmentDef::new("__rpow__", &[Ty:...
  constant __LT__ (line 1722) | const __LT__: SlotFragmentDef = SlotFragmentDef::new("__lt__", &[Ty::Obj...
  constant __LE__ (line 1725) | const __LE__: SlotFragmentDef = SlotFragmentDef::new("__le__", &[Ty::Obj...
  constant __EQ__ (line 1728) | const __EQ__: SlotFragmentDef = SlotFragmentDef::new("__eq__", &[Ty::Obj...
  constant __NE__ (line 1731) | const __NE__: SlotFragmentDef = SlotFragmentDef::new("__ne__", &[Ty::Obj...
  constant __GT__ (line 1734) | const __GT__: SlotFragmentDef = SlotFragmentDef::new("__gt__", &[Ty::Obj...
  constant __GE__ (line 1737) | const __GE__: SlotFragmentDef = SlotFragmentDef::new("__ge__", &[Ty::Obj...
  function extract_proto_arguments (line 1741) | fn extract_proto_arguments(
  type TokenGenerator (line 1771) | struct TokenGenerator(fn(&Ctx) -> TokenStream);
  type TokenGeneratorCtx (line 1773) | struct TokenGeneratorCtx<'ctx>(TokenGenerator, &'ctx Ctx);
  method to_tokens (line 1776) | fn to_tokens(&self, tokens: &mut TokenStream) {
  function field_python_name (line 1782) | pub fn field_python_name(
  function doc_to_optional_cstr (line 1800) | fn doc_to_optional_cstr(doc: Option<&PythonDoc>, ctx: &Ctx) -> Result<To...

FILE: pyo3-macros-backend/src/quotes.rs
  function some_wrap (line 5) | pub(crate) fn some_wrap(obj: TokenStream, ctx: &Ctx) -> TokenStream {
  function ok_wrap (line 12) | pub(crate) fn ok_wrap(obj: TokenStream, ctx: &Ctx) -> TokenStream {
  function map_result_into_ptr (line 25) | pub(crate) fn map_result_into_ptr(result: TokenStream, ctx: &Ctx) -> Tok...

FILE: pyo3-macros-backend/src/utils.rs
  function is_python (line 47) | pub fn is_python(ty: &syn::Type) -> bool {
  function option_type_argument (line 60) | pub fn option_type_argument(ty: &syn::Type) -> Option<&syn::Type> {
  type PythonDoc (line 78) | pub struct PythonDoc {
    method to_cstr_stream (line 146) | pub fn to_cstr_stream(&self, ctx: &Ctx) -> syn::Result<TokenStream> {
  function get_doc (line 87) | pub fn get_doc(attrs: &[syn::Attribute], mut text_signature: Option<Stri...
  type StrOrExpr (line 172) | pub enum StrOrExpr {
  method to_tokens (line 178) | fn to_tokens(&self, tokens: &mut TokenStream) {
  function unwrap_ty_group (line 186) | pub fn unwrap_ty_group(mut ty: &syn::Type) -> &syn::Type {
  type Ctx (line 193) | pub struct Ctx {
    method new (line 203) | pub(crate) fn new(attr: &Option<CrateAttribute>, signature: Option<&sy...
  type PyO3CratePath (line 227) | pub enum PyO3CratePath {
    method to_tokens_spanned (line 233) | pub fn to_tokens_spanned(&self, span: Span) -> TokenStream {
    method to_tokens (line 242) | fn to_tokens(&self, tokens: &mut TokenStream) {
  function apply_renaming_rule (line 250) | pub fn apply_renaming_rule(rule: RenamingRule, name: &str) -> String {
  type IdentOrStr (line 265) | pub(crate) enum IdentOrStr<'a> {
  function has_attribute (line 270) | pub(crate) fn has_attribute(attrs: &[syn::Attribute], ident: &str) -> bo...
  function has_attribute_with_namespace (line 274) | pub(crate) fn has_attribute_with_namespace(
  function expr_to_python (line 301) | pub fn expr_to_python(expr: &syn::Expr) -> String {
  type StaticIdent (line 331) | pub struct StaticIdent(&'static str);
    method new (line 334) | pub const fn new(name: &'static str) -> Self {
  method to_tokens (line 340) | fn to_tokens(&self, tokens: &mut TokenStream) {
  function locate_tokens_at (line 348) | pub(crate) fn locate_tokens_at(tokens: TokenStream, span: Span) -> Token...

FILE: pyo3-macros/src/lib.rs
  function pymodule (line 41) | pub fn pymodule(args: TokenStream, input: TokenStream) -> TokenStream {
  function pyclass (line 69) | pub fn pyclass(attr: TokenStream, input: TokenStream) -> TokenStream {
  function pymethods (line 116) | pub fn pymethods(attr: TokenStream, input: TokenStream) -> TokenStream {
  function pyfunction (line 146) | pub fn pyfunction(attr: TokenStream, input: TokenStream) -> TokenStream {
  function derive_into_py_object (line 160) | pub fn derive_into_py_object(item: TokenStream) -> TokenStream {
  function derive_into_py_object_ref (line 170) | pub fn derive_into_py_object_ref(item: TokenStream) -> TokenStream {
  function derive_from_py_object (line 181) | pub fn derive_from_py_object(item: TokenStream) -> TokenStream {
  function pyclass_impl (line 190) | fn pyclass_impl(
  function pyclass_enum_impl (line 205) | fn pyclass_enum_impl(
  function pymethods_impl (line 220) | fn pymethods_impl(
  function methods_type (line 240) | fn methods_type() -> PyClassMethodsType {
  type UnwrapOrCompileError (line 248) | trait UnwrapOrCompileError {
    method unwrap_or_compile_error (line 249) | fn unwrap_or_compile_error(self) -> TokenStream2;
    method unwrap_or_compile_error (line 253) | fn unwrap_or_compile_error(self) -> TokenStream2 {

FILE: pytests/build.rs
  function main (line 1) | fn main() {

FILE: pytests/conftest.py
  function pytest_terminal_summary (line 12) | def pytest_terminal_summary(terminalreporter, exitstatus, config):

FILE: pytests/noxfile.py
  function test (line 12) | def test(session: nox.Session):
  function bench (line 37) | def bench(session: nox.Session):
  function mypy (line 43) | def mypy(session: nox.Session):

FILE: pytests/src/awaitable.rs
  type IterAwaitable (line 17) | pub(crate) struct IterAwaitable {
    method new (line 24) | fn new(result: Py<PyAny>) -> Self {
    method __await__ (line 30) | fn __await__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
    method __iter__ (line 34) | fn __iter__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
    method __next__ (line 38) | fn __next__(&mut self, py: Python<'_>) -> PyResult<Py<PyAny>> {
  type FutureAwaitable (line 50) | pub(crate) struct FutureAwaitable {
    method new (line 59) | fn new(result: Py<PyAny>) -> Self {
    method __await__ (line 66) | fn __await__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
    method __iter__ (line 70) | fn __iter__(pyself: PyRef<'_, Self>) -> PyRef<'_, Self> {
    method __next__ (line 74) | fn __next__(mut pyself: PyRefMut<'_, Self>) -> PyResult<PyRefMut<'_, S...

FILE: pytests/src/buf_and_str.rs
  type BytesExtractor (line 15) | struct BytesExtractor {}
    method __new__ (line 20) | pub fn __new__() -> Self {
    method from_bytes (line 25) | pub fn from_bytes(bytes: &Bound<'_, PyBytes>) -> PyResult<usize> {
    method from_str (line 31) | pub fn from_str(string: &Bound<'_, PyString>) -> PyResult<usize> {
    method from_str_lossy (line 37) | pub fn from_str_lossy(string: &Bound<'_, PyString>) -> usize {
    method from_buffer (line 43) | pub fn from_buffer(buf: &Bound<'_, PyAny>) -> PyResult<usize> {
  function return_memoryview (line 50) | fn return_memoryview(py: Python<'_>) -> PyResult<Bound<'_, PyMemoryView>> {
  function map_byte_slice (line 56) | fn map_byte_slice(bytes: &[u8]) -> &[u8] {
  function map_byte_cow (line 61) | fn map_byte_cow(bytes: Cow<'_, [u8]>) -> Cow<'_, [u8]> {
  function map_byte_vec (line 66) | fn map_byte_vec(bytes: Vec<u8>) -> Vec<u8> {

FILE: pytests/src/comparisons.rs
  type Eq (line 6) | struct Eq(i64);
    method new (line 11) | fn new(value: i64) -> Self {
    method __eq__ (line 15) | fn __eq__(&self, other: &Self) -> bool {
    method __ne__ (line 19) | fn __ne__(&self, other: &Self) -> bool {
  type EqDefaultNe (line 25) | struct EqDefaultNe(i64);
    method new (line 30) | fn new(value: i64) -> Self {
    method __eq__ (line 34) | fn __eq__(&self, other: &Self) -> bool {
  type EqDerived (line 41) | struct EqDerived(i64);
    method new (line 46) | fn new(value: i64) -> Self {
  type Ordered (line 52) | struct Ordered(i64);
    method new (line 57) | fn new(value: i64) -> Self {
    method __lt__ (line 61) | fn __lt__(&self, other: &Self) -> bool {
    method __le__ (line 65) | fn __le__(&self, other: &Self) -> bool {
    method __eq__ (line 69) | fn __eq__(&self, other: &Self) -> bool {
    method __ne__ (line 73) | fn __ne__(&self, other: &Self) -> bool {
    method __gt__ (line 77) | fn __gt__(&self, other: &Self) -> bool {
    method __ge__ (line 81) | fn __ge__(&self, other: &Self) -> bool {
  type OrderedRichCmp (line 87) | struct OrderedRichCmp(i64);
    method new (line 92) | fn new(value: i64) -> Self {
    method __richcmp__ (line 96) | fn __richcmp__(&self, other: &Self, op: CompareOp) -> bool {
  type OrderedDerived (line 103) | struct OrderedDerived(i64);
    method fmt (line 106) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method new (line 114) | fn new(value: i64) -> Self {
  type OrderedDefaultNe (line 120) | struct OrderedDefaultNe(i64);
    method new (line 125) | fn new(value: i64) -> Self {
    method __lt__ (line 129) | fn __lt__(&self, other: &Self) -> bool {
    method __le__ (line 133) | fn __le__(&self, other: &Self) -> bool {
    method __eq__ (line 137) | fn __eq__(&self, other: &Self) -> bool {
    method __gt__ (line 141) | fn __gt__(&self, other: &Self) -> bool {
    method __ge__ (line 145) | fn __ge__(&self, other: &Self) -> bool {

FILE: pytests/src/consts.rs
  constant PI (line 9) | pub const PI: f64 = std::f64::consts::PI;
  constant ESCAPING (line 13) | pub const ESCAPING: &str = "S\0\x01\t\n\r\"'\\";
  type ClassWithConst (line 16) | struct ClassWithConst {}
    constant INSTANCE (line 22) | const INSTANCE: Self = ClassWithConst {};

FILE: pytests/src/datetime.rs
  function make_date (line 8) | fn make_date(py: Python<'_>, year: i32, month: u8, day: u8) -> PyResult<...
  function get_date_tuple (line 13) | fn get_date_tuple<'py>(d: &Bound<'py, PyDate>) -> PyResult<Bound<'py, Py...
  function date_from_timestamp (line 21) | fn date_from_timestamp(py: Python<'_>, timestamp: f64) -> PyResult<Bound...
  function make_time (line 27) | fn make_time<'py>(
  function time_with_fold (line 40) | fn time_with_fold<'py>(
  function get_time_tuple (line 53) | fn get_time_tuple<'py>(dt: &Bound<'py, PyTime>) -> PyResult<Bound<'py, P...
  function get_time_tuple_fold (line 66) | fn get_time_tuple_fold<'py>(dt: &Bound<'py, PyTime>) -> PyResult<Bound<'...
  function make_delta (line 80) | fn make_delta(
  function get_delta_tuple (line 90) | fn get_delta_tuple<'py>(delta: &Bound<'py, PyDelta>) -> PyResult<Bound<'...
  function make_datetime (line 104) | fn make_datetime<'py>(
  function get_datetime_tuple (line 129) | fn get_datetime_tuple<'py>(dt: &Bound<'py, PyDateTime>) -> PyResult<Boun...
  function get_datetime_tuple_fold (line 145) | fn get_datetime_tuple_fold<'py>(dt: &Bound<'py, PyDateTime>) -> PyResult...
  function datetime_from_timestamp (line 163) | fn datetime_from_timestamp<'py>(
  function get_datetime_tzinfo (line 172) | fn get_datetime_tzinfo<'py>(dt: &Bound<'py, PyDateTime>) -> Option<Bound...
  function get_time_tzinfo (line 177) | fn get_time_tzinfo<'py>(dt: &Bound<'py, PyTime>) -> Option<Bound<'py, Py...
  type TzClass (line 182) | pub struct TzClass {}
    method new (line 187) | fn new() -> Self {
    method utcoffset (line 192) | fn utcoffset<'py>(
    method tzname (line 201) | fn tzname(&self, _dt: Option<&Bound<'_, PyDateTime>>) -> String {
    method dst (line 206) | fn dst(&self, _dt: Option<&Bound<'_, PyDateTime>>) -> Option<Bound<'st...

FILE: pytests/src/dict_iter.rs
  type DictSize (line 10) | pub struct DictSize {
    method new (line 17) | fn new(expected: u32) -> Self {
    method iter_dict (line 21) | fn iter_dict(&mut self, _py: Python<'_>, dict: &Bound<'_, PyDict>) -> ...

FILE: pytests/src/enums.rs
  type SimpleEnum (line 14) | pub enum SimpleEnum {
  type SimpleEnumWithoutDerive (line 26) | pub enum SimpleEnumWithoutDerive {
  function do_simple_stuff (line 32) | pub fn do_simple_stuff(thing: &SimpleEnum) -> SimpleEnum {
  type ComplexEnum (line 45) | pub enum ComplexEnum {
  function do_complex_stuff (line 71) | pub fn do_complex_stuff(thing: &ComplexEnum) -> ComplexEnum {
  type SimpleTupleEnum (line 90) | enum SimpleTupleEnum {
  type TupleEnum (line 96) | pub enum TupleEnum {
  function do_tuple_stuff (line 105) | pub fn do_tuple_stuff(thing: &TupleEnum) -> TupleEnum {
  type MixedComplexEnum (line 114) | pub enum MixedComplexEnum {
  function do_mixed_complex_stuff (line 120) | pub fn do_mixed_complex_stuff(thing: &MixedComplexEnum) -> MixedComplexE...

FILE: pytests/src/exception.rs
  function raise_my_value_error (line 16) | fn raise_my_value_error() -> PyResult<()> {
  function return_value_error (line 21) | fn return_value_error<'py>(py: Python<'py>) -> PyResult<Bound<'py, PyVal...
  function return_my_value_error (line 28) | fn return_my_value_error<'py>(py: Python<'py>) -> PyResult<Bound<'py, My...
  function return_pyerr (line 35) | fn return_pyerr() -> PyErr {

FILE: pytests/src/lib.rs
  function init (line 46) | fn init(m: &Bound<'_, PyModule>) -> PyResult<()> {

FILE: pytests/src/misc.rs
  function issue_219 (line 7) | fn issue_219() {
  type LockHolder (line 13) | struct LockHolder {
  function hammer_attaching_in_thread (line 21) | fn hammer_attaching_in_thread() -> LockHolder {
  function get_type_fully_qualified_name (line 35) | fn get_type_fully_qualified_name<'py>(obj: &Bound<'py, PyAny>) -> PyResu...
  function accepts_bool (line 40) | fn accepts_bool(val: bool) -> bool {
  function get_item_and_run_callback (line 45) | fn get_item_and_run_callback(dict: Bound<'_, PyDict>, callback: Bound<'_...

FILE: pytests/src/objstore.rs
  type ObjStore (line 9) | pub struct ObjStore {
    method new (line 16) | fn new() -> Self {
    method push (line 20) | fn push(&mut self, obj: &Bound<'_, PyAny>) {

FILE: pytests/src/othermod.rs
  type ModClass (line 12) | pub struct ModClass {
    method new (line 19) | fn new() -> Self {
    method noop (line 25) | fn noop(&self, x: usize) -> usize {
  function double (line 31) | fn double(x: i32) -> i32 {
  constant USIZE_MIN (line 36) | pub const USIZE_MIN: usize = usize::MIN;
  constant USIZE_MAX (line 38) | pub const USIZE_MAX: usize = usize::MAX;

FILE: pytests/src/path.rs
  function make_path (line 9) | fn make_path() -> PathBuf {
  function take_pathbuf (line 14) | fn take_pathbuf(path: PathBuf) -> PathBuf {

FILE: pytests/src/pyclasses.rs
  type EmptyClass (line 12) | struct EmptyClass {}
    method new (line 17) | fn new() -> Self {
    method method (line 21) | fn method(&self) {}
    method __len__ (line 23) | fn __len__(&self) -> usize {
  type PyClassIter (line 31) | struct PyClassIter {
    method new (line 39) | pub fn new() -> Self {
    method __next__ (line 43) | fn __next__(&mut self) -> PyResult<usize> {
  type PyClassThreadIter (line 55) | struct PyClassThreadIter {
    method new (line 62) | pub fn new() -> Self {
    method __next__ (line 66) | fn __next__(&mut self, py: Python<'_>) -> usize {
  type AssertingBaseClass (line 79) | struct AssertingBaseClass;
    method new (line 85) | fn new(cls: &Bound<'_, PyType>, expected_type: Bound<'_, PyType>) -> P...
  type ClassWithoutConstructor (line 96) | struct ClassWithoutConstructor;
  type ClassWithDict (line 100) | struct ClassWithDict;
    method new (line 106) | fn new() -> Self {
  type SubClassWithInit (line 113) | struct SubClassWithInit;
    method __new__ (line 121) | fn __new__(args: &Bound<'_, PyTuple>, kwargs: Option<&Bound<'_, PyDict...
    method __init__ (line 126) | fn __init__(
  type ClassWithDecorators (line 141) | struct ClassWithDecorators {
    method new (line 149) | fn new(_cls: Bound<'_, PyType>) -> Self {
    method get_attr (line 155) | fn get_attr(&self) -> PyResult<usize> {
    method set_attr (line 162) | fn set_attr(&mut self, value: usize) {
    method delete_attr (line 168) | fn delete_attr(&mut self) {
    method cls_method (line 174) | fn cls_method(_cls: &Bound<'_, PyType>) -> usize {
    method static_method (line 180) | fn static_method() -> usize {
    method cls_attribute (line 186) | fn cls_attribute() -> usize {
  type PlainObject (line 192) | struct PlainObject {
  type AClass (line 200) | enum AClass {
  function map_a_class (line 213) | fn map_a_class(cls: AClass) -> AClass {
  type Number (line 218) | struct Number(u64);
    method new (line 224) | fn new(value: u64) -> Self {
    method __str__ (line 228) | fn __str__(&self) -> String {
    method __repr__ (line 232) | fn __repr__(&self) -> String {
    method __hash__ (line 236) | fn __hash__(&self) -> u64 {
    method __richcmp__ (line 240) | fn __richcmp__(&self, other: &Self, op: CompareOp) -> bool {
    method __add__ (line 244) | fn __add__(&self, other: &Self) -> Self {
    method __sub__ (line 248) | fn __sub__(&self, other: &Self) -> Self {
    method __mul__ (line 252) | fn __mul__(&self, other: &Self) -> Self {
    method __matmul__ (line 256) | fn __matmul__(&self, other: &Self) -> Self {
    method __truediv__ (line 260) | fn __truediv__(&self, other: &Self) -> Self {
    method __floordiv__ (line 264) | fn __floordiv__(&self, other: &Self) -> Self {
    method __mod__ (line 268) | fn __mod__(&self, other: &Self) -> Self {
    method __divmod__ (line 272) | fn __divmod__(&self, other: &Self) -> (Self, Self) {
    method __pow__ (line 276) | fn __pow__(&self, other: &Self, modulo: Option<&Self>) -> Self {
    method __rshift__ (line 280) | fn __rshift__(&self, other: &Self) -> Self {
    method __lshift__ (line 284) | fn __lshift__(&self, other: &Self) -> Self {
    method __and__ (line 288) | fn __and__(&self, other: &Self) -> Self {
    method __or__ (line 292) | fn __or__(&self, other: &Self) -> Self {
    method __xor__ (line 296) | fn __xor__(&self, other: &Self) -> Self {
    method __pos__ (line 300) | fn __pos__(slf: PyRef<'_, Self>) -> PyRef<'_, Self> {
    method __neg__ (line 304) | fn __neg__(&self) -> PyResult<Self> {
    method __abs__ (line 312) | fn __abs__(slf: PyRef<'_, Self>) -> PyRef<'_, Self> {
    method __invert__ (line 316) | fn __invert__(&self) -> Self {
    method __int__ (line 320) | fn __int__(&self) -> u64 {
    method __float__ (line 324) | fn __float__(&self) -> f64 {
    method __complex__ (line 328) | fn __complex__<'py>(&self, py: Python<'py>) -> Bound<'py, PyComplex> {

FILE: pytests/src/pyfunctions.rs
  function none (line 5) | fn none() {}
  type Any (line 7) | type Any<'py> = Bound<'py, PyAny>;
  type Dict (line 8) | type Dict<'py> = Bound<'py, PyDict>;
  type Tuple (line 9) | type Tuple<'py> = Bound<'py, PyTuple>;
  function simple (line 12) | fn simple<'py>(
  function simple_args (line 21) | fn simple_args<'py>(
  function simple_kwargs (line 31) | fn simple_kwargs<'py>(
  function simple_args_kwargs (line 46) | fn simple_args_kwargs<'py>(
  function args_kwargs (line 63) | fn args_kwargs<'py>(
  function positional_only (line 71) | fn positional_only<'py>(a: Any<'py>, b: Any<'py>) -> (Any<'py>, Any<'py>) {
  function with_typed_args (line 76) | fn with_typed_args(a: bool, b: u64, c: f64, d: &str) -> (bool, u64, f64,...
  function with_custom_type_annotations (line 82) | fn with_custom_type_annotations<'py>(
  function with_async (line 93) | async fn with_async() {}
  function many_keyword_arguments (line 117) | fn many_keyword_arguments<'py>(

FILE: pytests/src/sequence.rs
  function vec_to_vec_i32 (line 9) | fn vec_to_vec_i32(vec: Vec<i32>) -> Vec<i32> {
  function array_to_array_i32 (line 14) | fn array_to_array_i32(arr: [i32; 3]) -> [i32; 3] {
  function vec_to_vec_pystring (line 19) | fn vec_to_vec_pystring(vec: Vec<Bound<'_, PyString>>) -> Vec<Bound<'_, P...

FILE: pytests/src/subclassing.rs
  type Subclassable (line 12) | pub struct Subclassable {}
    method new (line 17) | fn new() -> Self {
    method __str__ (line 21) | fn __str__(&self) -> &'static str {
  type Subclass (line 27) | pub struct Subclass {}
    method new (line 32) | fn new() -> (Self, Subclassable) {
    method __str__ (line 36) | fn __str__(&self) -> &'static str {
  type SubDict (line 43) | pub struct SubDict {}
    method new (line 49) | fn new() -> Self {
    method __str__ (line 53) | fn __str__(&self) -> &'static str {

FILE: pytests/stubs/__init__.pyi
  function __getattr__ (line 9) | def __getattr__(name: str) -> Incomplete: ...

FILE: pytests/stubs/awaitable.pyi
  class FutureAwaitable (line 4) | class FutureAwaitable:
    method __await__ (line 5) | def __await__(self, /) -> FutureAwaitable: ...
    method __iter__ (line 6) | def __iter__(self, /) -> FutureAwaitable: ...
    method __new__ (line 7) | def __new__(cls, /, result: Any) -> FutureAwaitable: ...
    method __next__ (line 8) | def __next__(self, /) -> FutureAwaitable: ...
    method _asyncio_future_blocking (line 10) | def _asyncio_future_blocking(self, /) -> bool: ...
    method _asyncio_future_blocking (line 12) | def _asyncio_future_blocking(self, /, value: bool) -> None: ...
  class IterAwaitable (line 15) | class IterAwaitable:
    method __await__ (line 16) | def __await__(self, /) -> IterAwaitable: ...
    method __iter__ (line 17) | def __iter__(self, /) -> IterAwaitable: ...
    method __new__ (line 18) | def __new__(cls, /, result: Any) -> IterAwaitable: ...
    method __next__ (line 19) | def __next__(self, /) -> Any: ...

FILE: pytests/stubs/buf_and_str.pyi
  class BytesExtractor (line 9) | class BytesExtractor:
    method __new__ (line 13) | def __new__(cls, /) -> BytesExtractor: ...
    method from_buffer (line 15) | def from_buffer(buf: Any) -> int: ...
    method from_bytes (line 17) | def from_bytes(bytes: bytes) -> int: ...
    method from_str (line 19) | def from_str(string: str) -> int: ...
    method from_str_lossy (line 21) | def from_str_lossy(string: str) -> int: ...
  function map_byte_cow (line 23) | def map_byte_cow(bytes: Sequence[int]) -> bytes: ...
  function map_byte_slice (line 24) | def map_byte_slice(bytes: bytes) -> bytes: ...
  function map_byte_vec (line 25) | def map_byte_vec(bytes: Sequence[int]) -> bytes: ...
  function return_memoryview (line 26) | def return_memoryview() -> memoryview: ...

FILE: pytests/stubs/comparisons.pyi
  class Eq (line 4) | class Eq:
    method __eq__ (line 5) | def __eq__(self, /, other: object) -> bool: ...
    method __ne__ (line 6) | def __ne__(self, /, other: object) -> bool: ...
    method __new__ (line 7) | def __new__(cls, /, value: int) -> Eq: ...
  class EqDefaultNe (line 10) | class EqDefaultNe:
    method __eq__ (line 11) | def __eq__(self, /, other: object) -> bool: ...
    method __new__ (line 12) | def __new__(cls, /, value: int) -> EqDefaultNe: ...
  class EqDerived (line 15) | class EqDerived:
    method __eq__ (line 16) | def __eq__(self, /, other: object) -> bool: ...
    method __ne__ (line 17) | def __ne__(self, /, other: object) -> bool: ...
    method __new__ (line 18) | def __new__(cls, /, value: int) -> EqDerived: ...
  class Ordered (line 21) | class Ordered:
    method __eq__ (line 22) | def __eq__(self, /, other: object) -> bool: ...
    method __ge__ (line 23) | def __ge__(self, /, other: object) -> bool: ...
    method __gt__ (line 24) | def __gt__(self, /, other: object) -> bool: ...
    method __le__ (line 25) | def __le__(self, /, other: object) -> bool: ...
    method __lt__ (line 26) | def __lt__(self, /, other: object) -> bool: ...
    method __ne__ (line 27) | def __ne__(self, /, other: object) -> bool: ...
    method __new__ (line 28) | def __new__(cls, /, value: int) -> Ordered: ...
  class OrderedDefaultNe (line 31) | class OrderedDefaultNe:
    method __eq__ (line 32) | def __eq__(self, /, other: object) -> bool: ...
    method __ge__ (line 33) | def __ge__(self, /, other: object) -> bool: ...
    method __gt__ (line 34) | def __gt__(self, /, other: object) -> bool: ...
    method __le__ (line 35) | def __le__(self, /, other: object) -> bool: ...
    method __lt__ (line 36) | def __lt__(self, /, other: object) -> bool: ...
    method __new__ (line 37) | def __new__(cls, /, value: int) -> OrderedDefaultNe: ...
  class OrderedDerived (line 40) | class OrderedDerived:
    method __eq__ (line 41) | def __eq__(self, /, other: object) -> bool: ...
    method __ge__ (line 42) | def __ge__(self, /, other: object) -> bool: ...
    method __gt__ (line 43) | def __gt__(self, /, other: object) -> bool: ...
    method __hash__ (line 44) | def __hash__(self, /) -> int: ...
    method __le__ (line 45) | def __le__(self, /, other: object) -> bool: ...
    method __lt__ (line 46) | def __lt__(self, /, other: object) -> bool: ...
    method __ne__ (line 47) | def __ne__(self, /, other: object) -> bool: ...
    method __new__ (line 48) | def __new__(cls, /, value: int) -> OrderedDerived: ...
    method __str__ (line 49) | def __str__(self, /) -> str: ...
  class OrderedRichCmp (line 52) | class OrderedRichCmp:
    method __eq__ (line 53) | def __eq__(self, /, other: object) -> bool: ...
    method __ge__ (line 54) | def __ge__(self, /, other: object) -> bool: ...
    method __gt__ (line 55) | def __gt__(self, /, other: object) -> bool: ...
    method __le__ (line 56) | def __le__(self, /, other: object) -> bool: ...
    method __lt__ (line 57) | def __lt__(self, /, other: object) -> bool: ...
    method __ne__ (line 58) | def __ne__(self, /, other: object) -> bool: ...
    method __new__ (line 59) | def __new__(cls, /, value: int) -> OrderedRichCmp: ...

FILE: pytests/stubs/consts.pyi
  class ClassWithConst (line 14) | class ClassWithConst:

FILE: pytests/stubs/datetime.pyi
  class TzClass (line 5) | class TzClass(tzinfo):
    method __new__ (line 6) | def __new__(cls, /) -> TzClass: ...
    method dst (line 7) | def dst(self,
Condensed preview — 766 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,995K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "chars": 2028,
    "preview": "name: 🐛 Bug Report\ndescription: Create a bug report\ntype: Bug\nbody:\n  - type: markdown\n    attributes:\n      value: |\n  "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 428,
    "preview": "blank_issues_enabled: true\ncontact_links:\n  - name: ❓ Question\n    url: https://github.com/PyO3/pyo3/discussions\n    abo"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 438,
    "preview": "---\nname: 💡 Feature request\nabout: Suggest an idea for this project\ntype: Feature\n---\n\n<!--\nThank you for sharing your i"
  },
  {
    "path": ".github/actions/fetch-merge-base/action.yml",
    "chars": 1036,
    "preview": "name: 'Fetch Merge Base'\ndescription: 'Fetches the merge base between two branches, deepening the git checkout until com"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 887,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 858,
    "preview": "Thank you for contributing to PyO3!\n\nBy submitting these contributions you agree for them to be dual-licensed under PyO3"
  },
  {
    "path": ".github/workflows/benches.yml",
    "chars": 1348,
    "preview": "name: benches\n\non:\n  push:\n    branches:\n      - \"main\"\n  pull_request:\n\nconcurrency:\n  group: ${{ github.workflow }}-${"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 6805,
    "preview": "on:\n  workflow_call:\n    inputs:\n      os:\n        required: true\n        type: string\n      python-version:\n        req"
  },
  {
    "path": ".github/workflows/cache-cleanup.yml",
    "chars": 878,
    "preview": "name: CI Cache Cleanup\non:\n  pull_request_target:\n    types:\n      - closed\n\njobs:\n  cleanup:\n    runs-on: ubuntu-latest"
  },
  {
    "path": ".github/workflows/changelog.yml",
    "chars": 415,
    "preview": "name: changelog\n\non:\n  pull_request:\n    types: [opened, synchronize, labeled, unlabeled, edited]\n\njobs:\n  check:\n    na"
  },
  {
    "path": ".github/workflows/ci-cache-warmup.yml",
    "chars": 912,
    "preview": "name: CI Cache Warmup\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  cross-compilation-windows:\n    runs-on: ubuntu-la"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 30997,
    "preview": "name: CI\n\non:\n  pull_request:\n  merge_group:\n    types: [checks_requested]\n  workflow_dispatch:\n\nconcurrency:\n  group: $"
  },
  {
    "path": ".github/workflows/coverage-pr-base.yml",
    "chars": 1127,
    "preview": "# This runs as a separate job because it needs to run on the `pull_request_target` event\n# in order to access the CODECO"
  },
  {
    "path": ".github/workflows/netlify-build.yml",
    "chars": 3020,
    "preview": "name: netlify-build\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n  release:\n    types: [published]\n\nconcurren"
  },
  {
    "path": ".github/workflows/netlify-deploy.yml",
    "chars": 2351,
    "preview": "# This runs as a separate job because it needs to run on the `workflow_run` event\n# in order to access the netlify secre"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 825,
    "preview": "name: Release Rust Crate\n\non:\n  push:\n    tags:\n      - \"v*\"\n  workflow_dispatch:\n    inputs:\n      version:\n        des"
  },
  {
    "path": ".gitignore",
    "chars": 348,
    "preview": "target\nCargo.lock\n/doc\n/gh-pages\nbuild/\n*.py[co]\n__pycache__/\n.cache\n.pytest_cache/\ndist/\n.tox/\n.mypy_cache/\n.hypothesis"
  },
  {
    "path": ".netlify/internal_banner.html",
    "chars": 1414,
    "preview": "<div id='pyo3-internal-banner'>\n    <div style=\"white-space: nowrap;\">\n        ⚠️ Internal Docs ⚠️ Not Public API 👉\n    "
  },
  {
    "path": ".netlify/redirect.sh",
    "chars": 2402,
    "preview": "# Add redirect for each documented version\nset +x  # these loops get very spammy and fill the deploy log\n\nfor d in netli"
  },
  {
    "path": ".towncrier.template.md",
    "chars": 558,
    "preview": "{% for section_text, section in sections.items() %}{%- if section %}{{section_text}}{% endif -%}\n\n{% if section %}\n{% fo"
  },
  {
    "path": "Architecture.md",
    "chars": 10303,
    "preview": "<!-- This file contains a rough overview of the PyO3 codebase. -->\n<!-- Please do not make descriptions too specific, so"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 203071,
    "preview": "# Changelog\n\nAll notable changes to this project will be documented in this file. For help with updating to new\nPyO3 ver"
  },
  {
    "path": "CITATION.cff",
    "chars": 291,
    "preview": "cff-version: 1.2.0\ntitle: PyO3\nmessage: >-\n  If you use this software as part of a publication and wish to cite\n  it, pl"
  },
  {
    "path": "Cargo.toml",
    "chars": 7434,
    "preview": "[package]\nname = \"pyo3\"\nversion = \"0.28.2\"\ndescription = \"Bindings to Python interpreter\"\nauthors = [\"PyO3 Project and C"
  },
  {
    "path": "Code-of-Conduct.md",
    "chars": 3332,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "Contributing.md",
    "chars": 14651,
    "preview": "# Contributing\n\nThank you for your interest in contributing to PyO3! All are welcome - please consider reading our [Code"
  },
  {
    "path": "LICENSE-APACHE",
    "chars": 9807,
    "preview": "Copyright (c) 2017-present PyO3 Project and Contributors.  https://github.com/PyO3\n\n                              Apache"
  },
  {
    "path": "LICENSE-MIT",
    "chars": 1107,
    "preview": "Copyright (c) 2023-present PyO3 Project and Contributors.  https://github.com/PyO3\n\nPermission is hereby granted, free o"
  },
  {
    "path": "README.md",
    "chars": 19756,
    "preview": "# PyO3\n\n[![actions status](https://img.shields.io/github/actions/workflow/status/PyO3/pyo3/ci.yml?branch=main&logo=githu"
  },
  {
    "path": "Releasing.md",
    "chars": 3466,
    "preview": "# Releasing\n\nThis is notes for the current process of releasing a new PyO3 version. Replace `<version>` in all instructi"
  },
  {
    "path": "assets/script.py",
    "chars": 52,
    "preview": "# Used in PyModule examples.\n\n\nclass Blah:\n    pass\n"
  },
  {
    "path": "build.rs",
    "chars": 2130,
    "preview": "use std::env;\n\nuse pyo3_build_config::pyo3_build_script_impl::{cargo_env_var, errors::Result};\nuse pyo3_build_config::{\n"
  },
  {
    "path": "codecov.yml",
    "chars": 408,
    "preview": "comment: off\n\ncoverage:\n  status:\n    project:\n      default:\n        target: auto\n        # Allow a tiny drop of overal"
  },
  {
    "path": "emscripten/.gitignore",
    "chars": 24,
    "preview": "pybuilddir.txt\nbuilddir\n"
  },
  {
    "path": "emscripten/Makefile",
    "chars": 3060,
    "preview": "CURDIR=$(abspath .)\n\n# These three are passed in from nox.\nBUILDROOT ?= $(CURDIR)/builddir\nPYTHON ?= python3\nPYMAJORMINO"
  },
  {
    "path": "emscripten/runner.py",
    "chars": 229,
    "preview": "#!/usr/local/bin/python\nimport pathlib\nimport sys\nimport subprocess\n\np = pathlib.Path(sys.argv[1])\n\ncommand = [\"node\", p"
  },
  {
    "path": "examples/Cargo.toml",
    "chars": 294,
    "preview": "[package]\nname = \"pyo3-examples\"\nversion = \"0.0.0\"\npublish = false\nedition = \"2021\"\nrust-version = \"1.83\"\n\n[dev-dependen"
  },
  {
    "path": "examples/README.md",
    "chars": 1435,
    "preview": "# PyO3 Examples\n\nThese example crates are a collection of toy extension modules built with PyO3. They are all tested usi"
  },
  {
    "path": "examples/decorator/.template/Cargo.toml",
    "chars": 189,
    "preview": "[package]\nauthors = [\"{{authors}}\"]\nname = \"{{project-name}}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\nname = \"decorato"
  },
  {
    "path": "examples/decorator/.template/pre-script.rhai",
    "chars": 180,
    "preview": "variable::set(\"PYO3_VERSION\", \"0.28.2\");\nfile::rename(\".template/Cargo.toml\", \"Cargo.toml\");\nfile::rename(\".template/pyp"
  },
  {
    "path": "examples/decorator/.template/pyproject.toml",
    "chars": 175,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"{{project-name}}\"\nversion = \"0."
  },
  {
    "path": "examples/decorator/Cargo.toml",
    "chars": 192,
    "preview": "[package]\nname = \"decorator\"\nversion = \"0.1.0\"\nedition = \"2021\"\nrust-version = \"1.83\"\n\n[lib]\nname = \"decorator\"\ncrate-ty"
  },
  {
    "path": "examples/decorator/MANIFEST.in",
    "chars": 58,
    "preview": "include pyproject.toml Cargo.toml\nrecursive-include src *\n"
  },
  {
    "path": "examples/decorator/README.md",
    "chars": 794,
    "preview": "# decorator\n\nA project showcasing the example from the [Emulating callable objects](https://pyo3.rs/latest/class/call.ht"
  },
  {
    "path": "examples/decorator/cargo-generate.toml",
    "chars": 74,
    "preview": "[template]\nignore = [\".nox\"]\n\n[hooks]\npre = [\".template/pre-script.rhai\"]\n"
  },
  {
    "path": "examples/decorator/noxfile.py",
    "chars": 173,
    "preview": "import nox\n\n\n@nox.session\ndef python(session: nox.Session):\n    session.env[\"MATURIN_PEP517_ARGS\"] = \"--profile=dev\"\n   "
  },
  {
    "path": "examples/decorator/pyproject.toml",
    "chars": 461,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"decorator\"\nversion = \"0.1.0\"\ncl"
  },
  {
    "path": "examples/decorator/src/lib.rs",
    "chars": 1886,
    "preview": "use pyo3::prelude::*;\nuse pyo3::types::{PyDict, PyTuple};\nuse std::sync::atomic::{AtomicU64, Ordering};\n\n/// A function "
  },
  {
    "path": "examples/decorator/tests/example.py",
    "chars": 156,
    "preview": "from decorator import Counter\n\n\n@Counter\ndef say_hello():\n    print(\"hello\")\n\n\nsay_hello()\nsay_hello()\nsay_hello()\nsay_h"
  },
  {
    "path": "examples/decorator/tests/test_.py",
    "chars": 832,
    "preview": "from decorator import Counter\n\n\ndef test_no_args():\n    @Counter\n    def say_hello():\n        print(\"hello\")\n\n    say_he"
  },
  {
    "path": "examples/getitem/.template/Cargo.toml",
    "chars": 187,
    "preview": "[package]\nauthors = [\"{{authors}}\"]\nname = \"{{project-name}}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\nname = \"getitem\""
  },
  {
    "path": "examples/getitem/.template/pre-script.rhai",
    "chars": 180,
    "preview": "variable::set(\"PYO3_VERSION\", \"0.19.0\");\nfile::rename(\".template/Cargo.toml\", \"Cargo.toml\");\nfile::rename(\".template/pyp"
  },
  {
    "path": "examples/getitem/.template/pyproject.toml",
    "chars": 175,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"{{project-name}}\"\nversion = \"0."
  },
  {
    "path": "examples/getitem/Cargo.toml",
    "chars": 188,
    "preview": "[package]\nname = \"getitem\"\nversion = \"0.1.0\"\nedition = \"2021\"\nrust-version = \"1.83\"\n\n[lib]\nname = \"getitem\"\ncrate-type ="
  },
  {
    "path": "examples/getitem/MANIFEST.in",
    "chars": 58,
    "preview": "include pyproject.toml Cargo.toml\nrecursive-include src *\n"
  },
  {
    "path": "examples/getitem/README.md",
    "chars": 1275,
    "preview": "# getitem\n\nA project showcasing how to create a `__getitem__` override that also showcases how to deal with multiple inc"
  },
  {
    "path": "examples/getitem/cargo-generate.toml",
    "chars": 74,
    "preview": "[template]\nignore = [\".nox\"]\n\n[hooks]\npre = [\".template/pre-script.rhai\"]\n"
  },
  {
    "path": "examples/getitem/noxfile.py",
    "chars": 173,
    "preview": "import nox\n\n\n@nox.session\ndef python(session: nox.Session):\n    session.env[\"MATURIN_PEP517_ARGS\"] = \"--profile=dev\"\n   "
  },
  {
    "path": "examples/getitem/pyproject.toml",
    "chars": 459,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"getitem\"\nversion = \"0.1.0\"\nclas"
  },
  {
    "path": "examples/getitem/src/lib.rs",
    "chars": 3209,
    "preview": "// This is a very fake example of how to check __getitem__ parameter and handle appropriately\nuse pyo3::exceptions::PyTy"
  },
  {
    "path": "examples/getitem/tests/test_getitem.py",
    "chars": 497,
    "preview": "import getitem\nimport pytest\n\n\ndef test_simple():\n    container = getitem.ExampleContainer()\n    assert container[3] == "
  },
  {
    "path": "examples/maturin-starter/.template/Cargo.toml",
    "chars": 195,
    "preview": "[package]\nauthors = [\"{{authors}}\"]\nname = \"{{project-name}}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\nname = \"maturin_"
  },
  {
    "path": "examples/maturin-starter/.template/pre-script.rhai",
    "chars": 180,
    "preview": "variable::set(\"PYO3_VERSION\", \"0.28.2\");\nfile::rename(\".template/Cargo.toml\", \"Cargo.toml\");\nfile::rename(\".template/pyp"
  },
  {
    "path": "examples/maturin-starter/.template/pyproject.toml",
    "chars": 175,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"{{project-name}}\"\nversion = \"0."
  },
  {
    "path": "examples/maturin-starter/Cargo.toml",
    "chars": 242,
    "preview": "[package]\nname = \"maturin-starter\"\nversion = \"0.1.0\"\nedition = \"2021\"\nrust-version = \"1.83\"\n\n[lib]\nname = \"maturin_start"
  },
  {
    "path": "examples/maturin-starter/MANIFEST.in",
    "chars": 58,
    "preview": "include pyproject.toml Cargo.toml\nrecursive-include src *\n"
  },
  {
    "path": "examples/maturin-starter/README.md",
    "chars": 789,
    "preview": "# maturin-starter\n\nAn example of a basic Python extension module built using PyO3 and [`maturin`](https://github.com/PyO"
  },
  {
    "path": "examples/maturin-starter/cargo-generate.toml",
    "chars": 74,
    "preview": "[template]\nignore = [\".nox\"]\n\n[hooks]\npre = [\".template/pre-script.rhai\"]\n"
  },
  {
    "path": "examples/maturin-starter/maturin_starter/__init__.py",
    "chars": 376,
    "preview": "# import the contents of the Rust library into the Python extension\nfrom .maturin_starter import *\nfrom .maturin_starter"
  },
  {
    "path": "examples/maturin-starter/noxfile.py",
    "chars": 160,
    "preview": "import nox\n\n\n@nox.session\ndef python(session):\n    session.env[\"MATURIN_PEP517_ARGS\"] = \"--profile=dev\"\n    session.inst"
  },
  {
    "path": "examples/maturin-starter/pyproject.toml",
    "chars": 467,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"maturin-starter\"\nversion = \"0.1"
  },
  {
    "path": "examples/maturin-starter/src/lib.rs",
    "chars": 886,
    "preview": "use pyo3::prelude::*;\nuse pyo3::types::PyDict;\nuse pyo3::wrap_pymodule;\n\nmod submodule;\n\n#[pyclass]\nstruct ExampleClass "
  },
  {
    "path": "examples/maturin-starter/src/submodule.rs",
    "chars": 371,
    "preview": "use pyo3::prelude::*;\n\n#[pyclass]\nstruct SubmoduleClass {}\n\n#[pymethods]\nimpl SubmoduleClass {\n    #[new]\n    pub fn __n"
  },
  {
    "path": "examples/maturin-starter/tests/test_maturin_starter.py",
    "chars": 422,
    "preview": "from maturin_starter import ExampleClass, PythonClass\n\n\ndef test_python_class() -> None:\n    py_class = PythonClass(valu"
  },
  {
    "path": "examples/maturin-starter/tests/test_submodule.py",
    "chars": 187,
    "preview": "from maturin_starter.submodule import SubmoduleClass\n\n\ndef test_submodule_class() -> None:\n    submodule_class = Submodu"
  },
  {
    "path": "examples/plugin/.template/Cargo.toml",
    "chars": 176,
    "preview": "[package]\nauthors = [\"{{authors}}\"]\nname = \"{{project-name}}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\npyo3 = "
  },
  {
    "path": "examples/plugin/.template/plugin_api/Cargo.toml",
    "chars": 201,
    "preview": "[package]\nname = \"plugin_api\"\nversion = \"0.1.0\"\ndescription = \"Plugin API example\"\nedition = \"2021\"\n\n[lib]\nname = \"plugi"
  },
  {
    "path": "examples/plugin/.template/pre-script.rhai",
    "chars": 194,
    "preview": "variable::set(\"PYO3_VERSION\", \"0.28.2\");\nfile::rename(\".template/Cargo.toml\", \"Cargo.toml\");\nfile::rename(\".template/plu"
  },
  {
    "path": "examples/plugin/Cargo.toml",
    "chars": 208,
    "preview": "[package]\nname = \"plugin_example\"\nversion = \"0.1.0\"\nedition = \"2021\"\nrust-version = \"1.83\"\n\n[dependencies]\npyo3 = { path"
  },
  {
    "path": "examples/plugin/README.md",
    "chars": 1213,
    "preview": "# plugin\n\nAn example of a Rust app that uses Python for a plugin. A Python extension module built using PyO3 and [`matur"
  },
  {
    "path": "examples/plugin/cargo-generate.toml",
    "chars": 74,
    "preview": "[template]\nignore = [\".nox\"]\n\n[hooks]\npre = [\".template/pre-script.rhai\"]\n"
  },
  {
    "path": "examples/plugin/plugin_api/Cargo.toml",
    "chars": 205,
    "preview": "[package]\nname = \"plugin_api\"\nversion = \"0.1.0\"\ndescription = \"Plugin API example\"\nedition = \"2021\"\n\n[lib]\nname = \"plugi"
  },
  {
    "path": "examples/plugin/plugin_api/noxfile.py",
    "chars": 160,
    "preview": "import nox\n\n\n@nox.session\ndef python(session):\n    session.env[\"MATURIN_PEP517_ARGS\"] = \"--profile=dev\"\n    session.inst"
  },
  {
    "path": "examples/plugin/plugin_api/pyproject.toml",
    "chars": 362,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"plugin_api\"\nrequires-python = \""
  },
  {
    "path": "examples/plugin/plugin_api/src/lib.rs",
    "chars": 671,
    "preview": "use pyo3::prelude::*;\n\n///this is our Gadget that python plugin code can create, and rust app can then access natively.\n"
  },
  {
    "path": "examples/plugin/plugin_api/tests/test_Gadget.py",
    "chars": 270,
    "preview": "import pytest\n\n\n@pytest.fixture\ndef gadget():\n    import plugin_api as pa\n\n    g = pa.Gadget()\n    return g\n\n\ndef test_c"
  },
  {
    "path": "examples/plugin/plugin_api/tests/test_import.py",
    "chars": 55,
    "preview": "def test_import():\n    import plugin_api  # noqa: F401\n"
  },
  {
    "path": "examples/plugin/python_plugin/gadget_init_plugin.py",
    "chars": 236,
    "preview": "import plugin_api\nimport rng\n\n\ndef start():\n    \"\"\"create an instance of Gadget, configure it and return to Rust\"\"\"\n    "
  },
  {
    "path": "examples/plugin/python_plugin/rng.py",
    "chars": 92,
    "preview": "def get_random_number():\n    # verified by the roll of a fair die to be random\n    return 4\n"
  },
  {
    "path": "examples/plugin/src/main.rs",
    "chars": 1965,
    "preview": "use plugin_api::plugin_api as pylib_module;\nuse pyo3::prelude::*;\nuse pyo3::types::PyList;\n\nfn main() -> Result<(), Box<"
  },
  {
    "path": "examples/setuptools-rust-starter/.template/Cargo.toml",
    "chars": 203,
    "preview": "[package]\nauthors = [\"{{authors}}\"]\nname = \"{{project-name}}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\nname = \"setuptoo"
  },
  {
    "path": "examples/setuptools-rust-starter/.template/pre-script.rhai",
    "chars": 170,
    "preview": "variable::set(\"PYO3_VERSION\", \"0.28.2\");\nfile::rename(\".template/Cargo.toml\", \"Cargo.toml\");\nfile::rename(\".template/set"
  },
  {
    "path": "examples/setuptools-rust-starter/.template/setup.cfg",
    "chars": 146,
    "preview": "[metadata]\nname = {{project-name}}\nversion = 0.1.0\npackages =\n    setuptools_rust_starter\n\n[options]\ninclude_package_dat"
  },
  {
    "path": "examples/setuptools-rust-starter/Cargo.toml",
    "chars": 220,
    "preview": "[package]\nname = \"setuptools-rust-starter\"\nversion = \"0.1.0\"\nedition = \"2021\"\nrust-version = \"1.83\"\n\n[lib]\nname = \"setup"
  },
  {
    "path": "examples/setuptools-rust-starter/MANIFEST.in",
    "chars": 58,
    "preview": "include pyproject.toml Cargo.toml\nrecursive-include src *\n"
  },
  {
    "path": "examples/setuptools-rust-starter/README.md",
    "chars": 853,
    "preview": "# setuptools-rust-starter\n\nAn example of a basic Python extension module built using PyO3 and [`setuptools_rust`](https:"
  },
  {
    "path": "examples/setuptools-rust-starter/cargo-generate.toml",
    "chars": 74,
    "preview": "[template]\nignore = [\".nox\"]\n\n[hooks]\npre = [\".template/pre-script.rhai\"]\n"
  },
  {
    "path": "examples/setuptools-rust-starter/noxfile.py",
    "chars": 299,
    "preview": "import nox\nimport sys\n\n\n@nox.session\ndef python(session: nox.Session):\n    if sys.version_info < (3, 9):\n        session"
  },
  {
    "path": "examples/setuptools-rust-starter/pyproject.toml",
    "chars": 666,
    "preview": "[build-system]\nrequires = [\"setuptools>=62.4\", \"setuptools_rust>=1.11\"]\n\n[project]\nname = \"setuptools-rust-starter\"\nvers"
  },
  {
    "path": "examples/setuptools-rust-starter/requirements-dev.txt",
    "chars": 53,
    "preview": "pytest>=3.5.0\nsetuptools_rust~=1.0.0\npip>=21.3\nwheel\n"
  },
  {
    "path": "examples/setuptools-rust-starter/setuptools_rust_starter/__init__.py",
    "chars": 403,
    "preview": "# import the contents of the Rust library into the Python extension\nfrom ._setuptools_rust_starter import *\nfrom ._setup"
  },
  {
    "path": "examples/setuptools-rust-starter/src/lib.rs",
    "chars": 911,
    "preview": "use pyo3::prelude::*;\nuse pyo3::types::PyDict;\nuse pyo3::wrap_pymodule;\n\nmod submodule;\n\n#[pyclass]\nstruct ExampleClass "
  },
  {
    "path": "examples/setuptools-rust-starter/src/submodule.rs",
    "chars": 371,
    "preview": "use pyo3::prelude::*;\n\n#[pyclass]\nstruct SubmoduleClass {}\n\n#[pymethods]\nimpl SubmoduleClass {\n    #[new]\n    pub fn __n"
  },
  {
    "path": "examples/setuptools-rust-starter/tests/test_setuptools_rust_starter.py",
    "chars": 454,
    "preview": "from setuptools_rust_starter import ExampleClass, PythonClass\n\n\ndef test_python_class() -> None:\n    py_class = PythonCl"
  },
  {
    "path": "examples/setuptools-rust-starter/tests/test_submodule.py",
    "chars": 195,
    "preview": "from setuptools_rust_starter.submodule import SubmoduleClass\n\n\ndef test_submodule_class() -> None:\n    submodule_class ="
  },
  {
    "path": "examples/word-count/.template/Cargo.toml",
    "chars": 206,
    "preview": "[package]\nauthors = [\"{{authors}}\"]\nname = \"{{project-name}}\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\nname = \"word_cou"
  },
  {
    "path": "examples/word-count/.template/pre-script.rhai",
    "chars": 180,
    "preview": "variable::set(\"PYO3_VERSION\", \"0.28.2\");\nfile::rename(\".template/Cargo.toml\", \"Cargo.toml\");\nfile::rename(\".template/pyp"
  },
  {
    "path": "examples/word-count/.template/pyproject.toml",
    "chars": 234,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"{{project-name}}\"\nversion = \"0."
  },
  {
    "path": "examples/word-count/Cargo.toml",
    "chars": 209,
    "preview": "[package]\nname = \"word-count\"\nversion = \"0.1.0\"\nedition = \"2021\"\nrust-version = \"1.83\"\n\n[lib]\nname = \"word_count\"\ncrate-"
  },
  {
    "path": "examples/word-count/MANIFEST.in",
    "chars": 58,
    "preview": "include pyproject.toml Cargo.toml\nrecursive-include src *\n"
  },
  {
    "path": "examples/word-count/README.md",
    "chars": 809,
    "preview": "# word-count\n\nDemonstrates searching for a file in plain python, with rust singlethreaded and with rust multithreaded.\n\n"
  },
  {
    "path": "examples/word-count/cargo-generate.toml",
    "chars": 74,
    "preview": "[template]\nignore = [\".nox\"]\n\n[hooks]\npre = [\".template/pre-script.rhai\"]\n"
  },
  {
    "path": "examples/word-count/noxfile.py",
    "chars": 330,
    "preview": "import nox\n\nnox.options.sessions = [\"test\"]\n\n\n@nox.session\ndef test(session: nox.Session):\n    session.env[\"MATURIN_PEP5"
  },
  {
    "path": "examples/word-count/pyproject.toml",
    "chars": 541,
    "preview": "[build-system]\nrequires = [\"maturin>=1,<2\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"word-count\"\nversion = \"0.1.0\"\nc"
  },
  {
    "path": "examples/word-count/src/lib.rs",
    "chars": 1133,
    "preview": "use pyo3::prelude::*;\nuse rayon::prelude::*;\n\n/// Searches for the word, parallelized by rayon\n#[pyfunction]\nfn search(c"
  },
  {
    "path": "examples/word-count/tests/test_word_count.py",
    "chars": 2089,
    "preview": "from concurrent.futures import ThreadPoolExecutor\n\nimport pytest\nimport word_count\n\n\n@pytest.fixture(scope=\"session\")\nde"
  },
  {
    "path": "examples/word-count/word_count/__init__.py",
    "chars": 400,
    "preview": "from .word_count import search, search_sequential, search_sequential_detached\n\n__all__ = [\n    \"search_py\",\n    \"search\""
  },
  {
    "path": "guide/book.toml",
    "chars": 450,
    "preview": "[book]\ntitle = \"PyO3 user guide\"\ndescription = \"PyO3 user guide\"\nauthors = [\"PyO3 Project and Contributors\"]\n\n[preproces"
  },
  {
    "path": "guide/pyclass-parameters.md",
    "chars": 5446,
    "preview": "`#[pyclass]` can be used with the following parameters:\n\n|  Parameter  |  Description |\n| :-  | :- |\n| `constructor` | T"
  },
  {
    "path": "guide/pyo3_version.py",
    "chars": 1680,
    "preview": "\"\"\"Simple mdbook preprocessor to inject pyo3 version into the guide.\n\nIt will replace:\n    - {{#PYO3_VERSION_TAG}} with "
  },
  {
    "path": "guide/src/SUMMARY.md",
    "chars": 1899,
    "preview": "# Summary\n\n[Introduction](index.md)\n\n---\n\n- [Getting started](getting-started.md)\n- [Using Rust from Python](rust-from-p"
  },
  {
    "path": "guide/src/advanced.md",
    "chars": 401,
    "preview": "# Advanced topics\n\n## FFI\n\nPyO3 exposes much of Python's C API through the `ffi` module.\n\nThe C API is naturally unsafe "
  },
  {
    "path": "guide/src/async-await.md",
    "chars": 4613,
    "preview": "# Using `async` and `await`\n\n*This feature is still in active development.*\n*See [the related issue](https://github.com/"
  },
  {
    "path": "guide/src/building-and-distribution/multiple-python-versions.md",
    "chars": 5203,
    "preview": "# Supporting multiple Python versions\n\nPyO3 supports all actively-supported Python 3 and PyPy versions.\nAs much as possi"
  },
  {
    "path": "guide/src/building-and-distribution.md",
    "chars": 26641,
    "preview": "# Building and distribution\n\nThis chapter of the guide goes into detail on how to build and distribute projects using Py"
  },
  {
    "path": "guide/src/changelog.md",
    "chars": 32,
    "preview": "{{#include ../../CHANGELOG.md}}\n"
  },
  {
    "path": "guide/src/class/call.md",
    "chars": 4822,
    "preview": "# Emulating callable objects\n\nClasses can be callable if they have a `#[pymethod]` named `__call__`.\nThis allows instanc"
  },
  {
    "path": "guide/src/class/numeric.md",
    "chars": 12572,
    "preview": "# Emulating numeric types\n\nAt this point we have a `Number` class that we can't actually do any math on!\n\nBefore proceed"
  },
  {
    "path": "guide/src/class/object.md",
    "chars": 10392,
    "preview": "# Basic object customization\n\nRecall the `Number` class from the previous chapter:\n\n```rust,no_run\n# #![allow(dead_code)"
  },
  {
    "path": "guide/src/class/protocols.md",
    "chars": 20630,
    "preview": "# Class customizations\n\nPython's object model defines several protocols for different object behavior, such as the seque"
  },
  {
    "path": "guide/src/class/thread-safety.md",
    "chars": 4751,
    "preview": "# `#[pyclass]` thread safety\n\nPython objects are freely shared between threads by the Python interpreter.\nThis means tha"
  },
  {
    "path": "guide/src/class.md",
    "chars": 51546,
    "preview": "# Python classes\n\nPyO3 exposes a group of attributes powered by Rust's proc macro system for defining Python classes as "
  },
  {
    "path": "guide/src/contributing.md",
    "chars": 35,
    "preview": "{{#include ../../Contributing.md}}\n"
  },
  {
    "path": "guide/src/conversions/tables.md",
    "chars": 8070,
    "preview": "# Mapping of Rust types to Python types\n\nWhen writing functions callable from Python (such as a `#[pyfunction]` or in a "
  },
  {
    "path": "guide/src/conversions/traits.md",
    "chars": 26816,
    "preview": "# Conversion traits\n\nPyO3 provides some handy traits to convert between Python types and Rust types.\n\n## `.extract()` an"
  },
  {
    "path": "guide/src/conversions.md",
    "chars": 288,
    "preview": "# Type conversions\n\nIn this portion of the guide we'll talk about the mapping of Python types to Rust types offered by P"
  },
  {
    "path": "guide/src/debugging.md",
    "chars": 15130,
    "preview": "# Debugging\n\n## Macros\n\nPyO3's attributes (`#[pyclass]`, `#[pymodule]`, etc.) are [procedural macros](https://doc.rust-l"
  },
  {
    "path": "guide/src/ecosystem/async-await.md",
    "chars": 1356,
    "preview": "# Using `async` and `await`\n\n*`async`/`await` support is currently being integrated in PyO3.*\n*See the [dedicated docume"
  },
  {
    "path": "guide/src/ecosystem/logging.md",
    "chars": 3210,
    "preview": "# Logging\n\nIt is desirable if both the Python and Rust parts of the application end up logging using the same configurat"
  },
  {
    "path": "guide/src/ecosystem/tracing.md",
    "chars": 4764,
    "preview": "# Tracing\n\nPython projects that write extension modules for performance reasons may want to tap into [Rust's `tracing` e"
  },
  {
    "path": "guide/src/ecosystem.md",
    "chars": 387,
    "preview": "# The PyO3 ecosystem\n\nThis portion of the guide is dedicated to crates which are external to the main PyO3 project and p"
  },
  {
    "path": "guide/src/exception.md",
    "chars": 5076,
    "preview": "# Python exceptions\n\n## Defining a new exception\n\nUse the [`create_exception!`] macro:\n\n```rust\nuse pyo3::create_excepti"
  },
  {
    "path": "guide/src/faq.md",
    "chars": 8635,
    "preview": "# Frequently Asked Questions and troubleshooting\n\nSorry that you're having trouble using PyO3.\nIf you can't find the ans"
  },
  {
    "path": "guide/src/features.md",
    "chars": 15638,
    "preview": "# Features reference\n\nPyO3 provides a number of Cargo features to customize functionality.\nThis chapter of the guide pro"
  },
  {
    "path": "guide/src/free-threading.md",
    "chars": 17556,
    "preview": "# Supporting Free-Threaded CPython\n\nCPython 3.14 declared support for the \"free-threaded\" build of CPython that does not"
  },
  {
    "path": "guide/src/function/error-handling.md",
    "chars": 9287,
    "preview": "# Error handling\n\nThis chapter contains a little background of error handling in Rust and how PyO3 integrates this with "
  },
  {
    "path": "guide/src/function/signature.md",
    "chars": 9538,
    "preview": "# Function signatures\n\nThe `#[pyfunction]` attribute also accepts parameters to control how the generated Python functio"
  },
  {
    "path": "guide/src/function-calls.md",
    "chars": 27,
    "preview": "# Calling Python functions\n"
  },
  {
    "path": "guide/src/function.md",
    "chars": 11218,
    "preview": "# Python functions\n\nThe `#[pyfunction]` attribute is used to define a Python function from a Rust function.\nOnce defined"
  },
  {
    "path": "guide/src/getting-started.md",
    "chars": 6678,
    "preview": "# Installation\n\nTo get started using PyO3 you will need three things: a Rust toolchain, a Python environment, and a way "
  },
  {
    "path": "guide/src/index.md",
    "chars": 617,
    "preview": "# The PyO3 user guide\n\nWelcome to the PyO3 user guide!\nThis book is a companion to [PyO3's API docs](https://docs.rs/pyo"
  },
  {
    "path": "guide/src/migration.md",
    "chars": 98826,
    "preview": "# Migrating from older PyO3 versions\n\nThis guide can help you upgrade code through breaking changes from one PyO3 versio"
  },
  {
    "path": "guide/src/module.md",
    "chars": 4888,
    "preview": "# Python modules\n\nYou can create a module using `#[pymodule]`:\n\n```rust,no_run\n# mod declarative_module_basic_test {\nuse"
  },
  {
    "path": "guide/src/parallelism.md",
    "chars": 8963,
    "preview": "# Parallelism\n\nHistorically, CPython was limited by the [global interpreter lock](https://docs.python.org/3/glossary.htm"
  },
  {
    "path": "guide/src/performance.md",
    "chars": 7670,
    "preview": "# Performance\n\nTo achieve the best possible performance, it is useful to be aware of several tricks and sharp edges conc"
  },
  {
    "path": "guide/src/python-from-rust/calling-existing-code.md",
    "chars": 11230,
    "preview": "# Executing existing Python code\n\nIf you already have some existing Python code that you need to execute from Rust, the "
  },
  {
    "path": "guide/src/python-from-rust/function-calls.md",
    "chars": 4322,
    "preview": "# Calling Python functions\n\nThe `Bound<'py, T>` smart pointer (such as `Bound<'py, PyAny>`, `Bound<'py, PyList>`, or `Bo"
  },
  {
    "path": "guide/src/python-from-rust.md",
    "chars": 3942,
    "preview": "# Calling Python in Rust code\n\nThis chapter of the guide documents some ways to interact with Python code from Rust.\n\nBe"
  },
  {
    "path": "guide/src/python-typing-hints.md",
    "chars": 11225,
    "preview": "# Typing and IDE hints for your Python package\n\nPyO3 provides an easy to use interface to code native Python libraries i"
  },
  {
    "path": "guide/src/rust-from-python.md",
    "chars": 563,
    "preview": "# Using Rust from Python\n\nThis chapter of the guide is dedicated to explaining how to wrap Rust code into Python objects"
  },
  {
    "path": "guide/src/trait-bounds.md",
    "chars": 16717,
    "preview": "# Using in Python a Rust function with trait bounds\n\nPyO3 allows for easy conversion from Rust to Python for certain fun"
  },
  {
    "path": "guide/src/type-stub.md",
    "chars": 3032,
    "preview": "# Type stub generation (`*.pyi` files) and introspection\n\n*This feature is still in active development.*\n*See [the relat"
  },
  {
    "path": "guide/src/types.md",
    "chars": 17545,
    "preview": "# Python object types\n\nPyO3 offers two main sets of types to interact with Python objects.\nThis section of the guide exp"
  },
  {
    "path": "guide/theme/tabs.css",
    "chars": 407,
    "preview": ".mdbook-tabs {\n    display: flex;\n}\n\n.mdbook-tab {\n    background-color: var(--table-alternate-bg);\n    padding: 0.5rem "
  },
  {
    "path": "guide/theme/tabs.js",
    "chars": 2370,
    "preview": "/**\n * Change active tab of tabs.\n *\n * @param {Element} container\n * @param {string} name\n */\nconst changeTab = (contai"
  },
  {
    "path": "newsfragments/.gitignore",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "newsfragments/5349.added.md",
    "chars": 72,
    "preview": "Added `PyErr::set_traceback` to set the traceback of an exception object"
  },
  {
    "path": "newsfragments/5349.changed.md",
    "chars": 115,
    "preview": "Changed exception remapping on argument extraction error to use `add_note` for enhancing the error message instead."
  },
  {
    "path": "newsfragments/5668.added.md",
    "chars": 100,
    "preview": "Added new `PyUnicodeDecodeError::new_err_from_utf8` API to create a `PyErr` from a `str::Utf8Error`\n"
  },
  {
    "path": "newsfragments/5668.fixed.md",
    "chars": 105,
    "preview": "Fixed the implementations of `From<string::FromUtf8Error>` and `From<ffi::IntoStringError>` for `PyErr`.\n"
  },
  {
    "path": "newsfragments/5668.removed.md",
    "chars": 143,
    "preview": "Removed the failing implementations of `From<str::Utf8Error>`, `From<string::FromUtf16Error>`, and `From<char::DecodeUtf"
  },
  {
    "path": "newsfragments/5753.changed.md",
    "chars": 87,
    "preview": "Module initialization uses the PyModExport and PyABIInfo APIs on python 3.15 and newer."
  },
  {
    "path": "newsfragments/5770.added.md",
    "chars": 89,
    "preview": "Introspection: implement `INPUT_TYPE` and `OUTPUT_TYPE` on third party crates conversions"
  },
  {
    "path": "newsfragments/5782.added.md",
    "chars": 66,
    "preview": "Introspection: introspect doc comments and emit them in the stubs."
  },
  {
    "path": "newsfragments/5797.changed.md",
    "chars": 111,
    "preview": "Deprecate `Py<T>::get_refcnt` and `PyAnyMethods::get_refcnt` in favor of `pyo3::ffi::Py_REFCNT(obj.as_ptr())`\n\n"
  },
  {
    "path": "newsfragments/5803.changed.md",
    "chars": 130,
    "preview": "`PyEnvironmentError`, `PyIOError`, and `PyWindowsError` are now type aliases of `PyOSError` (as is the case in Python si"
  },
  {
    "path": "newsfragments/5809.packaging.md",
    "chars": 64,
    "preview": "`pyo3-macros-backend` no longer depends on `pyo3-build-config`.\n"
  },
  {
    "path": "newsfragments/5824.changed.md",
    "chars": 76,
    "preview": "Deprecate and remove `Py_TRACE_REFS` support (unsupported from Python 3.13)."
  },
  {
    "path": "newsfragments/5828.added.md",
    "chars": 225,
    "preview": "Added FFI wrappers for the following PyUnstable APIs available in Python 3.14: `PyUnstable_Object_IsUniquelyReferenced`,"
  },
  {
    "path": "newsfragments/5830.changed.md",
    "chars": 47,
    "preview": "Allow non-`ExactSizeIterator` in `PyList::new`\n"
  },
  {
    "path": "newsfragments/5837.fixed.md",
    "chars": 51,
    "preview": "Allow pyclass named `Probe` with `get_all` fields.\n"
  },
  {
    "path": "newsfragments/5839.changed.md",
    "chars": 158,
    "preview": "Stubs: emit `#[classattribute]` as plain Python class attributes and not functions annotated with `@classattribute` and "
  },
  {
    "path": "newsfragments/5841.changed.md",
    "chars": 138,
    "preview": "Stubs: use `object` as the input annotation type of magic methods returning `NonImplemented` if the input value is not o"
  },
  {
    "path": "newsfragments/5847.fixed.md",
    "chars": 80,
    "preview": "Fix type resolution error when using `_Py_NegativeRefcount` with Python < 3.12.\n"
  },
  {
    "path": "newsfragments/5849.added.md",
    "chars": 68,
    "preview": "Add `Borrowed::get` as an equivalent to `Bound::get` and `Py::get`.\n"
  },
  {
    "path": "newsfragments/5857.added.md",
    "chars": 75,
    "preview": "Add `PyFrame::new`, `PyTraceBack::new`, and `PyFrameMethods::line_number`.\n"
  },
  {
    "path": "newsfragments/5865.packaging.md",
    "chars": 161,
    "preview": "Drop support for Python 3.13t (3.14t and above continue to be supported in alignment with CPython declaring free-threadi"
  },
  {
    "path": "newsfragments/5866.changed.md",
    "chars": 75,
    "preview": "pyo3-ffi: use raw-dylib for Windows linking, eliminating import libraries.\n"
  },
  {
    "path": "newsfragments/5883.changed.md",
    "chars": 122,
    "preview": "`PyMappingProxy`: allow subclasses during type checking\n`PyWeakrefReference`: always allow subclasses during type checki"
  },
  {
    "path": "newsfragments/5887.added.md",
    "chars": 114,
    "preview": "Add `PyErr::set_context`, `PyErr::context`, `ffi::PyErr_GetHandledException` and `ffi::PyErr_SetHandledException`."
  },
  {
    "path": "newsfragments/5891.added.md",
    "chars": 40,
    "preview": "Add `Py_HASH_SIPHASH13` to Rust binding\n"
  },
  {
    "path": "newsfragments/5893.removed.md",
    "chars": 242,
    "preview": "Remove the `TypeInfo` enum and the `FromPyObject::type_input` and `IntoPyObject::type_output` functions. They are replac"
  },
  {
    "path": "newsfragments/5896.changed.md",
    "chars": 100,
    "preview": "`PyDate::from_timestamp` argument is now a `f64` (the Python API expects a float and not an integer)"
  },
  {
    "path": "newsfragments/5897.changed.md",
    "chars": 94,
    "preview": "Change `PathBuf::extract` input type hint from `str | os.PathLike` to `str | os.PathLike[str]`"
  },
  {
    "path": "noxfile.py",
    "chars": 55045,
    "preview": "import io\nimport json\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport sysconfig\nimport tarfile\nimp"
  },
  {
    "path": "pyo3-benches/Cargo.toml",
    "chars": 1554,
    "preview": "[package]\nname = \"pyo3-benches\"\nversion = \"0.1.0\"\ndescription = \"In-tree benchmarks for the PyO3 project\"\nauthors = [\"Py"
  },
  {
    "path": "pyo3-benches/benches/bench_any.rs",
    "chars": 2524,
    "preview": "use codspeed_criterion_compat::{criterion_group, criterion_main, Bencher, Criterion};\n\nuse pyo3::{\n    prelude::*,\n    t"
  },
  {
    "path": "pyo3-benches/benches/bench_attach.rs",
    "chars": 772,
    "preview": "use codspeed_criterion_compat::{criterion_group, criterion_main, Bencher, Criterion};\n\nuse pyo3::prelude::*;\n\nfn bench_c"
  },
  {
    "path": "pyo3-benches/benches/bench_bigint.rs",
    "chars": 2279,
    "preview": "use std::hint::black_box;\n\nuse codspeed_criterion_compat::{criterion_group, criterion_main, Bencher, Criterion};\nuse num"
  },
  {
    "path": "pyo3-benches/benches/bench_call.rs",
    "chars": 5181,
    "preview": "use std::hint::black_box;\n\nuse codspeed_criterion_compat::{criterion_group, criterion_main, Bencher, Criterion};\n\nuse py"
  }
]

// ... and 566 more files (download for full content)

About this extraction

This page contains the full source code of the PyO3/pyo3 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 766 files (4.6 MB), approximately 1.2M tokens, and a symbol index with 8440 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!