From e6283b2d54126a9fb2176dfa8a655cf4b47302cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez?= Date: Mon, 23 Aug 2021 16:01:10 +0100 Subject: [PATCH 1/3] Add support for Graph API 9.0, 10.0 and 11.0. Removed support for deprecated versions. --- docs/changes.rst | 6 +++--- facebook/__init__.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/changes.rst b/docs/changes.rst index 5dec2cbc..4612b09d 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -6,9 +6,9 @@ Version 4.0.0 (unreleased) ========================== - Add support for Python 3.8. - Remove support for Python 2.7 and 3.4. -- Add support for Graph API versions 3.2, 3.3, 4.0, 5.0, 6.0, 7.0 and 8.0. -- Remove support for Graph API versions 2.8, 2.9, 2.10, 2.11, 2.12, and 3.0. -- Change default Graph API version to 2.10. +- Add support for Graph API versions 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 and 11.0. +- Remove support for Graph API versions 2.8, 2.9, 2.10, 2.11, 2.12, 3.0, 3.1, 3.2 and 3.3. +- Change default Graph API version to 4.0. - Add support for securing Graph API Calls with a proof based on the application secret (#454). - Add subcodes to GraphAPIError objects. diff --git a/facebook/__init__.py b/facebook/__init__.py index e91c5939..18faeeec 100755 --- a/facebook/__init__.py +++ b/facebook/__init__.py @@ -41,7 +41,7 @@ FACEBOOK_GRAPH_URL = "https://graph.facebook.com/" FACEBOOK_WWW_URL = "https://www.facebook.com/" FACEBOOK_OAUTH_DIALOG_PATH = "dialog/oauth?" -VALID_API_VERSIONS = ["3.1", "3.2", "3.3", "4.0", "5.0", "6.0", "7.0", "8.0"] +VALID_API_VERSIONS = ["4.0", "5.0", "6.0", "7.0", "8.0", "9.0", "10.0", "11.0"] VALID_SEARCH_TYPES = ["place", "placetopic"] From 1078fdefac896fedba1de965aa4753f33dee915b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez?= Date: Mon, 23 Aug 2021 16:10:29 +0100 Subject: [PATCH 2/3] Allow versions higher than 9.0, double digited --- facebook/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facebook/__init__.py b/facebook/__init__.py index 18faeeec..6e1ae4f7 100755 --- a/facebook/__init__.py +++ b/facebook/__init__.py @@ -93,7 +93,7 @@ def __init__( self.app_secret_hmac = None if version: - version_regex = re.compile(r"^\d\.\d{1,2}$") + version_regex = re.compile(r"^\d{1,2}\.\d{1,2}$") match = version_regex.search(str(version)) if match is not None: if str(version) not in VALID_API_VERSIONS: From d84b73b13171a822c53176158587ee015c2ae737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez?= Date: Tue, 24 Aug 2021 11:07:35 +0100 Subject: [PATCH 3/3] Fix doc linting long lines --- docs/changes.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changes.rst b/docs/changes.rst index 4612b09d..dfb9ace6 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -6,8 +6,10 @@ Version 4.0.0 (unreleased) ========================== - Add support for Python 3.8. - Remove support for Python 2.7 and 3.4. -- Add support for Graph API versions 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 and 11.0. -- Remove support for Graph API versions 2.8, 2.9, 2.10, 2.11, 2.12, 3.0, 3.1, 3.2 and 3.3. +- Add support for Graph API versions 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 and + 11.0. +- Remove support for Graph API versions 2.8, 2.9, 2.10, 2.11, 2.12, 3.0, 3.1, + 3.2 and 3.3. - Change default Graph API version to 4.0. - Add support for securing Graph API Calls with a proof based on the application secret (#454).