[Python-apps-team] Bug#787591: python-pelican: datetime comparison error when WITH_FUTURE_DATES = False

Christian 'Greek0' Aichinger Greek0 at gmx.net
Wed Jun 3 07:35:01 UTC 2015


Package: python-pelican
Version: 3.5.0-1
Severity: normal
Control: found -1 3.5.0-1~bpo8+1

Dear Maintainers,

when WITH_FUTURE_DATES is set to False to enable scheduling of posts in
the future, articles and pages will fail with the following error:

DEBUG: Read file blog/2006-08-05_secure_unison.md -> Article
ERROR: Could not process blog/2006-08-05_secure_unison.md
  | can't compare offset-naive and offset-aware datetimes
  |___
  | Traceback (most recent call last):
  |   File "/usr/lib/python2.7/dist-packages/pelican/generators.py", line 502, in generate_context
  |     context_sender=self)
  |   File "/usr/lib/python2.7/dist-packages/pelican/readers.py", line 492, in read_file
  |     context=context)
  |   File "/usr/lib/python2.7/dist-packages/pelican/contents.py", line 136, in __init__
  |     if hasattr(self, 'date') and self.date > SafeDatetime.now():
  | TypeError: can't compare offset-naive and offset-aware datetimes

This bug has been reported upstream in issue 1536[1] and has a patch in
PR 1525[2], which has already been merged in master. Applying this patch
to my installation fixed the problem for me.

Note: I'm using BPO version 3.5.0-1~bpo8+1, but this bug report applies
to testing/unstable as well. Once this fix has propagated to testing, it
would be great if it could be applied to the BPO version as well.

Cheers,
Chris

[1]: https://github.com/getpelican/pelican/issues/1536
[2]: https://github.com/getpelican/pelican/pull/1525


-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages python-pelican depends on:
ii  python                2.7.9-1
ii  python-blinker        1.3.dfsg2-1
ii  python-dateutil       2.2-2
ii  python-docutils       0.12+dfsg-1
ii  python-feedgenerator  1.7-1
ii  python-jinja2         2.7.3-1
ii  python-markdown       2.5.1-2
ii  python-pkg-resources  5.5.1-1
ii  python-pygments       2.0.1+dfsg-1.1
ii  python-six            1.8.0-1
ii  python-tz             2012c+dfsg-0.1
ii  python-unidecode      0.04.16-1

python-pelican recommends no packages.

Versions of packages python-pelican suggests:
pn  pandoc      <none>
pn  python-bs4  <none>

-- no debconf information



More information about the Python-apps-team mailing list