jenkins-bot submitted this change.
[cleanup] remove deprecated PYWIKIBOT2 config settings
Bug: T184674
Change-Id: Ic86b5c036ed81b4e4e354e4a5dce8e52d02c2031
---
M generate_family_file.py
M pywikibot/config.py
2 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/generate_family_file.py b/generate_family_file.py
index 795ea8b..330a725 100755
--- a/generate_family_file.py
+++ b/generate_family_file.py
@@ -277,8 +277,7 @@
def _import_with_no_user_config(*import_args):
"""Return __import__(*import_args) without loading user-config.py."""
- orig_no_user_config = getenv('PYWIKIBOT_NO_USER_CONFIG') or getenv(
- 'PYWIKIBOT2_NO_USER_CONFIG')
+ orig_no_user_config = getenv('PYWIKIBOT_NO_USER_CONFIG')
environ['PYWIKIBOT_NO_USER_CONFIG'] = '2'
result = __import__(*import_args)
# Reset this flag
diff --git a/pywikibot/config.py b/pywikibot/config.py
index cd38f22..d573ada 100644
--- a/pywikibot/config.py
+++ b/pywikibot/config.py
@@ -53,7 +53,7 @@
from pywikibot.backports import (DefaultDict, Dict, FrozenSet, List, Mapping,
Tuple, removesuffix)
from pywikibot.logging import error, output, warning
-from pywikibot.tools import deprecated, issue_deprecation_warning
+from pywikibot.tools import deprecated
_DabComDict = DefaultDict[str, Dict[str, str]]
@@ -65,22 +65,6 @@
if OSWIN32:
import winreg
-
-# Normalize old PYWIKIBOT2 environment variables and issue a deprecation warn.
-for env_name in (
- 'PYWIKIBOT2_DIR', 'PYWIKIBOT2_DIR_PWB', 'PYWIKIBOT2_NO_USER_CONFIG',
-):
- if env_name not in environ:
- continue
- env_value = environ[env_name]
- new_env_name = env_name.replace('PYWIKIBOT2_', 'PYWIKIBOT_')
- del environ[env_name]
- if new_env_name not in environ:
- environ[new_env_name] = env_value
- issue_deprecation_warning(
- env_name + ' environment variable', new_env_name, 0, since='20180803')
-
-
# This frozen set should contain all imported modules/variables, so it must
# occur directly after the imports. At that point globals() only contains the
# names and some magic variables (like __name__)
To view, visit change 735668. To unsubscribe, or for help writing mail filters, visit settings.