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
4 changes: 4 additions & 0 deletions changelog.d/20260605_135304_aaschaer_remove_pinned.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Removed
-------

- The ``pinned`` field was removed from the experimental ``BookmarkCreateDocument`` and ``BookmarkUpdateDocument`` classes to align with the API which does not support the field.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import typing as t
import uuid

from globus_sdk._missing import MISSING, MissingType
from globus_sdk._payload import GlobusPayload

log = logging.getLogger(__name__)
Expand All @@ -23,7 +22,6 @@ def __init__(
name: str,
path: str,
*,
pinned: bool | MissingType = MISSING,
additional_fields: dict[str, t.Any] | None = None,
) -> None:
super().__init__()
Expand All @@ -41,7 +39,6 @@ def __init__(
attributes = {
"name": name,
"path": path,
"pinned": pinned,
}

if additional_fields is not None:
Expand All @@ -66,7 +63,6 @@ def __init__(
name: str,
path: str,
*,
pinned: bool | MissingType = MISSING,
additional_fields: dict[str, t.Any] | None = None,
) -> None:
super().__init__()
Expand All @@ -75,7 +71,6 @@ def __init__(
attributes = {
"name": name,
"path": path,
"pinned": pinned,
}

if additional_fields is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"attributes": {
"name": _name,
"path": _path,
"pinned": False,
},
"relationships": {
"collection": {
Expand Down
2 changes: 1 addition & 1 deletion src/globus_sdk/testing/data/transfer/v2/get_bookmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"data": {
"type": "Bookmark",
"id": BOOKMARK_ID,
"attributes": {"name": _name, "path": _path, "pinned": True},
"attributes": {"name": _name, "path": _path},
"relationships": {
"collection": {
"data": {
Expand Down
3 changes: 0 additions & 3 deletions src/globus_sdk/testing/data/transfer/v2/list_bookmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
"collection_id": str(uuid.uuid4()),
"name": "public datasets",
"path": "/data_repository/public",
"pinned": True,
},
{
"bookmark_id": str(uuid.uuid4()),
"collection_id": str(uuid.uuid4()),
"name": "private datasets",
"path": "/data_repository/private",
"pinned": False,
},
]

Expand All @@ -32,7 +30,6 @@
"attributes": {
"name": b["name"],
"path": b["path"],
"pinned": b["pinned"],
},
"relationships": {
"collection": {
Expand Down
3 changes: 0 additions & 3 deletions src/globus_sdk/testing/data/transfer/v2/update_bookmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
_collection_id = str(uuid.uuid4())
_name = "private datasets"
_path = "/data_repository/private"
_pinned = True


RESPONSES = ResponseSet(
Expand All @@ -24,7 +23,6 @@
"attributes": {
"name": _name,
"path": _path,
"pinned": _pinned,
},
"relationships": {
"collection": {
Expand All @@ -41,7 +39,6 @@
"collection": _collection_id,
"name": _name,
"path": _path,
"pinned": _pinned,
},
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def test_list_bookmarks(client):
assert bm["id"] == meta["bookmarks"][i]["bookmark_id"]
assert bm["attributes"]["name"] == meta["bookmarks"][i]["name"]
assert bm["attributes"]["path"] == meta["bookmarks"][i]["path"]
assert bm["attributes"]["pinned"] == meta["bookmarks"][i]["pinned"]

assert (
bm["relationships"]["collection"]["data"]["id"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def test_update_bookmark(client):
data = BookmarkUpdateDocument(
meta["name"],
meta["path"],
pinned=meta["pinned"],
)

res = client.update_bookmark(meta["bookmark_id"], data)
Expand All @@ -25,4 +24,3 @@ def test_update_bookmark(client):
sent = json.loads(req.body)
assert sent["data"]["attributes"]["name"] == meta["name"]
assert sent["data"]["attributes"]["path"] == meta["path"]
assert sent["data"]["attributes"]["pinned"] == meta["pinned"]
Loading