Skip to content

Commit

Permalink
preview version not needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe committed Sep 25, 2024
1 parent be86266 commit 8bf2cf9
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
upload_api_base: str = DEFAULT_UPLOAD_API_BASE
meter_events_api_base: str = DEFAULT_METER_EVENTS_API_BASE
api_version: str = _ApiVersion.CURRENT
preview_api_version: str = _ApiVersion.PREVIEW
verify_ssl_certs: bool = True
proxy: Optional[str] = None
default_http_client: Optional["HTTPClient"] = None
Expand Down
2 changes: 0 additions & 2 deletions stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,6 @@ def _args_for_request_with_retries(
):
# If user specified an API version, honor it
request_options["stripe_version"] = options["stripe_version"]
elif api_mode == "V2":
request_options["stripe_version"] = stripe.preview_api_version

if request_options.get("api_key") is None:
raise error.AuthenticationError(
Expand Down
3 changes: 1 addition & 2 deletions stripe/_api_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2024-06-20"
PREVIEW = "2024-09-30.acacia"
CURRENT = "2024-09-30.acacia"
1 change: 0 additions & 1 deletion tests/test_raw_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def test_preview_request_default_api_version(self, http_client_mock):
http_client_mock.assert_requested(
"get",
path=self.GET_REL_URL_V2,
stripe_version=stripe.preview_api_version,
)

def test_preview_request_overridden_api_version(self, http_client_mock):
Expand Down
1 change: 0 additions & 1 deletion tests/test_stripe_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def test_v2_events_retrieve(self, http_client_mock):
api_base=stripe.DEFAULT_API_BASE,
path=path,
api_key="keyinfo_test_123",
stripe_version=stripe.preview_api_version,
)
assert event.id is not None
assert isinstance(event, Event)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_v2_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def test_raises_v2_error(
method,
path=path,
api_key="keyinfo_test_123",
stripe_version=stripe.preview_api_version,
)

@pytest.mark.skip("python doesn't have any errors with invalid params yet")
Expand Down Expand Up @@ -96,7 +95,6 @@ def test_raises_v2_error_with_field(
method,
path=path,
api_key="keyinfo_test_123",
stripe_version=stripe.preview_api_version,
)

def test_falls_back_to_v1_error(
Expand Down Expand Up @@ -140,5 +138,4 @@ def test_falls_back_to_v1_error(
method,
path=path,
api_key="keyinfo_test_123",
stripe_version=stripe.preview_api_version,
)

0 comments on commit 8bf2cf9

Please # to comment.