- Update to 0.9.14:
* Include tests dir in release pack * Fix responed data type error * Fix exception when trying to list directory over WebDAV * Don't send Content-Type header twice * Fix python2 support * Don't decode binary data on put - Drop merged patch python2.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyWebDAV3?expand=0&rev=9
This commit is contained in:
committed by
Git OBS Bridge
parent
1695dcb6df
commit
0bdf707624
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:866143ccc863283b3163b9022a15cd04aed8e736ac22204f3488d41944b7265e
|
||||
size 519941
|
||||
3
PyWebDAV3-0.9.14.tar.gz
Normal file
3
PyWebDAV3-0.9.14.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:efab3b820bb19963bc5eaca40086ef632843f0abd5bdb2b4aed150f292979c87
|
||||
size 525433
|
||||
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 09:52:25 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 0.9.14:
|
||||
* Include tests dir in release pack
|
||||
* Fix responed data type error
|
||||
* Fix exception when trying to list directory over WebDAV
|
||||
* Don't send Content-Type header twice
|
||||
* Fix python2 support
|
||||
* Don't decode binary data on put
|
||||
- Drop merged patch python2.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 6 09:27:27 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -20,16 +20,15 @@
|
||||
%define oldpython python
|
||||
%define ltmsver 0.13
|
||||
Name: python-PyWebDAV3
|
||||
Version: 0.9.12
|
||||
Version: 0.9.14
|
||||
Release: 0
|
||||
Summary: WebDAV library including a standalone server for python2 and python3
|
||||
License: LGPL-2.0-only
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/andrewleech/PyWebDAV3
|
||||
Source0: https://files.pythonhosted.org/packages/source/P/PyWebDAV3/PyWebDAV3-%{version}.tar.gz
|
||||
# Only used in %check for testing purposes
|
||||
# Only used in %%check for testing purposes
|
||||
Source1: http://www.webdav.org/neon/litmus/litmus-%{ltmsver}.tar.gz
|
||||
Patch0: python2.patch
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six}
|
||||
@@ -55,7 +54,6 @@ This package does not provide client functionality.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyWebDAV3-%{version}
|
||||
%patch0 -p1
|
||||
cp %{SOURCE1} test/
|
||||
|
||||
%build
|
||||
@@ -75,8 +73,7 @@ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/py
|
||||
%python_clone -a %{buildroot}%{_bindir}/davserver
|
||||
|
||||
%check
|
||||
%python_expand py.test-%{$python_bin_suffix} -v
|
||||
rm test/litmus-%{ltmsver}.tar.gz
|
||||
%pytest
|
||||
|
||||
%post
|
||||
%python_install_alternative davserver
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
From 5d7d16a4e417c9483d8ff529835498f336c6cc37 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Leech <andrew@alelec.net>
|
||||
Date: Mon, 23 Apr 2018 10:12:16 +1000
|
||||
Subject: [PATCH] Fix python2 support
|
||||
|
||||
---
|
||||
pywebdav/server/fshandler.py | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pywebdav/server/fshandler.py b/pywebdav/server/fshandler.py
|
||||
index 84bb333..7b9b0a6 100644
|
||||
--- a/pywebdav/server/fshandler.py
|
||||
+++ b/pywebdav/server/fshandler.py
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
-import html
|
||||
import textwrap
|
||||
import six
|
||||
import logging
|
||||
@@ -12,6 +11,10 @@
|
||||
from pywebdav.lib.errors import *
|
||||
from pywebdav.lib.iface import *
|
||||
from pywebdav.lib.davcmd import copyone, copytree, moveone, movetree, delone, deltree
|
||||
+if six.PY2:
|
||||
+ from cgi import escape
|
||||
+else:
|
||||
+ from html import escape
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -142,7 +145,7 @@ def _get_listing(self, path):
|
||||
</body>
|
||||
</html>
|
||||
""")
|
||||
- escapeditems = (html.escape(i) + ('/' if os.path.isdir(os.path.join(path, i)) else '') for i in os.listdir(path) if not i.startswith('.'))
|
||||
+ escapeditems = (escape(i) + ('/' if os.path.isdir(os.path.join(path, i)) else '') for i in os.listdir(path) if not i.startswith('.'))
|
||||
htmlitems = "\n".join('<li><a href="{i}">{i}</a></li>'.format(i=i) for i in escapeditems)
|
||||
|
||||
return template.format(items=htmlitems, path=path)
|
||||
Reference in New Issue
Block a user