mirror of
https://github.com/Kozea/Radicale.git
synced 2025-04-04 21:57:43 +03:00
Compare commits
15 commits
Author | SHA1 | Date | |
---|---|---|---|
|
357b364ed1 | ||
|
eb91f793b4 | ||
|
1a0a2159a7 | ||
|
db5fc2d88d | ||
|
437bdbcc30 | ||
|
4ae3bdd26c | ||
|
98bea89665 | ||
|
d57325a904 | ||
|
b6d2905364 | ||
|
b1af3de2d9 | ||
|
8387a4c33f | ||
|
d1199420cf | ||
|
5603c55ccc | ||
|
d0dac14f84 | ||
|
e0a2d20919 |
14 changed files with 2966 additions and 28 deletions
15
.github/workflows/generate-documentation.yml
vendored
Normal file
15
.github/workflows/generate-documentation.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: Generate documentation
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- DOCUMENTATION.md
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: gh-pages
|
||||
- name: Run generator
|
||||
run: documentation-generator/run.py
|
23
.github/workflows/pypi-publish.yml
vendored
Normal file
23
.github/workflows/pypi-publish.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
name: PyPI publish
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install dependencies
|
||||
run: python -m pip install wheel
|
||||
- name: Build
|
||||
run: python setup.py sdist bdist_wheel
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -6,12 +6,19 @@ __pycache__
|
|||
/MANIFEST
|
||||
/build
|
||||
/dist
|
||||
/Radicale.egg-info
|
||||
/*.egg-info
|
||||
/_site
|
||||
|
||||
coverage.xml
|
||||
.pytest_cache
|
||||
.cache
|
||||
.coverage
|
||||
.coverage.*
|
||||
.eggs
|
||||
.project
|
||||
.pydevproject
|
||||
.settings
|
||||
.tox
|
||||
.vscode
|
||||
.sass-cache
|
||||
Gemfile.lock
|
||||
|
|
|
@ -3,8 +3,6 @@ sudo: false
|
|||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
python: 3.3
|
||||
- os: linux
|
||||
python: 3.4
|
||||
- os: linux
|
||||
|
@ -15,7 +13,12 @@ matrix:
|
|||
language: generic
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3 || brew upgrade python3; fi
|
||||
- |
|
||||
if [ "${TRAVIS_OS_NAME}" == osx ]; then
|
||||
rm '/usr/local/include/c++'
|
||||
brew install python3 ||
|
||||
brew upgrade python3
|
||||
fi
|
||||
- pip3 install --upgrade six
|
||||
|
||||
install:
|
||||
|
|
2863
DOCUMENTATION.md
Normal file
2863
DOCUMENTATION.md
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,3 @@
|
|||
include COPYING NEWS.md README.md
|
||||
include COPYING DOCUMENTATION.md NEWS.md README.md
|
||||
include config logging rights
|
||||
include radicale.py radicale.fcgi radicale.wsgi
|
||||
|
|
18
NEWS.md
18
NEWS.md
|
@ -1,6 +1,20 @@
|
|||
News
|
||||
====
|
||||
|
||||
2.1.12 - Wild Radish
|
||||
--------------------
|
||||
|
||||
This release is compatible with version 2.0.0.
|
||||
|
||||
* Include documentation in source archive
|
||||
|
||||
2.1.11 - Wild Radish
|
||||
--------------------
|
||||
|
||||
This release is compatible with version 2.0.0.
|
||||
|
||||
* Fix moving items between collections
|
||||
|
||||
2.1.10 - Wild Radish
|
||||
--------------------
|
||||
|
||||
|
@ -158,8 +172,8 @@ This release is compatible with version 2.0.0.
|
|||
2.0.0 - Little Big Radish
|
||||
-------------------------
|
||||
|
||||
This feature is not compatible with the 1.x.x versions. See
|
||||
http://radicale.org/1to2/ if you want to switch from 1.x.x to
|
||||
This feature is not compatible with the 1.x.x versions. Follow our
|
||||
[migration guide](https://radicale.org/2.1.html#documentation/migration-from-1xx-to-2xx) if you want to switch from 1.x.x to
|
||||
2.0.0.
|
||||
|
||||
* Support Python 3.3+ only, Python 2 is not supported anymore
|
||||
|
|
|
@ -3,5 +3,5 @@ Read Me
|
|||
|
||||
Radicale is a free and open-source CalDAV and CardDAV server.
|
||||
|
||||
For complete documentation, please visit the
|
||||
[Radicale online documentation](http://www.radicale.org/documentation)
|
||||
For the complete documentation, please visit
|
||||
[Radicale "2.1" documentation](https://radicale.org/2.1.html).
|
||||
|
|
2
logging
2
logging
|
@ -7,7 +7,7 @@
|
|||
# The path must be specified in the logging section of the configuration file
|
||||
#
|
||||
# Some examples are included in Radicale's documentation, see:
|
||||
# http://radicale.org/logging/
|
||||
# https://radicale.org/2.1.html#documentation/logging
|
||||
#
|
||||
# Other handlers are available. For more information, see:
|
||||
# http://docs.python.org/library/logging.config.html
|
||||
|
|
|
@ -656,7 +656,7 @@ class Application:
|
|||
self.logger.warning(
|
||||
"Bad MKCALENDAR request on %r: %s", path, e, exc_info=True)
|
||||
return BAD_REQUEST
|
||||
except socket.timeout as e:
|
||||
except socket.timeout:
|
||||
self.logger.debug("client timed out", exc_info=True)
|
||||
return REQUEST_TIMEOUT
|
||||
with self.Collection.acquire_lock("w", user):
|
||||
|
@ -695,7 +695,7 @@ class Application:
|
|||
self.logger.warning(
|
||||
"Bad MKCOL request on %r: %s", path, e, exc_info=True)
|
||||
return BAD_REQUEST
|
||||
except socket.timeout as e:
|
||||
except socket.timeout:
|
||||
self.logger.debug("client timed out", exc_info=True)
|
||||
return REQUEST_TIMEOUT
|
||||
with self.Collection.acquire_lock("w", user):
|
||||
|
@ -765,12 +765,6 @@ class Application:
|
|||
return FORBIDDEN
|
||||
if to_item and environ.get("HTTP_OVERWRITE", "F") != "T":
|
||||
return PRECONDITION_FAILED
|
||||
if (to_item and item.uid != to_item.uid or
|
||||
not to_item and
|
||||
to_collection.path != item.collection.path and
|
||||
to_collection.has_uid(item.uid)):
|
||||
return self._webdav_error_response(
|
||||
"C" if tag == "VCALENDAR" else "CR", "no-uid-conflict")
|
||||
to_href = posixpath.basename(to_path.strip("/"))
|
||||
try:
|
||||
self.Collection.move(item, to_collection, to_href)
|
||||
|
@ -798,7 +792,7 @@ class Application:
|
|||
self.logger.warning(
|
||||
"Bad PROPFIND request on %r: %s", path, e, exc_info=True)
|
||||
return BAD_REQUEST
|
||||
except socket.timeout as e:
|
||||
except socket.timeout:
|
||||
self.logger.debug("client timed out", exc_info=True)
|
||||
return REQUEST_TIMEOUT
|
||||
with self.Collection.acquire_lock("r", user):
|
||||
|
@ -831,7 +825,7 @@ class Application:
|
|||
self.logger.warning(
|
||||
"Bad PROPPATCH request on %r: %s", path, e, exc_info=True)
|
||||
return BAD_REQUEST
|
||||
except socket.timeout as e:
|
||||
except socket.timeout:
|
||||
self.logger.debug("client timed out", exc_info=True)
|
||||
return REQUEST_TIMEOUT
|
||||
with self.Collection.acquire_lock("w", user):
|
||||
|
@ -862,7 +856,7 @@ class Application:
|
|||
self.logger.warning(
|
||||
"Bad PUT request on %r: %s", path, e, exc_info=True)
|
||||
return BAD_REQUEST
|
||||
except socket.timeout as e:
|
||||
except socket.timeout:
|
||||
self.logger.debug("client timed out", exc_info=True)
|
||||
return REQUEST_TIMEOUT
|
||||
with self.Collection.acquire_lock("w", user):
|
||||
|
@ -969,7 +963,7 @@ class Application:
|
|||
self.logger.warning(
|
||||
"Bad REPORT request on %r: %s", path, e, exc_info=True)
|
||||
return BAD_REQUEST
|
||||
except socket.timeout as e:
|
||||
except socket.timeout:
|
||||
self.logger.debug("client timed out", exc_info=True)
|
||||
return REQUEST_TIMEOUT
|
||||
with self.Collection.acquire_lock("r", user):
|
||||
|
|
|
@ -1353,7 +1353,7 @@ class Collection(BaseCollection):
|
|||
cache_hash, *content = pickle.load(f)
|
||||
if cache_hash == input_hash:
|
||||
uid, etag, text, name, tag, start, end = content
|
||||
except FileNotFoundError as e:
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
except (pickle.UnpicklingError, ValueError) as e:
|
||||
self.logger.warning(
|
||||
|
|
|
@ -315,6 +315,25 @@ class BaseRequestsMixIn:
|
|||
status, _, _ = self.request("GET", path2)
|
||||
assert status == 200
|
||||
|
||||
def test_move_between_colections(self):
|
||||
"""Move a item."""
|
||||
status, _, _ = self.request("MKCALENDAR", "/calendar1.ics/")
|
||||
assert status == 201
|
||||
status, _, _ = self.request("MKCALENDAR", "/calendar2.ics/")
|
||||
assert status == 201
|
||||
event = get_file_content("event1.ics")
|
||||
path1 = "/calendar1.ics/event1.ics"
|
||||
path2 = "/calendar2.ics/event2.ics"
|
||||
status, _, _ = self.request("PUT", path1, event)
|
||||
assert status == 201
|
||||
status, _, _ = self.request(
|
||||
"MOVE", path1, HTTP_DESTINATION=path2, HTTP_HOST="")
|
||||
assert status == 201
|
||||
status, _, _ = self.request("GET", path1)
|
||||
assert status == 404
|
||||
status, _, _ = self.request("GET", path2)
|
||||
assert status == 200
|
||||
|
||||
def test_head(self):
|
||||
status, _, _ = self.request("HEAD", "/")
|
||||
assert status == 302
|
||||
|
|
2
rights
2
rights
|
@ -7,7 +7,7 @@
|
|||
# The path can be specified in the rights section of the configuration file
|
||||
#
|
||||
# Some examples are included in Radicale's documentation, see:
|
||||
# http://radicale.org/rights/
|
||||
# https://radicale.org/2.1.html#documentation/authentication-and-rights
|
||||
#
|
||||
# This file gives independant examples to help users write their own
|
||||
# configuration files. Using these examples together in the same configuration
|
||||
|
|
8
setup.py
8
setup.py
|
@ -31,7 +31,7 @@ and Android clients. It is free and open-source software, released under GPL
|
|||
version 3.
|
||||
|
||||
For further information, please visit the `Radicale Website
|
||||
<http://www.radicale.org/>`_.
|
||||
<https://radicale.org/>`_.
|
||||
|
||||
"""
|
||||
|
||||
|
@ -41,7 +41,7 @@ from setuptools import setup
|
|||
|
||||
# When the version is updated, a new section in the NEWS.md file must be
|
||||
# added too.
|
||||
VERSION = "2.1.10"
|
||||
VERSION = "2.1.12"
|
||||
WEB_FILES = ["web/css/icon.png", "web/css/main.css", "web/fn.js",
|
||||
"web/index.html"]
|
||||
|
||||
|
@ -58,8 +58,8 @@ setup(
|
|||
long_description=__doc__,
|
||||
author="Guillaume Ayoub",
|
||||
author_email="guillaume.ayoub@kozea.fr",
|
||||
url="http://www.radicale.org/",
|
||||
download_url=("http://pypi.python.org/packages/source/R/Radicale/"
|
||||
url="https://radicale.org/",
|
||||
download_url=("https://pypi.python.org/packages/source/R/Radicale/"
|
||||
"Radicale-%s.tar.gz" % VERSION),
|
||||
license="GNU GPL v3",
|
||||
platforms="Any",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue