Remove deprecated get_attribute_for_oid method#12937
Merged
reaperhulk merged 1 commit intopyca:mainfrom May 18, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the deprecated get_attribute_for_oid method from the CertificateSigningRequest binding, updates tests to drop deprecation warnings, and records the removal in the changelog.
- Drop all test cases that validated the old deprecation path.
- Remove the Rust implementation and import of the deprecated method.
- Document the backward-incompatible removal in
CHANGELOG.rst.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/x509/test_x509.py | Removed tests wrapping request.get_attribute_for_oid in warnings |
| src/rust/src/x509/csr.rs | Deleted the get_attribute_for_oid method and its import |
| CHANGELOG.rst | Added note about removing the deprecated method |
Comments suppressed due to low confidence (2)
tests/x509/test_x509.py:1
- Remove the import of
utils.DeprecatedIn36(and related warning imports) since all tests referencing the deprecated method have been removed.
import utils
tests/x509/test_x509.py:6854
- Add a new test asserting that calling
request.get_attribute_for_oidnow raises anAttributeError, to ensure the deprecated method is fully removed from the public API.
assert request.attributes.get_attribute_for_oid(
reaperhulk
approved these changes
May 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.