From a896206a373d3ec1383edb15bdf1551cf39750b8 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 26 Sep 2019 17:01:27 -0400 Subject: [PATCH] doc: Use scheme argument for Site constructor in docs (#234) This fixes the warning: DeprecationWarning: Specifying host as a tuple is deprecated as of mwclient 0.10.0. Please use the new scheme argument instead. --- docs/source/index.rst | 2 +- docs/source/user/connecting.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index ace791fb..058d064c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -27,7 +27,7 @@ Quickstart .. code-block:: python - >>> site = mwclient.Site(('https', 'en.wikipedia.org')) + >>> site = mwclient.Site('en.wikipedia.org') >>> page = site.pages[u'LeipƤjuusto'] >>> page.text() u'{{Unreferenced|date=September 2009}}\n[[Image:Leip\xe4juusto cheese with cloudberry jam.jpg|thumb|Leip\xe4juusto with [[cloudberry]] jam]]\n\'\'\'Leip\xe4juusto\'\'\' (bread cheese) or \'\'juustoleip\xe4\'\', which is also known in English as \'\'\'Finnish squeaky cheese\'\'\', is a fresh [[cheese]] traditionally made from cow\'s [[beestings]], rich milk from a cow that has recently calved.' diff --git a/docs/source/user/connecting.rst b/docs/source/user/connecting.rst index bab60725..1482c379 100644 --- a/docs/source/user/connecting.rst +++ b/docs/source/user/connecting.rst @@ -14,7 +14,7 @@ Then try to connect to a site: By default, mwclient will connect using https. If your site doesn't support https, you need to explicitly request http like so: - >>> site = Site(('http', 'test.wikipedia.org')) + >>> site = Site('test.wikipedia.org', scheme='http') .. _endpoint: