Skip to content

Commit 7cff4dc

Browse files
authored
Merge pull request #26 from sentdm/release-please--branches--main--changes--next
release: 0.18.2
2 parents 23fb3c6 + 15ffaa6 commit 7cff4dc

File tree

7 files changed

+25
-7
lines changed

7 files changed

+25
-7
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-
".": "0.18.1"
2+
".": "0.18.2"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 40
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-2fa77c5563df4353049c27f275600e30487ea3fd617770a059a8e8579bedcedb.yml
3-
openapi_spec_hash: 3ae742e1990418d2c01ecac606187887
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-d0b10022e8bcb371d5db9a476396808e779984cee62c9f3d1b042d51a3fbce4a.yml
3+
openapi_spec_hash: 3451ed04f3a6373c7905abb219fc4e30
44
config_hash: 405ade725d72d542c60de821a127411b

CHANGELOG.md

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

3+
## 0.18.2 (2026-04-14)
4+
5+
Full Changelog: [v0.18.1...v0.18.2](https://github.com/sentdm/sent-dm-python/compare/v0.18.1...v0.18.2)
6+
7+
### Bug Fixes
8+
9+
* ensure file data are only sent as 1 parameter ([c3cc931](https://github.com/sentdm/sent-dm-python/commit/c3cc93144f58651efa4a00c8f71a2e213846e3ee))
10+
311
## 0.18.1 (2026-04-10)
412

513
Full Changelog: [v0.18.0...v0.18.1](https://github.com/sentdm/sent-dm-python/compare/v0.18.0...v0.18.1)

pyproject.toml

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

src/sent_dm/_utils/_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ def _extract_items(
8686
index += 1
8787
if is_dict(obj):
8888
try:
89-
# We are at the last entry in the path so we must remove the field
90-
if (len(path)) == index:
89+
# Remove the field if there are no more dict keys in the path,
90+
# only "<array>" traversal markers or end.
91+
if all(p == "<array>" for p in path[index:]):
9192
item = obj.pop(key)
9293
else:
9394
item = obj[key]

src/sent_dm/_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__ = "sent_dm"
4-
__version__ = "0.18.1" # x-release-please-version
4+
__version__ = "0.18.2" # x-release-please-version

tests/test_extract_files.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ def test_multiple_files() -> None:
3535
assert query == {"documents": [{}, {}]}
3636

3737

38+
def test_top_level_file_array() -> None:
39+
query = {"files": [b"file one", b"file two"], "title": "hello"}
40+
assert extract_files(query, paths=[["files", "<array>"]]) == [
41+
("files[]", b"file one"),
42+
("files[]", b"file two"),
43+
]
44+
assert query == {"title": "hello"}
45+
46+
3847
@pytest.mark.parametrize(
3948
"query,paths,expected",
4049
[

0 commit comments

Comments
 (0)