- Explicit Python 3.13 support, drop Python 3.8 support
- Documentation improvements
- Improved support for implicit/native namespace packages (#228, #230)
- Improved robustness of importing of namespace packages and built-in modules (#227)
- Fix packaging metadata issue where README/CHANGELOG were installed to the wrong location.
- Remove Python upper version constraint in package metadata
- Fixed
Generic
false positive in Python 3.12+ (#201). - Remove
pkgutil
deprecation warning on Python 3.12+. - Official Python 3.12 support.
- Drop Python 3.7 support.
- Remove
typing-extensions
andimportlib_metadata
dependencies. - More robust checks to prevent
Protocol
false positives.
- Don't flag
TypedDict
fromtyping_extensions
in Python versions wheretyping
hasTypedDict
itself.
- Remove
tomli
dependency on Python 3.11+
- Fix broken
Protocol
import due to absenttyping_extensions
on Python <3.10.
- Don't flag
Protocol
classes as needing slots if strictrequire-subclass
option is enabled.
- Don't flag
TypedDict
subclasses as missing slots (#120).
Breaking changes
- The "strict-imports" default value was mistakenly
False
in contrast to what is documented. The default value is nowTrue
, in line with documentation. If you were relying on this permissive import behavior, you will need to set this option in the CLI or settings file. - Drop Python 3.6 support
Bugfixes
- Disabling "strict-imports" now also gracefully handles failed imports of the root module given (#113).
Features
- Add official Python 3.11 support
- Fix error when encountering metaclass with slots (#106)
- Improved detection of immutable classes on Python 3.10+ (#92)
- Gracefully handle inspection failure due to unimportable parent package (#90).
- Improved robustness of importing implicitly namespaced and extension packages (#64)
- Improved robustness of determining whether a class is pure Python (#65)
- Add helpful link to 'failed to find module' message.
- Support
setup.cfg
as alternate settings file (#52).
- Explicitly prevent ambiguous imports (#51).
- Correctly handle case when
__slots__
is defined as a single string (#47).
- Small improvements to verbose error messages.
- Detect duplicate slots (#21).
- Improvements to docs.
- Clarify pre-commit usage (#45).
- Support specifying the location of settings file with
--settings
option. - Improved verbose error messages.
- Extension modules are now traversed.
- Small tweaks to documentation.
- Recommend running as
python -m slotscheck
when checking files. Update pre-commit hook to reflect this.
- Add Python 3.6 support
Breaking changes
- Strict imports are now the default
- Include/exclude regex patterns now use partial patch (like mypy, isort do).
Adjustments
- Clarifications in documentation
- Pre-commit hook uses verbose mode by default
Breaking changes
- Arguments are now file paths. Use the
-m/--module
option to scan modules.
Features
- Support use as pre-commit hook.
- Multiple modules or files allowed as input.
- Document the types of slot errors.
- Fix typo in readme.
- Fix crash when encountering overlapping slots from multiple classes.
- Relax
tomli
dependency pin.
- More descriptive output on overlapping slots (#26).
- Simplify slot requirement flags.
- allow configuration by
pyproject.toml
(#28).
- Recognize builtin exceptions as not having slots.
- Split
--exclude-modules
andexclude-classes
. - Add flags to specify inclusion as well as exclusion of modules/classes.
- Allow disabling slot inheritance check.
- Add
--require-slots
option.
- Catch
BaseException
in module import.
- Add
--strict-imports
flag (#24) - Detect overlapping slots (#10)
- 100% test coverage (#15)
- Add
--exclude
flag (#9)
- Improved error message if module cannot be found (#18)
- Enable running with
-m slotscheck
(#13)
- Skip
__main__.py
in module scan to prevent running unintented code
- Improve output report
- Improve documentation
- Initial release