Skip to content

add warning-risk for deprecated packages#17957

Merged
memsharded merged 1 commit intoconan-io:develop2from
memsharded:fix/add_deprecated_warning
Mar 13, 2025
Merged

add warning-risk for deprecated packages#17957
memsharded merged 1 commit intoconan-io:develop2from
memsharded:fix/add_deprecated_warning

Conversation

@memsharded
Copy link
Member

@memsharded memsharded commented Mar 13, 2025

Changelog: Fix: Add warning for deprecated attribute in recipes.
Docs: conan-io/docs#4041

Close #17952

@uilianries
Copy link
Member

I would include the case deprecated = "foobar", where the warning message suggests to use foobar as replacement for the deprecated reference.

@memsharded
Copy link
Member Author

I would include the case deprecated = "foobar", where the warning message suggests to use foobar as replacement for the deprecated reference.

@uilianries The deprecation is already showing the reason:

    if deprecated:
        output.info("Deprecated", Color.BRIGHT_YELLOW)
        for d, reason in deprecated.items():
            reason = f": {reason}" if reason else ""
            output.info("    {}{}".format(d, reason), Color.BRIGHT_CYAN)

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for backporting it!

@memsharded memsharded merged commit 2c1fddd into conan-io:develop2 Mar 13, 2025
15 checks passed
@memsharded memsharded deleted the fix/add_deprecated_warning branch March 13, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Deprecated attribute does not raise a warning when enabled

3 participants