Port from gramps34 branch my fix after retest by the bug submitter.
Add a hack protection for descendants like we already have
for ancestors, and add a debug printout.
svn: r23161
Back-merge from trunk changes to date.py and date_test.py
from the following commits (cumulative, clean apply).
Tests pass (but need to block the CAL_FRENCH on date_test.py:199,
because of bug# 7068 -- skipping it wasn't back-ported in this commit as
it is about the fully fixed issues only!)
commit fa49752824bd58802773439b35faa39f2d34b151
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sat Sep 14 15:44:04 2013 +0000
provide sensible defautls for all Date.set params
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23126 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 3f32597699f3b372324ad87e6f7a04abac6d19e7
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sat Sep 14 15:11:09 2013 +0000
7045: Setting an invalid date does not raise
do the sanity checks on a separate date object,
so that the uncertainty expressed with 0 d/m isn't removed
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23124 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 12edf7e97626e01931c4063b2d94bec3b299a2ed
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sat Sep 14 14:23:58 2013 +0000
7065: Calendar conversion broken for negative date
fixed, repro steps work as expected now
date_test still broken due to further blocking issues,
see #7045
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23123 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 091d4461e9715ab06f1ef6ab3b67517d6608daf3
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sat Sep 14 13:24:40 2013 +0000
7045: Date.set on invalid date does not raise
refactor _zero_adjust_ymd out of 3 cut-and-paste cases
the bug with the code inside it remains -- the negative years
should not be clamped to positive ones!!!!
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23122 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 5987046ac4cac407a4be506da9242f7a5000d878
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sat Sep 14 13:00:19 2013 +0000
7045: Date.set on invalid date does not raise
Now it does, but another test breaks:
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 252, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 230, in _get_module_from_name
__import__(name)
File "/home/vassilii/Gramps/gramps/gen/lib/test/date_test.py", line 136, in <module>
d.set(quality,modifier,calendar,(4,11,-90,False),"Text comment")
File "/home/vassilii/Gramps/gramps/gen/lib/date.py", line 1600, in set
format(original, value))
DateError: Invalid year -90 passed in value (4, 11, -90, False)
because the corresponding year gets adjusted from -90 to 1...
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23121 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit d8876cceb64629ce0a025ff714e4875768ab88a6
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sat Sep 14 11:50:58 2013 +0000
7034: fix test_copy_ymd_preserves_orig
broken in r23083
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23120 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 7c163636c8e48149a5b09c211ff3dc146ebd84b2
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Tue Sep 10 17:19:16 2013 +0000
7034: add remove_stop_date parameter
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23083 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit b45e20da3bd67d864420f99cf59fbb9929c58851
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Mon Sep 9 19:31:13 2013 +0000
7034: probably_alive() failing when no birth-death
further refactoring of set_.../set2_... common code
added accessor get_stop_ymd analogous to get_ymd
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23068 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit f13a3fc23e7f0763c49e605b428b6a175c3f9eeb
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Mon Sep 9 19:31:00 2013 +0000
7034: probably_alive() failing when no birth-death
docstring update
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23067 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 9ee312d7ed02520b99d2ca1b28f75c87846aa3c6
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sun Sep 8 19:35:15 2013 +0000
refactor test
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23059 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 07ca997ebd885ad4d1b205907a00509099ac8f9a
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sun Sep 8 19:23:23 2013 +0000
consistency between offset and non-offset setters
added ugly parameter _update2 to set_yr_mon_day, needs refactoring
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23058 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 67a904c529642668fbe34bfc97ef2915278ecbdb
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sun Sep 8 19:23:12 2013 +0000
fix set_yr_mon_day_offset for compound dates
now calls set2_yr_mon_day_offset
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23057 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 3db06c36d6449ec75cde49b433349cddad40d596
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sun Sep 8 19:23:02 2013 +0000
refactor set_yr_mon_day and set2_yr_mon_day
refactor common base
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23056 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 4192680c72cc0028c22fa207fe3f1ff0940358b3
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sun Sep 8 19:22:52 2013 +0000
raise DateError in set2_... if not is_compound()
refactor Date to always use is_compound instead of repeating
its logic everywhere
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23055 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 44195ede18c5a887d4440b4132bd5321f76ce5ff
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sun Sep 8 19:22:40 2013 +0000
Add some UT for Date.set2_... and fix bugs
Cut and paste is evil ;-) fix bugs before I refactor the code...
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23054 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
commit 14f6e3a3f35e0ff7b67006bf4996ce63ae665098
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sun Sep 8 19:22:30 2013 +0000
7034: probably_alive() failing when no birth-death
docstring fix
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23053 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
svn: r23156
Merged from
commit dbae40dd1edad52023b828d5eef0fe7eb3684fb6
Author: Vassilii Khachaturov <vassilii@tarunz.org>
Date: Sat Sep 14 19:42:48 2013 +0000
7066: use sdn module from Calendar package on pypi
Unfortunately, no package on ubuntu for sdn...
Bug fixed on trunk, when sdn is present on the system.
Verified that sdn roundtrip works.
date_test now fails on 1789-13-4(French) recognized as invalid,
as it probably should -- I guess this one is a test bug.
git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23127 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
M gramps/gen/lib/calendar.py
--->M gramps/grampsapp.py
svn: r23132
OOPS. This was tested only with "runtest.sh", but turns out
things are broken with GUI :-) Reverting for now @gramps40,
will investigate on trunk!
svn: r23098
Reapply from trunk.
Now that #7061 is done, all the old code should no longer use
User.begin_.../step_.../end_progress directly any more, preferring
the context manager instead.
The only reject is on gramps/gen/merge/diff.py that doesn't have
any progress callbacks on gramps40. I'm leaving it untouched.
svn: r23097