skillfed

ExtensionClass

Metaclass for subclassable extension types

extensionclass v6.3 169.6K downloads/30d#10,417 on PyPI4
License unclear ZPL-2.1 Active released

What it is and what it does

ExtensionClass is a metaclass that allows classes defined in C extension modules to be subclassed from Python code—a capability not normally available with standard extension types. It also provides ComputedAttribute (similar to property but works on instances and preserves Acquisition semantics) and MethodObject (for attaching callable methods to extension classes). The package is primarily maintained for legacy Zope applications; modern Python code should use standard new-style classes and descriptors instead.

The package has no runtime dependencies and ships as compiled wheels for Python 3.10–3.14 across macOS (Intel and ARM64), Linux (i686, x86_64, aarch64), and Windows (x86_64 and ARM64). It is actively maintained and has been updated to support free-threaded Python 3.14t, though it is explicitly recommended only for applications that require it for backward compatibility.

Use it for:

  • Maintaining legacy Zope applications that depend on ExtensionClass-based object models.
  • Subclassing C extension types when standard Python descriptors or properties are insufficient.
  • Preserving Acquisition wrapper semantics in extension-based object hierarchies.
  • Attaching computed attributes to extension class instances that behave like properties.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a metaclass that enables extension module classes to be subclassed in Python, along with utilities for computed attributes and method objects on ExtensionClass instances.

Yes, but only if you are maintaining a legacy Zope application or have a specific need to subclass C extension types. The package is actively maintained and has no known vulnerabilities. For new projects, use Python's built-in descriptor protocol and properties instead. Install friction is moderate due to compiled wheels, but prebuilt binaries are available for common platforms.

Install

extensionclass on PyPI

pip

pip install extensionclass

uv

uv add extensionclass

poetry

poetry add extensionclass

Installing ExtensionClass

Before you install

Medium install friction due to compiled wheels for multiple platforms and Python versions (3.10–3.14). Actively maintained with recent release (106 days ago) and ongoing support for new Python versions including free-threaded 3.14t.

License in practice

Licensed under ZPL-2.1 (Zope Public License 2.1), a permissive open-source license. License treatment is marked unclear in the fact sheet, so verify compatibility with your project's licensing requirements before use.

Quickstart

import extensionclass

class MyExtension(extensionclass.ExtensionClass):
    pass

obj = MyExtension()

Requires Python 3.10 or later; compiled C extension wheels are provided for common platforms but may require a C compiler on unsupported architectures.

Verify before relying

  • Whether ZPL-2.1 is compatible with your project's license (marked unclear in metadata).
  • Performance characteristics compared to modern Python descriptors and properties.
  • Whether Acquisition wrapper semantics are still needed for your use case versus standard Python patterns.

Package facts

License ZPL-2.1 (unclear)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 106 days since the last release
Last repo commit
First released
Downloads 169,563/month — #10,417 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: extensionclass-6.3-cp310-cp310-macosx_10_9_x86_64.whl; extensionclass-6.3-cp310-cp310-macosx_11_0_arm64.whl; extensionclass-6.3-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; extensionclass-6.3-cp310-cp310-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl; extensionclass-6.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; extensionclass-6.3-cp310-cp310-win_amd64.whl; extensionclass-6.3-cp311-cp311-macosx_10_9_x86_64.whl; extensionclass-6.3-cp311-cp311-macosx_11_0_arm64.whl; extensionclass-6.3-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; extensionclass-6.3-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl; extensionclass-6.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; extensionclass-6.3-cp311-cp311-win_amd64.whl; extensionclass-6.3-cp311-cp311-win_arm64.whl; extensionclass-6.3-cp312-cp312-macosx_10_9_x86_64.whl; extensionclass-6.3-cp312-cp312-macosx_11_0_arm64.whl; extensionclass-6.3-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; extensionclass-6.3-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl; extensionclass-6.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; extensionclass-6.3-cp312-cp312-win_amd64.whl; extensionclass-6.3-cp312-cp312-win_arm64.whl

Development Status :: 6 - MatureEnvironment :: Web EnvironmentFramework :: ZopeFramework :: Zope :: 5Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

extension class metaclasssubclass C extension typesextensionclass pythoncomputed attributes extensionmethod objects extension classeszope extension classeslegacy extension class support
legacy-zopec-extensionmetaclass

More Application Frameworks packages