[Python-modules-commits] [sphinx] 12/17: merge patched into master

Dmitry Shachnev mitya57 at moszumanska.debian.org
Wed Mar 2 07:30:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch master
in repository sphinx.

commit 33c50b237402db098b06577efda996acaf89cdd6
Merge: 45ff398 4cbb7fc
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Wed Mar 2 09:55:12 2016 +0300

    merge patched into master

 CHANGES                                            |  33 +++++-
 PKG-INFO                                           |   2 +-
 Sphinx.egg-info/PKG-INFO                           |   2 +-
 debian/.git-dpm                                    |   6 +-
 debian/patches/disable_distribute_setup.diff       |   2 +-
 debian/patches/disable_js_version_check.diff       |   2 +-
 debian/patches/no_external_css.diff                |   2 +-
 debian/patches/no_snowballstemmer.diff             |   6 +-
 debian/patches/reproducible_grammar.diff           |   2 +-
 debian/patches/reproducible_inventory.diff         |   6 +-
 debian/patches/reproducible_js_locale.diff         |   2 +-
 debian/patches/reproducible_searchindex.diff       |   6 +-
 debian/patches/source_date_epoch.diff              |   2 +-
 doc/intl.rst                                       |  13 ++-
 doc/templating.rst                                 |   5 +
 sphinx/__init__.py                                 |   6 +-
 sphinx/application.py                              |   5 +-
 sphinx/builders/html.py                            |   4 +
 sphinx/cmdline.py                                  |   8 ++
 sphinx/domains/std.py                              |   3 +-
 sphinx/environment.py                              |  93 ++--------------
 sphinx/ext/autodoc.py                              |   9 +-
 sphinx/ext/mathbase.py                             |   7 +-
 sphinx/highlighting.py                             |   4 +-
 sphinx/io.py                                       | 121 +++++++++++++++++++++
 sphinx/quickstart.py                               |   5 +-
 sphinx/search/__init__.py                          |   2 +
 sphinx/themes/agogo/static/agogo.css_t             |  10 ++
 sphinx/themes/haiku/static/haiku.css_t             |   5 +
 sphinx/themes/scrolls/static/scrolls.css_t         |  10 ++
 sphinx/themes/traditional/static/traditional.css_t |  10 ++
 sphinx/transforms.py                               |  60 +++++-----
 sphinx/util/nodes.py                               |   5 +-
 sphinx/writers/html.py                             |   2 +-
 sphinx/writers/latex.py                            |  39 ++++---
 tests/roots/test-footnotes/bar.rst                 |   6 +
 tests/roots/test-footnotes/baz.rst                 |   6 +
 tests/roots/test-footnotes/index.rst               |   8 ++
 tests/test_build_html.py                           |  17 ++-
 tests/test_build_latex.py                          |  68 ++++++++++--
 tests/test_build_texinfo.py                        |   1 -
 tests/test_search.py                               |  13 +++
 42 files changed, 427 insertions(+), 191 deletions(-)

diff --cc debian/.git-dpm
index d711742,0000000..e978649
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- e3eb4d2564a7363dba6afb15e7ced1c952becec6
- e3eb4d2564a7363dba6afb15e7ced1c952becec6
- 65adc14434e705bdb8976d84b268ba564c112613
++4cbb7fc79efd57de674aa1cfd1fc3c0603e21969
++4cbb7fc79efd57de674aa1cfd1fc3c0603e21969
++cca571bd757bd9a1ab039154581b689c7986ee29
 +cca571bd757bd9a1ab039154581b689c7986ee29
 +sphinx_1.3.6.orig.tar.gz
 +62042abca05a28ae58ff840cac55f3bd56cca912
 +3682405
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/disable_distribute_setup.diff
index 0898c64,0000000..8d923f1
mode 100644,000000..100644
--- a/debian/patches/disable_distribute_setup.diff
+++ b/debian/patches/disable_distribute_setup.diff
@@@ -1,26 -1,0 +1,26 @@@
- From b54d76860843845f1c0ecbdfa951e748351e7dfa Mon Sep 17 00:00:00 2001
++From a4d87c5c456e3d239b848e11055c2846a134b27b Mon Sep 17 00:00:00 2001
 +From: Jakub Wilk <jwilk at debian.org>
 +Date: Thu, 8 Oct 2015 13:58:02 -0700
 +Subject: disable use of distribute_setup, which bootstraps distribute
 + installation
 +
 +Forwarded: not-needed
 +Last-Update: 2013-10-05
 +
 +Patch-Name: disable_distribute_setup.diff
 +---
 + setup.py | 1 +
 + 1 file changed, 1 insertion(+)
 +
 +diff --git a/setup.py b/setup.py
 +index 4ff6315..b556549 100644
 +--- a/setup.py
 ++++ b/setup.py
 +@@ -2,6 +2,7 @@
 + try:
 +     from setuptools import setup, find_packages
 + except ImportError:
 ++    raise
 +     import ez_setup
 +     ez_setup.use_setuptools()
 +     from setuptools import setup, find_packages
