From 43e6f5e5ec9e1aacb9c663e5f12d541a79a24480 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 27 Jan 2020 12:46:50 +0100 Subject: [PATCH] [FIX] forwardport: logging.warn -> logging.warning logging.warn is deprecated but I've a hard time shaking the habit. --- forwardport/models/project.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/forwardport/models/project.py b/forwardport/models/project.py index ec68d580..6d838ae6 100644 --- a/forwardport/models/project.py +++ b/forwardport/models/project.py @@ -343,22 +343,22 @@ class PullRequests(models.Model): # otherwise check if we already have a pending forward port _logger.info("%s %s %s", pr, batch, batch.prs) if self.env['forwardport.batches'].search_count([('batch_id', '=', batch.id)]): - _logger.warn('-> already recorded') + _logger.warning('-> already recorded') continue # check if batch-mate are all valid mates = batch.prs # wait until all of them are validated or ready if any(pr.state not in ('validated', 'ready') for pr in mates): - _logger.warn("-> not ready (%s)", [(pr.number, pr.state) for pr in mates]) + _logger.warning("-> not ready (%s)", [(pr.number, pr.state) for pr in mates]) continue # check that there's no weird-ass state if not all(pr.parent_id for pr in mates): - _logger.warn("Found a batch (%s) with only some PRs having parents, ignoring", mates) + _logger.warning("Found a batch (%s) with only some PRs having parents, ignoring", mates) continue if self.search_count([('parent_id', 'in', mates.ids)]): - _logger.warn("Found a batch (%s) with only some of the PRs having children", mates) + _logger.warning("Found a batch (%s) with only some of the PRs having children", mates) continue _logger.info('-> ok')