jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/467411 )
Change subject: [doc] Update README-conversion.txt and explain debugging level ......................................................................
[doc] Update README-conversion.txt and explain debugging level
A lot of methods has been changed since compat release. It should be recommended to use debugging level to show all deprecation warnings and to clean the code accordingly instead to have a hint for only a few methods and keep them unchanged.
Explain using debugging level.
Bug: T127998 Change-Id: Idd97333c9a6337041436d470cfa7f89938070047 --- M README-conversion.txt 1 file changed, 17 insertions(+), 10 deletions(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/README-conversion.txt b/README-conversion.txt index 1026cfa..e127cc5 100644 --- a/README-conversion.txt +++ b/README-conversion.txt @@ -43,6 +43,23 @@ pwb.py compat2core [<script to convert>] and follow the instructions and hints.
+== Deprecated methods == + +A lot of object methods have been deprecated; deprecated methods still work, +but print a warning message in debug mode. You should follow the warning +message and update your script accordingly because deprecated methods might +be removed in future releases. + +To activate the debugging level just call your script with -debug option like +-debug:bot or +-debug:* + +Note: The -debug option does not warn when importing deprecated modules. +A better ability is to set the debugging level in your user-config.py: +debug_log = ['*'] or +debug_log = ['bot'] or +log += ['deprecation'] + == Python libraries ==
[Note: the goal will be to package pywikibot with setuptools easy_install, @@ -69,16 +86,6 @@ Category, or vice versa: e.g., Category(pageobj) converts a Page to a Category, as long as the page is in the category namespace.
-The following methods of the Page object have been deprecated (deprecated -methods still work, but print a warning message in debug mode): - -- urlname(): replaced by Page.title(as_url=True) -- titleWithoutNamespace(): replaced by Page.title(with_ns=False) -- sectionFreeTitle(): replaced by Page.title(with_section=False) -- aslink(): replaced by Page.title(as_link=True) -- encoding(): replaced by Page.site.encoding() -- put_async(): replaced by Page.put(asynchronous=True) - The following methods of the Page object have been obsoleted and no longer work (but these methods don't appear to be used anywhere in the code distributed with the bot framework). The functionality of the two obsolete