diff --git a/stackalytics/processor/default_data_processor.py b/stackalytics/processor/default_data_processor.py index 922d841b0..f81b24145 100644 --- a/stackalytics/processor/default_data_processor.py +++ b/stackalytics/processor/default_data_processor.py @@ -77,7 +77,7 @@ def _retrieve_project_list_from_gerrit(project_source): gerrit_inst.close() except Exception as e: LOG.exception(e) - LOG.warn('Fail to retrieve list of projects. Keep it unmodified') + LOG.warning('Fail to retrieve list of projects. Keep it unmodified') return organization = project_source['organization'] @@ -109,7 +109,7 @@ def _retrieve_project_list_from_github(project_source): github_repos = github.get_organization(organization).get_repos() except Exception as e: LOG.exception(e) - LOG.warn('Fail to retrieve list of projects. Keep it unmodified') + LOG.warning('Fail to retrieve list of projects. Keep it unmodified') return for repo in github_repos: @@ -160,7 +160,7 @@ def _update_with_driverlog_data(default_data, driverlog_data_uri): driverlog_data = utils.read_json_from_uri(driverlog_data_uri) if not driverlog_data: - LOG.warn('DriverLog data is not available') + LOG.warning('DriverLog data is not available') return module_cis = collections.defaultdict(list) diff --git a/stackalytics/processor/launchpad_utils.py b/stackalytics/processor/launchpad_utils.py index 71a1851c8..0c7710943 100644 --- a/stackalytics/processor/launchpad_utils.py +++ b/stackalytics/processor/launchpad_utils.py @@ -69,7 +69,7 @@ def lp_blueprint_generator(module): chunk = utils.read_json_from_uri(uri, session=launchpad_session) if not chunk: - LOG.warn('No data was read from uri %s', uri) + LOG.warning('No data was read from uri %s', uri) break for record in chunk['entries']: @@ -90,7 +90,7 @@ def lp_bug_generator(module, modified_since): chunk = utils.read_json_from_uri(uri, session=launchpad_session) if not chunk: - LOG.warn('No data was read from uri %s', uri) + LOG.warning('No data was read from uri %s', uri) break for record in chunk['entries']: @@ -101,7 +101,7 @@ def lp_bug_generator(module, modified_since): related_tasks = utils.read_json_from_uri(related_tasks_uri, session=launchpad_session) if not related_tasks: - LOG.warn('No data was read from uri %s', uri) + LOG.warning('No data was read from uri %s', uri) elif related_tasks['entries']: for related_task in related_tasks['entries']: yield related_task diff --git a/stackalytics/processor/main.py b/stackalytics/processor/main.py index 8fe382059..63b774178 100644 --- a/stackalytics/processor/main.py +++ b/stackalytics/processor/main.py @@ -242,7 +242,7 @@ def apply_corrections(uri, runtime_storage_inst): if 'primary_key' in c: valid_corrections.append(c) else: - LOG.warn('Correction misses primary key: %s', c) + LOG.warning('Correction misses primary key: %s', c) runtime_storage_inst.apply_corrections(valid_corrections) diff --git a/stackalytics/processor/record_processor.py b/stackalytics/processor/record_processor.py index 422ce4eb2..072a6485a 100644 --- a/stackalytics/processor/record_processor.py +++ b/stackalytics/processor/record_processor.py @@ -45,9 +45,9 @@ class RecordProcessor(object): def _get_release(self, timestamp): release_index = bisect.bisect(self.releases_dates, timestamp) if release_index >= len(self.releases): - LOG.warn('Timestamp %s is beyond releases boundaries, the last ' - 'release will be used. Please consider adding a ' - 'new release into default_data.json', timestamp) + LOG.warning('Timestamp %s is beyond releases boundaries, the last ' + 'release will be used. Please consider adding a ' + 'new release into default_data.json', timestamp) release_index = len(self.releases) - 1 return self.releases[release_index]['release_name'] diff --git a/stackalytics/processor/utils.py b/stackalytics/processor/utils.py index 291792085..589255210 100644 --- a/stackalytics/processor/utils.py +++ b/stackalytics/processor/utils.py @@ -137,16 +137,16 @@ def read_uri(uri, session=None): try: return do_request(uri, session=session).text except Exception as e: - LOG.warn('Error "%(error)s" retrieving uri %(uri)s', - {'error': e, 'uri': uri}) + LOG.warning('Error "%(error)s" retrieving uri %(uri)s', + {'error': e, 'uri': uri}) def read_json_from_uri(uri, session=None): try: return do_request(uri, session=session).json() except Exception as e: - LOG.warn('Error "%(error)s" parsing json from uri %(uri)s', - {'error': e, 'uri': uri}) + LOG.warning('Error "%(error)s" parsing json from uri %(uri)s', + {'error': e, 'uri': uri}) def _gzip_decompress(content): @@ -161,16 +161,16 @@ def read_gzip_from_uri(uri): try: return _gzip_decompress(do_request(uri).content) except Exception as e: - LOG.warn('Error "%(error)s" retrieving uri %(uri)s', - {'error': e, 'uri': uri}) + LOG.warning('Error "%(error)s" retrieving uri %(uri)s', + {'error': e, 'uri': uri}) def get_uri_last_modified(uri): try: return do_request(uri, method='head').headers['last-modified'] except Exception as e: - LOG.warn('Error "%(error)s" retrieving uri %(uri)s', - {'error': e, 'uri': uri}) + LOG.warning('Error "%(error)s" retrieving uri %(uri)s', + {'error': e, 'uri': uri}) def cmp_to_key(mycmp): # ported from python 3 diff --git a/stackalytics/processor/vcs.py b/stackalytics/processor/vcs.py index bab09056e..b8b533f5e 100644 --- a/stackalytics/processor/vcs.py +++ b/stackalytics/processor/vcs.py @@ -121,8 +121,8 @@ class Git(Vcs): return {} if uri != self.repo['uri']: - LOG.warn('Repo uri %(uri)s differs from cloned %(old)s', - {'uri': self.repo['uri'], 'old': uri}) + LOG.warning('Repo uri %(uri)s differs from cloned %(old)s', + {'uri': self.repo['uri'], 'old': uri}) os.chdir('..') shutil.rmtree(self.folder)