jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/637875 )
Change subject: [doc] Update HISTORY.rst and ROADMAP.rst
......................................................................
[doc] Update HISTORY.rst and ROADMAP.rst
Change-Id: I3004e7c35d987d1d6015f234e2635b397422e96e
---
M HISTORY.rst
M ROADMAP.rst
2 files changed, 25 insertions(+), 17 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index 5ea6768..21cc668 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,30 @@
Release history
===============
+5.1.0
+-----
+
+*1 November 2020*
+
+* Avoid conflicts between site and possible site keyword in api.Request.create_simple() (T262926)
+* Remove wrong param of rvision() call in Page.latest_revision_id
+* Do not raise Exception in Page.get_best_claim() but follow redirect (T265839)
+* xml-support of wikistats will be dropped
+* Remove deprecated mime_params in api.Request()
+* cleanup interwiki_graph.py and replace deprecated originPage by origin in Subjects
+* Upload a file that ends with the '\r' byte (T132676)
+* Fix incorrect server time (T266084)
+* L10N-Updates
+* Support Namespace packages in version.py (T265946)
+* Server414Error was added to pywikibot (T266000)
+* Deprecated editor.command() method was removed
+* comms.PywikibotCookieJar and comms.mode_check_decorator were deleted
+* Remove deprecated tools classes Stringtypes and UnicodeType
+* Remove deprecated tools function open_compressed and signature and UnicodeType class
+* Fix http_tests.LiveFakeUserAgentTestCase (T265842)
+* HttpRequest properties were renamed to request.Response identifiers (T265206)
+
+
5.0.0
-----
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 50ec36f..8a59efc 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,23 +1,7 @@
Current release changes
~~~~~~~~~~~~~~~~~~~~~~~
-* Avoid conflicts between site and possible site keyword in api.Request.create_simple() (T262926)
-* Remove wrong param of rvision() call in Page.latest_revision_id
-* Do not raise Exception in Page.get_best_claim() but follow redirect (T265839)
-* xml-support of wikistats will be dropped
-* Remove deprecated mime_params in api.Request()
-* cleanup interwiki_graph.py and replace deprecated originPage by origin in Subjects
-* Upload a file that ends with the '\r' byte (T132676)
-* Fix incorrect server time (T266084)
-* L10N-Updates
-* Support Namespace packages in version.py (T265946)
-* Server414Error was added to pywikibot (T266000)
-* Deprecated editor.command() method was removed
-* comms.PywikibotCookieJar and comms.mode_check_decorator were deleted
-* Remove deprecated tools classes Stringtypes and UnicodeType
-* Remove deprecated tools function open_compressed and signature and UnicodeType class
-* Fix http_tests.LiveFakeUserAgentTestCase (T265842)
-* HttpRequest properties were renamed to request.Response identifiers (T265206)
+* (no changes yet)
Future release notes
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/637875
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I3004e7c35d987d1d6015f234e2635b397422e96e
Gerrit-Change-Number: 637875
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/637866 )
Change subject: [fix] Don't show a FutureWarning when using WikiStats.get()
......................................................................
[fix] Don't show a FutureWarning when using WikiStats.get()
All WikiStats methods fetch, raw_cached, xml, csv are deprecated.
Do not call them with get() method.
Change-Id: Ia4867199961f694400c3537e33e1c8dd13d8b3ea
---
M pywikibot/data/wikistats.py
1 file changed, 8 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/wikistats.py b/pywikibot/data/wikistats.py
index 979df92..53757ab 100644
--- a/pywikibot/data/wikistats.py
+++ b/pywikibot/data/wikistats.py
@@ -146,8 +146,14 @@
if table in self._data:
return self._data[table]
- raw = self.raw_cached(table)
- f = StringIO(raw.decode('utf8'))
+ if table not in self.ALL_KEYS:
+ pywikibot.warning('WikiStats unknown table ' + table)
+
+ table = self.FAMILY_MAPPING.get(table, table)
+ path = '/api.php?action=dump&table={table}&format=csv'
+ url = self.url + path
+ r = http.fetch(url.format(table=table))
+ f = StringIO(r.text)
reader = DictReader(f)
data = list(reader)
self._data[table] = data
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/637866
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ia4867199961f694400c3537e33e1c8dd13d8b3ea
Gerrit-Change-Number: 637866
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged