Skip to content

Commit

Permalink
chore(internal): codegen related update (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 8, 2025
1 parent 80a1d9c commit ad003b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
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
5 changes: 2 additions & 3 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.25.2
httpx==0.28.1
# via onebusaway
# via respx
idna==3.4
Expand Down Expand Up @@ -77,7 +77,7 @@ 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 @@ -86,7 +86,6 @@ six==1.16.0
# via python-dateutil
sniffio==1.3.0
# via anyio
# via httpx
# via onebusaway
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 @@ -26,7 +26,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.25.2
httpx==0.28.1
# via onebusaway
idna==3.4
# via anyio
Expand All @@ -37,7 +37,6 @@ pydantic-core==2.27.1
# via pydantic
sniffio==1.3.0
# via anyio
# via httpx
# via onebusaway
typing-extensions==4.12.2
# via anyio
Expand Down
6 changes: 6 additions & 0 deletions src/onebusaway/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,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 @@ -1334,6 +1337,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

0 comments on commit ad003b8

Please sign in to comment.