2620: GEPS 031: Python 3 support - 3.2
This does patch updates Gramps to the 3.2 syntax, it does not yet mean Gramps works with python 3.2 Expect next day commits to fix further issues, but this is the main 2to3 tool created patch changed where needed to have python 2.7 work. Specific issues might be: 1. next has been changed, must be checked 2. new division as on the wiki page listed is to do 3. ... svn: r20634
This commit is contained in:
@@ -26,7 +26,11 @@
|
||||
# Gramps Modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import cPickle
|
||||
import sys
|
||||
if sys.version_info[0] < 3:
|
||||
import cPickle as pickle
|
||||
else:
|
||||
import pickle
|
||||
import base64
|
||||
import time
|
||||
import re
|
||||
@@ -52,6 +56,7 @@ from ..lib.place import Place
|
||||
from ..lib.repo import Repository
|
||||
from ..lib.note import Note
|
||||
from ..lib.tag import Tag
|
||||
from ..constfunc import STRTYPE
|
||||
|
||||
class Cursor(object):
|
||||
"""
|
||||
@@ -264,7 +269,7 @@ class DictionaryDb(DbWriteBase, DbReadBase):
|
||||
|
||||
@staticmethod
|
||||
def _validated_id_prefix(val, default):
|
||||
if isinstance(val, basestring) and val:
|
||||
if isinstance(val, STRTYPE) and val:
|
||||
try:
|
||||
str_ = val % 1
|
||||
except TypeError: # missing conversion specifier
|
||||
|
||||
Reference in New Issue
Block a user