Skip to content

MAINT: Remove deprecated message init in JSON schema normalizer#2091

Open
biefan wants to merge 1 commit into
microsoft:mainfrom
biefan:fix/json-schema-normalizer-message-init
Open

MAINT: Remove deprecated message init in JSON schema normalizer#2091
biefan wants to merge 1 commit into
microsoft:mainfrom
biefan:fix/json-schema-normalizer-message-init

Conversation

@biefan

@biefan biefan commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Description

  • Update JsonSchemaNormalizer to construct Message with keyword-only arguments.
  • Update the JsonSchemaNormalizer unit tests to use the same non-deprecated Message construction style.
  • This removes the deprecation warnings for this normalizer ahead of the 0.16.0 removal path.

Tests and Documentation

  • uv run -m pytest tests/unit/message_normalizer/test_json_schema_normalizer.py -W default
  • uv run -m pytest tests/unit/message_normalizer -W default
  • uv run pre-commit run --files pyrit/message_normalizer/json_schema_normalizer.py tests/unit/message_normalizer/test_json_schema_normalizer.py
  • uv run -m ty check pyrit/message_normalizer/json_schema_normalizer.py tests/unit/message_normalizer/test_json_schema_normalizer.py
  • uv run -m pytest tests/unit/message_normalizer/test_json_schema_normalizer.py -W error::DeprecationWarning

Documentation changes are not applicable for this maintenance-only update.

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.

1 participant