Skip to content

Commit

Permalink
Fix Python CI Action (#649)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #649

[BizSDK][Python] Fix Python CI Action

views keyword is removed from EndpointDecodeDict.txt to fix get_pre_views wrong function name.
Remove deprecated python versions from CI to work with latest-ubuntu.

Differential Revision: D48336761

fbshipit-source-id: c7b2a5c16a4913d5785ae9f31c3c020c9b4ed480
  • Loading branch information
stcheng authored and facebook-github-bot committed Aug 15, 2023
1 parent a3113c3 commit a59c964
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 21 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,17 @@ jobs:
strategy:
matrix:
include:
- python-version: 2.7
tox-env: py27
- python-version: 3.5
tox-env: py35
- python-version: 3.6
tox-env: py36
- python-version: 3.7
tox-env: py37
- python-version: 3.8
tox-env: py38
- python-version: 3.9
- python-version: '3.9'
tox-env: py39
- python-version: 3.10
- python-version: '3.10'
tox-env: py310
- python-version: '3.11'
tox-env: py311

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Test with tox
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from facebook_business.session import FacebookSession
from facebook_business.api import FacebookAdsApi

__version__ = '17.0.2'
__version__ = '17.0.4'
__all__ = [
'session',
'objects',
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/adobjects/ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def get_leads(self, fields=None, params=None, batch=None, success=None, failure=
self.assure_call()
return request.execute()

def get_pre_views(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
def get_previews(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
api_utils.warning('`success` and `failure` callback only work for batch call.')
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/adobjects/adaccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,7 @@ def get_deprecated_targeting_ad_sets(self, fields=None, params=None, batch=None,
self.assure_call()
return request.execute()

def get_generate_pre_views(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
def get_generate_previews(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
api_utils.warning('`success` and `failure` callback only work for batch call.')
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/adobjects/adcreative.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def get_creative_insights(self, fields=None, params=None, batch=None, success=No
self.assure_call()
return request.execute()

def get_pre_views(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
def get_previews(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
api_utils.warning('`success` and `failure` callback only work for batch call.')
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/adobjects/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure
self.assure_call()
return request.execute()

def get_pre_views(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
def get_previews(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
api_utils.warning('`success` and `failure` callback only work for batch call.')
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/apiconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

ads_api_config = {
'API_VERSION': 'v17.0',
'SDK_VERSION': 'v17.0.2',
'SDK_VERSION': 'v17.0.4',
'STRICT_MODE': False
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
requirements_filename = os.path.join(this_dir, 'requirements.txt')

PACKAGE_NAME = 'facebook_business'
PACKAGE_VERSION = '17.0.3'
PACKAGE_VERSION = '17.0.4'
PACKAGE_AUTHOR = 'Facebook'
PACKAGE_AUTHOR_EMAIL = ''
PACKAGE_URL = 'https://github.com/facebook/facebook-python-business-sdk'
Expand Down

0 comments on commit a59c964

Please sign in to comment.