Git Product home page Git Product logo

pywebdav3's Introduction

PyWebDAV3

PyWebDAV is a standards compliant WebDAV server and library written in Python

PyWebDAV3 is an updated distribution for python 3 support.

Python WebDAV implementation (level 1 and 2) that features a library that enables you to integrate WebDAV server capabilities to your application

A fully working example on how to use the library is included. You can find the server in the DAVServer package. Upon installation a script called davserver is created in your $PYTHON/bin directory.

DETAILS

Consists of a server that is ready to run Serve and the DAV package that provides WebDAV server(!) functionality.

Currently supports

* WebDAV level 1
* Level 2 (LOCK, UNLOCK)
* Experimental iterator support

It plays nice with

* Mac OS X Finder
* Windows Explorer
* iCal
* cadaver
* Nautilus

This package does not provide client functionality.

INSTALLATION

Installation and setup of server can be as easy as follows:

pip install PyWebDAV3
davserver -D /tmp -n -J

After installation of this package you will have a new script in you $PYTHON/bin directory called davserver. This serves as the main entry point to the server.

If you're living on the bleeding edge then check out the sourcecode from https://github.com/andrewleech/PyWebDAV3

After having downloaded code simply install a development egg:

git clone https://github.com/andrewleech/PyWebDAV3
cd PyWebDAV3
python setup.py develop
davserver --help

Any updates, fork and pull requests against my github page

If you want to use the library then have a look at the DAVServer package that holds all code for a full blown server. Also doc/ARCHITECURE has information for you.

QUESTIONS?

Ask here https://github.com/andrewleech/PyWebDAV3 or send an email to the maintainer.

REQUIREMENTS

  • Python 3.5 or higher (www.python.org)
  • PyXML 0.66 (pyxml.sourceforge.net)

LICENSE

General Public License v2 see doc/LICENSE

AUTHOR(s)

Andrew Leech [*] Melbourne, Australia [email protected]

Simon Pamies Bielefeld, Germany [email protected]

Christian Scholz Aachen, Germany [email protected]

Vince Spicer Ontario, Canada [email protected]

[*]: Current Maintainer

OPTIONAL

NOTES

Look inside the file doc/TODO for things which needs to be done and may be done in the near future.

Have a look at doc/ARCHITECTURE to understand what's going on under the hood

pywebdav3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pywebdav3's Issues

Latest release 0.9.9 does not work with Python3

Latest release 0.9.9 does not work with Python3: the code uses old syntax, e.g. "except DAV_Error, (ec, dd):" in pywebdav/lib/WebDAVServer.py.

This was fixed 3 years ago in commit b4abb32
Please make a new release compatible with Python3.

Py2 package meta is missing dependency

$ sudo pip install PyWebDAV3
[sudo] password for nick: 
The directory '/home/nick/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nick/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting PyWebDAV3
  Downloading https://files.pythonhosted.org/packages/9d/77/1115b1ec5861ced542373b63551febe9e35bf69c8145680625d9f88be2dd/PyWebDAV3-0.9.12.tar.gz (519kB)
    100% |████████████████████████████████| 522kB 428kB/s 
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from PyWebDAV3)
Installing collected packages: PyWebDAV3
  Running setup.py install for PyWebDAV3 ... done
Successfully installed PyWebDAV3-0.9.12
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

$ davserver
Traceback (most recent call last):
  File "/usr/local/bin/davserver", line 9, in <module>
    load_entry_point('PyWebDAV3==0.9.12', 'console_scripts', 'davserver')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/pywebdav/server/server.py", line 28, in <module>
    from pywebdav.server.fileauth import DAVAuthHandler
  File "/usr/local/lib/python2.7/dist-packages/pywebdav/server/fileauth.py", line 32, in <module>
    from .fshandler import FilesystemHandler
  File "/usr/local/lib/python2.7/dist-packages/pywebdav/server/fshandler.py", line 3, in <module>
    import html
ImportError: No module named html

wishlist: read-only

it seems that there is currently no easy way to run pywebdav3 read-only (short of running it as a user w/o write permissions, which on linux afaict requires root privileges). please consider adding a read-only switch to the default server.

implementation-wise, i'd suggest splitting the FilesystemHandler class into a FilesystemReadHandler and a FilesystemRWHandler (apart from the last two methods, the code already looks like it's split accordingly); this would ease auditing compared to a flag set to the FilesystemHandler.

use nginx proxy_pass,when get file will cause an error

nginx conf

upstream testweb{
        server test.com max_fails=3; 
        keepalive 16;
        }
