diff --git a/gramps/gen/datehandler/_dateparser.py b/gramps/gen/datehandler/_dateparser.py
index ce6e54afc..3ef821e4c 100644
--- a/gramps/gen/datehandler/_dateparser.py
+++ b/gramps/gen/datehandler/_dateparser.py
@@ -618,12 +618,11 @@ class DateParser:
y = self._get_int(groups[0])
m = self._get_int(groups[3])
d = self._get_int(groups[4])
- if check and not check((d, m, y)):
- return Date.EMPTY
- if groups[2]: # slash year digit
+ if groups[2] and julian_valid((d, m, y + 1)): # slash year digit
return (d, m, y + 1, True)
- else:
+ if check is None or check((d, m, y)):
return (d, m, y, False)
+ return Date.EMPTY
# Database datetime format, used in ex. MSSQL
# YYYYMMDD HH:MM:SS or YYYYMMDD or YYYYMMDDHHMMSS
diff --git a/gramps/gen/db/base.py b/gramps/gen/db/base.py
index d78a7624c..12e44233e 100644
--- a/gramps/gen/db/base.py
+++ b/gramps/gen/db/base.py
@@ -1385,7 +1385,7 @@ class DbReadBase:
def set_mediapath(self, path):
"""
- Set the default media path for database, path should be utf-8.
+ Set the default media path for database.
"""
raise NotImplementedError
diff --git a/gramps/gen/db/dummydb.py b/gramps/gen/db/dummydb.py
index cdd19b759..ebdf0c37e 100644
--- a/gramps/gen/db/dummydb.py
+++ b/gramps/gen/db/dummydb.py
@@ -67,6 +67,7 @@ from .base import DbReadBase
from .dbconst import DBLOGNAME
from ..errors import HandleError
from ..utils.callback import Callback
+from ..lib import Researcher
LOG = logging.getLogger(DBLOGNAME)
@@ -218,6 +219,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
Callback.__init__(self)
self.db_is_open = False
self.readonly = True
+ self.name_formats = []
self.bookmarks = Bookmarks()
self.family_bookmarks = Bookmarks()
self.event_bookmarks = Bookmarks()
@@ -227,6 +229,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
self.repo_bookmarks = Bookmarks()
self.media_bookmarks = Bookmarks()
self.note_bookmarks = Bookmarks()
+ self.owner = Researcher()
def get_feature(self, feature):
"""
@@ -526,7 +529,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_family_handles(self, sort_handles=False):
"""
@@ -670,7 +673,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_note_handles(self):
"""
@@ -782,7 +785,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_person_attribute_types(self):
"""
@@ -829,7 +832,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_person_handles(self, sort_handles=False):
"""
@@ -887,7 +890,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_place_handles(self, sort_handles=False):
"""
@@ -907,7 +910,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_family_data(self, handle):
"""
@@ -916,7 +919,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_note_data(self, handle):
"""
@@ -925,7 +928,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_media_data(self, handle):
"""
@@ -934,7 +937,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_person_data(self, handle):
"""
@@ -943,7 +946,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_place_data(self, handle):
"""
@@ -952,7 +955,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_repository_data(self, handle):
"""
@@ -961,7 +964,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_source_data(self, handle):
"""
@@ -970,7 +973,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_citation_data(self, handle):
"""
@@ -979,7 +982,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_raw_tag_data(self, handle):
"""
@@ -988,7 +991,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_repo_bookmarks(self):
"""
@@ -1026,7 +1029,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_repository_handles(self):
"""
@@ -1053,7 +1056,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
"""
if not self.db_is_open:
LOG.warning("database is closed")
- return None
+ return self.owner
def get_save_path(self):
"""
@@ -1097,7 +1100,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_source_handles(self, sort_handles=False):
"""
@@ -1155,7 +1158,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_citation_handles(self, sort_handles=False):
"""
@@ -1193,7 +1196,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
LOG.warning("handle %s does not exist in the dummy database", handle)
- raise HandleError('Handle %s not found' % handle.encode('utf-8'))
+ raise HandleError('Handle %s not found' % handle)
def get_tag_from_name(self, val):
"""
@@ -1611,7 +1614,7 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
def set_mediapath(self, path):
"""
- Set the default media path for database, path should be utf-8.
+ Set the default media path for database.
"""
if not self.db_is_open:
LOG.warning("database is closed")
diff --git a/gramps/gen/db/generic.py b/gramps/gen/db/generic.py
index 509325057..1d5332d28 100644
--- a/gramps/gen/db/generic.py
+++ b/gramps/gen/db/generic.py
@@ -1285,8 +1285,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
################################################################
def _get_from_handle(self, obj_key, obj_class, handle):
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle is None:
raise HandleError('Handle is None')
if not handle:
diff --git a/gramps/gen/filters/rules/test/event_rules_test.py b/gramps/gen/filters/rules/test/event_rules_test.py
index f158ee45d..010706996 100644
--- a/gramps/gen/filters/rules/test/event_rules_test.py
+++ b/gramps/gen/filters/rules/test/event_rules_test.py
@@ -81,7 +81,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['E0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0eb696917232725']))
+ set(['a5af0eb696917232725']))
def test_hasgallery(self):
"""
@@ -89,7 +89,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasGallery(['0', 'greater than'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0ecb107303354a0']))
+ set(['a5af0ecb107303354a0']))
def test_regexpidof(self):
"""
@@ -97,11 +97,11 @@ class BaseTest(unittest.TestCase):
"""
rule = RegExpIdOf(['E000.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'a5af0eb69cf2d3fb615', b'a5af0eb667015e355db',
- b'a5af0eb6a016da2d6d1', b'a5af0eb6a405acb126c',
- b'a5af0eb698f29568502', b'a5af0eb69b82a6cdc5a',
- b'a5af0eb69f41bfb5a6a', b'a5af0eb69c40c179441',
- b'a5af0eb6a3229544ba2', b'a5af0eb696917232725']))
+ 'a5af0eb69cf2d3fb615', 'a5af0eb667015e355db',
+ 'a5af0eb6a016da2d6d1', 'a5af0eb6a405acb126c',
+ 'a5af0eb698f29568502', 'a5af0eb69b82a6cdc5a',
+ 'a5af0eb69f41bfb5a6a', 'a5af0eb69c40c179441',
+ 'a5af0eb6a3229544ba2', 'a5af0eb696917232725']))
def test_hascitation(self):
"""
@@ -109,7 +109,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasCitation(['page 1', '', ''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0ecb107303354a0']))
+ set(['a5af0ecb107303354a0']))
def test_hasnote(self):
"""
@@ -117,7 +117,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasNote([])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0ecb11f5ac3110e']))
+ set(['a5af0ecb11f5ac3110e']))
def test_hasnoteregexp(self):
"""
@@ -125,7 +125,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasNoteRegexp(['.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0ecb11f5ac3110e']))
+ set(['a5af0ecb11f5ac3110e']))
def test_hasreferencecountof(self):
"""
@@ -133,8 +133,8 @@ class BaseTest(unittest.TestCase):
"""
rule = HasReferenceCountOf(['greater than', '1'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'cc8205d86fc4e9706a5', b'a5af0ed60de7a612b9e',
- b'cc820604ef05cb67907']))
+ 'cc8205d86fc4e9706a5', 'a5af0ed60de7a612b9e',
+ 'cc820604ef05cb67907']))
def test_hassourcecount(self):
"""
@@ -142,7 +142,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceCount(['1', 'greater than'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0ecb107303354a0']))
+ set(['a5af0ecb107303354a0']))
def test_eventprivate(self):
"""
@@ -157,7 +157,7 @@ class BaseTest(unittest.TestCase):
"""
rule = MatchesSourceConfidence(['2'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0ecb107303354a0']))
+ set(['a5af0ecb107303354a0']))
def test_hasattribute(self):
"""
@@ -165,7 +165,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasAttribute(['Cause', ''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a5af0ecb11f5ac3110e']))
+ set(['a5af0ecb11f5ac3110e']))
def test_hasdata(self):
"""
@@ -173,8 +173,8 @@ class BaseTest(unittest.TestCase):
"""
rule = HasData(['Burial', 'before 1800', 'USA', ''])
self.assertEqual(self.filter_with_rule(rule), set([
- b'a5af0ed4211095487d2', b'a5af0ed36793c1d3e05',
- b'a5af0ecfcc16ce7a96a']))
+ 'a5af0ed4211095487d2', 'a5af0ed36793c1d3e05',
+ 'a5af0ecfcc16ce7a96a']))
def test_changedsince(self):
"""
@@ -182,8 +182,8 @@ class BaseTest(unittest.TestCase):
"""
rule = ChangedSince(['2011-01-01', '2014-01-01'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'a5af0ecb107303354a0', b'a5af0ecb11f5ac3110e',
- b'a5af0ed5df832ee65c1']))
+ 'a5af0ecb107303354a0', 'a5af0ecb11f5ac3110e',
+ 'a5af0ed5df832ee65c1']))
def test_hastag(self):
"""
diff --git a/gramps/gen/filters/rules/test/family_rules_test.py b/gramps/gen/filters/rules/test/family_rules_test.py
index 2cce8d523..7b626e788 100644
--- a/gramps/gen/filters/rules/test/family_rules_test.py
+++ b/gramps/gen/filters/rules/test/family_rules_test.py
@@ -83,7 +83,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasGallery(['0', 'greater than'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_hasidof(self):
"""
@@ -91,7 +91,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['F0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'48TJQCGNNIR5SJRCAK']))
+ set(['48TJQCGNNIR5SJRCAK']))
def test_haslds(self):
"""
@@ -99,7 +99,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasLDS(['0', 'greater than'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_hasnote(self):
"""
@@ -107,7 +107,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasNote([])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_regexpidof(self):
"""
@@ -115,11 +115,11 @@ class BaseTest(unittest.TestCase):
"""
rule = RegExpIdOf(['F000.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'LOTJQC78O5B4WQGJRP', b'UPTJQC4VPCABZUDB75',
- b'NBTJQCIX49EKOCIHBP', b'C9UJQCF6ETBTV2MRRV',
- b'74UJQCKV8R4NBNHCB', b'4BTJQCL4CHNA5OUTKF',
- b'48TJQCGNNIR5SJRCAK', b'4YTJQCTEH7PQUU4AD',
- b'MTTJQC05LKVFFLN01A', b'd5839c123c034ef82ab',
+ 'LOTJQC78O5B4WQGJRP', 'UPTJQC4VPCABZUDB75',
+ 'NBTJQCIX49EKOCIHBP', 'C9UJQCF6ETBTV2MRRV',
+ '74UJQCKV8R4NBNHCB', '4BTJQCL4CHNA5OUTKF',
+ '48TJQCGNNIR5SJRCAK', '4YTJQCTEH7PQUU4AD',
+ 'MTTJQC05LKVFFLN01A', 'd5839c123c034ef82ab',
]))
def test_hasnoteregexp(self):
@@ -128,7 +128,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasNoteRegexp(['.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_hasreferencecountof(self):
"""
@@ -136,10 +136,10 @@ class BaseTest(unittest.TestCase):
"""
rule = HasReferenceCountOf(['greater than', '12'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'29IKQCMUNFTIBV653N', b'8OUJQCUVZ0XML7BQLF', b'UPTJQC4VPCABZUDB75',
- b'9NWJQCJGLXUR3AQSFJ', b'5G2KQCGBTS86UVSRG5', b'WG2KQCSY9LEFDFQHMN',
- b'MTTJQC05LKVFFLN01A', b'C2VJQC71TNHO7RBBMX', b'QIDKQCJQ37SIUQ3UFU',
- b'DV4KQCX9OBVQ74H77F']))
+ '29IKQCMUNFTIBV653N', '8OUJQCUVZ0XML7BQLF', 'UPTJQC4VPCABZUDB75',
+ '9NWJQCJGLXUR3AQSFJ', '5G2KQCGBTS86UVSRG5', 'WG2KQCSY9LEFDFQHMN',
+ 'MTTJQC05LKVFFLN01A', 'C2VJQC71TNHO7RBBMX', 'QIDKQCJQ37SIUQ3UFU',
+ 'DV4KQCX9OBVQ74H77F']))
def test_hassourcecount(self):
"""
@@ -147,7 +147,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceCount(['1', 'greater than'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_hassourceof(self):
"""
@@ -155,7 +155,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceOf(['S0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_hascitation(self):
"""
@@ -163,7 +163,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasCitation(['page 10', '', '2'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_familyprivate(self):
"""
@@ -178,8 +178,8 @@ class BaseTest(unittest.TestCase):
"""
rule = HasEvent(['Marriage', 'before 1900', 'USA', '', 'Garner'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'KSFKQCP4V0YXGM1LR9', b'8ZFKQC3FRSHACOJBOU', b'3XFKQCE7QUDJ99AVNV',
- b'OVFKQC51DX0OQUV3JB', b'9OUJQCBOHW9UEK9CNV']))
+ 'KSFKQCP4V0YXGM1LR9', '8ZFKQC3FRSHACOJBOU', '3XFKQCE7QUDJ99AVNV',
+ 'OVFKQC51DX0OQUV3JB', '9OUJQCBOHW9UEK9CNV']))
def test_hasattribute(self):
"""
@@ -187,7 +187,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasAttribute(['Number of Children', ''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_isbookmarked(self):
"""
@@ -195,7 +195,7 @@ class BaseTest(unittest.TestCase):
"""
rule = IsBookmarked([])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_matchessourceconfidence(self):
"""
@@ -211,7 +211,7 @@ class BaseTest(unittest.TestCase):
rule = FatherHasNameOf(['', '', 'Dr.', '', '', '', '', '', '', '',
''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_fatherhasidof(self):
"""
@@ -219,7 +219,7 @@ class BaseTest(unittest.TestCase):
"""
rule = FatherHasIdOf(['I0106'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'8OUJQCUVZ0XML7BQLF']))
+ set(['8OUJQCUVZ0XML7BQLF']))
def test_motherhasnameof(self):
"""
@@ -228,8 +228,8 @@ class BaseTest(unittest.TestCase):
rule = MotherHasNameOf(['', 'Alvarado', '', '', '', '', '', '', '', '',
''])
self.assertEqual(self.filter_with_rule(rule), set([
- b'EM3KQC48HFLA02TF8D', b'K9NKQCBG105ECXZ48D',
- b'2QMKQC5YWNAWZMG6VO', b'6JUJQCCAXGENRX990K']))
+ 'EM3KQC48HFLA02TF8D', 'K9NKQCBG105ECXZ48D',
+ '2QMKQC5YWNAWZMG6VO', '6JUJQCCAXGENRX990K']))
def test_motherhasidof(self):
"""
@@ -237,7 +237,7 @@ class BaseTest(unittest.TestCase):
"""
rule = MotherHasIdOf(['I0107'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'8OUJQCUVZ0XML7BQLF']))
+ set(['8OUJQCUVZ0XML7BQLF']))
def test_childhasnameof(self):
"""
@@ -246,9 +246,9 @@ class BaseTest(unittest.TestCase):
rule = ChildHasNameOf(['Eugene', '', '', '', '', '', '', '', '', '',
''])
self.assertEqual(self.filter_with_rule(rule), set([
- b'D1YJQCGLEIBPPLNL4B', b'5GTJQCXVYVAIQTBVKA', b'I42KQCM3S926FMJ91O',
- b'7CTJQCFJVBQSY076A6', b'9OUJQCBOHW9UEK9CNV', b'9IXJQCX18AHUFPQHEZ',
- b'9NWJQCJGLXUR3AQSFJ']))
+ 'D1YJQCGLEIBPPLNL4B', '5GTJQCXVYVAIQTBVKA', 'I42KQCM3S926FMJ91O',
+ '7CTJQCFJVBQSY076A6', '9OUJQCBOHW9UEK9CNV', '9IXJQCX18AHUFPQHEZ',
+ '9NWJQCJGLXUR3AQSFJ']))
def test_childhasidof(self):
"""
@@ -256,7 +256,7 @@ class BaseTest(unittest.TestCase):
"""
rule = ChildHasIdOf(['I0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'48TJQCGNNIR5SJRCAK']))
+ set(['48TJQCGNNIR5SJRCAK']))
def test_changedsince(self):
"""
@@ -264,7 +264,7 @@ class BaseTest(unittest.TestCase):
"""
rule = ChangedSince(['2008-01-01', '2014-01-01'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_hastag(self):
"""
@@ -272,7 +272,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasTag(['ToDo'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'9OUJQCBOHW9UEK9CNV']))
+ set(['9OUJQCBOHW9UEK9CNV']))
def test_hastwins(self):
"""
@@ -280,8 +280,8 @@ class BaseTest(unittest.TestCase):
"""
rule = HasTwins([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'SD6KQC7LB8MYGA7F5W', b'8OUJQCUVZ0XML7BQLF', b'1BVJQCNTFAGS8273LJ',
- b'5IUJQCRJY47YQ8PU7N', b'ZLUJQCPDV93OR8KHB7', b'4U2KQCBXG2VTPH6U1F',
+ 'SD6KQC7LB8MYGA7F5W', '8OUJQCUVZ0XML7BQLF', '1BVJQCNTFAGS8273LJ',
+ '5IUJQCRJY47YQ8PU7N', 'ZLUJQCPDV93OR8KHB7', '4U2KQCBXG2VTPH6U1F',
]))
def test_isancestorof(self):
@@ -290,10 +290,10 @@ class BaseTest(unittest.TestCase):
"""
rule = IsAncestorOf(['F0031', '0'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'4AXJQC96KTN3WGPTVE', b'1RUJQCYX9QL1V45YLD', b'5GTJQCXVYVAIQTBVKA',
- b'X3WJQCSF48F6809142', b'NSVJQC89IHEEBIPDP2', b'9OUJQCBOHW9UEK9CNV',
- b'1RUJQCCL9MVRYLMTBO', b'RRVJQC5A8DDHQFPRDL', b'0SUJQCOS78AXGWP8QR',
- b'57WJQCTBJKR5QYPS6K', b'8OUJQCUVZ0XML7BQLF', b'7PUJQC4PPS4EDIVMYE'
+ '4AXJQC96KTN3WGPTVE', '1RUJQCYX9QL1V45YLD', '5GTJQCXVYVAIQTBVKA',
+ 'X3WJQCSF48F6809142', 'NSVJQC89IHEEBIPDP2', '9OUJQCBOHW9UEK9CNV',
+ '1RUJQCCL9MVRYLMTBO', 'RRVJQC5A8DDHQFPRDL', '0SUJQCOS78AXGWP8QR',
+ '57WJQCTBJKR5QYPS6K', '8OUJQCUVZ0XML7BQLF', '7PUJQC4PPS4EDIVMYE'
]))
def test_isdescendantof(self):
@@ -302,11 +302,11 @@ class BaseTest(unittest.TestCase):
"""
rule = IsDescendantOf(['F0031', '0'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'SFXJQCLE8PIG7PH38J', b'UCXJQCC5HS8VXDKWBM', b'IIEKQCRX89WYBHKB7R',
- b'XDXJQCMWU5EIV8XCRF', b'7BXJQCU22OCA4HN38A', b'3FXJQCR749H2H7G321',
- b'IEXJQCFUN95VENI6BO', b'4FXJQC7656WDQ3HJGW', b'FLEKQCRVG3O1UA9YUB',
- b'BCXJQC9AQ0DBXCVLEQ', b'9SEKQCAAWRUCIO7A0M', b'DDXJQCVT5X72TOXP0C',
- b'CGXJQC515QL9RLPQTU', b'XGXJQCNVZH2PWRMVAH', b'RBXJQCUYMQR2KRMDFY'
+ 'SFXJQCLE8PIG7PH38J', 'UCXJQCC5HS8VXDKWBM', 'IIEKQCRX89WYBHKB7R',
+ 'XDXJQCMWU5EIV8XCRF', '7BXJQCU22OCA4HN38A', '3FXJQCR749H2H7G321',
+ 'IEXJQCFUN95VENI6BO', '4FXJQC7656WDQ3HJGW', 'FLEKQCRVG3O1UA9YUB',
+ 'BCXJQC9AQ0DBXCVLEQ', '9SEKQCAAWRUCIO7A0M', 'DDXJQCVT5X72TOXP0C',
+ 'CGXJQC515QL9RLPQTU', 'XGXJQCNVZH2PWRMVAH', 'RBXJQCUYMQR2KRMDFY'
]))
diff --git a/gramps/gen/filters/rules/test/media_rules_test.py b/gramps/gen/filters/rules/test/media_rules_test.py
index 9c289b064..395496109 100644
--- a/gramps/gen/filters/rules/test/media_rules_test.py
+++ b/gramps/gen/filters/rules/test/media_rules_test.py
@@ -74,7 +74,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['O0000'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'b39fe1cfc1305ac4a21']))
+ set(['b39fe1cfc1305ac4a21']))
def test_regexpidof(self):
"""
@@ -82,9 +82,9 @@ class BaseTest(unittest.TestCase):
"""
rule = RegExpIdOf(['O000.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'F0QIGQFT275JFJ75E8', b'78V2GQX2FKNSYQ3OHE',
- b'b39fe1cfc1305ac4a21', b'F8JYGQFL2PKLSYH79X',
- b'B1AUFQV7H8R9NR4SZM']))
+ 'F0QIGQFT275JFJ75E8', '78V2GQX2FKNSYQ3OHE',
+ 'b39fe1cfc1305ac4a21', 'F8JYGQFL2PKLSYH79X',
+ 'B1AUFQV7H8R9NR4SZM']))
def test_hascitation(self):
"""
@@ -92,7 +92,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasCitation(['page 21', '', ''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'B1AUFQV7H8R9NR4SZM']))
+ set(['B1AUFQV7H8R9NR4SZM']))
def test_hasnoteregexp(self):
"""
@@ -114,7 +114,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasReferenceCountOf(['greater than', '1'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'238CGQ939HG18SS5MG', b'b39fe1cfc1305ac4a21']))
+ '238CGQ939HG18SS5MG', 'b39fe1cfc1305ac4a21']))
def test_hassourcecount(self):
"""
@@ -122,7 +122,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceCount(['1', 'equal to'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'B1AUFQV7H8R9NR4SZM']))
+ set(['B1AUFQV7H8R9NR4SZM']))
def test_hassourceof(self):
"""
@@ -130,7 +130,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceOf(['S0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'B1AUFQV7H8R9NR4SZM']))
+ set(['B1AUFQV7H8R9NR4SZM']))
def test_mediaprivate(self):
"""
@@ -145,7 +145,7 @@ class BaseTest(unittest.TestCase):
"""
rule = MatchesSourceConfidence(['2'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'B1AUFQV7H8R9NR4SZM']))
+ set(['B1AUFQV7H8R9NR4SZM']))
def test_hasmedia(self):
"""
@@ -153,7 +153,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasMedia(['mannschaft', 'image/jpeg', '.jpg', '1897'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'238CGQ939HG18SS5MG']))
+ set(['238CGQ939HG18SS5MG']))
def test_hasattribute(self):
"""
@@ -161,7 +161,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasAttribute(['Description', ''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'B1AUFQV7H8R9NR4SZM']))
+ set(['B1AUFQV7H8R9NR4SZM']))
def test_changedsince(self):
"""
@@ -169,8 +169,8 @@ class BaseTest(unittest.TestCase):
"""
rule = ChangedSince(['2010-01-01', '2016-01-01'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'b39fe1cfc1305ac4a21', b'B1AUFQV7H8R9NR4SZM',
- b'238CGQ939HG18SS5MG', b'F0QIGQFT275JFJ75E8']))
+ 'b39fe1cfc1305ac4a21', 'B1AUFQV7H8R9NR4SZM',
+ '238CGQ939HG18SS5MG', 'F0QIGQFT275JFJ75E8']))
def test_hastag(self):
"""
@@ -178,7 +178,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasTag(['ToDo'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'238CGQ939HG18SS5MG']))
+ set(['238CGQ939HG18SS5MG']))
if __name__ == "__main__":
diff --git a/gramps/gen/filters/rules/test/note_rules_test.py b/gramps/gen/filters/rules/test/note_rules_test.py
index c71714a94..c8a429201 100644
--- a/gramps/gen/filters/rules/test/note_rules_test.py
+++ b/gramps/gen/filters/rules/test/note_rules_test.py
@@ -72,7 +72,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['N0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'ac380498bac48eedee8']))
+ set(['ac380498bac48eedee8']))
def test_regexpidof(self):
"""
@@ -80,11 +80,11 @@ class BaseTest(unittest.TestCase):
"""
rule = RegExpIdOf(['N000.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'ac380498c020c7bcdc7', b'ac3804a842b21358c97',
- b'ae13613d581506d040892f88a21', b'ac3804a8405171ef666',
- b'ac3804a1d747a39822c', b'ac3804aac6b762b75a5',
- b'ac380498bac48eedee8', b'ac3804a1d66258b8e13',
- b'ac380498bc46102e1e8', b'b39fe2e143d1e599450']))
+ 'ac380498c020c7bcdc7', 'ac3804a842b21358c97',
+ 'ae13613d581506d040892f88a21', 'ac3804a8405171ef666',
+ 'ac3804a1d747a39822c', 'ac3804aac6b762b75a5',
+ 'ac380498bac48eedee8', 'ac3804a1d66258b8e13',
+ 'ac380498bc46102e1e8', 'b39fe2e143d1e599450']))
def test_hasnote(self):
"""
@@ -92,7 +92,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasNote(['note', 'Person Note'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'b39ff11d8912173cded', b'b39ff01f75c1f76859a']))
+ 'b39ff11d8912173cded', 'b39ff01f75c1f76859a']))
def test_matchesregexpof(self):
"""
@@ -100,8 +100,8 @@ class BaseTest(unittest.TestCase):
"""
rule = MatchesRegexpOf(['^This'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'b39ff11d8912173cded', b'c140d4c29520c92055c',
- b'b39ff01f75c1f76859a']))
+ 'b39ff11d8912173cded', 'c140d4c29520c92055c',
+ 'b39ff01f75c1f76859a']))
def test_hasreferencecountof(self):
"""
@@ -109,7 +109,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasReferenceCountOf(['greater than', '1'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'c140d4c29520c92055c']))
+ set(['c140d4c29520c92055c']))
def test_noteprivate(self):
"""
@@ -124,9 +124,9 @@ class BaseTest(unittest.TestCase):
"""
rule = ChangedSince(['2010-01-01', '2016-01-01'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'c140d4c29520c92055c', b'd0436bcc69d6bba278bff5bc7db',
- b'b39fe2e143d1e599450', b'd0436bba4ec328d3b631259a4ee',
- b'd0436be64ac277b615b79b34e72']))
+ 'c140d4c29520c92055c', 'd0436bcc69d6bba278bff5bc7db',
+ 'b39fe2e143d1e599450', 'd0436bba4ec328d3b631259a4ee',
+ 'd0436be64ac277b615b79b34e72']))
def test_hastag(self):
"""
@@ -134,7 +134,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasTag(['ToDo'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'b39ff01f75c1f76859a', b'b39fe2e143d1e599450']))
+ 'b39ff01f75c1f76859a', 'b39fe2e143d1e599450']))
def test_hastype(self):
"""
@@ -142,8 +142,8 @@ class BaseTest(unittest.TestCase):
"""
rule = HasType(['Person Note'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'ac380498c020c7bcdc7', b'b39ff11d8912173cded',
- b'b39ff01f75c1f76859a']))
+ 'ac380498c020c7bcdc7', 'b39ff11d8912173cded',
+ 'b39ff01f75c1f76859a']))
if __name__ == "__main__":
diff --git a/gramps/gen/filters/rules/test/person_rules_test.py b/gramps/gen/filters/rules/test/person_rules_test.py
index 900afcfc1..75e9f6aad 100644
--- a/gramps/gen/filters/rules/test/person_rules_test.py
+++ b/gramps/gen/filters/rules/test/person_rules_test.py
@@ -68,31 +68,31 @@ class BaseTest(unittest.TestCase):
"""
rule = Disconnected([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'0PBKQCXHLAEIB46ZIA', b'QEVJQC04YO01UAWJ2N', b'UT0KQCMN7PC9XURRXJ',
- b'MZAKQCKAQLIQYWP5IW', b'Y7BKQC9CUXWQLGLPQM', b'OBBKQC8NJM5UYBO849',
- b'NPBKQCKEF0G7T4H312', b'423KQCGLT8UISDUM1Q', b'8S0KQCNORIWDL0X8SB',
- b'AP5KQC0LBXPM727OWB', b'AREKQC0VPBHNZ5R3IO', b'KU0KQCJ0RUTJTIUKSA',
- b'VC4KQC7L7KKH9RLHXN', b'0P3KQCRSIVL1A4VJ19', b'PK6KQCGEL4PTE720BL',
- b'YIKKQCSD2Z85UHJ8LX', b'KY8KQCMIH2HUUGLA3R', b'RD7KQCQ24B1N3OEC5X',
- b'NV0KQC7SIEH3SVDPP1', b'KIKKQCU2CJ543TLM5J', b'AT0KQC4P3MMUCHI3BK',
- b'J6BKQC1PMNBAYSLM9U', b'IXXJQCLKOUAJ5RSQY4', b'U4ZJQC5VR0QBIE8DU',
- b'F7BKQC4NXO9R7XOG2W', b'7U0KQC6PGZBNQATNOT', b'78AKQCI05U36T3E82O',
- b'H1GKQCWOUJHFSHXABA', b'ZWGKQCRFZAPC5PYJZ1', b'EZ0KQCF3LSM9PRSG0K',
- b'FHKKQC963NGSY18ZDZ', b'FJ9KQCRJ3RGHNBWW4S', b'S2EKQC9F4UR4R71IC3',
- b'1XBKQCX019BKJ0M9IH', b'Z62KQC706L0B0WTN3Q', b'O7EKQCEVZ7FBEWMNWE',
- b'XY8KQCULFPN4SR915Q', b'WQDKQCEULSD5G9XNFI', b'2Z0KQCSWKVFG7RPFD8',
- b'26BKQC0SJIJOH02H2A', b'262KQCH2RQKN0CBRLF', b'P5ZJQCMKO7EYV4HFCL',
- b'KXBKQC52JO3AP4GMLF', b'9IFKQC60JTDBV57N6S', b'TQ0KQCZ8LA7X9DIEAN',
- b'BAXJQCORQA5Q46FCDG', b'VR0KQC7LVANO83AL35', b'75CKQC4T617U2E5T5Y',
- b'LCTKQCZU3F94CEFSOM', b'WJYJQCPNJJI5JN07SD', b'3N6KQC6BE5EIXTRMDL',
- b'CM5KQCD57I15GKLAMB', b'cccbffffd3e69819cd8',
- b'BJKKQCVDA66528PDAU', b'QS0KQCLMIZFI8ZDLM3', b'UW0KQCRHBIYMA8LPZD',
- b'GJ7KQC7APJSAMHEK5Q', b'711KQCDXOQWB3KDWEP', b'PY0KQC77AJ3457A6C2',
- b'WZ0KQCYVMEJHDR4MV2', b'28EKQCQGM6NLLWFRG7', b'E33KQCRREJALRA715H',
- b'8HKKQCTEJAOBVH410L', b'IO6KQC70PMBQUDNB3L', b'1YBKQCWRBNB433NEMH',
- b'M01KQCF7KUWCDY67JD', b'CR0KQCOMV2QPPC90IF', b'85ZJQCMG38N7Q2WKIK',
- b'I9GKQCERACL8UZF2PY', b'BY0KQCOZUK47R2JZDE', b'7W0KQCYDMD4LTSY5JL',
- b'A0YJQC3HONEKD1JCPK', b'd5839c13b0541b7b8e6',
+ '0PBKQCXHLAEIB46ZIA', 'QEVJQC04YO01UAWJ2N', 'UT0KQCMN7PC9XURRXJ',
+ 'MZAKQCKAQLIQYWP5IW', 'Y7BKQC9CUXWQLGLPQM', 'OBBKQC8NJM5UYBO849',
+ 'NPBKQCKEF0G7T4H312', '423KQCGLT8UISDUM1Q', '8S0KQCNORIWDL0X8SB',
+ 'AP5KQC0LBXPM727OWB', 'AREKQC0VPBHNZ5R3IO', 'KU0KQCJ0RUTJTIUKSA',
+ 'VC4KQC7L7KKH9RLHXN', '0P3KQCRSIVL1A4VJ19', 'PK6KQCGEL4PTE720BL',
+ 'YIKKQCSD2Z85UHJ8LX', 'KY8KQCMIH2HUUGLA3R', 'RD7KQCQ24B1N3OEC5X',
+ 'NV0KQC7SIEH3SVDPP1', 'KIKKQCU2CJ543TLM5J', 'AT0KQC4P3MMUCHI3BK',
+ 'J6BKQC1PMNBAYSLM9U', 'IXXJQCLKOU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CPK', 'd5839c13b0541b7b8e6',
]))
def test_everyone(self):
@@ -117,7 +117,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasAlternateName([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'46WJQCIOLQ0KOX2XCC', b'GNUJQCL9MD64AM56OH',
+ '46WJQCIOLQ0KOX2XCC', 'GNUJQCL9MD64AM56OH',
]))
def test_commonancestor_empty(self):
@@ -134,7 +134,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasCommonAncestorWith(['I0000'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'd5839c1237765987724'
+ 'd5839c1237765987724'
]))
def test_commonancestor_irregular(self):
@@ -151,39 +151,39 @@ class BaseTest(unittest.TestCase):
"""
rule = HasCommonAncestorWith(['I0044'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'GNUJQCL9MD64AM56OH', b'SOFKQCBYAO18OWC0CS', b'EMEKQC02EOUF8H0SHM',
- b'3EXJQCVWOSQFGLYB6H', b'EMTJQCQU6TL4WAVSE4', b'QUEKQCZL61S8BJJ388',
- b'MKEKQCSBQGAVHAPCQT', b'MUFKQCMXUJ07MCDUNI', b'DBXJQCJCEZMO17WZ89',
- b'ORFKQC4KLWEGTGR19L', b'MG5KQC6ZKSVO4A63G2', b'N26KQCF3ASHMZ0HEW6',
- b'GNWJQC9NLVF2MZLHU9', b'ZFXJQCHAD8SLZZ7KRP', b'44WJQCLCQIPZUB0UH',
- b'B8TJQC53HJXOGXK8F7', b'D3WJQCCGV58IP8PNHZ', b'3LEKQCRF3FD2E1H73I',
- b'F06KQCZY1I4H4IFZM', b'VMTJQC49IGKLG2EQ5', b'9BXKQC1PVLPYFMD6IX',
- b'H1DKQC4YGZ5A61FGS', b'1GWJQCGOOZ8FJW3YK9', b'S16KQCX8XUO3EEL85N',
- b'OREKQCF34YE89RL8S6', b'RU5KQCQTPC9SJ5Q1JN', b'GYFKQCPH8Q0JDN94GR',
- b'9QFKQC54ET79K2SD57', b'MLEKQCH64557K610VR', b'AWFKQCJELLUWDY2PD3',
- b'ZDWJQC7TMS2AWAVF2Y', b'VJFKQCFO7WESWPNKHE', b'LV5KQCJCCR0S3DN5WW',
- b'CDTJQCVTVX7CNMY9YU', b'OX5KQCKE3I94MEPDC', b'JF5KQC2L6ABI0MVD3E',
- b'CH5KQCIEXSN1J5UEHB', b'4JEKQC22K5UTH9QHCU', b'EPFKQCETTDTEL3PYIR',
- b'D16KQCIZS56HVPW6DA', b'2TEKQCTSCRL4Z2AUHE', b'3WEKQCHXRH61E3CIKB',
- b'TDTJQCGYRS2RCCGQN3', b'SMWJQCXQ6I2GEXSPK9', b'PXFKQCXEHJX3W1Q1IV',
- b'Q9TJQCXDL1599L2B2Z', b'BFXJQCF1JBOXPRW2OS', b'6TFKQCUTO94WB2NHN',
- b'FNEKQCO239QSNK0R78', b'3RFKQCNKMX9HVLNSLW', b'W2DKQCV4H3EZUJ35DX',
- b'5IEKQCN37EFBK9EBUD', b'LW5KQCXSXRC2XV3T3D', b'ZNEKQCULV911DIXBK3',
- b'35WJQC1B7T7NPV8OLV', b'MPEKQC6TIP3SP1YF7I', b'DMFKQC5MHGYC6503F2',
- b'3KEKQC45RL87D4ZG86', b'KLTJQC70XVZJSPQ43U', b'LVEKQCP09W7JNFDAFC',
- b'DPUJQCUYKKDPT78JJV', b'JDXJQCR5L0NTR21SQA', b'UAXJQC6HC354V7Q6JA',
- b'XBXJQCS4QY316ZGHRN', b'HCXJQCRKB4K65V1C07', b'66TJQC6CC7ZWL9YZ64',
- b'XNFKQC6DN59LACS9IU', b'LL5KQCG687Y165GL5P', b'7X5KQC9ABK4T6AW7QF',
- b'HKTJQCIJD8RK9RJFO1', b'1LTJQCYQI1DXBLG6Z', b'0FWJQCLYEP736P3YZK',
- b'0DXJQC1T8P3CQKZIUO', b'ISEKQC97YI74A9VKWC', b'KGXJQCBQ39ON9VB37T',
- b'BZ5KQCD4KFI3BTIMZU', b'0HEKQCLINMQS4RB7B8', b'BBTJQCNT6N1H4X6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
+ 'COFKQCUXC2H4G3QBYT', 'DI5KQC3CLKWQI3I0CC', 'T8TJQCWWI8RY57YNTQ',
+ '46WJQCIOLQ0KOX2XCC', 'OEXJQCQJHF2BLSAAIS', 'GNFKQCH8AFJRJO9V4Y',
+ '8LFKQCQWXTJQJR4CXV', 'IGWJQCSVT8NXTFXOFJ', '3PEKQC8ZDCYTSSIKZ9',
+ '5UEKQC8N8NEPSWU1QQ', 'NK5KQC1MAOU2BP35ZV', 'UZFKQCIHVT44DC9KGH',
+ 'JJ5KQC83DT7VDMUYRQ', '626KQC7C08H3UTM38E', 'XIFKQCLQOY645QTGP7',
+ 'HEWJQCWQQ3K4BNRLIO', 'HDWJQCT361VOV2PQLP', 'XFKKQCGA4DVECEB48E',
+ 'KWEKQCTNIIV9BROFFG',
]))
def test_hasnickname(self):
@@ -192,8 +192,8 @@ class BaseTest(unittest.TestCase):
"""
rule = HasNickname([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'cc8205d883763f02abd', b'GNUJQCL9MD64AM56OH',
- b'Q8HKQC3VMRM1M6M7ES',
+ 'cc8205d883763f02abd', 'GNUJQCL9MD64AM56OH',
+ 'Q8HKQC3VMRM1M6M7ES',
]))
def test_hasunknowngender(self):
@@ -202,13 +202,13 @@ class BaseTest(unittest.TestCase):
"""
rule = HasUnknownGender([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'OJOKQC83Y1EDBIMLJ6', b'8BHKQCFK9UZFRJYC2Y', b'PGFKQC1TUQMXFAMLMB',
- b'IHOKQCECRZYQDKW6KF', b'8HKKQCTEJAOBVH410L', b'AGFKQCO358R18LNJYV',
- b'1ENKQCBPFZTAQJSP4O', b'NUWKQCO7TVAOH0CHLV', b'P5IKQC88STY3FNTFZ3',
- b'7GXKQCMVFU8WR1LKZL', b'LGXKQCJ5OP6MKF9QLN', b'XNFKQC6DN59LACS9IU',
- b'7IOKQC1NVGUI1E55CQ', b'57PKQCFAWY7AM3JS4M', b'BNXKQCEBXC1RCOGJNF',
- b'TFFKQC1RMG8RRADKDH', b'FHKKQC963NGSY18ZDZ', b'WMXKQCDUJ4JKQQYCR7',
- b'PBHKQCHOAGTECRKT9L', b'OFXKQC8W0N3N6JP6YQ',
+ 'OJOKQC83Y1EDBIMLJ6', '8BHKQCFK9UZFRJYC2Y', 'PGFKQC1TUQMXFAMLMB',
+ 'IHOKQCECRZYQDKW6KF', '8HKKQCTEJAOBVH410L', 'AGFKQCO358R18LNJYV',
+ '1ENKQCBPFZTAQJSP4O', 'NUWKQCO7TVAOH0CHLV', 'P5IKQC88STY3FNTFZ3',
+ '7GXKQCMVFU8WR1LKZL', 'LGXKQCJ5OP6MKF9QLN', 'XNFKQC6DN59LACS9IU',
+ '7IOKQC1NVGUI1E55CQ', '57PKQCFAWY7AM3JS4M', 'BNXKQCEBXC1RCOGJNF',
+ 'TFFKQC1RMG8RRADKDH', 'FHKKQC963NGSY18ZDZ', 'WMXKQCDUJ4JKQQYCR7',
+ 'PBHKQCHOAGTECRKT9L', 'OFXKQC8W0N3N6JP6YQ',
]))
def test_hassourceof_empty(self):
@@ -218,25 +218,25 @@ class BaseTest(unittest.TestCase):
# when run with an empty string finds people with no sourc citations
rule = HasSourceOf([''])
self.assertEqual(self.filter_with_rule(rule), set([
- b'cc82060512042f67e2c', b'cc8205d87831c772e87',
- b'cc82060516c6c141500', b'cc8205d87fd529000ff',
- b'cc82060504445ab6deb', b'cc8205d887376aacba2',
- b'cccbffffd3e69819cd8', b'cc8205d87c20350420b',
- b'cc8206050e541f79f92', b'cc8205d883763f02abd',
- b'cc8206050980ea622d0', b'cc8205d872f532ab14e',
- b'd5839c132b11d9e3632', b'd583a5ba0d50afbbaaf',
- b'd5839c1352c64b924d9', b'd583a5b9fc864e3bf4e',
- b'd583a5ba1bd083ce4c2', b'd583a5b9df71bceb48c',
- b'd583a5b9ced473a7e6a', b'd583a5ba2bc7b9d1388',
- b'd5839c12fec09785f6a', b'd5839c1237765987724',
- b'd5839c137b3640ad776', b'd5839c126d11a754f46',
- b'd5839c12d3b4d5e619b', b'd5839c13380462b246f',
- b'd5839c12e9e08301ce2', b'd5839c1366b21411fb4',
- b'd5839c13a282b51dd0d', b'd5839c12ac91650a72b',
- b'd583a5b9edf6cb5d8d5', b'd583a5ba4be3acdd312',
- b'd5839c131d560e06bac', b'd5839c13b0541b7b8e6',
- b'd5839c1388e3ab6c87c', b'd583a5ba5ca6b698463',
- b'd583a5ba3bc48c2002c', b'd583a5b90777391ea9a',
+ 'cc82060512042f67e2c', 'cc8205d87831c772e87',
+ 'cc82060516c6c141500', 'cc8205d87fd529000ff',
+ 'cc82060504445ab6deb', 'cc8205d887376aacba2',
+ 'cccbffffd3e69819cd8', 'cc8205d87c20350420b',
+ 'cc8206050e541f79f92', 'cc8205d883763f02abd',
+ 'cc8206050980ea622d0', 'cc8205d872f532ab14e',
+ 'd5839c132b11d9e3632', 'd583a5ba0d50afbbaaf',
+ 'd5839c1352c64b924d9', 'd583a5b9fc864e3bf4e',
+ 'd583a5ba1bd083ce4c2', 'd583a5b9df71bceb48c',
+ 'd583a5b9ced473a7e6a', 'd583a5ba2bc7b9d1388',
+ 'd5839c12fec09785f6a', 'd5839c1237765987724',
+ 'd5839c137b3640ad776', 'd5839c126d11a754f46',
+ 'd5839c12d3b4d5e619b', 'd5839c13380462b246f',
+ 'd5839c12e9e08301ce2', 'd5839c1366b21411fb4',
+ 'd5839c13a282b51dd0d', 'd5839c12ac91650a72b',
+ 'd583a5b9edf6cb5d8d5', 'd583a5ba4be3acdd312',
+ 'd5839c131d560e06bac', 'd5839c13b0541b7b8e6',
+ 'd5839c1388e3ab6c87c', 'd583a5ba5ca6b698463',
+ 'd583a5ba3bc48c2002c', 'd583a5b90777391ea9a',
]))
def test_hassourceof_nonmatching(self):
@@ -261,7 +261,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceOf(['S0000'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'GNUJQCL9MD64AM56OH',
+ 'GNUJQCL9MD64AM56OH',
]))
@@ -271,7 +271,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HaveAltFamilies([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'CH5KQCIEXSN1J5UEHB', b'MG5KQC6ZKSVO4A63G2',
+ 'CH5KQCIEXSN1J5UEHB', 'MG5KQC6ZKSVO4A63G2',
]))
def test_havechildren(self):
@@ -288,36 +288,36 @@ class BaseTest(unittest.TestCase):
"""
rule = IncompleteNames([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'IHOKQCECRZYQDKW6KF', b'cc82060504445ab6deb',
- b'LCXKQCQZH5EH56NTCD', b'cc8205d87831c772e87',
- b'3RFKQCNKMX9HVLNSLW', b'cc8205d87fd529000ff',
- b'B1UKQCBR49WB3134PN', b'0TTKQCXXY59OCDPLV3',
- b'F3UKQC7ZV3EYVWTZ8O', b'1MXKQCJ2BR43910ZYX',
- b'cc8206050e541f79f92', b'FHKKQC963NGSY18ZDZ',
- b'R5HKQCIEPOY1DMQOWX', b'ZHMKQC50PFVAPI8PZ6', b'T4UKQCYGECXGVNBWMY',
- b'cc82060516c6c141500', b'UPWKQCYVFH7RZOSZ29',
- b'2AMKQCE67YOH3TBVYI', b'2CUKQCFDVN3EZE2E4C', b'7IOKQC1NVGUI1E55CQ',
- b'KSTKQC018GNA7HDCAS', b'WIVKQC4Q4FCQJT5M63', b'A4YKQCRYSI5FT5T38',
- b'BUNKQCO4HZHZP70F3K', b'YRTKQCNDP343OD5OQJ', b'7VEKQCV05EDK0625KI',
- b'cc8205d872f532ab14e', b'TPXKQCEGL04KHGMO2X',
- b'L9LKQCQ8KJRKHM4D2E', b'8QXKQCHJ2EUC7OV8EQ', b'W0XKQCKSFWWJWQ2OSN',
- b'I6QKQCFRDTV2LDC8M2', b'XTUKQC7WCIVA5F0NC4', b'F4UKQCPK572VWU2YZQ',
- b'JKDKQCF4ND92A088J2', b'COFKQCUXC2H4G3QBYT', b'BNXKQCEBXC1RCOGJNF',
- b'Q42KQCKJZGS4IZWHF5', b'P5IKQC88STY3FNTFZ3', b'7CXKQC59NSZFXIG1UE',
- b'cc8205d87c20350420b', b'FQUKQCWEHOAWUP4QWS',
- b'3YTKQCK2W63W0MQBJE', b'8HKKQCTEJAOBVH410L', b'HLQKQC0BJIZL0V4EK4',
- b'B0UKQC9A54F1GUB7NR', b'EPXKQCQRZP2PNPN7BE',
- b'cc82060512042f67e2c', b'XZLKQCRQA9EHPBNZPT',
- b'OQXKQC2Y5FVH9PK0JL', b'AXLKQC0YTFAWQ234YD', b'OFXKQC8W0N3N6JP6YQ',
- b'MWUKQCD2ZSCECQOCLG', b'1ENKQCBPFZTAQJSP4O', b'N7XKQCYD3VSCSZREGJ',
- b'2LQKQC62GJUQCJIOK8', b'QXXKQC9PT5FWNT140K', b'VAXKQC19HIFPX61J28',
- b'0PXKQCJ9S1M3NNASET', b'K8XKQCDSVLSK422A3K', b'52UKQCFYXMFTKIGNBS',
- b'7GXKQCMVFU8WR1LKZL', b'4UMKQCF07KL2K92CI5', b'LGXKQCJ5OP6MKF9QLN',
- b'FZTKQCSTPIQ3C9JC46', b'WMXKQCDUJ4JKQQYCR7', b'R6UKQC939L9FV62UGE',
- b'OIUKQCBHUWDGL7DNTI', b'FRTKQC3G6JBJAR2ZPX', b'PIEKQCKUL6OAMS8Q9R',
- b'cc8205d887376aacba2', b'LGMKQCQP5M5L18FVTN',
- b'8HUKQCRV8B3J2LLQ3B', b'LOUKQC45HUN532HOOM',
- b'cc8205d883763f02abd', b'TBXKQC7OHIN28PVCS3',
+ 'IHOKQCECRZYQDKW6KF', 'cc82060504445ab6deb',
+ 'LCXKQCQZH5EH56NTCD', 'cc8205d87831c772e87',
+ '3RFKQCNKMX9HVLNSLW', 'cc8205d87fd529000ff',
+ 'B1UKQCBR49WB3134PN', '0TTKQCXXY59OCDPLV3',
+ 'F3UKQC7ZV3EYVWTZ8O', '1MXKQCJ2BR43910ZYX',
+ 'cc8206050e541f79f92', 'FHKKQC963NGSY18ZDZ',
+ 'R5HKQC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KZL', '4UMKQCF07KL2K92CI5', 'LGXKQCJ5OP6MKF9QLN',
+ 'FZTKQCSTPIQ3C9JC46', 'WMXKQCDUJ4JKQQYCR7', 'R6UKQC939L9FV62UGE',
+ 'OIUKQCBHUWDGL7DNTI', 'FRTKQC3G6JBJAR2ZPX', 'PIEKQCKUL6OAMS8Q9R',
+ 'cc8205d887376aacba2', 'LGMKQCQP5M5L18FVTN',
+ '8HUKQCRV8B3J2LLQ3B', 'LOUKQC45HUN532HOOM',
+ 'cc8205d883763f02abd', 'TBXKQC7OHIN28PVCS3',
]))
def test_isbookmarked(self):
@@ -326,7 +326,7 @@ class BaseTest(unittest.TestCase):
"""
rule = IsBookmarked([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'35WJQC1B7T7NPV8OLV', b'AWFKQCJELLUWDY2PD3', b'Q8HKQC3VMRM1M6M7ES',
+ '35WJQC1B7T7NPV8OLV', 'AWFKQCJELLUWDY2PD3', 'Q8HKQC3VMRM1M6M7ES',
]))
def test_dupancestor_empty(self):
@@ -359,7 +359,7 @@ class BaseTest(unittest.TestCase):
"""
rule = IsDuplicatedAncestorOf(['I1631'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'I3VJQCUY5I6UR92507', b'D4VJQC09STQCWD393E',
+ 'I3VJQCUY5I6UR92507', 'D4VJQC09STQCWD393E',
]))
def test_isrelatedwith_empty(self):
@@ -376,7 +376,7 @@ class BaseTest(unittest.TestCase):
"""
rule = IsRelatedWith(['I0000'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'd5839c1237765987724', b'd5839c126d11a754f46',
+ 'd5839c1237765987724', 'd5839c126d11a754f46',
]))
def test_isrelatedwith_irregular(self):
@@ -393,24 +393,24 @@ class BaseTest(unittest.TestCase):
"""
rule = IsRelatedWith(['I1844'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'HWTKQCSM28EI6WFDHP', b'T4UKQCYGECXGVNBWMY', b'YOTKQCEX2PLG03LZQS',
- b'X8UKQCIDY21QIQBDVI', b'F3UKQC7ZV3EYVWTZ8O', b'0TTKQCXXY59OCDPLV3',
- b'EVTKQCHV2E2PODFD7C', b'BBUKQC5GPRPDJHJAWU', b'FRTKQC3G6JBJAR2ZPX',
- b'NDTKQCN95VFLGJ21L', b'SFTKQC26EJ2BYQCRIA', b'MYTKQCVCFOFM32H9GB',
- b'B0UKQC9A54F1GUB7NR', b'PTTKQCYN0JR3ZZJNWR', b'F4UKQCPK572VWU2YZQ',
- b'LLTKQCX39KCXFSX0U4', b'IXTKQC1BAU1F1WNXKB', b'3YTKQCK2W63W0MQBJE',
- b'TQTKQCO897BNA1H93B', b'DOTKQCP1MG3VC8D7V2', b'3NTKQCZKLMIM6HYFE1',
- b'WUTKQCVQCUPFFOGUT8', b'GETKQCPRC2W5YDUYM6', b'YRTKQCNDP343OD5OQJ',
- b'U0UKQCBZS0R6WW7LBS', b'J2UKQC897I42M9VHDD', b'7MTKQC1QNE4H5RF35S',
- b'5FTKQCKT9SDZ8TB03C', b'O1UKQCJD5YHDRW887V', b'EUTKQCFATXRU431YY6',
- b'UHTKQCORH3NTZ0FYL3', b'2CUKQCFDVN3EZE2E4C', b'RNTKQCMLGRRKQVKDPR',
- b'CGTKQC4WO8W3WSQRCX', b'WAUKQCOQ91QCJZWQ9U', b'FZTKQCSTPIQ3C9JC46',
- b'AHTKQCM2YFRW3AGSRL', b'WBTKQCC775IAAGIWZD', b'8KTKQC407A8CN5O68H',
- b'8QTKQCN8ZKY5OWWJZF', b'UKTKQCSL3AUJIWTD2A', b'HAUKQCM3GYGVTREGZS',
- b'52UKQCFYXMFTKIGNBS', b'U3UKQCO30PWAK6JQBA', b'R6UKQC939L9FV62UGE',
- b'TZTKQCR39A060AQ63C', b'X9UKQCFELSDAQ2TDP1', b'B1UKQCBR49WB3134PN',
- b'KSTKQC018GNA7HDCAS', b'FJTKQCJCMAHJOA9NHI', b'HITKQCWJSCZX2AN6NP',
- b'WVTKQCZC91I63LHEE7', b'0DTKQC6KBOS69LQJ35',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7HDCAS', 'FJTKQCJCMAHJOA9NHI', 'HITKQCWJSCZX2AN6NP',
+ 'WVTKQCZC91I63LHEE7', '0DTKQC6KBOS69LQJ35',
]))
def test_hasidof_empty(self):
@@ -427,7 +427,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['I0000'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'd5839c1237765987724'
+ 'd5839c1237765987724'
]))
def test_hasidof_irregular(self):
@@ -444,7 +444,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['I0044'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'GNUJQCL9MD64AM56OH',
+ 'GNUJQCL9MD64AM56OH',
]))
def test_isdefaultperson(self):
@@ -453,7 +453,7 @@ class BaseTest(unittest.TestCase):
"""
rule = IsDefaultPerson([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'GNUJQCL9MD64AM56OH',
+ 'GNUJQCL9MD64AM56OH',
]))
def test_isfemale(self):
@@ -486,24 +486,24 @@ class BaseTest(unittest.TestCase):
"""
rule = MultipleMarriages([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'R1VKQCJWNP24VN7BO', b'ZTVJQCTSMI85EGMXFM', b'ENTJQCZXQV1IRKJXUL',
- b'44WJQCLCQIPZUB0UH', b'SMWJQCXQ6I2GEXSPK9', b'DN3KQC1URTED410L3R',
- b'5FYJQC86G8EZ0L4E4B', b'5F4KQCJRU8ZKL6SILT', b'0YNKQC5U4EQGVNUZD8',
- b'YRYJQCE3RF4U8A59UB', b'APWKQCI6YXAXBLC33I', b'XSKKQC6GGKLAYANWAF',
- b'0FQKQCOQD0VRVJPTSD', b'B3UJQCZHDXII99AWW4',
- b'cc8205d872f532ab14e', b'SS1KQCWWF9488Q330U',
- b'OCYJQCS8YT7JO8KIMO', b'I6HKQCQF72V2N56JQ5', b'6YWJQC86FBVN0J6JS',
- b'KYNKQCVA6FE65ONFIQ', b'SHAKQCNY5IXO30GUAB', b'O5XKQC3V6BPJI13J24',
- b'ZN7KQC3RLB82EXF1QF', b'CIYJQCF3UK12DL0S2Y', b'H3XJQCFJ4FP4U2WGZC',
- b'cc82060504445ab6deb', b'4E4KQC1K4XUEX29IJO',
- b'0XVJQCJUNJY40WDSMA', b'1WUJQCHNH76G6YD3A', b'IH3KQCM1VZPRKLBLK7',
- b'242KQCBALBOD8ZK5VI', b'8G4KQCS6C1AOM6ZGR3', b'I1EKQCGGDSUD8ILUW4',
- b'X8BKQCSFF4AET5MY23', b'RJWJQCN1XKXRN5KMCP', b'ZWNKQC9DAZ3C6UHUAV',
- b'9QUJQCCSWRZNSAPCR', b'HI0KQCG9TGT5AAIPU', b'DI4KQC3S1AO27VWOLN',
- b'QBDKQCH2IU6N8IXMFE', b'DK2KQCJYW14VXUJ85', b'117KQCBB32RMTTV4G6',
- b'0QLKQCFTQMNVGCV4GM', b'D2OKQCGDNPT3BH4WH', b'CAYJQCKOL49OF7XWB3',
- b'ZQGKQCGHS67Q4IMHEG', b'OEXJQCQJHF2BLSAAIS', b'UKYJQC70LIZQ11BP89',
- b'FF2KQCRBSPCG1QY97', b'L6EKQCO8QYL2UO2MQO',
+ 'R1VKQCJWNP24VN7BO', 'ZTVJQCTSMI85EGMXFM', 'ENTJQCZXQV1IRKJXUL',
+ '44WJQCLCQIPZUB0UH', 'SMWJQCXQ6I2GEXSPK9', 'DN3KQC1URTED410L3R',
+ '5FYJQC86G8EZ0L4E4B', '5F4KQCJRU8ZKL6SILT', '0YNKQC5U4EQGVNUZD8',
+ 'YRYJQCE3RF4U8A59UB', 'APWKQCI6YXAXBLC33I', 'XSKKQC6GGKLAYANWAF',
+ '0FQKQCOQD0VRVJPTSD', 'B3UJQCZHDXII99AWW4',
+ 'cc8205d872f532ab14e', 'SS1KQCWWF9488Q330U',
+ 'OCYJQCS8YT7JO8KIMO', 'I6HKQCQF72V2N56JQ5', '6YWJQC86FBVN0J6JS',
+ 'KYNKQCVA6FE65ONFIQ', 'SHAKQCNY5IXO30GUAB', 'O5XKQC3V6BPJI13J24',
+ 'ZN7KQC3RLB82EXF1QF', 'CIYJQCF3UK12DL0S2Y', 'H3XJQCFJ4FP4U2WGZC',
+ 'cc82060504445ab6deb', '4E4KQC1K4XUEX29IJO',
+ '0XVJQCJUNJY40WDSMA', '1WUJQCHNH76G6YD3A', 'IH3KQCM1VZPRKLBLK7',
+ '242KQCBALBOD8ZK5VI', '8G4KQCS6C1AOM6ZGR3', 'I1EKQCGGDSUD8ILUW4',
+ 'X8BKQCSFF4AET5MY23', 'RJWJQCN1XKXRN5KMCP', 'ZWNKQC9DAZ3C6UHUAV',
+ '9QUJQCCSWRZNSAPCR', 'HI0KQCG9TGT5AAIPU', 'DI4KQC3S1AO27VWOLN',
+ 'QBDKQCH2IU6N8IXMFE', 'DK2KQCJYW14VXUJ85', '117KQCBB32RMTTV4G6',
+ '0QLKQCFTQMNVGCV4GM', 'D2OKQCGDNPT3BH4WH', 'CAYJQCKOL49OF7XWB3',
+ 'ZQGKQCGHS67Q4IMHEG', 'OEXJQCQJHF2BLSAAIS', 'UKYJQC70LIZQ11BP89',
+ 'FF2KQCRBSPCG1QY97', 'L6EKQCO8QYL2UO2MQO',
]))
def test_nevermarried(self):
@@ -560,8 +560,8 @@ class BaseTest(unittest.TestCase):
"""
rule = RelationshipPathBetweenBookmarks([])
self.assertEqual(self.filter_with_rule(rule), set([
- b'44WJQCLCQIPZUB0UH', b'35WJQC1B7T7NPV8OLV', b'AWFKQCJELLUWDY2PD3',
- b'D3WJQCCGV58IP8PNHZ', b'Q8HKQC3VMRM1M6M7ES',
+ '44WJQCLCQIPZUB0UH', '35WJQC1B7T7NPV8OLV', 'AWFKQCJELLUWDY2PD3',
+ 'D3WJQCCGV58IP8PNHZ', 'Q8HKQC3VMRM1M6M7ES',
]))
def test_hassoundexname(self):
@@ -578,7 +578,7 @@ class BaseTest(unittest.TestCase):
rule = HasNameOf(['Lewis', 'Garner', 'Dr.', 'Sr', 'Anderson',
'Big Louie', 'von', 'Zieliński', None, None, None])
self.assertEqual(self.filter_with_rule(rule), set([
- b'GNUJQCL9MD64AM56OH']))
+ 'GNUJQCL9MD64AM56OH']))
if __name__ == "__main__":
diff --git a/gramps/gen/filters/rules/test/place_rules_test.py b/gramps/gen/filters/rules/test/place_rules_test.py
index a4390e78f..c850d5ecf 100644
--- a/gramps/gen/filters/rules/test/place_rules_test.py
+++ b/gramps/gen/filters/rules/test/place_rules_test.py
@@ -77,7 +77,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasCitation(['page 23', '', ''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'YNUJQC8YM5EGRG868J']))
+ set(['YNUJQC8YM5EGRG868J']))
def test_hasgallery(self):
"""
@@ -85,7 +85,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasGallery(['0', 'greater than'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'YNUJQC8YM5EGRG868J']))
+ set(['YNUJQC8YM5EGRG868J']))
def test_hasidof(self):
"""
@@ -93,7 +93,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['P0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'c96587262e91149933fcea5f20a']))
+ set(['c96587262e91149933fcea5f20a']))
def test_regexpidof(self):
"""
@@ -101,11 +101,11 @@ class BaseTest(unittest.TestCase):
"""
rule = RegExpIdOf(['P000.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'c96587262e91149933fcea5f20a', b'c96587262ff262aaac31f6db7af',
- b'c96587262f24c33ab2420276737', b'c96587262e566596a225682bf53',
- b'c9658726302661576894508202d', b'c96587262f8329d37b252e1b9e5',
- b'c965872630664f33485fc18e75', b'c96587262fb7dbb954077cb1286',
- b'c96587262f4a44183c65ff1e52', b'c96587262ed43fdb37bf04bdb7f',
+ 'c96587262e91149933fcea5f20a', 'c96587262ff262aaac31f6db7af',
+ 'c96587262f24c33ab2420276737', 'c96587262e566596a225682bf53',
+ 'c9658726302661576894508202d', 'c96587262f8329d37b252e1b9e5',
+ 'c965872630664f33485fc18e75', 'c96587262fb7dbb954077cb1286',
+ 'c96587262f4a44183c65ff1e52', 'c96587262ed43fdb37bf04bdb7f',
]))
def test_hasnote(self):
@@ -128,9 +128,9 @@ class BaseTest(unittest.TestCase):
"""
rule = HasReferenceCountOf(['greater than', '35'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'c96587262e566596a225682bf53', b'MATJQCJYH8ULRIRYTH',
- b'5HTJQCSB91P69HY731', b'4ECKQCWCLO5YIHXEXC',
- b'c965872630a68ebd32322c4a30a']))
+ 'c96587262e566596a225682bf53', 'MATJQCJYH8ULRIRYTH',
+ '5HTJQCSB91P69HY731', '4ECKQCWCLO5YIHXEXC',
+ 'c965872630a68ebd32322c4a30a']))
def test_hassourcecount(self):
"""
@@ -138,7 +138,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceCount(['1', 'equal to'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'YNUJQC8YM5EGRG868J']))
+ set(['YNUJQC8YM5EGRG868J']))
def test_hassourceof(self):
"""
@@ -146,7 +146,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasSourceOf(['S0001'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'YNUJQC8YM5EGRG868J']))
+ set(['YNUJQC8YM5EGRG868J']))
def test_placeprivate(self):
"""
@@ -161,7 +161,7 @@ class BaseTest(unittest.TestCase):
"""
rule = MatchesSourceConfidence(['2'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'YNUJQC8YM5EGRG868J']))
+ set(['YNUJQC8YM5EGRG868J']))
def test_hasdata(self):
"""
@@ -169,7 +169,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasData(['Albany', 'County', ''])
self.assertEqual(self.filter_with_rule(rule),
- set([b'c9658726d602acadb74e330116a']))
+ set(['c9658726d602acadb74e330116a']))
def test_hasnolatorlon(self):
"""
@@ -184,8 +184,8 @@ class BaseTest(unittest.TestCase):
"""
rule = InLatLonNeighborhood(['30N', '90W', '2', '2'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'C6WJQC0GDYP3HZDPR3', b'N88LQCRB363ES5WJ83',
- b'03EKQCC2KTNLHFLDRJ', b'M9VKQCJV91X0M12J8']))
+ 'C6WJQC0GDYP3HZDPR3', 'N88LQCRB363ES5WJ83',
+ '03EKQCC2KTNLHFLDRJ', 'M9VKQCJV91X0M12J8']))
def test_changedsince(self):
"""
@@ -207,8 +207,8 @@ class BaseTest(unittest.TestCase):
"""
rule = HasTitle(['Albany'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'51VJQCXUP61H9JRL66', b'9XBKQCE1LZ7PMJE56G',
- b'c9658726d602acadb74e330116a', b'P9MKQCT08Z3YBJV5UB']))
+ '51VJQCXUP61H9JRL66', '9XBKQCE1LZ7PMJE56G',
+ 'c9658726d602acadb74e330116a', 'P9MKQCT08Z3YBJV5UB']))
def test_isenclosedby(self):
"""
@@ -216,9 +216,9 @@ class BaseTest(unittest.TestCase):
"""
rule = IsEnclosedBy(['P0001', '0'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'EAFKQCR0ED5QWL87EO', b'S22LQCLUZM135LVKRL', b'VDUJQCFP24ZV3O4ID2',
- b'V6ALQCZZFN996CO4D', b'OC6LQCXMKP6NUVYQD8', b'CUUKQC6BY5LAZXLXC6',
- b'PTFKQCKPHO2VC5SYKS', b'PHUJQCJ9R4XQO5Y0WS']))
+ 'EAFKQCR0ED5QWL87EO', 'S22LQCLUZM135LVKRL', 'VDUJQCFP24ZV3O4ID2',
+ 'V6ALQCZZFN996CO4D', 'OC6LQCXMKP6NUVYQD8', 'CUUKQC6BY5LAZXLXC6',
+ 'PTFKQCKPHO2VC5SYKS', 'PHUJQCJ9R4XQO5Y0WS']))
def test_withinarea(self):
"""
@@ -226,8 +226,8 @@ class BaseTest(unittest.TestCase):
"""
rule = WithinArea(['P1339', 100, 0])
self.assertEqual(self.filter_with_rule(rule), set([
- b'KJUJQCY580EB77WIVO', b'TLVJQC4FD2CD9OYAXU', b'TE4KQCL9FDYA4PB6VW',
- b'W9GLQCSRJIQ9N2TGDF']))
+ 'KJUJQCY580EB77WIVO', 'TLVJQC4FD2CD9OYAXU', 'TE4KQCL9FDYA4PB6VW',
+ 'W9GLQCSRJIQ9N2TGDF']))
def test_isenclosedby_inclusive(self):
"""
@@ -235,10 +235,10 @@ class BaseTest(unittest.TestCase):
"""
rule = IsEnclosedBy(['P0001', '1'])
self.assertEqual(self.filter_with_rule(rule), set([
- b'c96587262e91149933fcea5f20a', b'EAFKQCR0ED5QWL87EO',
- b'S22LQCLUZM135LVKRL', b'VDUJQCFP24ZV3O4ID2', b'V6ALQCZZFN996CO4D',
- b'OC6LQCXMKP6NUVYQD8', b'CUUKQC6BY5LAZXLXC6', b'PTFKQCKPHO2VC5SYKS',
- b'PHUJQCJ9R4XQO5Y0WS']))
+ 'c96587262e91149933fcea5f20a', 'EAFKQCR0ED5QWL87EO',
+ 'S22LQCLUZM135LVKRL', 'VDUJQCFP24ZV3O4ID2', 'V6ALQCZZFN996CO4D',
+ 'OC6LQCXMKP6NUVYQD8', 'CUUKQC6BY5LAZXLXC6', 'PTFKQCKPHO2VC5SYKS',
+ 'PHUJQCJ9R4XQO5Y0WS']))
if __name__ == "__main__":
diff --git a/gramps/gen/filters/rules/test/repository_rules_test.py b/gramps/gen/filters/rules/test/repository_rules_test.py
index 8d6728e63..11e9d75c0 100644
--- a/gramps/gen/filters/rules/test/repository_rules_test.py
+++ b/gramps/gen/filters/rules/test/repository_rules_test.py
@@ -72,7 +72,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasIdOf(['R0000'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'b39fe38593f3f8c4f12']))
+ set(['b39fe38593f3f8c4f12']))
def test_regexpidof(self):
"""
@@ -80,8 +80,8 @@ class BaseTest(unittest.TestCase):
"""
rule = RegExpIdOf(['R000.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'a701ead12841521cd4d', b'a701e99f93e5434f6f3',
- b'b39fe38593f3f8c4f12']))
+ 'a701ead12841521cd4d', 'a701e99f93e5434f6f3',
+ 'b39fe38593f3f8c4f12']))
def test_hasnoteregexp(self):
"""
@@ -89,7 +89,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasNoteRegexp(['.'], use_regex=True)
self.assertEqual(self.filter_with_rule(rule), set([
- b'a701ead12841521cd4d', b'b39fe38593f3f8c4f12']))
+ 'a701ead12841521cd4d', 'b39fe38593f3f8c4f12']))
def test_hasreferencecountof(self):
"""
@@ -97,7 +97,7 @@ class BaseTest(unittest.TestCase):
"""
rule = HasReferenceCountOf(['greater than', '1'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a701e99f93e5434f6f3']))
+ set(['a701e99f93e5434f6f3']))
def test_repoprivate(self):
"""
@@ -112,7 +112,7 @@ class BaseTest(unittest.TestCase):
"""
rule = ChangedSince(['2010-01-01', '2016-01-01'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a701e99f93e5434f6f3']))
+ set(['a701e99f93e5434f6f3']))
def test_matchesnamesubstringof(self):
"""
@@ -120,7 +120,7 @@ class BaseTest(unittest.TestCase):
"""
rule = MatchesNameSubstringOf(['Martha'])
self.assertEqual(self.filter_with_rule(rule),
- set([b'a701ead12841521cd4d']))
+ set(['a701ead12841521cd4d']))
def test_hastag(self):
"""
diff --git a/gramps/gen/proxy/cache.py b/gramps/gen/proxy/cache.py
index c2a0d3447..ed7845e29 100644
--- a/gramps/gen/proxy/cache.py
+++ b/gramps/gen/proxy/cache.py
@@ -64,8 +64,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_person_from_handle(handle)
return self.cache_handle[handle]
@@ -75,8 +73,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_event_from_handle(handle)
return self.cache_handle[handle]
@@ -86,8 +82,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_family_from_handle(handle)
return self.cache_handle[handle]
@@ -97,8 +91,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_repository_from_handle(handle)
return self.cache_handle[handle]
@@ -108,8 +100,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_place_from_handle(handle)
return self.cache_handle[handle]
@@ -119,8 +109,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_place_from_handle(handle)
return self.cache_handle[handle]
@@ -130,8 +118,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_citation_from_handle(handle)
return self.cache_handle[handle]
@@ -141,8 +127,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_source_from_handle(handle)
return self.cache_handle[handle]
@@ -152,8 +136,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_note_from_handle(handle)
return self.cache_handle[handle]
@@ -163,8 +145,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_media_from_handle(handle)
return self.cache_handle[handle]
@@ -174,8 +154,6 @@ class CacheProxyDb:
Gets item from cache if it exists. Converts
handles to string, for uniformity.
"""
- if isinstance(handle, bytes):
- handle = str(handle, "utf-8")
if handle not in self.cache_handle:
self.cache_handle[handle] = self.db.get_tag_from_handle(handle)
return self.cache_handle[handle]
diff --git a/gramps/gen/proxy/filter.py b/gramps/gen/proxy/filter.py
index e1ecca6bc..b3a35a456 100644
--- a/gramps/gen/proxy/filter.py
+++ b/gramps/gen/proxy/filter.py
@@ -78,8 +78,6 @@ class FilterProxyDb(ProxyDbBase):
Finds a Person in the database from the passed Gramps ID.
If no such Person exists, None is returned.
"""
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
if handle in self.plist:
person = self.db.get_person_from_handle(handle)
if person is None:
@@ -117,23 +115,15 @@ class FilterProxyDb(ProxyDbBase):
return None
def include_person(self, handle):
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
return handle in self.plist
def include_family(self, handle):
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
return handle in self.flist
def include_event(self, handle):
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
return handle in self.elist
def include_note(self, handle):
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
return handle in self.nlist
def get_source_from_handle(self, handle):
@@ -212,8 +202,6 @@ class FilterProxyDb(ProxyDbBase):
Finds a Event in the database from the passed Gramps ID.
If no such Event exists, None is returned.
"""
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
if handle in self.elist:
event = self.db.get_event_from_handle(handle)
# Filter all notes out
@@ -227,8 +215,6 @@ class FilterProxyDb(ProxyDbBase):
Finds a Family in the database from the passed Gramps ID.
If no such Family exists, None is returned.
"""
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
if handle in self.flist:
family = self.db.get_family_from_handle(handle)
if family is None:
@@ -295,8 +281,6 @@ class FilterProxyDb(ProxyDbBase):
Finds a Note in the database from the passed Gramps ID.
If no such Note exists, None is returned.
"""
- if isinstance(handle, bytes):
- handle = str(handle, 'utf-8')
if handle in self.nlist:
return self.db.get_note_from_handle(handle)
else:
diff --git a/gramps/gen/proxy/proxybase.py b/gramps/gen/proxy/proxybase.py
index b35167be4..a2d3009f1 100644
--- a/gramps/gen/proxy/proxybase.py
+++ b/gramps/gen/proxy/proxybase.py
@@ -58,7 +58,7 @@ class ProxyCursor:
def __iter__(self):
for handle in self.get_handles():
- yield bytes(handle, "utf-8"), self.get_raw(handle)
+ yield handle, self.get_raw(handle)
class ProxyMap:
"""
@@ -75,7 +75,7 @@ class ProxyMap:
def keys(self):
""" return the keys """
- return [bytes(key, "utf-8") for key in self.get_keys()]
+ return self.get_keys()
class ProxyDbBase(DbReadBase):
"""
@@ -207,7 +207,7 @@ class ProxyDbBase(DbReadBase):
if (self.db is not None) and self.db.is_open():
proxied = set(self.iter_person_handles())
all = self.basedb.get_person_handles(sort_handles=sort_handles)
- return [hdl for hdl in all if str(hdl, 'utf-8') in proxied]
+ return [hdl for hdl in all if hdl in proxied]
else:
return []
@@ -219,7 +219,7 @@ class ProxyDbBase(DbReadBase):
if (self.db is not None) and self.db.is_open():
proxied = set(self.iter_family_handles())
all = self.basedb.get_family_handles(sort_handles=sort_handles)
- return [hdl for hdl in all if str(hdl, 'utf-8') in proxied]
+ return [hdl for hdl in all if hdl in proxied]
else:
return []
diff --git a/gramps/gui/filters/sidebar/_sidebarfilter.py b/gramps/gui/filters/sidebar/_sidebarfilter.py
index ab3e95202..b28f33c19 100644
--- a/gramps/gui/filters/sidebar/_sidebarfilter.py
+++ b/gramps/gui/filters/sidebar/_sidebarfilter.py
@@ -212,9 +212,6 @@ class SidebarFilter(DbGUIElement):
if self.dbstate.is_open():
for handle in self.dbstate.db.get_tag_handles(sort_handles=True):
tag = self.dbstate.db.get_tag_from_handle(handle)
- # for python3 this returns a byte object, so conversion needed
- if not isinstance(handle, str):
- handle = handle.decode('utf-8')
self.__tag_list.append((tag.get_name(), handle))
self.on_tags_changed([item[0] for item in self.__tag_list])
diff --git a/gramps/gui/glade/editdate.glade b/gramps/gui/glade/editdate.glade
index 2aed504a7..c7d9cc428 100644
--- a/gramps/gui/glade/editdate.glade
+++ b/gramps/gui/glade/editdate.glade
@@ -227,7 +227,7 @@
@@ -340,7 +340,7 @@
start_day
- 0
+ 2
3
@@ -366,7 +366,7 @@
start_year
- 2
+ 0
3
@@ -381,7 +381,7 @@
True
- 0
+ 2
4
@@ -406,7 +406,7 @@
True
- 2
+ 0
4
@@ -436,7 +436,7 @@
stop_day
- 3
+ 5
3
@@ -462,7 +462,7 @@
stop_year
- 5
+ 3
3
@@ -477,7 +477,7 @@
True
- 3
+ 5
4
@@ -502,7 +502,7 @@
True
- 5
+ 3
4
diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py
index 2409f7bec..b122cd1cc 100644
--- a/gramps/gui/views/listview.py
+++ b/gramps/gui/views/listview.py
@@ -209,7 +209,7 @@ class ListView(NavigationView):
self.edit_action.add_actions([
('Add', 'list-add', _("_Add..."), "Insert",
self.ADD_MSG, self.add),
- ('Remove', 'list-remove', _("_Remove"), "Delete",
+ ('Remove', 'list-remove', _("_Delete"), "Delete",
self.DEL_MSG, self.remove),
('Merge', 'gramps-merge', _('_Merge...'), None,
self.MERGE_MSG, self.merge),
diff --git a/gramps/gui/views/treemodels/flatbasemodel.py b/gramps/gui/views/treemodels/flatbasemodel.py
index af31d044a..2b6429a2a 100644
--- a/gramps/gui/views/treemodels/flatbasemodel.py
+++ b/gramps/gui/views/treemodels/flatbasemodel.py
@@ -310,10 +310,7 @@ class FlatNodeMap:
:type path: integer
:return handle: unicode form of the handle
"""
- handle = self._index2hndl[self.real_index(path)][1]
- if not isinstance(handle, str):
- handle = handle.decode('utf-8')
- return handle
+ return self._index2hndl[self.real_index(path)][1]
def iter_next(self, iter):
"""
@@ -567,7 +564,7 @@ class FlatBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel):
# use cursor as a context manager
with self.gen_cursor() as cursor:
#loop over database and store the sort field, and the handle
- srt_keys=[(self.sort_func(data), key.decode('utf8'))
+ srt_keys=[(self.sort_func(data), key)
for key, data in cursor]
srt_keys.sort()
return srt_keys
@@ -796,12 +793,7 @@ class FlatBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel):
val = self._get_value(handle, col)
#print 'val is', val, type(val)
- #GTK 3 should convert unicode objects automatically, but this
- # gives wrong column values, so we convert for python 2.7
- if not isinstance(val, str):
- return val.encode('utf-8')
- else:
- return val
+ return val
def do_iter_previous(self, iter):
#print 'do_iter_previous'
diff --git a/gramps/gui/views/treemodels/peoplemodel.py b/gramps/gui/views/treemodels/peoplemodel.py
index 69884f59e..4a311ecb9 100644
--- a/gramps/gui/views/treemodels/peoplemodel.py
+++ b/gramps/gui/views/treemodels/peoplemodel.py
@@ -168,9 +168,6 @@ class PeopleBaseModel(BaseModel):
cached, name = self.get_cached_value(handle, "SORT_NAME")
if not cached:
name = name_displayer.raw_sorted_name(data[COLUMN_NAME])
- # internally we work with utf-8
- if not isinstance(name, str):
- name = name.decode('utf-8')
self.set_cached_value(handle, "SORT_NAME", name)
return name
@@ -179,9 +176,6 @@ class PeopleBaseModel(BaseModel):
cached, name = self.get_cached_value(handle, "NAME")
if not cached:
name = name_displayer.raw_display_name(data[COLUMN_NAME])
- # internally we work with utf-8 for python 2.7
- if not isinstance(name, str):
- name = name.encode('utf-8')
self.set_cached_value(handle, "NAME", name)
return name
@@ -629,8 +623,6 @@ class PersonTreeModel(PeopleBaseModel, TreeBaseModel):
name_data = data[COLUMN_NAME]
group_name = ngn(self.db, name_data)
- #if isinstance(group_name, str):
- # group_name = group_name.encode('utf-8')
sort_key = self.sort_func(data)
#if group_name not in self.group_list:
diff --git a/gramps/gui/views/treemodels/treebasemodel.py b/gramps/gui/views/treemodels/treebasemodel.py
index f7127c488..ca361f2be 100644
--- a/gramps/gui/views/treemodels/treebasemodel.py
+++ b/gramps/gui/views/treemodels/treebasemodel.py
@@ -537,9 +537,6 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel):
pmon.add_op(status)
with gen_cursor() as cursor:
for handle, data in cursor:
- # for python3 this returns a byte object, so conversion needed
- if not isinstance(handle, str):
- handle = handle.decode('utf-8')
status.heartbeat()
self.__total += 1
if not (handle in skip or (dfilter and not
@@ -865,10 +862,7 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel):
not correspond to a gramps object.
"""
node = self.get_node_from_iter(iter)
- handle = node.handle
- if handle and not isinstance(handle, str):
- handle = handle.decode('utf-8')
- return handle
+ return node.handle
# The following implement the public interface of Gtk.TreeModel
@@ -904,7 +898,6 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel):
if node.handle is None:
# Header rows dont get the foreground color set
if col == self.color_column():
- #color must not be utf-8
return "#000000000000"
# Return the node name for the first column
@@ -917,14 +910,10 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel):
# return values for 'data' row, calling a function
# according to column_defs table
val = self._get_value(node.handle, col, node.secondary)
- #GTK 3 should convert unicode objects automatically, but this
- # gives wrong column values, so convert for python 2.7
+
if val is None:
return ''
- elif not isinstance(val, str):
- return val.decode('utf-8')
- else:
- return val
+ return val
def _get_value(self, handle, col, secondary=False, store_cache=True):
"""
diff --git a/gramps/plugins/db/bsddb/cursor.py b/gramps/plugins/db/bsddb/cursor.py
index f22c6b9ef..3e3fa63ae 100644
--- a/gramps/plugins/db/bsddb/cursor.py
+++ b/gramps/plugins/db/bsddb/cursor.py
@@ -111,11 +111,7 @@ class BsddbBaseCursor:
_flags | flags | (db.DB_RMW if self._update else 0),
**kwargs)
- try:
- return (data[0], loads(data[1])) if data else None
- except UnicodeDecodeError:
- #we need to assume we opened data in python3 saved in python2
- return (data[0], loads(data[1], encoding='utf-8')) if data else None
+ return (data[0].decode('utf-8'), loads(data[1])) if data else None
return get
diff --git a/gramps/plugins/db/bsddb/read.py b/gramps/plugins/db/bsddb/read.py
index bfbad545c..ca2cacca0 100644
--- a/gramps/plugins/db/bsddb/read.py
+++ b/gramps/plugins/db/bsddb/read.py
@@ -108,14 +108,11 @@ def find_byte_surname(key, data):
"""
surn = __index_surname(data[3][5])
# in python 3 we work with unicode internally, but need byte function sometimes
- if isinstance(surn, str):
- return surn.encode('utf-8')
- return surn
+ return surn.encode('utf-8')
def find_fullname(key, data):
"""
Creating a fullname from raw data of a person, to use for sort and index
- returns a byte string
"""
# data[3] -> primary_name
# data[3][4] -> primary given
@@ -140,7 +137,6 @@ def find_fullname(key, data):
def find_surname(key, data):
"""
Creating a surname from raw data of a person, to use for sort and index
- returns a byte string
"""
# data[3][5] -> surname_list
return __index_surname(data[3][5])
@@ -148,7 +144,6 @@ def find_surname(key, data):
def find_surname_name(key, data):
"""
Creating a surname from raw name, to use for sort and index
- returns a byte string
"""
return __index_surname(data[5])
@@ -156,7 +151,6 @@ def __index_surname(surn_list):
"""
All non pa/matronymic surnames are used in indexing.
pa/matronymic not as they change for every generation!
- returns a byte string
"""
if surn_list:
surn = " ".join([x[0] for x in surn_list if not (x[3][0] in [
@@ -196,11 +190,10 @@ class DbBsddbTreeCursor(BsddbBaseCursor):
Iterator
"""
_n = self.next_dup
- to_do = [b'']
+ to_do = ['']
while to_do:
key = to_do.pop()
- key = key.encode('utf-8') if not isinstance(key, bytes) else key
- data = self.set(key)
+ data = self.set(key.encode('utf-8'))
while data:
### FIXME: this is a dirty hack that works without no
### sensible explanation. For some reason, for a readonly
@@ -629,12 +622,9 @@ class DbBsddbRead(DbReadBase, Callback):
Helper function for find_next_