Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more deprecated methods #1204

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

anniel-stripe
Copy link
Contributor

@anniel-stripe anniel-stripe commented Jan 23, 2024

Did an audit of methods / classes with @_util.deprecated decorators. I removed ones that were for internal stripe-python use only (like ListObject.empty_list()), as well as interfaces that will already be broken since we made request options keyword-only in #1200.

Changelog

  • ⚠️ Remove APIRequestor.format_app_info(). This method was intended for internal stripe-python use only.
  • ⚠️ Remove StripeError.construct_error_object(). This method was intended for internal stripe-python use only.
  • ⚠️ Remove ListObject.empty_list(). This method was intended for internal stripe-python use only.
  • ⚠️ Remove SearchResultObject.empty_search_result(). This method was intended for internal stripe-python use only.
  • ⚠️ Remove StripeObject.ReprJSONEncoder. This class was intended for internal stripe-python use only.
  • ⚠️ Remove StripeObject.api_base. This property was defunct and returned None.

@anniel-stripe
Copy link
Contributor Author

Looks like it's not safe to remove ListObject.retrieve, etc. We actively encourage users to call these methods on the ListObject since we don't define them on the nested resources, e.g. https://github.com/stripe/stripe-python/blob/5c002d3e/stripe/_application_fee_refund.py#L77

@anniel-stripe anniel-stripe merged commit f131bf9 into sdk-release/next-major Jan 23, 2024
15 checks passed
anniel-stripe added a commit that referenced this pull request Jan 25, 2024
* Add StripeClient (#1200)

* Generated files

* Non-generated files

* Tests

* Inline one-off methods

* _ prefix for private APIRequestor methods and attributes, remove extra _Proxy

* Handle None options and tests fixes

* Don't accept api_mode in methods that don't use it

* Allow setting api_key, stripe_version, and stripe_account on StripeObject (#1201)

* Allow setting api_key, stripe_version, and stripe_account on StripeObject

* refactor

* fmt

* Don't mutate APIRequestor

* Update README with StripeClient examples (#1202)

* Update README with StripeClient examples

* from stripe import StripeClient

* fix test

* fix test

* Move _default_proxy to APIRequestor

* Don't copy twice, rtype params with Unpack[RequestOptions]

* More feedback

* Test service exports

* Deprecate `StripeObject.request` (#1203)

* Remove StripeObject.request

* Change to deprecated

* Remove more deprecated methods (#1204)

* Remove some deprecated methods

* Add back ListObject and SearchResultObect request sending methods

* Un-deprecate ListObject methods (#1205)

* Un-deprecate ListObject methods

* lint

* Remove APIRequestor from public API (#1207)

* Remove APIRequestor from public API

* fmt

* lint

* Remove request option positional params from more methods (#1208)
@xavdid-stripe xavdid-stripe deleted the anniel-remove-deprecated branch May 10, 2024 03:28
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.

2 participants