1. Georg Brandl
  2. sphinx


Georg Brandl  committed cba4d96

Fix #80: use string.ascii_* constants in case locale.setlocale() is
somehow called which then leads to UnicodeErrors.

  • Participants
  • Parent commits e3f4552
  • Branches default

Comments (0)

Files changed (2)

File sphinx/directives/desc.py

View file
     # add cross-ref nodes for all words
     for part in filter(None, wsplit_re.split(ctype)):
         tnode = nodes.Text(part, part)
-        if part[0] in string.letters+'_' and part not in stopwords:
+        if part[0] in string.ascii_letters+'_' and part not in stopwords:
             pnode = addnodes.pending_xref(
                 '', reftype='ctype', reftarget=part, modname=None, classname=None)
             pnode += tnode

File sphinx/environment.py

View file
 import cPickle as pickle
 from os import path
 from glob import glob
-from string import uppercase
+from string import ascii_uppercase as uppercase
 from itertools import izip, groupby
     import hashlib