jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/267435 )
Change subject: Some compat apispec functionality could be used in core ......................................................................
Some compat apispec functionality could be used in core
apispec.py is not used in compat but some methods are usable for core too. Below is a list where you find the old apispec functionality (left) in core (right) added to README-conversion.txt.
iso -> Timestamp.isoformat uniso -> Timestamp.strftime('%Y-%m-%d %H:%M:%S') dt -> Timestamp.totimestampformat duration -> BlockEntry.duration
Blocks.__init__ -> (* obsolete constructor *) Blocks.empty -> (* obsolete parameter cleanup *) Blocks.query -> site.blocks or site.logevents('block') Blocks.IPsortkey -> (* sort key, not needed * ) Blocks.allblocks -> site.blocks or site.logevents('block') Blocks.user -> site.blocks(user=user) Blocks.IP -> site.blocks(iprange=IP)
Bug: T66835 Change-Id: I310d2b28389d143051afcef5137e60ba20e535ae --- M README-conversion.txt 1 file changed, 16 insertions(+), 0 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/README-conversion.txt b/README-conversion.txt index d67b702..d2fd9ee 100644 --- a/README-conversion.txt +++ b/README-conversion.txt @@ -123,6 +123,22 @@
- contributions(): returns a pywikibot.Timestamp object instead of a Mediawiki one
+== apispec library and Blocks objects == + +Some apispec functionality could be replaced with other methods: + + iso() -> Timestamp.isoformat() + uniso() -> Timestamp.strftime('%Y-%m-%d %H:%M:%S') + dt() -> Timestamp.totimestampformat() + duration() -> BlockEntry.duration() + + Blocks.empty() -> (* obsolete parameter cleanup *) + Blocks.query() -> site.blocks() or site.logevents('block') + Blocks.IPsortkey() -> (* sort key, not needed * ) + Blocks.allblocks() -> site.blocks() or site.logevents('block') + Blocks.user() -> site.blocks(user=user) + Blocks.IP() -> site.blocks(iprange=IP) + === Command-line arguments ===
Scripts that supported unnamed arguments as titles of pages on which to work,
pywikibot-commits@lists.wikimedia.org