Commits

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

Comments (0)

Files changed (2)

sphinx/directives/desc.py

     # 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

sphinx/environment.py

 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
 try:
     import hashlib