Install & Compatibility
Where this runs
tested against v0.20.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.8MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
slotscheck
✓ import slotscheck
✗ from slotscheck import slotscheck
This quickstart demonstrates how to import and use the `slotscheck` function to verify `__slots__` implementation for individual classes. It shows examples of both a correctly slotted and an unslotted class, and how to get results from the checker. It can also be used to check entire modules.
from slotscheck import slotscheck
class MySlottedClass:
__slots__ = ('x', 'y')
def __init__(self, x, y):
self.x = x
self.y = y
class MyUnslottedClass:
def __init__(self, x, y):
self.x = x
self.y = y
results_slotted = slotscheck(MySlottedClass)
print(f"MySlottedClass check results: {results_slotted}")
results_unslotted = slotscheck(MyUnslottedClass)
print(f"MyUnslottedClass check results: {results_unslotted}")
# To check an entire module (e.g., the current file):
# import sys
# current_module = sys.modules[__name__]
# module_results = slotscheck(current_module)
# print(f"Current module check results: {module_results}")
Debug
Known issues
breakingPython 3.8 support was dropped in `slotscheck` version `0.19.1`. If you are using Python 3.8, you must upgrade your Python interpreter or pin your `slotscheck` version.fixUpgrade your Python environment to 3.9 or newer, or pin `slotscheck==0.18.0` in your project's dependencies.
affects: >=0.19.1
breakingPython 3.7 support was dropped in `slotscheck` version `0.17.0`. Users on Python 3.7 will not be able to install or use newer versions.fixUpgrade your Python environment to 3.8 or newer, or pin `slotscheck < 0.17.0` in your project's dependencies.
affects: >=0.17.0
gotchaWhen using Python 3.12+, `Generic` classes could be incorrectly flagged as not having slots in `slotscheck` versions prior to `0.17.1`, leading to false positives.fixUpgrade to `slotscheck >= 0.17.1` to resolve the false positive for `Generic` classes.
affects: 0.17.0 (on Python 3.12+)
gotcha`TypedDict` imported from `typing_extensions` could be incorrectly flagged as not having slots in `slotscheck` versions prior to `0.16.5`, particularly in Python versions where `TypedDict` is already in the standard library.fixUpgrade to `slotscheck >= 0.16.5` to correctly handle `TypedDict` instances.
affects: <0.16.5
Upgrade
Version history
0.20.0latest on PyPI · released May 29, 2026
Audit
Dependencies
No dependency data recorded yet.