Skip to content

Add error messages when compiling for ABI3 with unsupported macro features #3945

Closed
@davidhewitt

Description

@davidhewitt

Building from #3835 (comment) and https://pyo3.rs/v0.20.3/building_and_distribution#missing-features

We have some #[pyclass] options which do not work on older ABI3 versions:

  • #[pyo3(text_signature = "...")] does not work on classes until Python 3.10 or greater.
  • #[pyclass(dict)] and #[pyclass(weakref)] options on classes are not supported until Python 3.9 or greater.

At the moment I think these conditions fail silently (they compile but the runtime behaviour is missing). The proc macros should instead detect these cases and emit a helpful warning.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions