Skip to content

Remove deprecated get_attribute_for_oid method#12937

Merged
reaperhulk merged 1 commit intopyca:mainfrom
alex:remove-deprecated-method
May 18, 2025
Merged

Remove deprecated get_attribute_for_oid method#12937
reaperhulk merged 1 commit intopyca:mainfrom
alex:remove-deprecated-method

Conversation

@alex
Copy link
Copy Markdown
Member

@alex alex commented May 18, 2025

No description provided.

@alex alex requested a review from Copilot May 18, 2025 16:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_oid now raises an AttributeError, to ensure the deprecated method is fully removed from the public API.
assert request.attributes.get_attribute_for_oid(

@reaperhulk reaperhulk merged commit 600e300 into pyca:main May 18, 2025
65 checks passed
@alex alex deleted the remove-deprecated-method branch May 18, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants