jenkins-bot merged this change.
[compat] do not actively support compat module
core branch is now 11 years old and decommission of compat was two years
ago. The compat module was created in 2012 and older catlib and userlib
where merged into that folder in 2014.
The framework was never using this compatibility module and bot operators
get a deprecation warning for their private scripts when the module is
used. The scripts should be updated accordingly.
- remove their references from autogenerated docs to not actively support it
- update compat2core.py maintenance script
detached from I32cd9ca2d1e
Bug: T183085
Change-Id: I9d61e1eb0d26e570406b14ee28b0cd86a2a49871
---
M docs/api_ref/pywikibot.rst
M scripts/maintenance/compat2core.py
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/docs/api_ref/pywikibot.rst b/docs/api_ref/pywikibot.rst
index b111780..d8878f0 100644
--- a/docs/api_ref/pywikibot.rst
+++ b/docs/api_ref/pywikibot.rst
@@ -12,7 +12,6 @@
.. toctree::
pywikibot.comms
- pywikibot.compat
pywikibot.data
pywikibot.families
pywikibot.tools
diff --git a/scripts/maintenance/compat2core.py b/scripts/maintenance/compat2core.py
index c4b64ce..4ae4e2c 100755
--- a/scripts/maintenance/compat2core.py
+++ b/scripts/maintenance/compat2core.py
@@ -50,9 +50,8 @@
('import wikipedia(?: as pywikibot)?', 'import pywikibot'),
('(?<!from pywikibot )import (config|pagegenerators)',
r'from pywikibot import \1'),
- ('(?<!from pywikibot.compat )import query',
- 'from pywikibot.compat import query'),
# remove deprecated libs
+ ('(?:from pywikibot.compat )?import query', ''),
('import catlib\r?\n', ''),
('import userlib\r?\n', ''),
# change wikipedia to pywikibot, exclude URLs
@@ -112,6 +111,9 @@
('from wikipedia import',
'"wikipedia" library has been changed to "pywikibot". Please find the\n'
'right way to import your object.'),
+ ('from pywikibot.compat import',
+ 'compat module has been dropped. Please refer README-conversion.txt for\n'
+ 'core implementation.'),
('query.GetData(',
'query.GetData() should be replaced by pywikibot.data.api.Request or\n'
'by a direct site request'),
To view, visit change 467645. To unsubscribe, or for help writing mail filters, visit settings.