14
0
forked from pool/python-stripe
Files
python-stripe/use-sys-executable.patch
Steve Kowalik a84bc21097 - Update to 7.12.0:
* Add support for new resource `CustomerSession`
  * Add support for `create` method on resource `CustomerSession`
  * Remove support for values `obligation_inbound`,
    `obligation_payout_failure`, `obligation_payout`, and
    `obligation_reversal_outbound` from enum `BalanceTransaction.type`
  * Remove support for value `obligation` from enum
    `Reporting.ReportRunCreateParams.parameters.reporting_category`
  * Mark defunct and internal methods as deprecated
  * Do not raise a DeprecationWarning in `stripe.app_info`
  * Fix __getattr__ to raise AttributeError rather than returning None.
  * Add missing explicit reexport for `OAuth`, `Webhook`, `WebhookSignature`
  * `stripe.api_version`, `stripe.multipart_data_generator`,
    `stripe.request_metrics` are deprecated.
  * Move resource type exports to stripe.
  * Add support for new resources `Climate.Order`, `Climate.Product`, and
    `Climate.Supplier`
  * Add support for `cancel`, `create`, `list`, `modify`, and `retrieve`
    methods on resource `Order`
  * Add support for `exemption_indicator` on resource class
    `Charge.PaymentMethodDetails.Card.ThreeDSecure`
  * Add support for `Paypal` on `Checkout.Session.PaymentMethodOptions`
  * Add support for Python 3.11/3.12
  * Include `py.typed` and enable type annotations for the package
  * Behavior change: nested json objects will now deserialize into
    instances of specific classes that subclass `StripeObject`.
  * Behavior change: `PromotionCode.restrictions.currency_options` will now
    deserialize into `dict` and not `StripeObject`.
  * This release changes the pinned API version to `2023-10-16`. Please read
    https://stripe.com/docs/upgrades#2023-10-16 and carefully review the API

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-stripe?expand=0&rev=6
2024-01-17 03:19:43 +00:00

32 lines
1.0 KiB
Diff

From 46b7f4b2facac4a73828a736d69101828dda71e0 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Wed, 17 Jan 2024 11:52:06 +1100
Subject: [PATCH] Use sys.executable in test_exports
Not all systems will have 'python' in the path to execute to check
exports -- and indeed, it may not even be the interpreter that is under
test and can import the module. Since we are already running under the
test suite, use sys.executable to check.
---
tests/test_exports.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/test_exports.py b/tests/test_exports.py
index 9c7d9b980..149032109 100644
--- a/tests/test_exports.py
+++ b/tests/test_exports.py
@@ -3,11 +3,12 @@
from typing import Any
import stripe
import subprocess
+import sys
def assert_output(code: str, expected: str) -> None:
process = subprocess.Popen(
- ["python", "-c", f"import stripe; print({code})"],
+ [sys.executable, "-c", f"import stripe; print({code})"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)