Skip to content

MAINT: Fixing deprecated usage#1306

Merged
rlundeen2 merged 9 commits intomicrosoft:mainfrom
rlundeen2:users/rlundeen/2026_01_05_deprecation
Jan 8, 2026
Merged

MAINT: Fixing deprecated usage#1306
rlundeen2 merged 9 commits intomicrosoft:mainfrom
rlundeen2:users/rlundeen/2026_01_05_deprecation

Conversation

@rlundeen2
Copy link
Copy Markdown
Contributor

@rlundeen2 rlundeen2 commented Jan 6, 2026

  • Added print_deprecation_message (updated from an unused method)
  • Updated inconsistent log warnings to use this. It allows us to easily see warnings in tests, because previously we often did logger.warn
  • Went through and fixed all deprecated usage in tests and classes, other than those tests that were explicitly testing they existed

There are some flaky tests, but those are fixed in https://github.com/Azure/PyRIT/pull/1304; I want to merge that first

The journey was from something like 100 warnings originally -> 24 warnings -> 100 warnings when I explicitly called warn -> 30 warnings

Comment thread pyrit/scenario/scenarios/airt/cyber.py
Comment thread tests/unit/converter/test_add_image_text_converter.py
Copy link
Copy Markdown
Contributor

@jsong468 jsong468 left a comment

Choose a reason for hiding this comment

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

Looks good!

Comment thread pyrit/common/deprecation.py
@rlundeen2 rlundeen2 merged commit 0af160c into microsoft:main Jan 8, 2026
20 checks passed
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.

4 participants