diff --cc debian/patches/disable_js_version_check.diff
index c63bd8a,0000000..af0071b
mode 100644,000000..100644
--- a/debian/patches/disable_js_version_check.diff
+++ b/debian/patches/disable_js_version_check.diff
@@@ -1,33 -1,0 +1,33 @@@
- From c6fe98b0b62d5d8cafad87bcd92f0924c0c016a2 Mon Sep 17 00:00:00 2001
++From 1b56971bebeb120bfedcac7060a5846fe8a6c580 Mon Sep 17 00:00:00 2001
 +From: Dmitry Shachnev <mitya57 at debian.org>
 +Date: Thu, 8 Oct 2015 13:58:04 -0700
 +Subject: disable a test that checks versions of JS libraries
 +
 +Forwarded: not-needed
 +Last-Update: 2015-04-10
 +
 +Patch-Name: disable_js_version_check.diff
 +---
 + tests/test_theming.py | 2 ++
 + 1 file changed, 2 insertions(+)
 +
 +diff --git a/tests/test_theming.py b/tests/test_theming.py
 +index 07787ec..5d9377a 100644
 +--- a/tests/test_theming.py
 ++++ b/tests/test_theming.py
 +@@ -11,6 +11,7 @@
 + 
 + import os
 + import zipfile
 ++import unittest
 + 
 + from sphinx.theming import Theme, ThemeError
 + 
 +@@ -57,6 +58,7 @@ def test_theme_api(app, status, warning):
 +     assert not os.path.exists(themedir)
 + 
 + 
 ++ at unittest.skip('In Debian we use packaged JS libraries')
 + @with_app(testroot='tocdepth')  # a minimal root
 + def test_js_source(app, status, warning):
 +     # Now sphinx provides non-minified JS files for jquery.js and underscore.js
diff --cc debian/patches/no_external_css.diff
index 6f6a4dc,0000000..94cd2a4
mode 100644,000000..100644
--- a/debian/patches/no_external_css.diff
+++ b/debian/patches/no_external_css.diff
@@@ -1,40 -1,0 +1,40 @@@
- From cf52d6a22f888d8223157df2994f2a2ab15f5b0c Mon Sep 17 00:00:00 2001
++From 54665241932b4214f93dbb143116df25e01077f7 Mon Sep 17 00:00:00 2001
 +From: Jakub Wilk <jwilk at debian.org>
 +Date: Thu, 8 Oct 2015 13:58:03 -0700
 +Subject: don't use CSS files hosted on external sites
 +
 +Forwarded: no
 +Last-Update: 2013-04-08
 +
 +Patch-Name: no_external_css.diff
 +---
 + doc/_themes/sphinx13/layout.html  | 2 --
 + sphinx/themes/pyramid/layout.html | 2 --
 + 2 files changed, 4 deletions(-)
 +
 +diff --git a/doc/_themes/sphinx13/layout.html b/doc/_themes/sphinx13/layout.html
 +index bf28cd0..f1caadc 100644
 +--- a/doc/_themes/sphinx13/layout.html
 ++++ b/doc/_themes/sphinx13/layout.html
 +@@ -14,8 +14,6 @@
 + {% block sidebar2 %}{% endblock %}
 + 
 + {% block extrahead %}
 +-    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,700'
 +-          rel='stylesheet' type='text/css' />
 + {{ super() }}
 + {%- if not embedded %}
 +     <style type="text/css">
 +diff --git a/sphinx/themes/pyramid/layout.html b/sphinx/themes/pyramid/layout.html
 +index 318a366..be95248 100644
 +--- a/sphinx/themes/pyramid/layout.html
 ++++ b/sphinx/themes/pyramid/layout.html
 +@@ -1,8 +1,6 @@
 + {%- extends "basic/layout.html" %}
 + 
 + {%- block extrahead %}
 +-<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton&subset=latin" type="text/css" media="screen" charset="utf-8" />
 +-<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin" type="text/css" media="screen" charset="utf-8" />
 + <!--[if lte IE 6]>
 + <link rel="stylesheet" href="{{ pathto('_static/ie6.css', 1) }}" type="text/css" media="screen" charset="utf-8" />
 + <![endif]-->
