Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
matrix:
python_version:
# The last ~5 versions, once we're on schedule
# https://docs.stripe.com/sdks/versioning?server=python#stripe-sdk-language-version-support-policy
# https://docs.stripe.com/sdks/versioning?lang=python#stripe-sdk-language-version-support-policy
- "3.7"
- "3.8"
- "3.9"
Expand Down Expand Up @@ -126,30 +126,19 @@ jobs:
with:
python-version: "3.10"

- name: Configure GPG Key
run: |
set -ex
echo $GPG_SIGNING_PRIVKEY | base64 --decode | gpg --import --batch --yes --pinentry-mode loopback --passphrase "$GPG_SIGNING_PASSPHRASE"
env:
GPG_SIGNING_PRIVKEY: ${{ secrets.GPG_SIGNING_PRIVKEY }}
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
- name: Install tools
run: just install-build-deps

- name: Publish packages to PyPI
# could probably move this into a just recipe too?
run: |
set -ex
source .venv/bin/activate
export VERSION=$(cat VERSION)
gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION.tar.gz
gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION-py3-none-any.whl

python -m twine upload --verbose dist/stripe-$VERSION.tar.gz dist/stripe-$VERSION-py3-none-any.whl dist/stripe-$VERSION.tar.gz.asc dist/stripe-$VERSION-py3-none-any.whl.asc
python -m twine upload --verbose dist/*
env:
GPG_SIGNING_KEYID: ${{ secrets.GPG_SIGNING_KEYID }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
- uses: stripe/openapi/actions/notify-release@master
if: always()
with:
Expand Down
88 changes: 50 additions & 38 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ python -m pip install .

### Requirements

Per our [Language Version Support Policy](https://docs.stripe.com/sdks/versioning?server=python#stripe-sdk-language-version-support-policy), we currently support **Python 3.7+**.
Per our [Language Version Support Policy](https://docs.stripe.com/sdks/versioning?lang=python#stripe-sdk-language-version-support-policy), we currently support **Python 3.7+**.

Support for Python 3.7 and 3.8 is deprecated and will be removed in an upcoming major version. Read more and see the full schedule in the docs: https://docs.stripe.com/sdks/versioning?server=python#stripe-sdk-language-version-support-policy
Support for Python 3.7 and 3.8 is deprecated and will be removed in an upcoming major version. Read more and see the full schedule in the docs: https://docs.stripe.com/sdks/versioning?lang=python#stripe-sdk-language-version-support-policy

#### Extended Support

Expand Down Expand Up @@ -313,6 +313,8 @@ The default HTTP client uses `requests` for making synchronous requests but
you to explicitly initialize your own http client and pass it to StripeClient
or set it as the global default.

If you don't already have a dependency on an async-compatible HTTP library, `pip install stripe[async]` will install one for you (new in `v13.0.1`).

```python
# By default, an explicitly initialized HTTPXClient will raise an exception if you
# attempt to call a sync method. If you intend to only use async, this is useful to
Expand Down
23 changes: 16 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ authors = [{ name = "Stripe", email = "support@stripe.com" }]
license-files = ["LICENSE"]
keywords = ["stripe", "api", "payments"]
requires-python = ">=3.7"
dependencies = [
"typing_extensions <= 4.2.0, > 3.7.2; python_version < '3.7'",
# The best typing support comes from 4.5.0+ but we can support down to
# 3.7.2 without throwing exceptions.
"typing_extensions >= 4.5.0; python_version >= '3.7'",
"requests >= 2.20; python_version >= '3.0'",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand All @@ -33,6 +26,18 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]

dependencies = [
"typing_extensions <= 4.2.0, > 3.7.2; python_version < '3.7'",
# The best typing support comes from 4.5.0+ but we can support down to
# 3.7.2 without throwing exceptions.
"typing_extensions >= 4.5.0; python_version >= '3.7'",
"requests >= 2.20; python_version >= '3.0'",
]

[project.optional-dependencies]
# `pip install stripe[async]` gets you everything + `httpx`, so our async stuff works out of the box
async = ["httpx"]

[project.urls]
homepage = "https://stripe.com/"
source = "https://github.com/stripe/stripe-python"
Expand All @@ -44,6 +49,10 @@ documentation = "https://stripe.com/docs/api/?lang=python"
requires = ["flit_core >=3.11, <4"]
build-backend = "flit_core.buildapi"

[tool.flit.sdist]
# see: https://github.com/stripe/stripe-python/issues/1616
include = ["tests/"]

[tool.ruff]
# same as our black config
line-length = 79
Expand Down
Loading