[Python-apps-team] Bug#908497: khal: diff for NMU version 1:0.9.10-0.1
Jonas Smedegaard
dr at jones.dk
Thu Dec 13 14:46:09 GMT 2018
Control: tags 908497 + patch
Control: tags 908497 + pending
Dear maintainer,
I've prepared an NMU for khal (versioned as 1:0.9.10-0.1) and
uploaded it directly to NEW (since it affected an RC bug for some time
blocking the transition of a range of other packages by now.
I notice it has been some time since your last upload.
Please do tell if you are tired of maintaining this, and would be
interested in me either joining as co-maintainer or perhaps even take
over maintenance.
Regards,
- Jonas
diff -Nru khal-0.9.8/CHANGELOG.rst khal-0.9.10/CHANGELOG.rst
--- khal-0.9.8/CHANGELOG.rst 2017-10-05 23:19:47.000000000 +0200
+++ khal-0.9.10/CHANGELOG.rst 2018-10-09 18:01:22.000000000 +0200
@@ -7,6 +7,18 @@
may want to subscribe to `GitHub's tag feed
<https://github.com/geier/khal/tags.atom>`_.
+0.9.10
+======
+released 2018-010-09
+
+* Dependencies: dateutil 2.7 supported now
+
+0.9.9
+=====
+released 2018-05-26
+
+* Dependencies: only dateutil < 2.7 is supported (and always has been)
+
0.9.8
=====
released 2017-10-05
diff -Nru khal-0.9.8/debian/changelog khal-0.9.10/debian/changelog
--- khal-0.9.8/debian/changelog 2017-12-11 16:01:18.000000000 +0100
+++ khal-0.9.10/debian/changelog 2018-12-13 15:39:05.000000000 +0100
@@ -1,3 +1,15 @@
+khal (1:0.9.10-0.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+
+ [ Jonas Smedegaard ]
+ * New upstream version 0.9.6.1
+ Closes: Bug#908497. Thanks to Paul Gevers and Adrian Bunk.
+ * Unfuzz patch 0007.
+ * Add patch 0008 to fix pass categories as list in test.
+
+ -- Jonas Smedegaard <dr at jones.dk> Thu, 13 Dec 2018 15:39:05 +0100
+
khal (1:0.9.8-1) unstable; urgency=medium
* New upstream version
diff -Nru khal-0.9.8/debian/patches/0007-Workaround-test-of-stdin-input.patch khal-0.9.10/debian/patches/0007-Workaround-test-of-stdin-input.patch
--- khal-0.9.8/debian/patches/0007-Workaround-test-of-stdin-input.patch 2017-12-11 15:02:53.000000000 +0100
+++ khal-0.9.10/debian/patches/0007-Workaround-test-of-stdin-input.patch 2018-12-13 13:39:08.000000000 +0100
@@ -11,7 +11,7 @@
index 9c98899..140455e 100644
--- a/tests/cli_test.py
+++ b/tests/cli_test.py
-@@ -495,6 +495,7 @@ def test_import_invalid_choice_and_prefix(runner):
+@@ -497,6 +497,7 @@ def test_import_invalid_choice_and_prefix(runner):
assert result.output == '09.04.-09.04. An Event\n'
@@ -19,7 +19,7 @@
def test_import_from_stdin(runner):
ics_data = 'This is some really fake icalendar data'
-@@ -677,6 +678,7 @@ def test_print_ics_command(runner):
+@@ -681,6 +682,7 @@ def test_print_ics_command(runner):
assert 24 == len(result.output.split('\t'))
diff -Nru khal-0.9.8/debian/patches/0008_pass-categories-as-list.patch khal-0.9.10/debian/patches/0008_pass-categories-as-list.patch
--- khal-0.9.8/debian/patches/0008_pass-categories-as-list.patch 1970-01-01 01:00:00.000000000 +0100
+++ khal-0.9.10/debian/patches/0008_pass-categories-as-list.patch 2018-12-13 15:38:02.000000000 +0100
@@ -0,0 +1,17 @@
+Description: fix pass categories as list in test
+Author: Jonas Smedegaard <dr at jones.dk>
+Bug: https://github.com/pimutils/khal/issues/825
+Last-Update: 2018-12-13
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/tests/utils_test.py
++++ b/tests/utils_test.py
+@@ -564,7 +564,7 @@
+ event = _construct_event(data_list.split(),
+ description='please describe the event',
+ location='in the office',
+- categories='boring meeting',
++ categories=['boring meeting'],
+ locale=LOCALE_BERLIN)
+ assert _replace_uid(event).to_ical() == vevent
+
diff -Nru khal-0.9.8/debian/patches/series khal-0.9.10/debian/patches/series
--- khal-0.9.8/debian/patches/series 2017-12-11 15:02:53.000000000 +0100
+++ khal-0.9.10/debian/patches/series 2018-12-13 15:20:41.000000000 +0100
@@ -4,3 +4,4 @@
0005-Avoid-privacy-breach-in-sphinx-doc.patch
0006-Timezone-tests-may-fail-due-to-older-pytz-with-newer.patch
0007-Workaround-test-of-stdin-input.patch
+0008_pass-categories-as-list.patch
diff -Nru khal-0.9.8/doc/source/news/khal099.rst khal-0.9.10/doc/source/news/khal099.rst
--- khal-0.9.8/doc/source/news/khal099.rst 1970-01-01 01:00:00.000000000 +0100
+++ khal-0.9.10/doc/source/news/khal099.rst 2018-10-09 18:01:22.000000000 +0200
@@ -0,0 +1,21 @@
+khal v0.9.9 released (dependency clarification)
+===============================================
+
+.. feed-entry::
+ :date: 2018-05-26
+
+`khal v0.9.9`_ (and previous version of khal) currently only support the
+dateutil library (that khal depends on) in versions < 2.7. The only change in
+khal v0.9.9 is updated dependency.
+
+If your OS already shipe dateutil >= 2.7, we recommend pipsi_ to install the
+latest version of khal.
+
+
+Get `khal v0.9.9`_ from this site, or from pypi_.
+
+
+.. _pypi: https://pypi.python.org/pypi/khal/
+.. _khal v0.9.9: https://lostpackets.de/khal/downloads/khal-0.9.9.tar.gz
+.. _pipsi: https://pypi.org/project/pipsi/
+
diff -Nru khal-0.9.8/doc/source/news.rst khal-0.9.10/doc/source/news.rst
--- khal-0.9.8/doc/source/news.rst 2017-10-05 23:19:47.000000000 +0200
+++ khal-0.9.10/doc/source/news.rst 2018-10-09 18:01:22.000000000 +0200
@@ -12,6 +12,7 @@
:title: khal news
:link: http://lostpackets.de/khal/
+ news/khal099
news/khal098
news/khal097
news/khal096
diff -Nru khal-0.9.8/khal/cli.py khal-0.9.10/khal/cli.py
--- khal-0.9.8/khal/cli.py 2017-10-05 23:19:29.000000000 +0200
+++ khal-0.9.10/khal/cli.py 2018-10-09 18:01:22.000000000 +0200
@@ -20,6 +20,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
import logging
+import os
import sys
import textwrap
from shutil import get_terminal_size
@@ -435,7 +436,11 @@
# Default to stdin:
if not ics:
ics_strs = (sys.stdin.read(),)
- sys.stdin = open('/dev/tty', 'r')
+ if not batch:
+ if os.path.isfile('/dev/tty'):
+ sys.stdin = open('/dev/tty', 'r')
+ else:
+ logger.warning('/dev/tty does not exist, importing might not work')
else:
ics_strs = (ics_file.read() for ics_file in ics)
@@ -523,7 +528,6 @@
else:
ics_str = sys.stdin.read()
name = 'stdin input'
- sys.stdin = open('/dev/tty', 'r')
controllers.print_ics(ctx.obj['conf'], name, ics_str, format)
except FatalError as error:
logger.fatal(error)
diff -Nru khal-0.9.8/khal/khalendar/utils.py khal-0.9.10/khal/khalendar/utils.py
--- khal-0.9.8/khal/khalendar/utils.py 2017-10-05 23:19:29.000000000 +0200
+++ khal-0.9.10/khal/khalendar/utils.py 2018-10-09 18:01:22.000000000 +0200
@@ -83,10 +83,23 @@
dtstart = vevent['DTSTART'].dt
if events_tz:
dtstart = dtstart.replace(tzinfo=None)
+ if events_tz and 'Z' not in rrule_param.to_ical().decode():
+ logger.warning(
+ "In event {}, DTSTART has a timezone, but UNTIL does not. This "
+ "might lead to errenous repeating instances (like missing the "
+ "last intended instance or adding an extra one)."
+ "".format(href))
+ elif not events_tz and 'Z' in rrule_param.to_ical().decode():
+ logger.warning(
+ "In event {}, DTSTART has no timezone, but UNTIL has one. This "
+ "might lead to errenous repeating instances (like missing the "
+ "last intended instance or adding an extra one)."
+ "".format(href))
rrule = dateutil.rrule.rrulestr(
rrule_param.to_ical().decode(),
- dtstart=dtstart
+ dtstart=dtstart,
+ ignoretz=True,
)
if rrule._until is None:
@@ -95,10 +108,9 @@
# if python can deal with larger datetime values yet and b) pytz
# doesn't know any larger transition times
rrule._until = datetime(2037, 12, 31)
- elif getattr(rrule._until, 'tzinfo', None):
- rrule._until = rrule._until \
- .astimezone(events_tz) \
- .replace(tzinfo=None)
+ elif events_tz and 'Z' in rrule_param.to_ical().decode():
+ rrule._until = pytz.UTC.localize(
+ rrule._until).astimezone(events_tz).replace(tzinfo=None)
rrule = map(sanitize_datetime, rrule)
diff -Nru khal-0.9.8/khal/ui/calendarwidget.py khal-0.9.10/khal/ui/calendarwidget.py
--- khal-0.9.8/khal/ui/calendarwidget.py 2017-10-05 23:19:29.000000000 +0200
+++ khal-0.9.10/khal/ui/calendarwidget.py 2018-10-09 18:01:22.000000000 +0200
@@ -619,8 +619,9 @@
if weeknumbers == 'right':
dnames.append('#w')
+ month_names_length = get_month_abbr_len()
dnames = urwid.Columns(
- [(4, urwid.Text(' '))] +
+ [(month_names_length, urwid.Text(' ' * month_names_length))] +
[(2, urwid.AttrMap(urwid.Text(name), 'dayname')) for name in dnames],
dividechars=1)
self.walker = CalendarWalker(
diff -Nru khal-0.9.8/khal/version.py khal-0.9.10/khal/version.py
--- khal-0.9.8/khal/version.py 2017-10-05 23:20:26.000000000 +0200
+++ khal-0.9.10/khal/version.py 2018-10-09 18:05:14.000000000 +0200
@@ -1,4 +1,4 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '0.9.8'
+version = '0.9.10'
diff -Nru khal-0.9.8/khal.egg-info/PKG-INFO khal-0.9.10/khal.egg-info/PKG-INFO
--- khal-0.9.8/khal.egg-info/PKG-INFO 2017-10-05 23:20:27.000000000 +0200
+++ khal-0.9.10/khal.egg-info/PKG-INFO 2018-10-09 18:05:14.000000000 +0200
@@ -1,12 +1,11 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: khal
-Version: 0.9.8
+Version: 0.9.10
Summary: A standards based terminal calendar
Home-page: http://lostpackets.de/khal/
Author: Christian Geier et. al.
Author-email: khal at lostpackets.de
License: Expat/MIT
-Description-Content-Type: UNKNOWN
Description: khal
====
.. image:: https://travis-ci.org/pimutils/khal.svg?branch=master
@@ -117,3 +116,4 @@
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Utilities
Classifier: Topic :: Communications
+Provides-Extra: proctitle
diff -Nru khal-0.9.8/khal.egg-info/SOURCES.txt khal-0.9.10/khal.egg-info/SOURCES.txt
--- khal-0.9.8/khal.egg-info/SOURCES.txt 2017-10-05 23:20:27.000000000 +0200
+++ khal-0.9.10/khal.egg-info/SOURCES.txt 2018-10-09 18:05:14.000000000 +0200
@@ -58,6 +58,7 @@
doc/source/news/khal096.rst
doc/source/news/khal097.rst
doc/source/news/khal098.rst
+doc/source/news/khal099.rst
doc/source/ystatic/.gitignore
doc/source/ytemplates/layout.html
doc/webpage/src/new_rss_url.rst
diff -Nru khal-0.9.8/PKG-INFO khal-0.9.10/PKG-INFO
--- khal-0.9.8/PKG-INFO 2017-10-05 23:20:27.000000000 +0200
+++ khal-0.9.10/PKG-INFO 2018-10-09 18:05:15.000000000 +0200
@@ -1,12 +1,11 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: khal
-Version: 0.9.8
+Version: 0.9.10
Summary: A standards based terminal calendar
Home-page: http://lostpackets.de/khal/
Author: Christian Geier et. al.
Author-email: khal at lostpackets.de
License: Expat/MIT
-Description-Content-Type: UNKNOWN
Description: khal
====
.. image:: https://travis-ci.org/pimutils/khal.svg?branch=master
@@ -117,3 +116,4 @@
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Utilities
Classifier: Topic :: Communications
+Provides-Extra: proctitle
diff -Nru khal-0.9.8/tests/cli_test.py khal-0.9.10/tests/cli_test.py
--- khal-0.9.8/tests/cli_test.py 2017-10-05 23:19:29.000000000 +0200
+++ khal-0.9.10/tests/cli_test.py 2018-10-09 18:01:22.000000000 +0200
@@ -373,6 +373,8 @@
assert not result.exception
+# "see #810"
+ at pytest.mark.xfail
def test_repeating(runner):
runner = runner(default_command='list', days=2)
now = datetime.datetime.now().strftime('%d.%m.%Y')
@@ -651,8 +653,10 @@
# Non existing file
result = runner.invoke(main_khal, ['printics', 'nonexisting_file'])
assert result.exception
- assert 'Error: Invalid value for "ics": Could not open file: ' \
- in result.output
+ assert ('Error: Invalid value for "ics": Could not open file: ' \
+ in result.output or \
+ 'Error: Invalid value for "[ICS]": Could not open file:' \
+ in result.output)
# Run on test files
result = runner.invoke(main_khal, ['printics', _get_ics_filepath('cal_d')])
@@ -681,7 +685,7 @@
runner = runner(command='printics')
result = runner.invoke(main_khal, ['printics'], input=_get_text('cal_d'))
assert not result.exception
- assert result.output == '1 events found in stdin input\n An Event\n'
+ assert '1 events found in stdin input\n An Event\n' in result.output
def test_configure_command_config_exists(runner):
diff -Nru khal-0.9.8/tox.ini khal-0.9.10/tox.ini
--- khal-0.9.8/tox.ini 2017-04-08 01:18:22.000000000 +0200
+++ khal-0.9.10/tox.ini 2018-10-09 18:01:22.000000000 +0200
@@ -20,7 +20,7 @@
pytest-cov
pytest-capturelog
freezegun
- vdirsyncer
+ vdirsyncer<0.17.0
pytz201702: pytz==2017.2
pytz201610: pytz==2016.10
More information about the Python-apps-team
mailing list