{"id":28200,"library":"sorcery","title":"sorcery","description":"A library of dark magic delights for Python, providing a set of utility decorators and context managers for cleaner code. Currently at version 0.2.2 (though effectively abandoned since 2020). No release cadence; last release May 2019.","status":"abandoned","version":"0.2.2","language":"python","source_language":"en","source_url":"https://github.com/alexmojaki/sorcery","tags":["utility","decorators","magic","deprecated","abandoned"],"install":[{"cmd":"pip install sorcery","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"private module","wrong":"from sorcery.core import call_from","symbol":"call_from","correct":"from sorcery import call_from"},{"note":"","wrong":"","symbol":"delegate_to_instance","correct":"from sorcery import delegate_to_instance"},{"note":"","wrong":"","symbol":"spell","correct":"from sorcery import spell"}],"quickstart":{"code":"from sorcery import call_from, spell, delegate_to_instance\n\nclass Foo:\n    def __init__(self):\n        self.x = 10\n\n    @spell\n    def bar(self):\n        return call_from()  # returns (self, 'bar')\n\nfoo = Foo()\nassert foo.bar() == (foo, 'bar')\n\nprint('Quickstart works')","lang":"python","description":"Basic usage of call_from and spell decorator."},"warnings":[{"fix":"Consider alternatives like 'magicattr' or implement own utilities.","message":"Repository archived and no updates since 2020. Not compatible with Python 3.11+ due to reliance on removed inspect features.","severity":"abandoned","affected_versions":">=0.2.2"},{"fix":"Avoid using in production; test thoroughly.","message":"The library modifies frame introspection and may break in newer Python versions (especially 3.11+).","severity":"breaking","affected_versions":"Python >=3.11"},{"fix":"Pin version if you must use, but prefer migration.","message":"No official deprecation, but effectively unmaintained.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install sorcery","cause":"Not installed.","error":"ModuleNotFoundError: No module named 'sorcery'"},{"fix":"Use: from sorcery import call_from","cause":"Importing from wrong location or version conflict.","error":"AttributeError: module 'sorcery' has no attribute 'call_from'"},{"fix":"Use version 0.2.2 and ensure correct usage: call_from() without arguments.","cause":"The function signature changed in older versions.","error":"TypeError: call_from() missing 1 required positional argument: 'calling_frame'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}