Xqt submitted this change.

View Change


Approvals: Xqt: Verified; Looks good to me, approved
[doc] Update deprecations for tools module

Change-Id: I0ae99e3a363ee40536efd84c951b3655b09b3614
---
M pywikibot/tools/__init__.py
1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 1661611..0f07fc3 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1,4 +1,20 @@
-"""Miscellaneous helper functions (not wiki-dependent)."""
+"""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.
+"""
#
# (C) Pywikibot team, 2008-2023
#
@@ -841,12 +857,14 @@
replacement_name='pywikibot.tools.collections.EMPTY_DEFAULT',
since='7.6.0')

-# Deprecate objects which has to be imported from tools.itertools instead
+# 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',

To view, visit change 965466. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I0ae99e3a363ee40536efd84c951b3655b09b3614
Gerrit-Change-Number: 965466
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged