Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 May 2016 00:42:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 209878] textproc/py-sphinx: triggers AssertionError from py-Babel when SOURCE_DATE_EPOCH environment variable is set
Message-ID:  <bug-209878-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209878

            Bug ID: 209878
           Summary: textproc/py-sphinx: triggers AssertionError from
                    py-Babel when SOURCE_DATE_EPOCH environment variable
                    is set
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: kmoore@FreeBSD.org
          Reporter: emaste@freebsd.org
          Assignee: kmoore@FreeBSD.org
             Flags: maintainer-feedback?(kmoore@FreeBSD.org)

Setting SOURCE_DATE_EPOCH to a specific timestamp (for reproducible builds)
triggers an assertion failure from py-Babel, like so (py27-pip-8.0.2.log):

preparing documents... Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 88, in <module>
    cmdclass=3D{'test': PyTest},
  File "/usr/local/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_comma=
nds
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_comma=
nd
    cmd_obj.run()
  File "/usr/local/lib/python2.7/site-packages/sphinx/setup_command.py", li=
ne
164, in run
    app.build(force_all=3Dself.all_files)
  File "/usr/local/lib/python2.7/site-packages/sphinx/application.py", line
281, in build
    self.builder.build_all()
  File "/usr/local/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 211, in build_all
    self.build(None, summary=3D'all source files', method=3D'all')
  File "/usr/local/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 322, in build
    self.write(docnames, list(updated_docnames), method)
  File "/usr/local/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 349, in write
    self.prepare_writing(docnames)
  File "/usr/local/lib/python2.7/site-packages/sphinx/builders/html.py", li=
ne
297, in prepare_writing
    warn=3Dself.warn)
  File "/usr/local/lib/python2.7/site-packages/sphinx/util/i18n.py", line 2=
21,
in format_date
    formatter=3Dfunction))
  File "/usr/local/lib/python2.7/site-packages/sphinx/util/i18n.py", line 1=
70,
in babel_format_date
    return formatter(date, format, locale=3Dlocale)
  File "/usr/local/lib/python2.7/site-packages/babel/dates.py", line 686, in
format_date
    return pattern.apply(date, locale)
  File "/usr/local/lib/python2.7/site-packages/babel/dates.py", line 1208, =
in
apply
    return self % DateTimeFormat(datetime, locale)
  File "/usr/local/lib/python2.7/site-packages/babel/dates.py", line 1214, =
in
__init__
    assert isinstance(value, (date, datetime, time))
AssertionError
*** Error code 1

This is because sphinx/util/i18n.py has:
            date =3D gmtime(float(source_date_epoch))
while babel expects a datetime

Fixed upstream here:
https://github.com/sphinx-doc/sphinx/commit/7a89015a5466412597b9a0157c0ab1a=
f1914a81a

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209878-13>