Skip to content

Commit

Permalink
doc: Use scheme argument for Site constructor in docs (#234)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MarcoFalke authored and danmichaelo committed Sep 26, 2019
1 parent edfe9cb commit a896206
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/index.rst
Expand Up @@ -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.'
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user/connecting.rst
Expand Up @@ -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:

Expand Down

0 comments on commit a896206

Please sign in to comment.