jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/647624 )
Change subject: [cleanup] remove deprecated methods/properties in data_ingestion.py ......................................................................
[cleanup] remove deprecated methods/properties in data_ingestion.py
Also show a FutureWarning for deprecated site parameter for Photo.findDuplicateImages() method
Change-Id: I99e6f9deea9c09066f17ffe70cdf643f9fa89cf0 --- M scripts/data_ingestion.py 1 file changed, 2 insertions(+), 18 deletions(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py index 608aa2a..a7f58f0 100755 --- a/scripts/data_ingestion.py +++ b/scripts/data_ingestion.py @@ -114,7 +114,7 @@ from pywikibot.comms.http import fetch from pywikibot import pagegenerators from pywikibot.specialbots import UploadRobot -from pywikibot.tools import deprecated, deprecated_args, PYTHON_VERSION +from pywikibot.tools import deprecated_args, PYTHON_VERSION
if PYTHON_VERSION >= (3, 9): Tuple = tuple @@ -164,7 +164,7 @@ self.contents = io.BytesIO(imageFile) return self.contents
- @deprecated_args(site=None) + @deprecated_args(site=True) def findDuplicateImages(self): """ Find duplicates of the photo. @@ -250,17 +250,6 @@ self.titlefmt = titlefmt self.pagefmt = pagefmt
- @property - @deprecated('generator', since='20150508', future_warning=True) - def reader(self): - """Deprecated generator.""" - return self.generator - - @reader.setter - @deprecated('generator', since='20150508', future_warning=True) - def reader(self, value): - self.generator = value - def treat(self, photo): """ Process each page. @@ -290,11 +279,6 @@
return title
- @deprecated('treat()', since='20150118', future_warning=True) - def doSingle(self): - """Process one page.""" - return self.treat(next(self.reader)) - @classmethod def parseConfigurationPage(cls, configurationPage): """
pywikibot-commits@lists.wikimedia.org