diff --git a/HISTORY.rst b/HISTORY.rst index 7c142e36..d773bafc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,13 +1,21 @@ .. :changelog: Release History +13.0.17(2023-08-18) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. +* Added bulk mapping for new Criterion i.e., BulkCampaignDealCriterion, BulkAdGroupGenreCriterion. +* Added mappings for new fields in BulkCampaign: DestinationChannel and IsMultiChannelCampaign. +* Added mappings for new fields in BulkResponsiveAd: VerifiedTrackingDatas. +* Added mappings for new fields in ImageAsset: TargetWidth and TargetHeight. +* Fixed issue: https://github.com/BingAds/BingAds-Python-SDK/issues/250. + 13.0.16(2023-06-02) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. * Add bulk mappings for performance max campaign i.e., BulkAssetGroup, BulkAssetGroupListingGroup, BulkAudienceGroup, BulkAudienceGroupAssetGroupAssociation, BulkCampaignNegativeWebPage. * Add mappings for new fields in BulkCampaign: UrlExpansionOptOut. * Support new bidding scheme: ManualCpaScheme and CostPerSaleBiddingScheme. -* get rid of six/future as we support python3 only. Refer to https://github.com/BingAds/BingAds-Python-SDK/issues/233. 13.0.15(2022-12-23) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index 0790b948..199ce303 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.16' +VERSION = '13.0.17' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/bulk_ads.py b/bingads/v13/bulk/entities/bulk_ads.py index 51aee7e9..bb222667 100644 --- a/bingads/v13/bulk/entities/bulk_ads.py +++ b/bingads/v13/bulk/entities/bulk_ads.py @@ -13,7 +13,6 @@ ResponsiveSearchAd = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ResponsiveSearchAd')) ResponsiveAd = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ResponsiveAd')) - class _BulkAd(_SingleRecordBulkEntity): """ This abstract base class provides properties that are shared by all bulk ad classes. @@ -40,7 +39,21 @@ def __init__(self, self._ad_group_name = ad_group_name self._ad = ad self._performance_data = None + self._editorial_appeal_status = None + + @property + def editorial_appeal_status(self): + """ The editorial appeal status of the ad. + + :rtype: str + """ + return self._editorial_appeal_status + + @editorial_appeal_status.setter + def editorial_appeal_status(self, editorial_appeal_status): + self._editorial_appeal_status = editorial_appeal_status + @property def ad_group_id(self): """ The identifier of the ad group that contains the ad. @@ -164,6 +177,11 @@ def ad(self, ad): header=_StringTable.FinalUrlSuffix, field_to_csv=lambda c: bulk_optional_str(c.ad.FinalUrlSuffix, c.ad.Id), csv_to_field=lambda c, v: setattr(c.ad, 'FinalUrlSuffix', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.EditorialAppealStatus, + field_to_csv=lambda c: c.editorial_appeal_status, + csv_to_field=lambda c, v: setattr(c, '_editorial_appeal_status', v) ) ] @@ -599,6 +617,7 @@ def __init__(self, ad, ) self._ad = ad + self._verified_tracking_data = None @property def responsive_ad(self): @@ -613,7 +632,21 @@ def responsive_ad(self): def responsive_ad(self, responsive_ad): if responsive_ad is not None and not isinstance(responsive_ad, ResponsiveAd): raise ValueError('Not an instance of ResponsiveAd') - self._ad = responsive_ad + self._ad = responsive_ad + + @property + def verified_tracking_data(self): + """ + The verified tracking data that the ad associated + + Corresponds to 'Verified Tracking Setting' field in bulk file. + :rtype: ArrayOfArrayOfKeyValuePairOfstringstring + """ + return self._verified_tracking_data + + @verified_tracking_data.setter + def verified_tracking_data(self, value): + self._verified_tracking_data = value _MAPPINGS = [ _SimpleBulkMapping( @@ -676,6 +709,11 @@ def responsive_ad(self, responsive_ad): field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.responsive_ad.LongHeadlines), csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.responsive_ad.LongHeadlines ,v) ), + _SimpleBulkMapping( + header=_StringTable.Details, + field_to_csv=lambda c: to_verified_tracking_setting_string(c.verified_tracking_data), + csv_to_field=lambda c, v: setattr(c, 'verified_tracking_data', parse_verified_tracking_setting(v) if v else None) + ), ] def process_mappings_from_row_values(self, row_values): diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index c5e3ef3c..3ddc712a 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -39,6 +39,8 @@ def __init__(self, account_id=None, campaign=None): self._budget_name = None self._bid_strategy_name = None self._verified_tracking_data = None + self._destination_channel = None + self._is_multi_channel_campaign = None @property def account_id(self): @@ -119,6 +121,22 @@ def quality_score_data(self): return self._quality_score_data + @property + def destination_channel(self): + return self._destination_channel + + @destination_channel.setter + def destination_channel(self, value): + self._destination_channel = value + + @property + def is_multi_channel_campaign(self): + return self._is_multi_channel_campaign + + @is_multi_channel_campaign.setter + def is_multi_channel_campaign(self, value): + self._is_multi_channel_campaign = value + def _get_dynamic_feed_setting(self): return self._get_setting(_DynamicFeedSetting, 'DynamicFeedSetting') @@ -625,7 +643,17 @@ def _write_website(c): header=_StringTable.Details, field_to_csv=lambda c: to_verified_tracking_setting_string(c.verified_tracking_data), csv_to_field=lambda c, v: setattr(c, 'verified_tracking_data', parse_verified_tracking_setting(v) if v else None) - ) + ), + _SimpleBulkMapping( + header=_StringTable.DestinationChannel, + field_to_csv=lambda c: c.destination_channel, + csv_to_field=lambda c, v: setattr(c, 'destination_channel', v) + ), + _SimpleBulkMapping( + header=_StringTable.IsMultiChannelCampaign, + field_to_csv=lambda c: field_to_csv_bool(c.is_multi_channel_campaign), + csv_to_field=lambda c, v: setattr(c, 'is_multi_channel_campaign', parse_bool(v)) + ), ] def read_additional_data(self, stream_reader): diff --git a/bingads/v13/bulk/entities/target_criterions/__init__.py b/bingads/v13/bulk/entities/target_criterions/__init__.py index 5bea6dff..dafefb08 100644 --- a/bingads/v13/bulk/entities/target_criterions/__init__.py +++ b/bingads/v13/bulk/entities/target_criterions/__init__.py @@ -18,6 +18,7 @@ from .bulk_campaign_age_criterion import * from .bulk_campaign_biddable_criterion import * from .bulk_campaign_day_time_criterion import * +from .bulk_campaign_deal_criterion import * from .bulk_campaign_device_criterion import * from .bulk_campaign_gender_criterion import * from .bulk_campaign_location_criterion import * @@ -31,3 +32,4 @@ from .bulk_ad_group_hotel_check_in_day_criterion import * from .bulk_ad_group_hotel_date_selection_type_criterion import * from .bulk_ad_group_hotel_length_of_stay_criterion import * +from .bulk_ad_group_genre_criterion import * diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.py new file mode 100644 index 00000000..0d4fd59c --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.py @@ -0,0 +1,52 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + + +class BulkAdGroupGenreCriterion(BulkAdGroupBiddableCriterion): + """ Represents an Ad Group Genre Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the + Ad Group Genre Criterion record in a bulk file. + + For more information, see Ad Group Genre Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_ad_group_criterion=None, + campaign_name=None, + ad_group_name=None, ): + super(BulkAdGroupGenreCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.Target, + field_to_csv=lambda c: field_to_csv_GenreId(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_GenreId(c.biddable_ad_group_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenreCriterion') + self._biddable_ad_group_criterion.Criterion.Type = 'GenreCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupGenreCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupGenreCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupGenreCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupGenreCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupGenreCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.py new file mode 100644 index 00000000..585e827d --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.py @@ -0,0 +1,50 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_campaign_biddable_criterion import BulkCampaignBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + +class BulkCampaignDealCriterion(BulkCampaignBiddableCriterion): + """ Represents an Campaign Deal Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_campaign_criterion` property that can be read and written as fields of the + Campaign Deal Criterion record in a bulk file. + + For more information, see Campaign Deal Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_campaign_criterion=None, + campaign_name=None, ): + super(BulkCampaignDealCriterion, self).__init__(biddable_campaign_criterion, campaign_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.Target, + field_to_csv=lambda c: field_to_csv_DealTarget(c.biddable_campaign_criterion), + csv_to_field=lambda c, v: csv_to_field_DealTarget(c.biddable_campaign_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_campaign_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DealCriterion') + self._biddable_campaign_criterion.Criterion.Type = 'DealCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkCampaignDealCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkCampaignDealCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkCampaignDealCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkCampaignDealCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkCampaignDealCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 94b42ba9..837804ae 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -149,6 +149,7 @@ class _BulkObjectFactory(): _StringTable.CampaignCompanyNameCriterion: _EntityInfo(lambda: BulkCampaignCompanyNameCriterion()), _StringTable.CampaignJobFunctionCriterion: _EntityInfo(lambda: BulkCampaignJobFunctionCriterion()), _StringTable.CampaignIndustryCriterion: _EntityInfo(lambda: BulkCampaignIndustryCriterion()), + _StringTable.CampaignDealCriterion: _EntityInfo(lambda: BulkCampaignDealCriterion()), _StringTable.CombinedList: _EntityInfo(lambda: BulkCombinedList()), _StringTable.CustomerList: _EntityInfo(lambda: BulkCustomerList()), _StringTable.CustomerListItem: _EntityInfo(lambda: BulkCustomerListItem()), @@ -173,6 +174,7 @@ class _BulkObjectFactory(): _StringTable.AdGroupNegativeGenderCriterion: _EntityInfo(lambda: BulkAdGroupNegativeGenderCriterion()), _StringTable.AdGroupNegativeIndustryCriterion: _EntityInfo(lambda: BulkAdGroupNegativeIndustryCriterion()), _StringTable.AdGroupNegativeJobFunctionCriterion: _EntityInfo(lambda: BulkAdGroupNegativeJobFunctionCriterion()), + _StringTable.AdGroupGenreCriterion: _EntityInfo(lambda: BulkAdGroupGenreCriterion()), _StringTable.Label: _EntityInfo(lambda: BulkLabel()), _StringTable.CampaignLabel: _EntityInfo(lambda: BulkCampaignLabel()), _StringTable.AdGroupLabel: _EntityInfo(lambda: BulkAdGroupLabel()), diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 30ec085a..27266d2c 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -27,6 +27,8 @@ class _CsvHeaders: _StringTable.BudgetType, _StringTable.BudgetName, _StringTable.BudgetId, + _StringTable.DestinationChannel, + _StringTable.IsMultiChannelCampaign, # AdGroup _StringTable.StartDate, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index a3d824ae..4307976d 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -532,7 +532,7 @@ class _StringTable: AdGroupNegativeGenderCriterion = "Ad Group Negative Gender Criterion" AdGroupNegativeIndustryCriterion = "Ad Group Negative Industry Criterion" AdGroupNegativeJobFunctionCriterion = "Ad Group Negative Job Function Criterion" - + AdGroupGenreCriterion = "Ad Group Genre Criterion" # Responsive Ad ResponsiveAd = "Responsive Ad" @@ -606,6 +606,7 @@ class _StringTable: CampaignCompanyNameCriterion = 'Campaign Company Name Criterion' CampaignJobFunctionCriterion = 'Campaign Job Function Criterion' CampaignIndustryCriterion = 'Campaign Industry Criterion' + CampaignDealCriterion = 'Campaign Deal Criterion' # Online Conversion OnlineConversionAdjustment = "Online Conversion Adjustment" @@ -633,7 +634,7 @@ class _StringTable: # Campaign Conversion Goal CampaignConversionGoal = "Campaign Conversion Goal" GoalId = "Goal Id" - + # PMax AssetGroup = "Asset Group" AudienceGroup = "Audience Group" @@ -645,3 +646,8 @@ class _StringTable: AgeRanges = "Age Ranges" GenderTypes = "Gender Types" ParentListingGroupId = "Parent Listing Group Id" + + # MultiChannel Campaign + DestinationChannel = "Destination Channel" + IsMultiChannelCampaign = "Is Multi Channel Campaign" + diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 341969c8..82f95bfc 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -41,12 +41,14 @@ GenderCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenderCriterion') HotelAdvanceBookingWindowCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelAdvanceBookingWindowCriterion') HotelCheckInDateCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDateCriterion') +GenreCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenreCriterion') HotelCheckInDayCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDayCriterion') HotelDateSelectionTypeCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelDateSelectionTypeCriterion') HotelLengthOfStayCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelLengthOfStayCriterion') LocationCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('LocationCriterion') LocationIntentCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('LocationIntentCriterion') RadiusCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('RadiusCriterion') +DealCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DealCriterion') TargetSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetSetting')) HotelSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('HotelSetting')) CoOpSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CoOpSetting')) @@ -249,7 +251,7 @@ def entity_biddingscheme_to_csv(entity, row_values): elif bid_strategy_type == 'TargetImpressionShare': row_values[_StringTable.BidStrategyMaxCpc] = bid_bulk_str(entity.BiddingScheme.MaxCpc, entity.Id) row_values[_StringTable.BidStrategyTargetAdPosition] = bulk_optional_str(entity.BiddingScheme.TargetAdPosition, entity.Id) - row_values[_StringTable.TargetImpressionShare] = TargetImpressionShare(entity.BiddingScheme.TargetImpressionShare) + row_values[_StringTable.BidStrategyTargetImpressionShare] = TargetImpressionShare(entity.BiddingScheme.TargetImpressionShare) elif bid_strategy_type == 'PercentCpc': row_values[_StringTable.BidStrategyPercentMaxCpc] = bulk_str(entity.BiddingScheme.MaxPercentCpc) elif bid_strategy_type == 'Commission': @@ -623,6 +625,8 @@ def field_to_csv_VideoAssetLinks(assetLinks): contract['thumbnailImage']['cropY'] = thumbnailImage.CropY contract['thumbnailImage']['cropWidth'] = thumbnailImage.CropWidth contract['thumbnailImage']['cropHeight'] = thumbnailImage.CropHeight + contract['thumbnailImage']['targetWidth'] = thumbnailImage.TargetWidth + contract['thumbnailImage']['targetHeight'] = thumbnailImage.TargetHeight assetLinkContracts.append(contract) if len(assetLinkContracts) > 0: return json.dumps(assetLinkContracts, sort_keys = True) @@ -656,6 +660,8 @@ def csv_to_field_VideoAssetLinks(assetLinks, value): asset_link.Asset.ThumbnailImage.CropY = thumbnailImageContract.get('cropY') asset_link.Asset.ThumbnailImage.CropWidth = thumbnailImageContract.get('cropWidth') asset_link.Asset.ThumbnailImage.CropHeight = thumbnailImageContract.get('cropHeight') + asset_link.Asset.ThumbnailImage.TargetWidth = thumbnailImageContract.get('targetWidth') + asset_link.Asset.ThumbnailImage.TargetHeight = thumbnailImageContract.get('targetHeight') assetLinks.AssetLink.append(asset_link) @@ -694,6 +700,8 @@ def field_to_csv_ImageAssetLinks(entity): contract['assetPerformanceLabel'] = assetLink.AssetPerformanceLabel if hasattr(assetLink, 'AssetPerformanceLabel') else None contract['editorialStatus'] = assetLink.EditorialStatus if hasattr(assetLink, 'EditorialStatus') else None contract['pinnedField'] = assetLink.PinnedField if hasattr(assetLink, 'PinnedField') else None + contract['targetWidth'] = assetLink.TargetWidth if hasattr(assetLink, 'TargetWidth') else None + contract['targetHeight'] = assetLink.TargetHeight if hasattr(assetLink, 'TargetHeight') else None assetLinkContracts.append(contract) if len(assetLinkContracts) > 0: return json.dumps(assetLinkContracts) @@ -717,6 +725,8 @@ def csv_to_field_ImageAssetLinks(assetLinks, value): asset_link.AssetPerformanceLabel = assetLinkContract.get('assetPerformanceLabel') asset_link.PinnedField = assetLinkContract.get('pinnedField') asset_link.EditorialStatus = assetLinkContract.get('editorialStatus') + asset_link.TargetWidth = assetLinkContract.get('targetWidth') + asset_link.TargetHeight = assetLinkContract.get('targetHeight') assetLinks.AssetLink.append(asset_link) def field_to_csv_TextAssetLinks(entity): @@ -1464,6 +1474,17 @@ def csv_to_field_StartDate(entity, value): if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelCheckInDateCriterion)): setattr(entity.Criterion, "StartDate", parse_datetime(value)) +def field_to_csv_GenreId(entity): + if entity is None or entity.Criterion is None or entity.Criterion.GenreId is None: + return None + return bulk_str(entity.Criterion.GenreId) + +def csv_to_field_GenreId(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(GenreCriterion)): + setattr(entity.Criterion, "GenreId", int(value) if value else None) + def field_to_csv_EndDate(entity): if entity is None or entity.Criterion is None or entity.Criterion.EndDate is None: return None @@ -1585,6 +1606,17 @@ def csv_to_field_Radius(entity, value): if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(RadiusCriterion)): setattr(entity.Criterion, "Radius", value) +def field_to_csv_DealTarget(entity): + if entity is None or entity.Criterion is None or entity.Criterion.DealId is None: + return None + return str(entity.Criterion.DealId) + +def csv_to_field_DealTarget(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(DealCriterion)): + setattr(entity.Criterion, "DealId", int(value)) + def field_to_csv_RadiusUnit(entity): if entity is None or entity.Criterion is None or entity.Criterion.RadiusUnit is None: return None diff --git a/bingads/v13/internal/reporting/row_report_header.py b/bingads/v13/internal/reporting/row_report_header.py index 4cf2e996..3acd6da2 100644 --- a/bingads/v13/internal/reporting/row_report_header.py +++ b/bingads/v13/internal/reporting/row_report_header.py @@ -64,7 +64,7 @@ def set_report_time(self, report_time): self._report_time_end = datetime.strptime(time_array[0], '%m/%d/%Y') if time_array[0] else None elif len(time_array) == 2: self._report_time_start = datetime.strptime(time_array[0], '%m/%d/%Y') if time_array[0] else None - self._report_time_end = datetime.strptime(time_array[0], '%m/%d/%Y') if time_array[1] else None + self._report_time_end = datetime.strptime(time_array[1], '%m/%d/%Y') if time_array[1] else None @property def last_completed_available_date(self): diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index 048afd96..9d29651b 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3042,6 +3042,16 @@ + + + + + + + + + + @@ -3166,19 +3176,6 @@ - - - - - - - - - - - - - diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 9cd8e8e7..c1140430 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1121,6 +1121,34 @@ + + + + 151 + + + + + + + 152 + + + + + + + 153 + + + + + + + 154 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 8bc21086..ad4229b8 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -257,6 +257,13 @@ + + + + + + + @@ -677,6 +684,20 @@ + + + + + + + + + + + + + + @@ -703,6 +724,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -739,8 +957,8 @@ - - + + @@ -764,7 +982,7 @@ - + @@ -1012,179 +1230,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1288,6 +1333,9 @@ + + + @@ -1881,6 +1929,7 @@ + @@ -2149,6 +2198,13 @@ + + + + 5 + + + @@ -3755,6 +3811,13 @@ + + + + 134217728 + + + @@ -3816,6 +3879,13 @@ + + + + + + + @@ -4213,6 +4283,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -5588,6 +5678,7 @@ + @@ -5645,21 +5736,67 @@ - + + + + + + + + + + + + + + + + - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5704,7 +5841,7 @@ - + @@ -5719,7 +5856,7 @@ - + @@ -5749,14 +5886,14 @@ - + - + @@ -6030,7 +6167,7 @@ - + @@ -6064,15 +6201,59 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6094,7 +6275,7 @@ - + @@ -6108,7 +6289,7 @@ - + @@ -6133,10 +6314,24 @@ + + + + + + + + + + + + + + - + @@ -6206,7 +6401,7 @@ - + @@ -6237,6 +6432,7 @@ + @@ -6472,7 +6668,7 @@ - + @@ -6496,7 +6692,7 @@ - + @@ -6663,7 +6859,7 @@ - + @@ -6671,7 +6867,7 @@ - + @@ -6699,7 +6895,7 @@ - + @@ -6758,7 +6954,7 @@ - + @@ -6775,7 +6971,7 @@ - + @@ -6818,7 +7014,7 @@ - + @@ -6826,7 +7022,7 @@ - + @@ -6854,7 +7050,7 @@ - + @@ -6972,7 +7168,7 @@ - + @@ -7027,6 +7223,13 @@ + + + + + + + @@ -7113,6 +7316,13 @@ + + + + + + + @@ -7175,7 +7385,7 @@ - + @@ -7194,7 +7404,7 @@ - + @@ -7204,7 +7414,7 @@ - + @@ -7290,6 +7500,20 @@ + + + + 1024 + + + + + + + 2048 + + + @@ -7312,7 +7536,7 @@ - + @@ -7340,7 +7564,7 @@ - + @@ -7357,7 +7581,7 @@ - + @@ -7373,7 +7597,7 @@ - + @@ -7392,7 +7616,7 @@ - + @@ -7407,7 +7631,7 @@ - + @@ -7444,7 +7668,7 @@ - + @@ -7452,7 +7676,7 @@ - + @@ -7466,7 +7690,7 @@ - + @@ -7542,6 +7766,12 @@ + + + + + + @@ -7560,12 +7790,6 @@ - - - - - - @@ -9966,6 +10190,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -9985,7 +10233,7 @@ - + @@ -10009,7 +10257,7 @@ - + @@ -10033,7 +10281,7 @@ - + @@ -10057,7 +10305,7 @@ - + @@ -10081,7 +10329,7 @@ - + @@ -10105,7 +10353,7 @@ - + @@ -10129,7 +10377,7 @@ - + @@ -10153,11 +10401,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10177,7 +10449,7 @@ - + @@ -10201,7 +10473,7 @@ - + @@ -10225,7 +10497,7 @@ - + @@ -10249,7 +10521,7 @@ - + @@ -10273,7 +10545,7 @@ - + @@ -10297,7 +10569,7 @@ - + @@ -10321,7 +10593,7 @@ - + @@ -10345,7 +10617,7 @@ - + @@ -10369,7 +10641,7 @@ - + @@ -10393,7 +10665,7 @@ - + @@ -10417,7 +10689,7 @@ - + @@ -10441,7 +10713,7 @@ - + @@ -10465,7 +10737,7 @@ - + @@ -10489,7 +10761,7 @@ - + @@ -10513,7 +10785,7 @@ - + @@ -10537,7 +10809,7 @@ - + @@ -10561,7 +10833,7 @@ - + @@ -10585,7 +10857,7 @@ - + @@ -10609,7 +10881,7 @@ - + @@ -10633,7 +10905,7 @@ - + @@ -10657,7 +10929,7 @@ - + @@ -10681,7 +10953,7 @@ - + @@ -10705,7 +10977,7 @@ - + @@ -10729,7 +11001,7 @@ - + @@ -10753,7 +11025,7 @@ - + @@ -10777,7 +11049,7 @@ - + @@ -10801,7 +11073,7 @@ - + @@ -10825,7 +11097,7 @@ - + @@ -10849,7 +11121,7 @@ - + @@ -10873,7 +11145,7 @@ - + @@ -10897,7 +11169,7 @@ - + @@ -10921,7 +11193,7 @@ - + @@ -10945,7 +11217,7 @@ - + @@ -10969,7 +11241,7 @@ - + @@ -10993,7 +11265,7 @@ - + @@ -11017,7 +11289,7 @@ - + @@ -11041,7 +11313,7 @@ - + @@ -11623,6 +11895,12 @@ + + + + + + @@ -11671,6 +11949,12 @@ + + + + + + @@ -14105,6 +14389,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -14289,6 +14596,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index 978767b6..dae875c5 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -176,6 +176,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -518,6 +549,7 @@ + @@ -534,6 +566,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -619,6 +701,12 @@ + + + + + + @@ -825,6 +913,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -882,6 +1014,18 @@ + + + + + + + + + + + + @@ -1081,6 +1225,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 49947f1e..73db11b7 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -1829,6 +1829,13 @@ + + + + 2052 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index b0e85c49..6df095a0 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -176,6 +176,12 @@ + + + + + + @@ -945,6 +951,12 @@ + + + + + + @@ -1393,6 +1405,12 @@ + + + + + + @@ -2083,6 +2101,9 @@ + + + @@ -2168,6 +2189,10 @@ + + + + @@ -2176,11 +2201,24 @@ + + + + + + + + + + + + + @@ -3109,6 +3147,16 @@ + + + + + + + + + + @@ -3117,6 +3165,7 @@ + @@ -3220,6 +3269,10 @@ + + + + @@ -3228,6 +3281,7 @@ + @@ -3317,6 +3371,10 @@ + + + + @@ -3325,6 +3383,7 @@ + @@ -3406,6 +3465,9 @@ + + + @@ -3415,6 +3477,7 @@ + @@ -3458,6 +3521,9 @@ + + + @@ -3500,6 +3566,10 @@ + + + + @@ -3507,6 +3577,7 @@ + @@ -3645,6 +3716,10 @@ + + + + @@ -3653,6 +3728,7 @@ + @@ -4031,6 +4107,9 @@ + + + @@ -4112,6 +4191,7 @@ + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 099ada7d..259b2e9c 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3042,6 +3042,16 @@ + + + + + + + + + + @@ -3166,19 +3176,6 @@ - - - - - - - - - - - - - diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 2a7416ce..f93cf77d 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1121,6 +1121,34 @@ + + + + 151 + + + + + + + 152 + + + + + + + 153 + + + + + + + 154 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 6bc27d73..ad025b2c 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -257,6 +257,13 @@ + + + + + + + @@ -677,6 +684,20 @@ + + + + + + + + + + + + + + @@ -703,6 +724,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -739,8 +957,8 @@ - - + + @@ -764,7 +982,7 @@ - + @@ -1012,179 +1230,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1288,6 +1333,9 @@ + + + @@ -1881,6 +1929,7 @@ + @@ -2149,6 +2198,13 @@ + + + + 5 + + + @@ -3755,6 +3811,13 @@ + + + + 134217728 + + + @@ -3816,6 +3879,13 @@ + + + + + + + @@ -4213,6 +4283,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -5588,6 +5678,7 @@ + @@ -5645,21 +5736,67 @@ - + + + + + + + + + + + + + + + + - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5704,7 +5841,7 @@ - + @@ -5719,7 +5856,7 @@ - + @@ -5749,14 +5886,14 @@ - + - + @@ -6030,7 +6167,7 @@ - + @@ -6064,15 +6201,59 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6094,7 +6275,7 @@ - + @@ -6108,7 +6289,7 @@ - + @@ -6133,10 +6314,24 @@ + + + + + + + + + + + + + + - + @@ -6206,7 +6401,7 @@ - + @@ -6237,6 +6432,7 @@ + @@ -6472,7 +6668,7 @@ - + @@ -6496,7 +6692,7 @@ - + @@ -6663,7 +6859,7 @@ - + @@ -6671,7 +6867,7 @@ - + @@ -6699,7 +6895,7 @@ - + @@ -6758,7 +6954,7 @@ - + @@ -6775,7 +6971,7 @@ - + @@ -6818,7 +7014,7 @@ - + @@ -6826,7 +7022,7 @@ - + @@ -6854,7 +7050,7 @@ - + @@ -6972,7 +7168,7 @@ - + @@ -7027,6 +7223,13 @@ + + + + + + + @@ -7113,6 +7316,13 @@ + + + + + + + @@ -7175,7 +7385,7 @@ - + @@ -7194,7 +7404,7 @@ - + @@ -7204,7 +7414,7 @@ - + @@ -7290,6 +7500,20 @@ + + + + 1024 + + + + + + + 2048 + + + @@ -7312,7 +7536,7 @@ - + @@ -7340,7 +7564,7 @@ - + @@ -7357,7 +7581,7 @@ - + @@ -7373,7 +7597,7 @@ - + @@ -7392,7 +7616,7 @@ - + @@ -7407,7 +7631,7 @@ - + @@ -7444,7 +7668,7 @@ - + @@ -7452,7 +7676,7 @@ - + @@ -7466,7 +7690,7 @@ - + @@ -7542,6 +7766,12 @@ + + + + + + @@ -7560,12 +7790,6 @@ - - - - - - @@ -9966,6 +10190,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -9985,7 +10233,7 @@ - + @@ -10009,7 +10257,7 @@ - + @@ -10033,7 +10281,7 @@ - + @@ -10057,7 +10305,7 @@ - + @@ -10081,7 +10329,7 @@ - + @@ -10105,7 +10353,7 @@ - + @@ -10129,7 +10377,7 @@ - + @@ -10153,11 +10401,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10177,7 +10449,7 @@ - + @@ -10201,7 +10473,7 @@ - + @@ -10225,7 +10497,7 @@ - + @@ -10249,7 +10521,7 @@ - + @@ -10273,7 +10545,7 @@ - + @@ -10297,7 +10569,7 @@ - + @@ -10321,7 +10593,7 @@ - + @@ -10345,7 +10617,7 @@ - + @@ -10369,7 +10641,7 @@ - + @@ -10393,7 +10665,7 @@ - + @@ -10417,7 +10689,7 @@ - + @@ -10441,7 +10713,7 @@ - + @@ -10465,7 +10737,7 @@ - + @@ -10489,7 +10761,7 @@ - + @@ -10513,7 +10785,7 @@ - + @@ -10537,7 +10809,7 @@ - + @@ -10561,7 +10833,7 @@ - + @@ -10585,7 +10857,7 @@ - + @@ -10609,7 +10881,7 @@ - + @@ -10633,7 +10905,7 @@ - + @@ -10657,7 +10929,7 @@ - + @@ -10681,7 +10953,7 @@ - + @@ -10705,7 +10977,7 @@ - + @@ -10729,7 +11001,7 @@ - + @@ -10753,7 +11025,7 @@ - + @@ -10777,7 +11049,7 @@ - + @@ -10801,7 +11073,7 @@ - + @@ -10825,7 +11097,7 @@ - + @@ -10849,7 +11121,7 @@ - + @@ -10873,7 +11145,7 @@ - + @@ -10897,7 +11169,7 @@ - + @@ -10921,7 +11193,7 @@ - + @@ -10945,7 +11217,7 @@ - + @@ -10969,7 +11241,7 @@ - + @@ -10993,7 +11265,7 @@ - + @@ -11017,7 +11289,7 @@ - + @@ -11041,7 +11313,7 @@ - + @@ -11623,6 +11895,12 @@ + + + + + + @@ -11671,6 +11949,12 @@ + + + + + + @@ -14105,6 +14389,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -14289,6 +14596,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index 4b60b9e3..1a1ad7cf 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -176,6 +176,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -518,6 +549,7 @@ + @@ -534,6 +566,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -619,6 +701,12 @@ + + + + + + @@ -825,6 +913,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -882,6 +1014,18 @@ + + + + + + + + + + + + @@ -1081,6 +1225,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index 4a81b945..e4b1dbe3 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -1829,6 +1829,13 @@ + + + + 2052 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index f5596187..e4d4df6c 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -176,6 +176,12 @@ + + + + + + @@ -945,6 +951,12 @@ + + + + + + @@ -1393,6 +1405,12 @@ + + + + + + @@ -2083,6 +2101,9 @@ + + + @@ -2168,6 +2189,10 @@ + + + + @@ -2176,11 +2201,24 @@ + + + + + + + + + + + + + @@ -3109,6 +3147,16 @@ + + + + + + + + + + @@ -3117,6 +3165,7 @@ + @@ -3220,6 +3269,10 @@ + + + + @@ -3228,6 +3281,7 @@ + @@ -3317,6 +3371,10 @@ + + + + @@ -3325,6 +3383,7 @@ + @@ -3406,6 +3465,9 @@ + + + @@ -3415,6 +3477,7 @@ + @@ -3458,6 +3521,9 @@ + + + @@ -3500,6 +3566,10 @@ + + + + @@ -3507,6 +3577,7 @@ + @@ -3645,6 +3716,10 @@ + + + + @@ -3653,6 +3728,7 @@ + @@ -4031,6 +4107,9 @@ + + + @@ -4112,6 +4191,7 @@ + diff --git a/bingads/v13/reporting/reporting_operation.py b/bingads/v13/reporting/reporting_operation.py index 96c7a2d6..d1b0815d 100644 --- a/bingads/v13/reporting/reporting_operation.py +++ b/bingads/v13/reporting/reporting_operation.py @@ -104,30 +104,31 @@ def download_result_file(self, result_file_directory, result_file_name, decompre headers = { 'User-Agent': USER_AGENT, } - s = requests.Session() - s.mount('https://', TlsHttpAdapter()) - timeout_seconds = None if timeout_in_milliseconds is None else timeout_in_milliseconds / 1000.0 - try: - r = s.get(url, headers=headers, stream=True, verify=True, timeout=timeout_seconds) - except requests.Timeout as ex: - raise FileDownloadException(ex) - r.raise_for_status() - try: - with open(zip_file_path, 'wb') as f: - for chunk in r.iter_content(chunk_size=4096): - if chunk: - f.write(chunk) - f.flush() - if decompress: - with contextlib.closing(zipfile.ZipFile(zip_file_path)) as compressed: - first = compressed.namelist()[0] - with open(result_file_path, 'wb') as f, compressed.open(first, 'r') as cc: - shutil.copyfileobj(cc, f) - except Exception as ex: - raise ex - finally: - if decompress and os.path.exists(zip_file_path): - os.remove(zip_file_path) + + with requests.Session() as s: + s.mount('https://', TlsHttpAdapter()) + timeout_seconds = None if timeout_in_milliseconds is None else timeout_in_milliseconds / 1000.0 + try: + r = s.get(url, headers=headers, stream=True, verify=True, timeout=timeout_seconds) + except requests.Timeout as ex: + raise FileDownloadException(ex) + r.raise_for_status() + try: + with open(zip_file_path, 'wb') as f: + for chunk in r.iter_content(chunk_size=4096): + if chunk: + f.write(chunk) + f.flush() + if decompress: + with contextlib.closing(zipfile.ZipFile(zip_file_path)) as compressed: + first = compressed.namelist()[0] + with open(result_file_path, 'wb') as f, compressed.open(first, 'r') as cc: + shutil.copyfileobj(cc, f) + except Exception as ex: + raise ex + finally: + if decompress and os.path.exists(zip_file_path): + os.remove(zip_file_path) return result_file_path def track(self, timeout_in_milliseconds=None): diff --git a/setup.py b/setup.py index 2c8a8b58..295139a0 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.16' +VERSION = '13.0.17' with open('README.rst', 'r') as f: readme = f.read()