server {

        listen      443;
        server_name  domain.com;
        ssl on;
        ssl_certificate /usr/local/nginx/ssl/fullchain.key.pem;
        ssl_certificate_key /usr/local/nginx/ssl/privkey.key;
       location / {
	    proxy_pass http://testweb;
      }

webdav server

test.com

command

davserver -D D:\webdavserver -n -J -v -l INFO -H 0.0.0.0

When get webdav file,error info
image

Exception happened during processing of request from ('xxx.xxx.xxx.xx', 48906)
Traceback (most recent call last):
  File "X:\cmder\vendor\python3\Lib\socketserver.py", line 639, in process_request_thread
    self.finish_request(request, client_address)
  File "X:\cmder\vendor\python3\Lib\socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "X:\cmder\vendor\python3\Lib\socketserver.py", line 696, in __init__
    self.handle()
  File "X:\cmder\vendor\python3\Lib\http\server.py", line 420, in handle
    self.handle_one_request()
  File "X:\cmder\vendor\python3\Lib\http\server.py", line 386, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "X:\cmder\vendor\python3\Lib\socket.py", line 586, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054]

Preserve old history

When the project was first imported, the import was based on a pypy tar ball. The original history is still available at https://code.google.com/archive/p/pywebdav/source/default/source, albeit in hg, and would provide valuable insight into the history of the project ("Why was that variable introduced? Did it serve a purpose back than that is now lost, or did I just miss something?).

IMO, now (as the project is young and not many forks are out there) would be still a good time to rebase the project once onto the commit the tar ball was created (I've imported it to https://github.com/chrysn-pull-requests/PyWebDAV3/tree/old-history-used from the downloads google code provides; they also have an "import to GitHub" button). There are some commits later in the original project (dropping pkg_resources) that could still be mergable as well (at https://github.com/chrysn-pull-requests/PyWebDAV3/tree/old-history-latest).

Exception on LOCK

Hi Andrew,

  • mountet the webdav on linux with davfs2
  • tried a "touch test" on the share
  • got an error

on the client:

$ mkdir webdav
$ sudo mount -t davfs http://3.67.207.50:8000 webdav
$ cd webdav
$ touch test

[loewe@fedora webdav]$ touch test
touch: cannot touch 'test': Permission denied
[loewe@fedora webdav]$ sudo touch test
touch: cannot touch 'test': Input/output error
[loewe@fedora webdav]$

on the server:

[ec2-user@ip-172-31-44-33 ~]$ davserver -H 0.0.0.0 -P 8000 -D /home/ec2-user/Pictures/ -n
2022-10-26 08:13:52,715 WARNING Authentication disabled!
Listening on 0.0.0.0 (8000)
93.216.217.130 - - [26/Oct/2022 08:25:17] "OPTIONS / HTTP/1.1" 200 -
93.216.217.130 - - [26/Oct/2022 08:25:17] "PROPFIND / HTTP/1.1" 207 -
93.216.217.130 - - [26/Oct/2022 08:25:17] "PROPFIND / HTTP/1.1" 207 -
93.216.217.130 - - [26/Oct/2022 08:25:26] "PROPFIND / HTTP/1.1" 207 -
93.216.217.130 - - [26/Oct/2022 08:26:05] "PROPFIND / HTTP/1.1" 207 -
93.216.217.130 - - [26/Oct/2022 08:31:04] "PROPFIND / HTTP/1.1" 207 -
93.216.217.130 - - [26/Oct/2022 08:31:16] "PROPFIND / HTTP/1.1" 207 -
93.216.217.130 - - [26/Oct/2022 08:31:16] "LOCK /test HTTP/1.1" 200 -

Exception happened during processing of request from ('93.216.217.130', 52540)
Traceback (most recent call last):
File "/usr/lib64/python3.7/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib64/python3.7/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib64/python3.7/socketserver.py", line 720, in init
self.handle()
File "/usr/lib64/python3.7/http/server.py", line 426, in handle
self.handle_one_request()
File "/usr/lib64/python3.7/http/server.py", line 414, in handle_one_request
method()
File "/home/ec2-user/.local/lib/python3.7/site-packages/pywebdav/lib/locks.py", line 140, in do_LOCK
{'Lock-Token' : 'opaquelocktoken:%s' % token})
File "/home/ec2-user/.local/lib/python3.7/site-packages/pywebdav/lib/WebDAVServer.py", line 64, in send_body
self.send_response(code, message=msg)
File "/usr/lib64/python3.7/http/server.py", line 492, in send_response
self.send_response_only(code, message)
File "/usr/lib64/python3.7/http/server.py", line 507, in send_response_only
(self.protocol_version, code, message)).encode(
TypeError: %d format: a number is required, not str

Any idea.

Cheers

Heiko

davserver: TypeError raised when specifying an explicit baseurl.

I ran into an issue with davserver when specifying an explicit baseurl, from either the -B command-line flag or via config file:

2019-12-01 02:01:10,274 INFO Starting up PyWebDAV server (version 0.9.14)
2019-12-01 02:01:10,274 INFO chunked_http_response feature ON
2019-12-01 02:01:10,274 INFO http_request_use_iterator feature OFF
2019-12-01 02:01:10,274 INFO http_response_use_iterator feature ON
2019-12-01 02:01:10,274 INFO Initialized with /home/jayson/wut_it_be http://localhost:8081/
2019-12-01 02:01:10,274 WARNING Authentication disabled!
2019-12-01 02:01:10,274 INFO Serving data from /home/jayson/wut_it_be
2019-12-01 02:01:10,274 INFO Using http://skully:8081 as base url for PROPFIND requests
Listening on localhost (8081)
127.0.0.1 - - [01/Dec/2019 02:01:12] "OPTIONS / HTTP/1.1" 200 -
2019-12-01 02:01:12,058 INFO PROPFIND: Depth is 0, URI is b'http://localhost:8081/'
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 56366)
Traceback (most recent call last):
  File "/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/lib/python3.7/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
    method()
  File "/usr/local/lib/python3.7/dist-packages/PyWebDAV3-0.9.14-py3.7.egg/pywebdav/lib/WebDAVServer.py", line 344, in do_PROPFIND
    DATA = b'%s\n' % pf.createResponse()
  File "/usr/local/lib/python3.7/dist-packages/PyWebDAV3-0.9.14-py3.7.egg/pywebdav/lib/propfind.py", line 75, in createResponse
    df = self.create_prop()
  File "/usr/local/lib/python3.7/dist-packages/PyWebDAV3-0.9.14-py3.7.egg/pywebdav/lib/propfind.py", line 160, in create_prop
    res = self.mk_prop_response(self._uri, gp, bp, doc)
  File "/usr/local/lib/python3.7/dist-packages/PyWebDAV3-0.9.14-py3.7.egg/pywebdav/lib/propfind.py", line 245, in mk_prop_response
    uri = self._dataclass.baseurl + '/' + '/'.join(uri.split('/')[3:])
