Skip to content

Commit b314dab

Browse files
committed
Updated python-client-gen now has deprecation warnings for deprecated routes.
1 parent f12f276 commit b314dab

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

dropbox/base.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Auto-generated by Stone, do not modify.
22

33
from abc import ABCMeta, abstractmethod
4+
import warnings
45

56
from . import (
67
async,
@@ -774,6 +775,10 @@ def files_upload_session_append(self,
774775
If this raises, ApiError.reason is of type:
775776
:class:`dropbox.files.UploadSessionLookupError`
776777
"""
778+
warnings.warn(
779+
'upload_session/append is deprecated. Use upload_session/append_v2.',
780+
DeprecationWarning,
781+
)
777782
arg = files.UploadSessionCursor(session_id,
778783
offset)
779784
r = self.request(
@@ -982,6 +987,10 @@ def sharing_create_shared_link(self,
982987
If this raises, ApiError.reason is of type:
983988
:class:`dropbox.sharing.CreateSharedLinkError`
984989
"""
990+
warnings.warn(
991+
'create_shared_link is deprecated. Use create_shared_link_with_settings.',
992+
DeprecationWarning,
993+
)
985994
arg = sharing.CreateSharedLinkArg(path,
986995
short_url,
987996
pending_upload)
@@ -1165,6 +1174,10 @@ def sharing_get_shared_links(self,
11651174
If this raises, ApiError.reason is of type:
11661175
:class:`dropbox.sharing.GetSharedLinksError`
11671176
"""
1177+
warnings.warn(
1178+
'get_shared_links is deprecated. Use list_shared_links.',
1179+
DeprecationWarning,
1180+
)
11681181
arg = sharing.GetSharedLinksArg(path)
11691182
r = self.request(
11701183
sharing.get_shared_links,

dropbox/base_team.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Auto-generated by Stone, do not modify.
22

33
from abc import ABCMeta, abstractmethod
4+
import warnings
45

56
from . import (
67
async,
@@ -119,6 +120,10 @@ def team_devices_list_team_devices(self,
119120
If this raises, ApiError.reason is of type:
120121
:class:`dropbox.team.ListTeamDevicesError`
121122
"""
123+
warnings.warn(
124+
'devices/list_team_devices is deprecated. Use devices/list_members_devices.',
125+
DeprecationWarning,
126+
)
122127
arg = team.ListTeamDevicesArg(cursor,
123128
include_web_sessions,
124129
include_desktop_clients,
@@ -519,6 +524,10 @@ def team_linked_apps_list_team_linked_apps(self,
519524
If this raises, ApiError.reason is of type:
520525
:class:`dropbox.team.ListTeamAppsError`
521526
"""
527+
warnings.warn(
528+
'linked_apps/list_team_linked_apps is deprecated. Use linked_apps/list_members_linked_apps.',
529+
DeprecationWarning,
530+
)
522531
arg = team.ListTeamAppsArg(cursor)
523532
r = self.request(
524533
team.linked_apps_list_team_linked_apps,

0 commit comments

Comments
 (0)