Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
413bb22
feat: generate more types that are used as request bodies (#649)
stainless-app[bot] Dec 11, 2024
1406b81
chore(internal): bump pyright (#651)
stainless-app[bot] Dec 12, 2024
988f2a0
chore(internal): add support for TypeAliasType (#652)
stainless-app[bot] Dec 12, 2024
c446d74
chore(internal): remove some duplicated imports (#653)
stainless-app[bot] Dec 13, 2024
b0b1b64
chore(internal): updated imports (#654)
stainless-app[bot] Dec 13, 2024
6412dcd
chore(api): new ConvertPhysical endpoint to convert a virtual card to…
stainless-app[bot] Dec 16, 2024
4ca06b8
docs(readme): example snippet for client context manager (#657)
stainless-app[bot] Dec 16, 2024
79baa5d
chore(internal): fix some typos (#658)
stainless-app[bot] Dec 17, 2024
8b181ca
feat(api)!: removes AccountHolder `resubmit` endpoint and `KYC_ADVANC…
stainless-app[bot] Dec 18, 2024
b76a630
chore: bump license year (#660)
stainless-app[bot] Jan 2, 2025
e572151
chore: add missing isclass check (#661)
stainless-app[bot] Jan 6, 2025
767729e
chore(internal): bump httpx dependency (#662)
stainless-app[bot] Jan 7, 2025
7e704cf
chore(internal): update examples (#663)
stainless-app[bot] Jan 7, 2025
f6528df
fix(client): only call .close() when needed (#664)
stainless-app[bot] Jan 7, 2025
b0de6d4
docs: fix typos (#665)
stainless-app[bot] Jan 8, 2025
f97e3bc
docs: more typo fixes (#666)
stainless-app[bot] Jan 8, 2025
51bdab7
docs(readme): fix misplaced period (#667)
stainless-app[bot] Jan 8, 2025
2ce887f
fix: correctly handle deserialising `cls` fields (#668)
stainless-app[bot] Jan 9, 2025
2e69678
chore(api): updates to documentation and additional filter for status…
stainless-app[bot] Jan 13, 2025
2eddffd
chore(internal): update deps (#670)
stainless-app[bot] Jan 14, 2025
5748bc0
feat(types)!: improve auth rules types (#671)
stainless-app[bot] Jan 14, 2025
77a255c
chore(internal): bump pyright dependency (#672)
stainless-app[bot] Jan 15, 2025
9bc6a5e
docs(raw responses): fix duplicate `the` (#674)
stainless-app[bot] Jan 20, 2025
2dff4e0
fix(tests): make test_get_platform less flaky (#675)
stainless-app[bot] Jan 20, 2025
f1a31f3
chore(internal): avoid pytest-asyncio deprecation warning (#676)
stainless-app[bot] Jan 20, 2025
1fd8a18
chore(docs): updates documentation for DPANs (#677)
stainless-app[bot] Jan 21, 2025
150965a
fix: reuse model in pagination items type (#679)
stainless-app[bot] Jan 21, 2025
1e7eb6d
chore: add back compat aliases for LineItemListResponse
yjp20 Jan 21, 2025
b1fb9fb
chore(internal): minor style changes (#680)
stainless-app[bot] Jan 21, 2025
425d1a1
release: 0.82.0
stainless-app[bot] Jan 21, 2025
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.81.1"
".": "0.82.0"
}
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Changelog

## 0.82.0 (2025-01-21)

Full Changelog: [v0.81.1...v0.82.0](https://github.com/lithic-com/lithic-python/compare/v0.81.1...v0.82.0)

### ⚠ BREAKING CHANGES

* **types:** improve auth rules types ([#671](https://github.com/lithic-com/lithic-python/issues/671))
* **api:** removes AccountHolder `resubmit` endpoint and `KYC_ADVANCED` workflow ([#659](https://github.com/lithic-com/lithic-python/issues/659))

### Features

* **api:** removes AccountHolder `resubmit` endpoint and `KYC_ADVANCED` workflow ([#659](https://github.com/lithic-com/lithic-python/issues/659)) ([8b181ca](https://github.com/lithic-com/lithic-python/commit/8b181ca9ab1e09309d22f0c2de9ec41cb6b448dc))
* generate more types that are used as request bodies ([#649](https://github.com/lithic-com/lithic-python/issues/649)) ([413bb22](https://github.com/lithic-com/lithic-python/commit/413bb22511b1f28190eae3da910bac35fb1de841))
* **types:** improve auth rules types ([#671](https://github.com/lithic-com/lithic-python/issues/671)) ([5748bc0](https://github.com/lithic-com/lithic-python/commit/5748bc033592204bc983d8adea36df51b59671df))


### Bug Fixes

* **client:** only call .close() when needed ([#664](https://github.com/lithic-com/lithic-python/issues/664)) ([f6528df](https://github.com/lithic-com/lithic-python/commit/f6528dfd841d00157a50c9b0dbd9e4a61baae530))
* correctly handle deserialising `cls` fields ([#668](https://github.com/lithic-com/lithic-python/issues/668)) ([2ce887f](https://github.com/lithic-com/lithic-python/commit/2ce887f68604500c0c7ff0f5a0a3e2da6f9f7d02))
* reuse model in pagination items type ([#679](https://github.com/lithic-com/lithic-python/issues/679)) ([150965a](https://github.com/lithic-com/lithic-python/commit/150965ac048661778ba5becd99cdcde0903d5e71))
* **tests:** make test_get_platform less flaky ([#675](https://github.com/lithic-com/lithic-python/issues/675)) ([2dff4e0](https://github.com/lithic-com/lithic-python/commit/2dff4e0609c7226f61d7ff503c3d9a6abe08f895))


### Chores

* add back compat aliases for LineItemListResponse ([1e7eb6d](https://github.com/lithic-com/lithic-python/commit/1e7eb6daf16f95888ff30f020f954afd0faf55a3))
* add missing isclass check ([#661](https://github.com/lithic-com/lithic-python/issues/661)) ([e572151](https://github.com/lithic-com/lithic-python/commit/e572151d763b4ef9a27748bc0f6ddc088e35b29b))
* **api:** new ConvertPhysical endpoint to convert a virtual card to a physical card ([#656](https://github.com/lithic-com/lithic-python/issues/656)) ([6412dcd](https://github.com/lithic-com/lithic-python/commit/6412dcd78bae44cd35a742c357ec1e56948144e1))
* **api:** updates to documentation and additional filter for status on Transactions ([#669](https://github.com/lithic-com/lithic-python/issues/669)) ([2e69678](https://github.com/lithic-com/lithic-python/commit/2e69678de96264a5d2ba7b38cf07ffa76823e3f1))
* bump license year ([#660](https://github.com/lithic-com/lithic-python/issues/660)) ([b76a630](https://github.com/lithic-com/lithic-python/commit/b76a6307f08bc628e382638e33f07cac12160826))
* **docs:** updates documentation for DPANs ([#677](https://github.com/lithic-com/lithic-python/issues/677)) ([1fd8a18](https://github.com/lithic-com/lithic-python/commit/1fd8a184d28568eb4990a73746c440889325b6fa))
* **internal:** add support for TypeAliasType ([#652](https://github.com/lithic-com/lithic-python/issues/652)) ([988f2a0](https://github.com/lithic-com/lithic-python/commit/988f2a016c98cef5a3558c08f8568af27776a0fb))
* **internal:** avoid pytest-asyncio deprecation warning ([#676](https://github.com/lithic-com/lithic-python/issues/676)) ([f1a31f3](https://github.com/lithic-com/lithic-python/commit/f1a31f34ebe689b048f889b3ef0d470dc5defda4))
* **internal:** bump httpx dependency ([#662](https://github.com/lithic-com/lithic-python/issues/662)) ([767729e](https://github.com/lithic-com/lithic-python/commit/767729e44232516426fc018e9189e9a8d2ab48c5))
* **internal:** bump pyright ([#651](https://github.com/lithic-com/lithic-python/issues/651)) ([1406b81](https://github.com/lithic-com/lithic-python/commit/1406b81f7ca5e58d787afa86b723f4f271d361a4))
* **internal:** bump pyright dependency ([#672](https://github.com/lithic-com/lithic-python/issues/672)) ([77a255c](https://github.com/lithic-com/lithic-python/commit/77a255cb547c13d3b87127d096f628513dceb63f))
* **internal:** fix some typos ([#658](https://github.com/lithic-com/lithic-python/issues/658)) ([79baa5d](https://github.com/lithic-com/lithic-python/commit/79baa5d8fa228ee9f9575e264b8022e2c609f44a))
* **internal:** minor style changes ([#680](https://github.com/lithic-com/lithic-python/issues/680)) ([b1fb9fb](https://github.com/lithic-com/lithic-python/commit/b1fb9fbbe878bb1779db0ca23959565dcff929e1))
* **internal:** remove some duplicated imports ([#653](https://github.com/lithic-com/lithic-python/issues/653)) ([c446d74](https://github.com/lithic-com/lithic-python/commit/c446d74a9fd059d45d93966dd63894a68a76a965))
* **internal:** update deps ([#670](https://github.com/lithic-com/lithic-python/issues/670)) ([2eddffd](https://github.com/lithic-com/lithic-python/commit/2eddffdab2e6180f9f5b5f6848d3e8bbe45567fd))
* **internal:** update examples ([#663](https://github.com/lithic-com/lithic-python/issues/663)) ([7e704cf](https://github.com/lithic-com/lithic-python/commit/7e704cf7776ff4beb47beb397a846333c3843617))
* **internal:** updated imports ([#654](https://github.com/lithic-com/lithic-python/issues/654)) ([b0b1b64](https://github.com/lithic-com/lithic-python/commit/b0b1b644dcc1db989c22ba9def0fa4712e2e18d3))


### Documentation

* fix typos ([#665](https://github.com/lithic-com/lithic-python/issues/665)) ([b0de6d4](https://github.com/lithic-com/lithic-python/commit/b0de6d41f28cd60e8adfdcca389699a3c608156f))
* more typo fixes ([#666](https://github.com/lithic-com/lithic-python/issues/666)) ([f97e3bc](https://github.com/lithic-com/lithic-python/commit/f97e3bc55387ed862cf40d357051c896a28ad375))
* **raw responses:** fix duplicate `the` ([#674](https://github.com/lithic-com/lithic-python/issues/674)) ([9bc6a5e](https://github.com/lithic-com/lithic-python/commit/9bc6a5e8b9cbcb8e69497f4fef32f3ba2d7f2d1f))
* **readme:** example snippet for client context manager ([#657](https://github.com/lithic-com/lithic-python/issues/657)) ([4ca06b8](https://github.com/lithic-com/lithic-python/commit/4ca06b884448c3737fda47e1343814d20714d5ea))
* **readme:** fix misplaced period ([#667](https://github.com/lithic-com/lithic-python/issues/667)) ([51bdab7](https://github.com/lithic-com/lithic-python/commit/51bdab75952ec5716dab38b61c7c87cc8cda63fc))

## 0.81.1 (2024-12-11)

Full Changelog: [v0.81.0...v0.81.1](https://github.com/lithic-com/lithic-python/compare/v0.81.0...v0.81.1)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2024 Lithic
Copyright 2025 Lithic

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ except lithic.APIStatusError as e:
print(e.response)
```

Error codes are as followed:
Error codes are as follows:

| Status Code | Error Type |
| ----------- | -------------------------- |
Expand Down Expand Up @@ -332,7 +332,7 @@ card = response.parse() # get the object that `cards.create()` would have retur
print(card.token)
```

These methods return an [`LegacyAPIResponse`](https://github.com/lithic-com/lithic-python/tree/main/src/lithic/_legacy_response.py) object. This is a legacy class as we're changing it slightly in the next major version.
These methods return a [`LegacyAPIResponse`](https://github.com/lithic-com/lithic-python/tree/main/src/lithic/_legacy_response.py) object. This is a legacy class as we're changing it slightly in the next major version.

For the sync client this will mostly be the same with the exception
of `content` & `text` will be methods instead of properties. In the
Expand Down Expand Up @@ -370,8 +370,7 @@ If you need to access undocumented endpoints, params, or response properties, th
#### Undocumented endpoints

To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
http verbs. Options on the client will be respected (such as retries) will be respected when making this
request.
http verbs. Options on the client will be respected (such as retries) when making this request.

```py
import httpx
Expand Down Expand Up @@ -428,12 +427,22 @@ client.with_options(http_client=DefaultHttpxClient(...))

By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.

```py
from lithic import Lithic

with Lithic() as client:
# make requests here
...

# HTTP client is now closed
```

## Versioning

This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

1. Changes that only affect static types, without breaking runtime behavior.
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
3. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
Expand Down
15 changes: 9 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
from lithic.types import (
AccountFinancialAccountType,
Address,
AuthRule,
Carrier,
Currency,
Document,
InstanceFinancialAccountType,
ShippingAddress,
VelocityLimitParams,
VelocityLimitParamsPeriodWindow,
)
```

Expand Down Expand Up @@ -67,7 +64,6 @@ Methods:
- <code title="patch /v1/account_holders/{account_holder_token}">client.account_holders.<a href="./src/lithic/resources/account_holders.py">update</a>(account_holder_token, \*\*<a href="src/lithic/types/account_holder_update_params.py">params</a>) -> <a href="./src/lithic/types/account_holder_update_response.py">AccountHolderUpdateResponse</a></code>
- <code title="get /v1/account_holders">client.account_holders.<a href="./src/lithic/resources/account_holders.py">list</a>(\*\*<a href="src/lithic/types/account_holder_list_params.py">params</a>) -> <a href="./src/lithic/types/account_holder.py">SyncSinglePage[AccountHolder]</a></code>
- <code title="get /v1/account_holders/{account_holder_token}/documents">client.account_holders.<a href="./src/lithic/resources/account_holders.py">list_documents</a>(account_holder_token) -> <a href="./src/lithic/types/account_holder_list_documents_response.py">AccountHolderListDocumentsResponse</a></code>
- <code title="post /v1/account_holders/{account_holder_token}/resubmit">client.account_holders.<a href="./src/lithic/resources/account_holders.py">resubmit</a>(account_holder_token, \*\*<a href="src/lithic/types/account_holder_resubmit_params.py">params</a>) -> <a href="./src/lithic/types/account_holder.py">AccountHolder</a></code>
- <code title="get /v1/account_holders/{account_holder_token}/documents/{document_token}">client.account_holders.<a href="./src/lithic/resources/account_holders.py">retrieve_document</a>(document_token, \*, account_holder_token) -> <a href="./src/lithic/types/shared/document.py">Document</a></code>
- <code title="post /v1/simulate/account_holders/enrollment_document_review">client.account_holders.<a href="./src/lithic/resources/account_holders.py">simulate_enrollment_document_review</a>(\*\*<a href="src/lithic/types/account_holder_simulate_enrollment_document_review_params.py">params</a>) -> <a href="./src/lithic/types/shared/document.py">Document</a></code>
- <code title="post /v1/simulate/account_holders/enrollment_review">client.account_holders.<a href="./src/lithic/resources/account_holders.py">simulate_enrollment_review</a>(\*\*<a href="src/lithic/types/account_holder_simulate_enrollment_review_params.py">params</a>) -> <a href="./src/lithic/types/account_holder_simulate_enrollment_review_response.py">AccountHolderSimulateEnrollmentReviewResponse</a></code>
Expand All @@ -81,6 +77,12 @@ Types:

```python
from lithic.types.auth_rules import (
AuthRule,
AuthRuleCondition,
ConditionalAttribute,
ConditionalBlockParameters,
VelocityLimitParams,
VelocityLimitParamsPeriodWindow,
V2CreateResponse,
V2RetrieveResponse,
V2UpdateResponse,
Expand Down Expand Up @@ -187,6 +189,7 @@ Methods:
- <code title="get /v1/cards/{card_token}">client.cards.<a href="./src/lithic/resources/cards/cards.py">retrieve</a>(card_token) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="patch /v1/cards/{card_token}">client.cards.<a href="./src/lithic/resources/cards/cards.py">update</a>(card_token, \*\*<a href="src/lithic/types/card_update_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="get /v1/cards">client.cards.<a href="./src/lithic/resources/cards/cards.py">list</a>(\*\*<a href="src/lithic/types/card_list_params.py">params</a>) -> <a href="./src/lithic/types/card.py">SyncCursorPage[Card]</a></code>
- <code title="post /v1/cards/{card_token}/convert_physical">client.cards.<a href="./src/lithic/resources/cards/cards.py">convert_physical</a>(card_token, \*\*<a href="src/lithic/types/card_convert_physical_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="get /v1/embed/card">client.cards.<a href="./src/lithic/resources/cards/cards.py">embed</a>(\*\*<a href="src/lithic/types/card_embed_params.py">params</a>) -> str</code>
- <code title="post /v1/cards/{card_token}/provision">client.cards.<a href="./src/lithic/resources/cards/cards.py">provision</a>(card_token, \*\*<a href="src/lithic/types/card_provision_params.py">params</a>) -> <a href="./src/lithic/types/card_provision_response.py">CardProvisionResponse</a></code>
- <code title="post /v1/cards/{card_token}/reissue">client.cards.<a href="./src/lithic/resources/cards/cards.py">reissue</a>(card_token, \*\*<a href="src/lithic/types/card_reissue_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
Expand Down Expand Up @@ -375,12 +378,12 @@ Methods:
Types:

```python
from lithic.types.financial_accounts.statements import StatementLineItems, LineItemListResponse
from lithic.types.financial_accounts.statements import StatementLineItems
```

Methods:

- <code title="get /v1/financial_accounts/{financial_account_token}/statements/{statement_token}/line_items">client.financial_accounts.statements.line_items.<a href="./src/lithic/resources/financial_accounts/statements/line_items.py">list</a>(statement_token, \*, financial_account_token, \*\*<a href="src/lithic/types/financial_accounts/statements/line_item_list_params.py">params</a>) -> <a href="./src/lithic/types/financial_accounts/statements/line_item_list_response.py">SyncCursorPage[LineItemListResponse]</a></code>
- <code title="get /v1/financial_accounts/{financial_account_token}/statements/{statement_token}/line_items">client.financial_accounts.statements.line_items.<a href="./src/lithic/resources/financial_accounts/statements/line_items.py">list</a>(statement_token, \*, financial_account_token, \*\*<a href="src/lithic/types/financial_accounts/statements/line_item_list_params.py">params</a>) -> SyncCursorPage[Data]</code>

## LoanTapes

Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cache_fine_grained = True
# ```
# Changing this codegen to make mypy happy would increase complexity
# and would not be worth it.
disable_error_code = func-returns-value
disable_error_code = func-returns-value,overload-cannot-match

# https://github.com/python/mypy/issues/12162
[mypy.overrides]
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lithic"
version = "0.81.1"
version = "0.82.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand All @@ -10,7 +10,7 @@ authors = [
dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.7, <5",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
Expand Down Expand Up @@ -54,7 +54,7 @@ dev-dependencies = [
"dirty-equals>=0.6.0",
"importlib-metadata>=6.7.0",
"rich>=13.7.1",
"nest_asyncio==1.6.0"
"nest_asyncio==1.6.0",
]

[tool.rye.scripts]
Expand Down Expand Up @@ -129,6 +129,7 @@ testpaths = ["tests"]
addopts = "--tb=short"
xfail_strict = true
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
filterwarnings = [
"error"
]
Expand Down
9 changes: 4 additions & 5 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.25.2
httpx==0.28.1
# via lithic
# via respx
idna==3.4
Expand All @@ -48,7 +48,7 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
mypy==1.13.0
mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
nest-asyncio==1.6.0
Expand All @@ -68,15 +68,15 @@ pydantic-core==2.27.1
# via pydantic
pygments==2.18.0
# via rich
pyright==1.1.389
pyright==1.1.392.post0
pytest==8.3.3
# via pytest-asyncio
pytest-asyncio==0.24.0
python-dateutil==2.8.2
# via time-machine
pytz==2023.3.post1
# via dirty-equals
respx==0.20.2
respx==0.22.0
rich==13.7.1
ruff==0.6.9
setuptools==68.2.2
Expand All @@ -85,7 +85,6 @@ six==1.16.0
# via python-dateutil
sniffio==1.3.0
# via anyio
# via httpx
# via lithic
time-machine==2.9.0
tomli==2.0.2
Expand Down
3 changes: 1 addition & 2 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.25.2
httpx==0.28.1
# via lithic
idna==3.4
# via anyio
Expand All @@ -36,7 +36,6 @@ pydantic-core==2.27.1
# via pydantic
sniffio==1.3.0
# via anyio
# via httpx
# via lithic
typing-extensions==4.12.2
# via anyio
Expand Down
6 changes: 6 additions & 0 deletions src/lithic/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,9 @@ def __init__(self, **kwargs: Any) -> None:

class SyncHttpxClientWrapper(DefaultHttpxClient):
def __del__(self) -> None:
if self.is_closed:
return

try:
self.close()
except Exception:
Expand Down Expand Up @@ -1349,6 +1352,9 @@ def __init__(self, **kwargs: Any) -> None:

class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
def __del__(self) -> None:
if self.is_closed:
return

try:
# TODO(someday): support non asyncio runtimes here
asyncio.get_running_loop().create_task(self.aclose())
Expand Down
Loading
Loading