diff --cc debian/patches/no_snowballstemmer.diff
index 6acbac6,0000000..88a7d57
mode 100644,000000..100644
--- a/debian/patches/no_snowballstemmer.diff
+++ b/debian/patches/no_snowballstemmer.diff
@@@ -1,80 -1,0 +1,80 @@@
- From d60ce74116c0b031c7c4f93bc10e7cd8af67f296 Mon Sep 17 00:00:00 2001
++From a52f963bf824e4fbcfc1b1724ba00825d2a1c713 Mon Sep 17 00:00:00 2001
 +From: Dmitry Shachnev <mitya57 at debian.org>
 +Date: Thu, 8 Oct 2015 13:58:05 -0700
 +Subject: do not support snowballstemmer-based search for now
 +
 +Forwarded: not-needed
 +Last-Update: 2015-05-08
 +
 +Patch-Name: no_snowballstemmer.diff
 +---
 + Sphinx.egg-info/requires.txt |  1 -
 + setup.py                     |  1 -
 + sphinx/search/__init__.py    | 14 --------------
 + tests/run.py                 |  2 +-
 + 4 files changed, 1 insertion(+), 17 deletions(-)
 +
 +diff --git a/Sphinx.egg-info/requires.txt b/Sphinx.egg-info/requires.txt
 +index 8b45115..936c824 100644
 +--- a/Sphinx.egg-info/requires.txt
 ++++ b/Sphinx.egg-info/requires.txt
 +@@ -2,7 +2,6 @@ six>=1.4
 + Jinja2>=2.3
 + Pygments>=2.0
 + docutils>=0.11
 +-snowballstemmer>=1.1
 + babel>=1.3,!=2.0
 + alabaster>=0.7,<0.8
 + sphinx_rtd_theme>=0.1,<2.0
 +diff --git a/setup.py b/setup.py
 +index b556549..e656779 100644
 +--- a/setup.py
 ++++ b/setup.py
 +@@ -51,7 +51,6 @@ requires = [
 +     'Jinja2>=2.3',
 +     'Pygments>=2.0',
 +     'docutils>=0.11',
 +-    'snowballstemmer>=1.1',
 +     'babel>=1.3,!=2.0',
 +     'alabaster>=0.7,<0.8',
 +     'sphinx_rtd_theme>=0.1,<2.0',
 +diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py
- index 06b8351..648abd8 100644
++index e4b3169..9e770c0 100644
 +--- a/sphinx/search/__init__.py
 ++++ b/sphinx/search/__init__.py
- @@ -119,22 +119,8 @@ def parse_stop_word(source):
++@@ -120,22 +120,8 @@ def parse_stop_word(source):
 + 
 + # maps language name to module.class or directly a class
 + languages = {
 +-    'da': 'sphinx.search.da.SearchDanish',
 +-    'de': 'sphinx.search.de.SearchGerman',
 +     'en': SearchEnglish,
 +-    'es': 'sphinx.search.es.SearchSpanish',
 +-    'fi': 'sphinx.search.fi.SearchFinnish',
 +-    'fr': 'sphinx.search.fr.SearchFrench',
 +-    'hu': 'sphinx.search.hu.SearchHungarian',
 +-    'it': 'sphinx.search.it.SearchItalian',
 +     'ja': 'sphinx.search.ja.SearchJapanese',
 +-    'nl': 'sphinx.search.nl.SearchDutch',
 +-    'no': 'sphinx.search.no.SearchNorwegian',
 +-    'pt': 'sphinx.search.pt.SearchPortuguese',
 +-    'ro': 'sphinx.search.ro.SearchRomanian',
 +-    'ru': 'sphinx.search.ru.SearchRussian',
 +-    'sv': 'sphinx.search.sv.SearchSwedish',
 +-    'tr': 'sphinx.search.tr.SearchTurkish',
 + }
 + 
 + 
 +diff --git a/tests/run.py b/tests/run.py
 +index b4bbf98..b9a198c 100755
 +--- a/tests/run.py
 ++++ b/tests/run.py
 +@@ -23,7 +23,7 @@ sys.path.insert(0, os.path.abspath(os.path.join(testroot, os.path.pardir)))
 + # check dependencies before testing
 + print('Checking dependencies...')
 + for modname in ('nose', 'mock', 'six', 'docutils', 'jinja2', 'pygments',
 +-                'snowballstemmer', 'babel'):
 ++                'babel'):
 +     try:
 +         __import__(modname)
 +     except ImportError as err:
