Code Repositories xandikos / upstream/0.0.11
Import upstream version 0.0.11, md5 a7450ddda4fcf40f6ceef20a4bfeddfa Jelmer Vernooij 1 year, 11 months ago
17 changed file(s) with 48 addition(s) and 46 deletion(s). Raw diff Collapse all Expand all
44 apt:
55 update: true
66 python:
7 - 3.3
87 - 3.4
98 - 3.5
109 - 3.6
0 The goal of Xandikos is to be a simple CalDAV/CardDAV server for personal use:
1
2 * easy to set up
3 * use of plain .ics/.vcf files for storage
4 * history stored in Git
5 * clear separation between protocol implementation and storage
6 * well tested
7 * standards complete
8 * standards compliant
1313 $(PYTHON) -m unittest $(TESTSUITE)
1414
1515 style:
16 flake8 --exclude=compat/vdirsyncer/,.tox,compat/ccs-caldavtester
16 flake8
1717
1818 web:
1919 $(PYTHON) -m xandikos.web
00 Metadata-Version: 1.1
11 Name: xandikos
2 Version: 0.0.10
2 Version: 0.0.11
33 Summary: Lightweight CalDAV/CardDAV server
44 Home-page: https://www.xandikos.org/
55 Author: Jelmer Vernooij
7474 Dependencies
7575 ============
7676
77 At the moment, Xandikos supports Python 3.3 and higher as well as Pypy 3. It
77 At the moment, Xandikos supports Python 3.4 and higher as well as Pypy 3. It
7878 also uses `Dulwich <https://github.com/jelmer/dulwich>`_,
7979 `Jinja2 <http://jinja.pocoo.org/>`_,
8080 `icalendar <https://github.com/collective/icalendar>`_, and
182182 Platform: UNKNOWN
183183 Classifier: Development Status :: 4 - Beta
184184 Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
185 Classifier: Programming Language :: Python :: 3.3
186185 Classifier: Programming Language :: Python :: 3.4
187186 Classifier: Programming Language :: Python :: 3.5
188187 Classifier: Programming Language :: Python :: 3.6
6666 Dependencies
6767 ============
6868
69 At the moment, Xandikos supports Python 3.3 and higher as well as Pypy 3. It
69 At the moment, Xandikos supports Python 3.4 and higher as well as Pypy 3. It
7070 also uses `Dulwich <https://github.com/jelmer/dulwich>`_,
7171 `Jinja2 <http://jinja.pocoo.org/>`_,
7272 `icalendar <https://github.com/collective/icalendar>`_, and
00 environment:
11
22 matrix:
3
4 - PYTHON: "C:\\Python33"
5 PYTHON_VERSION: "3.3.x"
6 PYTHON_ARCH: "32"
73
84 - PYTHON: "C:\\Python34"
95 PYTHON_VERSION: "3.4.x"
0 [flake8]
1 ignore = W504
2 exclude = compat/vdirsyncer/,.tox,compat/ccs-caldavtester,.git
3 application-package-names = xandikos
4
05 [egg_info]
16 tag_build =
27 tag_date = 0
2222 from setuptools import find_packages, setup
2323 import sys
2424
25 version = "0.0.10"
25 version = "0.0.11"
2626
2727 if sys.platform != 'win32':
2828 # Win32 setup breaks on non-ascii characters
3030 else:
3131 author = "Jelmer Vernooij"
3232
33 with open('README.rst') as f:
33 with open('README.rst', encoding='utf-8') as f:
3434 long_description = f.read()
3535
3636 setup(name="xandikos",
5454 classifiers=[
5555 'Development Status :: 4 - Beta',
5656 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', # noqa
57 'Programming Language :: Python :: 3.3',
5857 'Programming Language :: Python :: 3.4',
5958 'Programming Language :: Python :: 3.5',
6059 'Programming Language :: Python :: 3.6',
66 recreate = True
77 whitelist_externals = make
88
9 [flake8]
10 # E731: Use a def instead of lambda expr
11 ignore = E731
12 application-package-names = xandikos
9
2020
2121 """CalDAV/CardDAV server."""
2222
23 __version__ = (0, 0, 10)
23 __version__ = (0, 0, 11)
2424 version_string = '.'.join(map(str, __version__))
2525
2626 import defusedxml.ElementTree # noqa: This does some monkey-patching on-load
575575 tz = get_pytz_from_text(tztext)
576576 else:
577577 tz = get_calendar_timezone(base_resource)
578 tzify = lambda dt: as_tz_aware_ts(dt, tz)
578
579 def tzify(dt):
580 return as_tz_aware_ts(dt, tz)
579581 for (href, resource) in webdav.traverse_resource(
580582 base_resource, base_href, depth):
581583 try:
919921 else:
920922 raise AssertionError("unexpected XML element")
921923 tz = get_calendar_timezone(base_resource)
922 tzify = lambda dt: as_tz_aware_ts(dt, tz).astimezone(pytz.utc)
924
925 def tzify(dt):
926 return as_tz_aware_ts(dt, tz).astimezone(pytz.utc)
923927 (start, end) = _parse_time_range(requested)
924928 assert start.tzinfo
925929 assert end.tzinfo
155155 old_component.name.upper() == "VTODO" and
156156 field.upper() == "STATUS"
157157 ):
158 human_readable = {
159 "NEEDS-ACTION": "needing action",
160 "COMPLETED": "complete",
161 "CANCELLED": "cancelled"}
162 yield "%s marked as %s" % (
163 description,
164 human_readable.get(new_value.upper(), new_value))
158 if new_value is None:
159 yield "status of %s deleted" % description
160 else:
161 human_readable = {
162 "NEEDS-ACTION": "needing action",
163 "COMPLETED": "complete",
164 "CANCELLED": "cancelled"}
165 yield "%s marked as %s" % (
166 description,
167 human_readable.get(new_value.upper(), new_value))
165168 elif field.upper() == 'DESCRIPTION':
166169 yield "changed description of %s" % description
167170 elif field.upper() == 'SUMMARY':
5252 from dulwich.pack import SHA1Writer
5353 import dulwich.repo
5454
55 _DEFAULT_COMMITTER_IDENTITY = b'Xandikos <xandikos>'
5655 DEFAULT_ENCODING = 'utf-8'
5756
5857
451450 return cls(dulwich.repo.MemoryRepo())
452451
453452 def _commit_tree(self, tree_id, message, author=None):
454 try:
455 committer = self.repo._get_user_identity()
456 except KeyError:
457 committer = _DEFAULT_COMMITTER_IDENTITY
458453 return self.repo.do_commit(message=message, tree=tree_id, ref=self.ref,
459 committer=committer, author=author)
454 author=author)
460455
461456 def _import_one(self, name, data, message, author=None):
462457 """Import a single object.
545540
546541 def _commit_tree(self, index, message, author=None):
547542 tree = index.commit(self.repo.object_store)
548 try:
549 committer = self.repo._get_user_identity()
550 except KeyError:
551 committer = _DEFAULT_COMMITTER_IDENTITY
552 return self.repo.do_commit(message=message, committer=committer,
553 author=author, tree=tree)
543 return self.repo.do_commit(message=message, author=author, tree=tree)
554544
555545 def _import_one(self, name, data, message, author=None):
556546 """Import a single object.
295295 def test_import_only_once(self):
296296 gc = self.create_store()
297297 (name1, etag1) = gc.import_one('foo.ics', 'text/calendar',
298 [EXAMPLE_VCALENDAR1])
298 [EXAMPLE_VCALENDAR1])
299299 (name2, etag2) = gc.import_one('foo.ics', 'text/calendar',
300 [EXAMPLE_VCALENDAR1])
300 [EXAMPLE_VCALENDAR1])
301301 self.assertEqual(name1, name2)
302302 self.assertEqual(etag1, etag2)
303303 walker = gc.repo.get_walker(include=[gc.repo.refs[gc.ref]])
17831783 method = environ['REQUEST_METHOD']
17841784 try:
17851785 do = self.methods[method]
1786 except KeyError as e:
1786 except KeyError:
17871787 return _send_method_not_allowed(environ, start_response,
17881788 self._get_allowed_methods(environ))
17891789 try:
17981798 start_response('415 Unsupported Media Type', [])
17991799 return [('Unsupported media type %r' % e.content_type)
18001800 .encode(DEFAULT_ENCODING)]
1801 except UnauthorizedError as e:
1801 except UnauthorizedError:
18021802 start_response('401 Unauthorized', [])
18031803 return [('Please login.'.encode(DEFAULT_ENCODING))]
00 Metadata-Version: 1.1
11 Name: xandikos
2 Version: 0.0.10
2 Version: 0.0.11
33 Summary: Lightweight CalDAV/CardDAV server
44 Home-page: https://www.xandikos.org/
55 Author: Jelmer Vernooij
7474 Dependencies
7575 ============
7676
77 At the moment, Xandikos supports Python 3.3 and higher as well as Pypy 3. It
77 At the moment, Xandikos supports Python 3.4 and higher as well as Pypy 3. It
7878 also uses `Dulwich <https://github.com/jelmer/dulwich>`_,
7979 `Jinja2 <http://jinja.pocoo.org/>`_,
8080 `icalendar <https://github.com/collective/icalendar>`_, and
182182 Platform: UNKNOWN
183183 Classifier: Development Status :: 4 - Beta
184184 Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
185 Classifier: Programming Language :: Python :: 3.3
186185 Classifier: Programming Language :: Python :: 3.4
187186 Classifier: Programming Language :: Python :: 3.5
188187 Classifier: Programming Language :: Python :: 3.6
66 CONTRIBUTING.rst
77 COPYING
88 Dockerfile
9 GOALS.rst
910 MANIFEST.in
1011 Makefile
1112 README.rst
1213 TODO
1314 appveyor.yml
15 setup.cfg
1416 setup.py
1517 tox.ini
1618 xandikos.1