Skip to content

Commit 0212f6a

Browse files
authored
Merge pull request #647 from orbcorp/release-please--branches--main--changes--next
release: 4.11.0
2 parents badbcb8 + 5c8b968 commit 0212f6a

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.10.0"
2+
".": "4.11.0"
33
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 4.11.0 (2025-07-30)
4+
5+
Full Changelog: [v4.10.0...v4.11.0](https://github.com/orbcorp/orb-python/compare/v4.10.0...v4.11.0)
6+
7+
### Features
8+
9+
* **client:** support file upload requests ([d4b17b0](https://github.com/orbcorp/orb-python/commit/d4b17b0534e20d7c0005e8c91ff3de022aa5f7c6))
10+
311
## 4.10.0 (2025-07-26)
412

513
Full Changelog: [v4.9.0...v4.10.0](https://github.com/orbcorp/orb-python/compare/v4.9.0...v4.10.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "orb-billing"
3-
version = "4.10.0"
3+
version = "4.11.0"
44
description = "The official Python library for the orb API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/orb/_base_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,10 @@ def _build_request(
533533
is_body_allowed = options.method.lower() != "get"
534534

535535
if is_body_allowed:
536-
kwargs["json"] = json_data if is_given(json_data) else None
536+
if isinstance(json_data, bytes):
537+
kwargs["content"] = json_data
538+
else:
539+
kwargs["json"] = json_data if is_given(json_data) else None
537540
kwargs["files"] = files
538541
else:
539542
headers.pop("Content-Type", None)

src/orb/_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
6969
return file
7070

7171
if is_tuple_t(file):
72-
return (file[0], _read_file_content(file[1]), *file[2:])
72+
return (file[0], read_file_content(file[1]), *file[2:])
7373

7474
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
7575

7676

77-
def _read_file_content(file: FileContent) -> HttpxFileContent:
77+
def read_file_content(file: FileContent) -> HttpxFileContent:
7878
if isinstance(file, os.PathLike):
7979
return pathlib.Path(file).read_bytes()
8080
return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
111111
return file
112112

113113
if is_tuple_t(file):
114-
return (file[0], await _async_read_file_content(file[1]), *file[2:])
114+
return (file[0], await async_read_file_content(file[1]), *file[2:])
115115

116116
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
117117

118118

119-
async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
119+
async def async_read_file_content(file: FileContent) -> HttpxFileContent:
120120
if isinstance(file, os.PathLike):
121121
return await anyio.Path(file).read_bytes()
122122

src/orb/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "orb"
4-
__version__ = "4.10.0" # x-release-please-version
4+
__version__ = "4.11.0" # x-release-please-version

0 commit comments

Comments
 (0)