diff --cc debian/patches/reproducible_grammar.diff
index d512861,0000000..3119e59
mode 100644,000000..100644
--- a/debian/patches/reproducible_grammar.diff
+++ b/debian/patches/reproducible_grammar.diff
@@@ -1,70 -1,0 +1,70 @@@
- From 74498a98e71d5fc9f703b6e6eb03423b14a06217 Mon Sep 17 00:00:00 2001
++From 2004e60dbeb61237e8563589af139c8a36e8693f Mon Sep 17 00:00:00 2001
 +From: Val Lorentz <progval at progval.net>
 +Date: Thu, 8 Oct 2015 13:58:13 -0700
 +Subject: make grammar generation deterministic
 +
 +Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
 +Last-Update: 2015-09-03
 +
 +Patch-Name: reproducible_grammar.diff
 +---
 + sphinx/pycode/pgen2/pgen.py | 18 ++++++++++++++----
 + 1 file changed, 14 insertions(+), 4 deletions(-)
 +
 +diff --git a/sphinx/pycode/pgen2/pgen.py b/sphinx/pycode/pgen2/pgen.py
 +index e199ed8..85a1bcc 100644
 +--- a/sphinx/pycode/pgen2/pgen.py
 ++++ b/sphinx/pycode/pgen2/pgen.py
 +@@ -4,6 +4,10 @@
 + from __future__ import print_function
 + 
 + from six import iteritems
 ++try:
 ++    from collections import OrderedDict
 ++except ImportError: # Fallback for Python 2.6
 ++    OrderedDict = dict
 + 
 + # Pgen imports
 + 
 +@@ -57,7 +61,7 @@ class ParserGenerator(object):
 +     def make_first(self, c, name):
 +         rawfirst = self.first[name]
 +         first = {}
 +-        for label in rawfirst:
 ++        for label in sorted(rawfirst):
 +             ilabel = self.make_label(c, label)
 +             ##assert ilabel not in first # X X X failed on <> ... !=
 +             first[ilabel] = 1
 +@@ -138,8 +142,8 @@ class ParserGenerator(object):
 +                 totalset[label] = 1
 +                 overlapcheck[label] = {label: 1}
 +         inverse = {}
 +-        for label, itsfirst in iteritems(overlapcheck):
 +-            for symbol in itsfirst:
 ++        for label, itsfirst in sorted(overlapcheck.items()):
 ++            for symbol in sorted(itsfirst):
 +                 if symbol in inverse:
 +                     raise ValueError("rule %s is ambiguous; %s is in the"
 +                                      " first sets of %s as well as %s" %
 +@@ -349,6 +353,9 @@ class NFAState(object):
 +         assert isinstance(next, NFAState)
 +         self.arcs.append((label, next))
 + 
 ++    def __hash__(self):
 ++        return hash(tuple(x[0] for x in self.arcs))
 ++
 + class DFAState(object):
 + 
 +     def __init__(self, nfaset, final):
 +@@ -357,7 +364,10 @@ class DFAState(object):
 +         assert isinstance(final, NFAState)
 +         self.nfaset = nfaset
 +         self.isfinal = final in nfaset
 +-        self.arcs = {} # map from label to DFAState
 ++        self.arcs = OrderedDict() # map from label to DFAState
 ++
 ++    def __hash__(self):
 ++        return hash(tuple(self.arcs))
 + 
 +     def addarc(self, next, label):
 +         assert isinstance(label, str)
diff --cc debian/patches/reproducible_inventory.diff
index 6ab3851,0000000..41789eb
mode 100644,000000..100644
--- a/debian/patches/reproducible_inventory.diff
+++ b/debian/patches/reproducible_inventory.diff
@@@ -1,26 -1,0 +1,26 @@@
- From f2449db5cbaf044e6cd278fd2329b479085824b8 Mon Sep 17 00:00:00 2001
++From f2eef5cb55647b10056327df4570ec6bef865725 Mon Sep 17 00:00:00 2001
 +From: Val Lorentz <progval at progval.net>
 +Date: Thu, 8 Oct 2015 13:58:14 -0700
 +Subject: make inventory generation deterministic
 +
 +Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
 +Last-Update: 2015-08-20
 +
 +Patch-Name: reproducible_inventory.diff
 +---
 + sphinx/builders/html.py | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
- index 8dcb905..e710571 100644
++index e247f33..a127a71 100644
 +--- a/sphinx/builders/html.py
 ++++ b/sphinx/builders/html.py
- @@ -830,7 +830,7 @@ class StandaloneHTMLBuilder(Builder):
++@@ -834,7 +834,7 @@ class StandaloneHTMLBuilder(Builder):
 +                      u'# The remainder of this file is compressed using zlib.\n'
 +                      % (self.config.project, self.config.version)).encode('utf-8'))
 +             compressor = zlib.compressobj(9)
 +-            for domainname, domain in iteritems(self.env.domains):
 ++            for domainname, domain in sorted(self.env.domains.items()):
 +                 for name, dispname, type, docname, anchor, prio in \
 +                         sorted(domain.get_objects()):
 +                     if anchor.endswith(name):
