From e4087f699648b1cd74587de8c5e2ab2d37340fee Mon Sep 17 00:00:00 2001 From: Renato <33936751+N4S4@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:03:19 +0200 Subject: [PATCH] added backward compatibility --- setup.py | 2 +- synology_api/audiostation.py | 1 + synology_api/auth.py | 1 + synology_api/core_active_backup.py | 1 + synology_api/core_backup.py | 1 + synology_api/core_certificate.py | 1 + synology_api/core_sys_info.py | 1 + synology_api/dhcp_server.py | 1 + synology_api/directory_server.py | 1 + synology_api/docker_api.py | 1 + synology_api/downloadstation.py | 1 + synology_api/drive_admin_console.py | 1 + synology_api/error_codes.py | 1 + synology_api/filestation.py | 1 + synology_api/log_center.py | 1 + synology_api/notestation.py | 1 + synology_api/oauth.py | 1 + synology_api/photos.py | 1 + synology_api/security_advisor.py | 1 + synology_api/universal_search.py | 1 + synology_api/usb_copy.py | 1 + synology_api/virtualization.py | 1 + synology_api/vpn.py | 1 + 23 files changed, 23 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7c3dbe0..9089aac 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='synology-api', - version='0.6.1', + version='0.6.2', packages=find_packages(exclude=['tests*']), license='MIT', description='Python Synology API Wrapper', diff --git a/synology_api/audiostation.py b/synology_api/audiostation.py index 7ba92fd..cc21462 100644 --- a/synology_api/audiostation.py +++ b/synology_api/audiostation.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import auth as syn diff --git a/synology_api/auth.py b/synology_api/auth.py index 519fd3b..2733cfc 100644 --- a/synology_api/auth.py +++ b/synology_api/auth.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional import requests from .error_codes import error_codes, CODE_SUCCESS, download_station_error_codes, file_station_error_codes diff --git a/synology_api/core_active_backup.py b/synology_api/core_active_backup.py index 2e5ddaf..258efd1 100644 --- a/synology_api/core_active_backup.py +++ b/synology_api/core_active_backup.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/core_backup.py b/synology_api/core_backup.py index 0517766..563a7fd 100644 --- a/synology_api/core_backup.py +++ b/synology_api/core_backup.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/core_certificate.py b/synology_api/core_certificate.py index 4a4fa74..a328d79 100644 --- a/synology_api/core_certificate.py +++ b/synology_api/core_certificate.py @@ -1,3 +1,4 @@ +from __future__ import annotations from io import BytesIO from typing import Optional diff --git a/synology_api/core_sys_info.py b/synology_api/core_sys_info.py index 298f9ad..a7ad3ad 100644 --- a/synology_api/core_sys_info.py +++ b/synology_api/core_sys_info.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/dhcp_server.py b/synology_api/dhcp_server.py index 9af578b..f1171da 100644 --- a/synology_api/dhcp_server.py +++ b/synology_api/dhcp_server.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/directory_server.py b/synology_api/directory_server.py index d86884e..6abf724 100644 --- a/synology_api/directory_server.py +++ b/synology_api/directory_server.py @@ -1,4 +1,5 @@ """directory_server.py works with base_api_core to provide AD capabilities.""" +from __future__ import annotations import json from typing import List, Optional, Any from . import base_api_core diff --git a/synology_api/docker_api.py b/synology_api/docker_api.py index cd42bab..12cb733 100644 --- a/synology_api/docker_api.py +++ b/synology_api/docker_api.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/downloadstation.py b/synology_api/downloadstation.py index 079a4de..df3d4b7 100644 --- a/synology_api/downloadstation.py +++ b/synology_api/downloadstation.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional, Any from . import auth as syn diff --git a/synology_api/drive_admin_console.py b/synology_api/drive_admin_console.py index 3fc09cb..34eeee9 100644 --- a/synology_api/drive_admin_console.py +++ b/synology_api/drive_admin_console.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/error_codes.py b/synology_api/error_codes.py index 3cedbca..9714db6 100644 --- a/synology_api/error_codes.py +++ b/synology_api/error_codes.py @@ -3,6 +3,7 @@ # NOTE: https://global.synologydownload.com/download/Document/Software/DeveloperGuide/Package/Calendar/2.4/enu # /Synology_Calendar_API_Guide_enu.pdf, Refers to common error code # 160, "Insufficient application privilege" Page 10. +from __future__ import annotations CODE_SUCCESS = 0 CODE_UNKNOWN = 9999 diff --git a/synology_api/filestation.py b/synology_api/filestation.py index 813ad3c..b13f4ac 100644 --- a/synology_api/filestation.py +++ b/synology_api/filestation.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional, Any import os import time diff --git a/synology_api/log_center.py b/synology_api/log_center.py index 64d124b..aa48529 100644 --- a/synology_api/log_center.py +++ b/synology_api/log_center.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/notestation.py b/synology_api/notestation.py index 6ba7da1..b857636 100644 --- a/synology_api/notestation.py +++ b/synology_api/notestation.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/oauth.py b/synology_api/oauth.py index 5183fed..3d165d4 100644 --- a/synology_api/oauth.py +++ b/synology_api/oauth.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/photos.py b/synology_api/photos.py index 51df0d6..59e6ad1 100755 --- a/synology_api/photos.py +++ b/synology_api/photos.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional, Any from . import auth as syn import json diff --git a/synology_api/security_advisor.py b/synology_api/security_advisor.py index ff21258..e6bb5a9 100644 --- a/synology_api/security_advisor.py +++ b/synology_api/security_advisor.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/universal_search.py b/synology_api/universal_search.py index 9b67eb3..465c07f 100644 --- a/synology_api/universal_search.py +++ b/synology_api/universal_search.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional, Any from synology_api import auth diff --git a/synology_api/usb_copy.py b/synology_api/usb_copy.py index 52f56ad..138deef 100644 --- a/synology_api/usb_copy.py +++ b/synology_api/usb_copy.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core diff --git a/synology_api/virtualization.py b/synology_api/virtualization.py index c117007..4e6eccf 100644 --- a/synology_api/virtualization.py +++ b/synology_api/virtualization.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional, Any from . import auth as syn diff --git a/synology_api/vpn.py b/synology_api/vpn.py index c529516..5e1d2bb 100644 --- a/synology_api/vpn.py +++ b/synology_api/vpn.py @@ -1,3 +1,4 @@ +from __future__ import annotations from typing import Optional from . import base_api_core