From c04f8849d20fd6fb5dec33d790d5c3b69aa84690 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Mon, 21 Dec 2020 14:54:50 -0800 Subject: [PATCH] newer mwclient, fix deprecation warning --- requirements.txt | 1 + setup.py | 2 +- wp2git/wp2git.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..84bb32a --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +mwclient>=0.10.1 diff --git a/setup.py b/setup.py index 2771ea4..2f62154 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ setup(name="wp2git", long_description=open('README.md').read(), author=open('AUTHORS').read(), author_email="dlenski@gmail.com", - install_requires=[ 'mwclient>=0.8' ], + install_requires=open('requirements.txt').readlines(), license=open('LICENSE').read(), url="https://github.com/dlenski/wp2git", packages=["wp2git"], diff --git a/wp2git/wp2git.py b/wp2git/wp2git.py index 35ec633..9e910d6 100755 --- a/wp2git/wp2git.py +++ b/wp2git/wp2git.py @@ -61,7 +61,7 @@ def main(): scheme, host, path = 'https', '%s.wikipedia.org' % args.lang, '/w/' else: scheme, host, path = 'https', 'wikipedia.org', '/w/' - site = mwclient.Site((scheme, host), path=path) + site = mwclient.Site(host, path=path, scheme=scheme) print('Connected to %s://%s%s' % (scheme, host, path), file=stderr) # Find the page