diff --cc debian/patches/reproducible_js_locale.diff
index 3883141,0000000..95909d5
mode 100644,000000..100644
--- a/debian/patches/reproducible_js_locale.diff
+++ b/debian/patches/reproducible_js_locale.diff
@@@ -1,26 -1,0 +1,26 @@@
- From 62e7a7827107b946e8382754ba0db6addc6c7896 Mon Sep 17 00:00:00 2001
++From 85db59f2663a83960b46455453952f50d2da2647 Mon Sep 17 00:00:00 2001
 +From: Val Lorentz <progval at progval.net>
 +Date: Thu, 8 Oct 2015 13:58:15 -0700
 +Subject: make JavaScript locale generation deterministic
 +
 +Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
 +Last-Update: 2015-08-20
 +
 +Patch-Name: reproducible_js_locale.diff
 +---
 + setup.py | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/setup.py b/setup.py
 +index e656779..6d48bc1 100644
 +--- a/setup.py
 ++++ b/setup.py
 +@@ -162,7 +162,7 @@ else:
 +                         messages=jscatalog,
 +                         plural_expr=catalog.plural_expr,
 +                         locale=str(catalog.locale)
 +-                    ), outfile)
 ++                    ), outfile, sort_keys=True)
 +                     outfile.write(');')
 +                 finally:
 +                     outfile.close()
