Punycode Fix and Optional Cohort Number #57
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements and bug fixes across the codebase, most notably improving domain name handling in
DomainEncoder, adding support for selecting a specific cohort for single-attempt MPIC orchestration, and expanding related test coverage. It also includes some refactoring, such as relocating exceptions and updating error messages.Domain name handling improvements:
DomainEncoder.prepare_target_for_lookupto correctly detect and handle already punycode-encoded domains (including inner labels), ensuring they are not double-encoded and raising clear errors for malformed domains. Added stricter validation for wildcards and malformed input.DomainEncoderto cover more edge cases, including already-encoded domains, wildcards, inner punycode labels, and malformed domains. [1] [2]MPIC orchestration enhancements:
cohort_for_single_attemptparameter inMpicRequestOrchestrationParameters, allowing users to select a specific cohort for a single orchestration attempt. The coordinator now validates this parameter and raises a newCohortSelectionExceptionif the requested cohort is invalid. [1] [2] [3] [4] [5] [6] [7]Refactoring and error handling:
CohortCreationExceptiontompic_request_errors.pyand introduced a newCohortSelectionExceptionfor invalid cohort selection. Updated all imports and error messages accordingly. [1] [2] [3] [4] [5] [6] [7]6.2.0in__about__.py.Test improvements: