jenkins-bot submitted this change.
[cleanup] Remove deprecated PywikibotCookieJar class
As announced with 4.1 remove comms.http.PywikibotCookieJar and its
_mode_check_decorator decorator
Change-Id: I2dc0b0377d733d927212b37a24bb4091dc19349f
---
M pywikibot/comms/http.py
1 file changed, 0 insertions(+), 43 deletions(-)
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index e1d28b0..623a486 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -39,7 +39,6 @@
deprecate_arg,
file_mode_checker,
issue_deprecation_warning,
- ModuleDeprecationWrapper,
)
try:
@@ -508,45 +507,3 @@
raise e
return request
-
-# Deprecated parts ############################################################
-
-
-def _mode_check_decorator(func):
- """DEPRECATED. Decorate load()/save() CookieJar methods."""
- def wrapper(cls, **kwargs):
- try:
- filename = kwargs['filename']
- except KeyError:
- filename = cls.filename
- res = func(cls, **kwargs)
- file_mode_checker(filename, mode=0o600)
- return res
- return wrapper
-
-
-class PywikibotCookieJar(cookiejar.LWPCookieJar):
-
- """DEPRECATED. CookieJar which checks file permissions."""
-
- @deprecated(since='20181007', future_warning=True)
- def __init__(self, *args, **kwargs):
- """Initialize the class."""
- super().__init__(*args, **kwargs)
-
- @_mode_check_decorator
- def load(self, **kwargs):
- """Load cookies from file."""
- super().load()
-
- @_mode_check_decorator
- def save(self, **kwargs):
- """Save cookies to file."""
- super().save()
-
-
-wrapper = ModuleDeprecationWrapper(__name__)
-wrapper._add_deprecated_attr('PywikibotCookieJar', replacement_name='',
- since='20181007', future_warning=True)
-wrapper._add_deprecated_attr('mode_check_decorator', _mode_check_decorator,
- since='20200724', future_warning=True)
To view, visit change 635001. To unsubscribe, or for help writing mail filters, visit settings.