diff --cc debian/patches/reproducible_searchindex.diff
index 261ca31,0000000..b3ecde8
mode 100644,000000..100644
--- a/debian/patches/reproducible_searchindex.diff
+++ b/debian/patches/reproducible_searchindex.diff
@@@ -1,29 -1,0 +1,29 @@@
- From e3eb4d2564a7363dba6afb15e7ced1c952becec6 Mon Sep 17 00:00:00 2001
++From 4cbb7fc79efd57de674aa1cfd1fc3c0603e21969 Mon Sep 17 00:00:00 2001
 +From: Val Lorentz <progval at progval.net>
 +Date: Thu, 8 Oct 2015 13:58:16 -0700
 +Subject: make searchindex generation deterministic
 +
 +Forwarded: https://github.com/sphinx-doc/sphinx/pull/2009
 +Last-Update: 2015-09-03
 +
 +Patch-Name: reproducible_searchindex.diff
 +---
 + sphinx/search/__init__.py | 4 ++--
 + 1 file changed, 2 insertions(+), 2 deletions(-)
 +
 +diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py
- index 648abd8..75acf25 100644
++index 9e770c0..e7656e7 100644
 +--- a/sphinx/search/__init__.py
 ++++ b/sphinx/search/__init__.py
- @@ -261,9 +261,9 @@ class IndexBuilder(object):
++@@ -262,9 +262,9 @@ class IndexBuilder(object):
 +         rv = {}
 +         otypes = self._objtypes
 +         onames = self._objnames
 +-        for domainname, domain in iteritems(self.env.domains):
 ++        for domainname, domain in sorted(iteritems(self.env.domains)):
 +             for fullname, dispname, type, docname, anchor, prio in \
 +-                    domain.get_objects():
 ++                    sorted(domain.get_objects()):
 +                 # XXX use dispname?
 +                 if docname not in fn2index:
 +                     continue
diff --cc debian/patches/source_date_epoch.diff
index af54ffa,0000000..7f1398e
mode 100644,000000..100644
--- a/debian/patches/source_date_epoch.diff
+++ b/debian/patches/source_date_epoch.diff
@@@ -1,44 -1,0 +1,44 @@@
- From 13405f9f1b9d97313e0fa24a8c2059f1b94f5853 Mon Sep 17 00:00:00 2001
++From d4b462f911079567e69d272c302644798bdbc6ec Mon Sep 17 00:00:00 2001
 +From: Dmitry Shachnev <mitya57 at gmail.com>
 +Date: Thu, 8 Oct 2015 13:58:08 -0700
 +Subject: add support for $SOURCE_DATE_EPOCH env variable
 +
 +Origin: upstream, https://github.com/sphinx-doc/sphinx/commit/71bac48e03d07f61
 +Last-Update: 2015-07-25
 +
 +Patch-Name: source_date_epoch.diff
 +---
 + sphinx/util/osutil.py | 15 +++++++++++----
 + 1 file changed, 11 insertions(+), 4 deletions(-)
 +
 +diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
 +index 70d5cf5..e1d29a9 100644
 +--- a/sphinx/util/osutil.py
 ++++ b/sphinx/util/osutil.py
 +@@ -151,15 +151,22 @@ no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
 + def make_filename(string):
 +     return no_fn_re.sub('', string) or 'sphinx'
 + 
 +-if PY2:
 ++
 ++def ustrftime(format, *args):
 +     # strftime for unicode strings
 +-    def ustrftime(format, *args):
 ++    if not args:
 ++        # If time is not specified, try to use $SOURCE_DATE_EPOCH variable
 ++        # See https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
 ++        source_date_epoch = os.getenv('SOURCE_DATE_EPOCH')
 ++        if source_date_epoch is not None:
 ++            time_struct = time.gmtime(float(source_date_epoch))
 ++            args = [time_struct]
 ++    if PY2:
 +         # if a locale is set, the time strings are encoded in the encoding
 +         # given by LC_TIME; if that is available, use it
 +         enc = locale.getlocale(locale.LC_TIME)[1] or 'utf-8'
 +         return time.strftime(text_type(format).encode(enc), *args).decode(enc)
 +-else:  # Py3
 +-    def ustrftime(format, *args):
 ++    else:  # Py3
 +         # On Windows, time.strftime() and Unicode characters will raise UnicodeEncodeError.
 +         # http://bugs.python.org/issue8304
 +         try:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinx.git



More information about the Python-modules-commits mailing list