Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearly document the limitations of abi3 #1318

Merged
merged 1 commit into from
Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion guide/src/building_and_distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,16 @@ If you set more that one of these api version feature flags the highest version
PyO3 is only able to link your extension module to api3 version up to and including your host Python version. E.g., if you set `abi3-py38` and try to compile the crate with a host of Python 3.6, the build will fail.

As an advanced feature, you can build PyO3 wheel without calling Python interpreter with
the environment variable `PYO3_NO_PYTHON` set, but this only works on *NIX.
the environment variable `PYO3_NO_PYTHON` set, but this only works on \*NIX.

### Missing features

Due to limitations in the Python API, there are a few `pyo3` features that do
not work when compiling for `abi3`. These are:

- `#[text_signature]` does not work on classes until Python 3.10 or greater.
- The `dict` and `weakref` options on classes are not supported.
- The buffer API is not supported.

## Cross Compiling

Expand Down
3 changes: 3 additions & 0 deletions guide/src/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ impl MyClass {
}
```

Note that `text_signature` on classes is not compatible with compilation in
`abi3` mode until Python 3.10 or greater.

### Making the function signature available to Python (old method)

Alternatively, simply make sure the first line of your docstring is
Expand Down