diff options
author | Bernd Kuhls <bernd.kuhls@t-online.de> | 2016-10-09 14:46:20 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-10-09 22:55:59 +0200 |
commit | 1519e5311097f9fd1779ab1f6e706a8cd7f9830b (patch) | |
tree | e26963d9f035e562b49ac21500d3255906b2ab19 /package/python-mwclient/0001-use-exec-in-py3-compatible-manner.patch | |
parent | ae86d30913786765aecce38177a99353c7e800aa (diff) | |
download | buildroot-1519e5311097f9fd1779ab1f6e706a8cd7f9830b.tar.gz buildroot-1519e5311097f9fd1779ab1f6e706a8cd7f9830b.zip |
package/python-mwclient: new package
Needed by upcoming python-mwscrape package.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python-mwclient/0001-use-exec-in-py3-compatible-manner.patch')
-rw-r--r-- | package/python-mwclient/0001-use-exec-in-py3-compatible-manner.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/package/python-mwclient/0001-use-exec-in-py3-compatible-manner.patch b/package/python-mwclient/0001-use-exec-in-py3-compatible-manner.patch new file mode 100644 index 0000000000..ac7838a7f7 --- /dev/null +++ b/package/python-mwclient/0001-use-exec-in-py3-compatible-manner.patch @@ -0,0 +1,36 @@ +From 5de1bb82465d39962e26175c62f644a3e423d030 Mon Sep 17 00:00:00 2001 +From: Adam Williamson <awilliam@redhat.com> +Date: Thu, 21 Jan 2016 17:21:52 -0800 +Subject: [PATCH] use 'exec' in py3-compatible manner + +per https://docs.python.org/2/reference/simple_stmts.html , +as exec is a function not a statement in py3, the py2 version +has been set to allow the subsequent statement to be a tuple, +so we can invoke it like this to make it both py2 and py3 +compatible. Without this, byte-compiling the file fails under +py3. + +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> +--- +downloaded from upstream commit: +https://github.com/mwclient/mwclient/commit/5de1bb82465d39962e26175c62f644a3e423d030 + + mwclient/ex.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mwclient/ex.py b/mwclient/ex.py +index db4006c..c0b1eae 100644 +--- a/mwclient/ex.py ++++ b/mwclient/ex.py +@@ -12,7 +12,7 @@ def read_config(config_files, **predata): + + def _read_config_file(_config_file, predata): + _file = open(_config_file) +- exec _file in globals(), predata ++ exec(_file, globals(), predata) + _file.close() + + for _k, _v in predata.iteritems(): +-- +2.9.3 + |