Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/282517

Change subject: [compat2core] Additional information about templatesWithParams
......................................................................

[compat2core] Additional information about templatesWithParams

- templatesWithParams() has a breaking change between compat and core.
  As this was done in the first implementation for core, we shouldn't
  change its behavior but note it in README-conversion.txt and give a
  warning in compat2core.py utility script.

Bug: T131952
Change-Id: I9ef501f7271d126d5720cec3ad48dcb21740f96b
---
M README-conversion.txt
M scripts/maintenance/compat2core.py
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/17/282517/1

diff --git a/README-conversion.txt b/README-conversion.txt
index 381c4a7..6b4e9a4 100644
--- a/README-conversion.txt
+++ b/README-conversion.txt
@@ -89,6 +89,9 @@
 The following methods have had their outputs changed:
 
 - getVersionHistory(): Returns a pywikibot.Timestamp object instead of a 
MediaWiki one
+- templatesWithParams(): Returns a list of of a list with two items. The first 
item is
+    a Page object of the template, the second is a list of parameters. In 
compat we have
+    a list of tuples with two items. The first item is the template title.
 
 === FilePage objects ===
 
diff --git a/scripts/maintenance/compat2core.py 
b/scripts/maintenance/compat2core.py
index de59ee0..4706cb2 100755
--- a/scripts/maintenance/compat2core.py
+++ b/scripts/maintenance/compat2core.py
@@ -117,7 +117,10 @@
      'query.GetData() should be replaced by pywikibot.data.api.Request or\n'
      'by a direct site request'),
     ('.verbose',
-     'verbose_output need "from pywikibot import config" first')
+     'verbose_output need "from pywikibot import config" first'),
+    ('templatesWithParams(',
+     'the first item of each template info is a Page object of the template,\n'
+     'not the title. Please refer README-conversion.txt and the 
documentation.')
 )
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/282517
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ef501f7271d126d5720cec3ad48dcb21740f96b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to