Skip to content

v5: Add deprecation warning - #3157

Open
Rot127 wants to merge 2 commits into
capstone-engine:v5from
Rot127:Deprecation
Open

Rot127 wants to merge 2 commits into
capstone-engine:v5from
Rot127:Deprecation

Conversation

@Rot127

@Rot127 Rot127 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

Adds a warning that Capstone v5 will soon be deprecated and instructions how to get self-help for migrating to v6 Beta.

Test plan

  • Check build logs in CI

Closing issues

closes #2851

Co-authored-by agent: hax/z-ai/glm-5.3

Signed-off-by: Rot127 <unisono@quyllur.org>
Signed-off-by: Rot127 <unisono@quyllur.org>
# Capstone v5 will soon be deprecated. Please migrate to Capstone v6 Beta.
# You can find details about migration in our release guide.
# Set CAPSTONE_NO_DEPRECATION_WARNING=1 to silence.
if not os.environ.get('CAPSTONE_NO_DEPRECATION_WARNING'):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some considerations: most likely you want to use same env var for C and Python and it’s ok of course, otherwise you can also avoid the introduction of this env var for Python and remove this check because the end user can disable the warning with

PYTHONWARNINGS="ignore::DeprecationWarning:capstone"

In addition from Python cli can be used the arg

-W ignore::DeprecationWarning:capstone

or from the code

warnings.filterwarnings("ignore", category=DeprecationWarning, module="capstone")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Will change it. Also add a comment there how to disable it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants