jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/620498 )
Change subject: [cleanup] Remove desupported UnicodeMixin and IteratorMixin
......................................................................
[cleanup] Remove desupported UnicodeMixin and IteratorMixin
Also remove py2_encode_utf_8 previously used by UnicodeMixin
Change-Id: I0dd16f4d6e8e3a6cb35e61cd3cdee5267e25739d
---
M pywikibot/__init__.py
M pywikibot/tools/__init__.py
2 files changed, 9 insertions(+), 39 deletions(-)
Approvals:
Matěj Suchánek: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 563e91d..2e99c51 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -65,7 +65,6 @@
MediaWikiVersion as _MediaWikiVersion,
redirect_func,
ModuleDeprecationWrapper as _ModuleDeprecationWrapper,
- _UnicodeMixin as UnicodeMixin,
)
from pywikibot.tools.formatter import color_format
@@ -93,15 +92,15 @@
'InvalidTitle', 'IsNotRedirectPage', 'IsRedirectPage',
'ItemPage', 'Link',
'LockedNoPage', 'LockedPage', 'log', 'NoCreateError',
'NoMoveTarget',
'NoPage', 'NoSuchSite', 'NoUsername',
'NoWikibaseEntity',
- 'OtherPageSaveError', 'output',
- 'Page', 'PageCreatedConflict', 'PageDeletedConflict',
'PageNotSaved',
- 'PageRelatedError', 'PageSaveRelatedError', 'PropertyPage',
- 'QuitKeyboardInterrupt', 'SectionError', 'Server504Error',
'ServerError',
- 'showHelp', 'Site', 'SiteDefinitionError',
'SiteLink',
- 'SpamblacklistError', 'stdout', 'TitleblacklistError',
'translate', 'ui',
- 'unicode2html', 'UnicodeMixin', 'UnknownExtension',
'UnknownFamily',
- 'UnknownSite', 'UnsupportedPage', 'UploadWarning',
'url2unicode', 'User',
- 'UserBlocked', 'warning', 'WikiBaseError',
'WikidataBot',
+ 'OtherPageSaveError', 'output', 'Page',
'PageCreatedConflict',
+ 'PageDeletedConflict', 'PageNotSaved', 'PageRelatedError',
+ 'PageSaveRelatedError', 'PropertyPage',
'QuitKeyboardInterrupt',
+ 'SectionError', 'Server504Error', 'ServerError',
'showHelp', 'Site',
+ 'SiteDefinitionError', 'SiteLink', 'SpamblacklistError',
'stdout',
+ 'TitleblacklistError', 'translate', 'ui',
'unicode2html',
+ 'UnknownExtension', 'UnknownFamily', 'UnknownSite',
'UnsupportedPage',
+ 'UploadWarning', 'url2unicode', 'User',
'UserBlocked', 'warning',
+ 'WikiBaseError', 'WikidataBot',
)
__all__ += textlib_methods
@@ -1429,5 +1428,3 @@
wrapper._add_deprecated_attr('__release__', __version__,
replacement_name='pywikibot.__version__',
since='20200707')
-wrapper._add_deprecated_attr('UnicodeMixin', replacement_name='',
- since='20200723', future_warning=True)
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 0fe224e..a58c064 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1782,22 +1782,6 @@
return open_archive(filename, use_extension=use_extension)
-class IteratorNextMixin(Iterator):
-
- """DEPRECATED. Backwards compatibility for
Iterators."""
-
- pass
-
-
-class _UnicodeMixin:
-
- """DEPRECATED. Mixin class to add __str__ method in Python 2 or
3."""
-
- def __str__(self):
- """Return the unicode representation as the str
representation."""
- return self.__unicode__()
-
-
@deprecated('bot_choice.Option and its subclasses', since='20181217')
def concat_options(message, line_length, options):
"""DEPRECATED. Concatenate options."""
@@ -1822,18 +1806,7 @@
return '{0} ({1}):'.format(message, option_msg)
-@deprecated(since='20200723', future_warning=True)
-def py2_encode_utf_8(func):
- """Decorator to optionally encode the string result of func on Python
2."""
- return func
-
-
wrapper = ModuleDeprecationWrapper(__name__)
-wrapper._add_deprecated_attr('UnicodeMixin', _UnicodeMixin,
- replacement_name='',
- since='20200723', future_warning=True)
-wrapper._add_deprecated_attr('IteratorNextMixin', replacement_name='',
- since='20200723', future_warning=True)
wrapper._add_deprecated_attr('getargspec', inspect.getargspec,
since='20200712', future_warning=True)
wrapper._add_deprecated_attr('ArgSpec', inspect.ArgSpec,
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/620498
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I0dd16f4d6e8e3a6cb35e61cd3cdee5267e25739d
Gerrit-Change-Number: 620498
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Huji <huji.huji(a)gmail.com>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged