Fix deprecated class properties for Python 3.13 (#3153)#3176
Fix deprecated class properties for Python 3.13 (#3153)#3176mlodic merged 5 commits intointelowlproject:developfrom
Conversation
|
@mlodic All checks are green. Could you please approve the pending workflows so CI can run? Thanks! |
|
@mlodic Hi! I've just pushed a commit to fix the isort import sorting issues (chore:fix import sorting). Thanks a lot for your help and patience! |
|
considering this is a big change in the code base , I'll ask approve of at least one of the other maintainers @0ssigeno @fgibertoni |
|
Hey @R1sh0bh-1, thanks for raising this PR. |
|
Hi @mlodic @fgibertoni |
|
@R1sh0bh-1 considering the possible impact of this change (this touches the core so everything could break badly), we need an additional manual verification. Please run IntelOwl with the free analyzers playbook and provide screenshot and JSON results. Also, it would be great if you could check whether any other weird errors appear in the console in the meanwhile. |
|
@mlodic, manual verification done as requested:
Please let me know if anything else is required! Thanks! |
|
@R1sh0bh-1 thank you for the checks. I'll merge the PR. About the Threatminer error you found, it could be either just a server problem from them or maybe the analyzer requires an update. Could you please open an issue about that? And if you like you could also investigate the problem. I would assign you. |


Replace deprecated class properties for Python 3.13 compatibility. Closes #3153
Description
This PR addresses the deprecation and removal of chained
@classmethod+@propertydecorators in Python 3.13 (fully removed after being deprecated in 3.11).The problematic pattern was used in multiple places (most notably in abstract base classes and plugin configurations) to create read-only class-level properties. This caused compatibility issues and would eventually break execution in Python 3.13+ environments.
Changes made:
api_app/decorators.py:classproperty— simple read-only class property (subclassespropertyfor clean integration)abstractclassproperty— variant that works seamlessly with@abstractmethod(sets__isabstractmethod__ = Truefor proper ABC enforcement)@classproperty@abstractclassproperty(often combined with@abstractmethod)api_app/classes.py,api_app/models.py,api_app/views.pyapi_app/analyzers_manager/classes.py,models.py,views.pyapi_app/connectors_manager/classes.py,models.pyapi_app/pivots_manager/classes.py,models.pyapi_app/visualizers_manager/classes.py,models.py,visualizers/dns.pyblackandisort(0 linting errors after changes)Approach rationale
After researching current best practices (2025–2026), subclassing
propertywas chosen over a pure descriptor because:@abstractmethod(via__isabstractmethod__)No new libraries were added. All changes are backward-compatible with Python 3.10+.
Type of change
(Prepares the project for future Python 3.13+ support without changing behavior)
Checklist
develop# This file is a part of IntelOwl <https://github.com/intelowlproject/IntelOwl> # See the file 'LICENSE' for copying permission.Black,Flake,Isort) gave 0 errors. (Pre-commit was used where applicable)testsfolder). All the tests (new and old ones) gave 0 errors → Existing test suite run locally; some failures are pre-existing due to missing env vars/mocks and unrelated to this changeDeepSource,Django Doctorsor other third-party linters have triggered any alerts during the CI checks, I will solve those alerts.Additional notes
Thank you for reviewing!