jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1100425?usp=email )
Change subject: cleanup: remove tools elements which can be used with submodules ...................................................................... cleanup: remove tools elements which can be used with submodules Bug: T378898 Change-Id: Ia4a681d04228e52ebf790de0d38d72beb984f389 --- M ROADMAP.rst M pywikibot/tools/__init__.py 2 files changed, 4 insertions(+), 83 deletions(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/ROADMAP.rst b/ROADMAP.rst index 013f0af..3cc0156 100644 --- a/ROADMAP.rst +++ b/ROADMAP.rst @@ -11,6 +11,9 @@ **Breaking changes and code cleanups** +* :mod:`tools.threading` classes no longer can be imported from :mod:`tools` +* :mod:`tools.itertools` datatypes no longer can be imported from :mod:`tools` +* :mod:`tools.collections` datatypes no longer can be imported from :mod:`tools` * ``svn_rev_info`` and ``getversion_svn`` of :mod:`version` module were be removed. SVN repository is no longer supported. (:phab:`T362484`) * Old color escape sequences like ``\03{color}`` were dropped in favour of new color format like ``<<color>>`` @@ -87,9 +90,6 @@ Pending removal in Pywikibot 10 ------------------------------- -* 7.7.0: :mod:`tools.threading` classes should no longer imported from :mod:`tools` -* 7.6.0: :mod:`tools.itertools` datatypes should no longer imported from :mod:`tools` -* 7.6.0: :mod:`tools.collections` datatypes should no longer imported from :mod:`tools` * 7.5.0: :mod:`textlib`.tzoneFixedOffset class will be removed in favour of :class:`time.TZoneFixedOffset` * 7.4.0: ``FilePage.usingPages()`` was renamed to :meth:`using_pages()<pywikibot.FilePage.using_pages>` * 7.3.0: ``linktrail`` method of :class:`family.Family` is deprecated; use :meth:`APISite.linktrail() diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 6390671..db9cbd3 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -1,20 +1,4 @@ -"""Miscellaneous helper functions (not wiki-dependent). - -.. deprecated:: 7.6 - The *CombinedError*, *DequeGenerator*, *EmptyDefault*, *EMPTY_DEFAULT* - and *SizedKeyCollection* objects. Import them from - :mod:`tools.collections` instead. -.. deprecated:: 7.6 - The *itergroup* function. Use :func:`backports.batched` or - ``itertools.batched`` instead. -.. deprecated:: 7.6 - The *filter_unique*, *intersect_generators*, *islice_with_ellipsis* - and *roundrobin_generators* functions. Import them from - :mod:`tools.itertools` instead. -.. deprecated:: 7.7 - The *RLock*, *ThreadedGenerator* and *ThreadList* classes. - Import them from :mod:`tools.threading` instead. -""" +"""Miscellaneous helper functions (not wiki-dependent).""" # # (C) Pywikibot team, 2008-2024 # @@ -780,66 +764,3 @@ return val return wrapper - - -# Deprecate objects which has to be imported from tools.collections instead -wrapper = ModuleDeprecationWrapper(__name__) -wrapper.add_deprecated_attr( - 'CombinedError', - replacement_name='pywikibot.tools.collections.CombinedError', - since='7.6.0') -wrapper.add_deprecated_attr( - 'DequeGenerator', - replacement_name='pywikibot.tools.collections.DequeGenerator', - since='7.6.0') -wrapper.add_deprecated_attr( - 'EmptyDefault', - replacement_name='pywikibot.tools.collections.EmptyDefault', - since='7.6.0') -wrapper.add_deprecated_attr( - 'SizedKeyCollection', - replacement_name='pywikibot.tools.collections.SizedKeyCollection', - since='7.6.0') -wrapper.add_deprecated_attr( - 'EMPTY_DEFAULT', - replacement_name='pywikibot.tools.collections.EMPTY_DEFAULT', - since='7.6.0') - -# Deprecate objects which has to be imported from backports instead -wrapper.add_deprecated_attr( - 'itergroup', - # new replacement in 8.2 - replacement_name='pywikibot.backports.batched', - since='7.6.0') - -# Deprecate objects which has to be imported from tools.itertools instead -wrapper.add_deprecated_attr( - 'islice_with_ellipsis', - replacement_name='pywikibot.tools.itertools.islice_with_ellipsis', - since='7.6.0') -wrapper.add_deprecated_attr( - 'intersect_generators', - replacement_name='pywikibot.tools.itertools.intersect_generators', - since='7.6.0') -wrapper.add_deprecated_attr( - 'roundrobin_generators', - replacement_name='pywikibot.tools.itertools.roundrobin_generators', - since='7.6.0') -wrapper.add_deprecated_attr( - 'filter_unique', - replacement_name='pywikibot.tools.itertools.filter_unique', - since='7.6.0') - -# Deprecate objects which has to be imported from tools.threading instead -wrapper.add_deprecated_attr( - 'RLock', - replacement_name='pywikibot.tools.threading.RLock', - since='7.7.0') -wrapper.add_deprecated_attr( - 'ThreadedGenerator', - replacement_name='pywikibot.tools.threading.ThreadedGenerator', - since='7.7.0') -wrapper.add_deprecated_attr( - 'ThreadList', - replacement_name='pywikibot.tools.threading.ThreadList', - since='7.7.0') -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1100425?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Ia4a681d04228e52ebf790de0d38d72beb984f389 Gerrit-Change-Number: 1100425 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot
_______________________________________________ Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org