jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1224962?usp=email )
Change subject: Cleanup: Remove deprecation warning for config.user_agent_format
......................................................................
Cleanup: Remove deprecation warning for config.user_agent_format
{httplib2} format variable was changed to {http_backend} 10 years ago.
Remove the deprecation warning now.
Bug: T98439
Change-Id: I5726cea80b3e5332f3deca7a69f71148c44d0a0c
---
M pywikibot/config.py
1 file changed, 1 insertion(+), 12 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/config.py b/pywikibot/config.py
index 191d637..6c15609 100644
--- a/pywikibot/config.py
+++ b/pywikibot/config.py
@@ -33,7 +33,7 @@
default. Editor detection functions were moved to :mod:`editor`.
"""
#
-# (C) Pywikibot team, 2003-2025
+# (C) Pywikibot team, 2003-2026
#
# Distributed under the terms of the MIT license.
#
@@ -43,7 +43,6 @@
import copy
import os
import platform
-import re
import stat
import sys
import types
@@ -1029,16 +1028,6 @@
_modified = {_key for _key in _public_globals
if _exec_globals[_key] != globals()[_key]}
-if 'user_agent_format' in _modified:
- _right_user_agent_format = re.sub(r'{httplib2(:|})', r'{http_backend\1',
- _exec_globals['user_agent_format'])
- if _right_user_agent_format != _exec_globals['user_agent_format']:
- warn('`{httplib2}` in user_agent_format is deprecated, '
- 'will replace `{httplib2}` with `{http_backend}`',
- _ConfigurationDeprecationWarning, stacklevel=2)
- _exec_globals['user_agent_format'] = _right_user_agent_format
- del _right_user_agent_format
-
for _key in _modified:
globals()[_key] = _exec_globals[_key]
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1224962?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: I5726cea80b3e5332f3deca7a69f71148c44d0a0c
Gerrit-Change-Number: 1224962
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]