TypeError: a bytes-like object is required, not 'str'

Looks like the culprit is line 245 in pywebdav/lib/propfind.py. The data contained in self._dataclass.baseurl is of type str, but the rest of the function expects bytes.

I've made a fix and submitted it as a pull request.

It also adds an empty baseurl configuration directive to the example config.ini, as I found that davserver would refuse to run unless that directive was present.

PS. I'm glad to see this fork exists, I was halfway through figuring out how to convert the old PyWebDAV codebase over to Python 3 when I found this!

--Jays

Can't upload file

When trying to copy a file onto the server from mac, Finder as the client.

Gives error, creates zero byte file.

Exception happened during processing of request from ('', 64387)
Traceback (most recent call last):
- - [29/Jul/2016 07:35:07] "PROPFIND /devpi8/upload/PyWebDAV3-0.9.8/pywebdav/server/._daemonize.py HTTP/1.1" 404 -
File "/usr/lib/python3.5/socketserver.py", line 628, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 357, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.5/socketserver.py", line 684, in init
self.handle()
File "/usr/lib/python3.5/http/server.py", line 415, in handle
self.handle_one_request()
File "/usr/lib/python3.5/http/server.py", line 403, in handle_one_request
method()
File "virtualenv_linux/lib/python3.5/site-packages/pywebdav/lib/locks.py", line 141, in do_LOCK
{'Lock-Token' : 'opaquelocktoken:%s' % token})
File "virtualenv_linux/lib/python3.5/site-packages/pywebdav/lib/WebDAVServer.py", line 65, in send_body
self.send_response(code, message=msg)
File "/usr/lib/python3.5/http/server.py", line 471, in send_response
self.send_response_only(code, message)
File "/usr/lib/python3.5/http/server.py", line 486, in send_response_only
(self.protocol_version, code, message)).encode(

TypeError: %d format: a number is required, not str

new handler

Hi.

The code is structured to allow different storage handlers.
There in "only" the file system handler, now. If I'd like to implement an other handler and make the server to use it, do I have only to change the line 76 of server.py? I checked the code and it is the only place where the handler is created.

Thanks in advance

The litmus test for PROPPATCH fails with '423 Locked'

With release 0.10.0 the litmus test for PROPPATCH fails with '423 Locked'.
Cf. https://salsa.debian.org/xypron/pywebdav/-/jobs/4196190

_________________________ Test.test_run_litmus_noauth __________________________

self = <test_litmus.Test testMethod=test_run_litmus_noauth>

    def test_run_litmus_noauth(self):
    
        result = []
        proc = None
        try:
            print('Starting davserver')
            davserver_cmd = [sys.executable, os.path.join(testdir, '..', 'pywebdav', 'server', 'server.py'), '-D',
                             self.rundir, '-n', '-H', 'localhost', '--port', str(port)]
            self.davserver_proc = subprocess.Popen(davserver_cmd)
            # Ensure davserver has time to startup
            time.sleep(1)
    
            # Run Litmus
            print('Running litmus')
            try:
                ret = run(["make", "URL=http://localhost:%d" % port, "check"], cwd=self.litmus_dist, capture_output=True)
                results = ret.stdout
    
            except subprocess.CalledProcessError as ex:
                results = ex.output
            lines = results.decode().split('\n')
            assert len(lines), "No litmus output"
            for line in lines:
                line = line.split('\r')[-1]
                result.append(line)
                if len(re.findall('^ *\d+\.', line)):
>                   assert line.endswith('pass'), line
E                   AssertionError:  6. propset............... FAIL (PROPPATCH on `/litmus/prop': 423 Locked)
E                   assert False
E                    +  where False = <built-in method endswith of str object at 0x7f60ae420830>('pass')
E                    +    where <built-in method endswith of str object at 0x7f60ae420830> = " 6. propset............... FAIL (PROPPATCH on `/litmus/prop': 423 Locked)".endswith

test/test_litmus.py:111: AssertionError

Does not work

I installed this on a Debian Bullseye machine using the apt package. It runs, but when I try to connect with MacOS Finder I get numerous exceptions such as:

----------------------------------------
2022-12-27 23:59:36,672 INFO PROPFIND: Depth is 0, URI is b'http://tesla.lan:8008/'
----------------------------------------
Exception occurred during processing of request from ('172.16.0.21', 50296)
Traceback (most recent call last):
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/WebDAVServer.py", line 344, in do_PROPFIND
    DATA = b'%s\n' % pf.createResponse()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 75, in createResponse
    df = self.create_prop()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 160, in create_prop
    res = self.mk_prop_response(self._uri, gp, bp, doc)
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 245, in mk_prop_response
    uri = self._dataclass.baseurl + '/' + '/'.join(uri.split('/')[3:])
TypeError: a bytes-like object is required, not 'str'
----------------------------------------
2022-12-27 23:59:36,675 INFO PROPFIND: Depth is 0, URI is b'http://tesla.lan:8008/'
----------------------------------------
Exception occurred during processing of request from ('172.16.0.21', 50297)
Traceback (most recent call last):
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/python3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/opt/python3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/WebDAVServer.py", line 344, in do_PROPFIND
    DATA = b'%s\n' % pf.createResponse()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 75, in createResponse
    df = self.create_prop()
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 160, in create_prop
    res = self.mk_prop_response(self._uri, gp, bp, doc)
  File "/home/chris/webdav/venv/lib/python3.10/site-packages/pywebdav/lib/propfind.py", line 245, in mk_prop_response
    uri = self._dataclass.baseurl + '/' + '/'.join(uri.split('/')[3:])
TypeError: a bytes-like object is required, not 'str'

Over and over. Looks like unicode is broken?

Add CORS header

Hi!

Would it be possible to add an option to add CORS headers, to allow connecting from PWAs?
Thanks!

range header does not work per spec

I needed a test WebDAV server, so I decided to attempt to use the package, but it appears that this software does not implement the range header properly. The RFC https://tools.ietf.org/html/rfc2616#section-14.35 states that the ranges is inclusive:

The last-byte-pos value gives the
   byte-offset of the last byte in the range; that is, the byte
   positions specified are inclusive. Byte offsets start at zero.

In the request, this does not appear to be the case. This is a log from a request:

>>> GET /somefile HTTP/1.1
>>> Host: 127.0.0.1:5555
>>> Accept: */*
>>> User-Agent: test libfetch/2.0
>>> Range: bytes=2-21
>>> Connection: close
>>> 
<<< HTTP/1.0 206 Partial Content
<<< Server: DAV/0.9.14 Python/3.7.7
<<< Date: Fri, 09 Oct 2020 21:46:08 GMT
<<< Content-type: application/octet-stream
<<< Transfer-Encoding: chunked
<<< Date: Fri, 09 Oct 2020 21:46:08 GMT
<<< DAV: 1,2
<<< Last-Modified: Fri, 09 Oct 2020 21:43:02 GMT
<<< Keep-Alive: timeout=15, max=86
last modified: [2020-10-09 21:43:02]
<<< Connection: Keep-Alive
<<< Content-Length: 19
<<< Content-Type: application/octet-stream
content length: [19]
<<< 
offset 0, length -1, size -1, clength 19

The request requests 20 bytes, (21 - 2 + 1), but as you can see, the reply only includes 19 bytes.

It also looks like it does not honor range, as if I manually do the request:

 $ telnet 0 5555
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
GET /somefile HTTP/1.1
Host: 127.0.0.1:5555
Accept: */*
User-Agent: test libfetch/2.0
Range: bytes=2-21
Connection: close

HTTP/1.0 206 Partial Content
Server: DAV/0.9.14 Python/3.7.7
Date: Fri, 09 Oct 2020 21:51:20 GMT
Content-type: application/octet-stream
Transfer-Encoding: chunked
Date: Fri, 09 Oct 2020 21:51:20 GMT
DAV: 1,2
Last-Modified: Fri, 09 Oct 2020 21:43:02 GMT
Keep-Alive: timeout=15, max=86
Connection: Keep-Alive
Content-Length: 19
Content-Type: application/octet-stream

1f400
is is a test to give some bogus data at first

1f400

1f400

1f400

1f400

1f400

1f400

1f400

5ffe

0

^]
telnet> quit
Connection closed.

A lot more data is included than the specified range:

freebsd@generic:~/lf.test $ echo -n 'is is a test to give some bogus data at first' | wc
       0      11      45

The data was a simple file that contained the above string, and zero padded to 1MB.

How to use it?

I was so stupid that I wanted to use it but didn't know how to use it. How to operate after installation?

  1. How to set up login verification? Where can I add my user name and password?
  2. How to open the test?

Support for Python 3.12

Quoting from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061833 :

With python3-defaults from experimental (Python 3.12), the package fails its autopkg 
tests:

[...]
559s autopkgtest [14:04:52]: test run-testsuite3: [-----------------------
560s ============================= test session starts 
==============================
560s platform linux -- Python 3.12.1, pytest-7.4.4, pluggy-1.3.0
560s rootdir: /tmp/autopkgtest.ibor7H/autopkgtest_tmp
560s collected 0 items / 1 error
560s
560s ==================================== ERRORS 
====================================
560s _____________________ ERROR collecting test/test_litmus.py 
_____________________
560s ImportError while importing test module 
'/tmp/autopkgtest.ibor7H/autopkgtest_tmp/test/test_litmus.py'.
560s Hint: make sure your test modules/packages have valid Python names.
560s Traceback:
560s /usr/lib/python3.12/importlib/__init__.py:90: in import_module
560s     return _bootstrap._gcd_import(name[level:], package, level)
560s test/test_litmus.py:15: in <module>
560s     import pywebdav.server.server
560s pywebdav/server/server.py:33: in <module>
560s     from pywebdav.lib.INI_Parse import Configuration
560s pywebdav/lib/INI_Parse.py:3: in <module>
560s     from six.moves.configparser import SafeConfigParser
560s E   ImportError: cannot import name 'SafeConfigParser' from 
'configparser' (/usr/lib/python3.12/configparser.py). Did you mean: 
'RawConfigParser'?
560s =============================== warnings summary 
===============================
560s test/test_litmus.py:91
560s   /tmp/autopkgtest.ibor7H/autopkgtest_tmp/test/test_litmus.py:91: 
SyntaxWarning: invalid escape sequence '\d'
560s     if len(re.findall('^ *\d+\.', line)):
560s
560s test/test_litmus.py:130
560s   /tmp/autopkgtest.ibor7H/autopkgtest_tmp/test/test_litmus.py:130: 
SyntaxWarning: invalid escape sequence '\d'
560s     if len(re.findall('^ *\d+\.', line)):
560s
560s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
560s =========================== short test summary info 
============================
560s ERROR test/test_litmus.py
560s !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection 
!!!!!!!!!!!!!!!!!!!!
560s ========================= 2 warnings, 1 error in 0.10s 
=========================
560s autopkgtest [14:04:53]: test run-testsuite3: -----------------------]
560s autopkgtest [14:04:53]: test run-testsuite3:  - - - - - - - - - - 
results - - - - - - - - - -
560s run-testsuite3       FAIL non-zero exit status 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.