From 48d8a4b6faec687806baa130097a068c8bd3b1c7 Mon Sep 17 00:00:00 2001 From: JJMC89 Date: Tue, 31 Dec 2024 12:02:19 -0800 Subject: [PATCH] backports: remove deprecation and declare not public API Change-Id: I809b5e582d9d3d74bb775c420b061ea7810a3bbf --- pywikibot/backports.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pywikibot/backports.py b/pywikibot/backports.py index d93b8a02e2..d981548205 100644 --- a/pywikibot/backports.py +++ b/pywikibot/backports.py @@ -1,8 +1,7 @@ """This module contains backports to support older Python versions. -.. deprecated:: 9.0 - The *nullcontext* context manager; use ``contextlib.nullcontext`` - instead. The *SimpleQueue* queue; use ``queue.SimpleQueue`` instead. +This module is not part of the public pywikibot API. Breaking changes may be +made at any time, and the module is not subject to deprecation requirements. """ # # (C) Pywikibot team, 2014-2024 @@ -203,16 +202,3 @@ def batched(iterable, n: int, *, yield group else: from itertools import batched # type: ignore[no-redef] - - -# import ModuleDeprecationWrapper here to prevent circular import -from pywikibot.tools import ModuleDeprecationWrapper # noqa: E402 - - -wrapper = ModuleDeprecationWrapper(__name__) -wrapper.add_deprecated_attr('nullcontext', - replacement_name='contextlib.nullcontext', - since='9.0.0') -wrapper.add_deprecated_attr('SimpleQueue', - replacement_name='queue.SimpleQueue', - since='9.0.0')