GEPS 032: Python 3 support/Python 3 Deprecated

From Gramps
Revision as of 13:36, 6 May 2009 by Romjerome (talk | contribs)
Jump to: navigation, search

python -3 gramps.py on trunk (2009-05-06)

module warnings (deprecation, runtime) . .
AutoComp.py:159: : the cmp argument is not supported in 3.x keys.sort(self.by_value)
BasicUtils/_NameDisplay.py:225: : the cmp argument is not supported in 3.x keys.sort(self._sort_name_format)
BasicUtils/_NameDisplay.py:349: : the cmp argument is not supported in 3.x d_keys.sort(_make_cmp) # reverse sort by ikeyword
BasicUtils/_NameDisplay.py:366: : the cmp argument is not supported in 3.x d_keys.sort(_make_cmp) # reverse sort by keyword
DataViews/GrampletView.py:782: classic int division r += t/2
DataViews/GrampletView.py:1184: : the cmp argument is not supported in 3.x gramplets.sort(lambda a, b: cmp(a.row, b.row))
DataViews/GrampletView.py:1330: : classic int division if x < (sx/len(self.columns) * (i + 1)):
DataViews/PedigreeView.py:841: : classic int division if i > 0 and lst[((i+1)/2)-1]:
DataViews/PedigreeView.py:843: : classic int division fam = lst[((i+1)/2)-1][2]
DataViews/PedigreeView.py:847: : classic int division pw.connect("button-press-event",

self.missing_parent_button_press_cb,lst[((i+1)/2)-1][0].get_handle(),fam_h)

DataViews/PedigreeView.py:860: : classic int division if self.show_images and i < ((len(positions)-1)/2) and positions[i][0][3] > 1:
DataViews/PedigreeView.py:984: : classic int division ymid = int(math.floor(ymax/2))
DataViews/PedigreeView.py:993: : classic int division ymid = int(math.floor(ymax/4))
DataViews/PedigreeView.py:1002: : classic int division ymid = int(math.floor(ymax/4*3))
DataViews/PedigreeView.py:1068: : classic int division gap = alloc.height / (h*2)
DataViews/PedigreeView.py:1077: : classic int division area.window.draw_line(gc, 0, alloc.height/2, alloc.width/2,alloc.height/2)
DataViews/PedigreeView.py:1083: : classic int division area.window.draw_line(gc, alloc.width/2, alloc.height/2, alloc.width/2,gap)
DataViews/PedigreeView.py:1084: : classic int division area.window.draw_line(gc, alloc.width/2, gap, alloc.width,gap)
DataViews/PedigreeView.py:1090: : classic int division area.window.draw_line(gc, alloc.width/2, alloc.height/2, alloc.width/2,alloc.height-gap)
DataViews/PedigreeView.py:1091: : classic int division area.window.draw_line(gc, alloc.width/2, alloc.height-gap, alloc.width,alloc.height-gap)
DateHandler/_DateParser.py:276: : the cmp argument is not supported in 3.x keys.sort(lambda x, y: cmp(len(y), len(x)))
DisplayModels/_BaseModel.py:220: the cmp argument is not supported in 3.x reverse=self.reverse)
DisplayModels/_PeopleModel.py:96: : the cmp argument is not supported in 3.x mylist.sort(locale.strcoll)
DisplayModels/_PeopleModel.py:196: : the cmp argument is not supported in 3.x slist.sort(lambda x, y: locale.strcoll(x[0], y[0]))
DisplayModels/_PeopleModel.py:358: DeprecationWarning: classic int division interval=len(handle_list)/10)
DisplayState.py:223: : the cmp argument is not supported in 3.x rfiles.sort(by_time)
Editors/_EditPrimary.py:139: : comparing unequal types not supported in 3.x self.empty_object().serialize()[1:]) == 0
gen/db/base.py:1419: the cmp argument is not supported in 3.x handle_list.sort(self.__sortbymedia)
gen/db/dbdir.py:2034: : comparing unequal types not supported in 3.x old_version = map(int, db.__version__.split(".",2)[:2]) < (4, 7)
gen/lib/calendar.py:435: : classic int division - _GRG_SDN_OFFSET )
gen/lib/calendar.py:442: : classic int division century = temp / _GRG_DAYS_PER_400_YEARS
gen/lib/calendar.py:445: : classic int division temp = ((temp % _GRG_DAYS_PER_400_YEARS) / 4) * 4 + 3
gen/lib/calendar.py:446: : classic int division year = (century * 100) + (temp / _GRG_DAYS_PER_4_YEARS)
gen/lib/calendar.py:447: : classic int division day_of_year = (temp % _GRG_DAYS_PER_4_YEARS) / 4 + 1
gen/lib/calendar.py:451: : classic int division month = temp / _GRG_DAYS_PER_5_MONTHS
gen/lib/calendar.py:452: : classic int division day = (temp % _GRG_DAYS_PER_5_MONTHS) / 5 + 1
gen/lib/date.py:1248: classic int division dv[Date._POS_YR] -= int((-dv[Date._POS_MON]) / 12) + 1
gen/lib/grampstype.py:70: : Overriding __cmp__ blocks inheritance of __hash__ in 3.x class GrampsType(object):
GrampsCfg.py:1076: classic int division color.green/256,
GrampsCfg.py:1077: classic int division color.blue/256)
GrampsLogger/_ErrorReportAssistant.py:5: : in 3.x, bsddb has been removed please use the pybsddb project, instead import sys, os,bsddb
ListModel.py:215: comparing unequal types not supported in 3.x if col < 0:
plugins/BookReport.py:707: RuntimeWarning: missing handler 'on_booklist_ok_clicked', missing handler 'on_booklist_cancel_clicked', missing handler 'on_booklist_delete_clicked' "destroy_passed_object" : self.close
plugins/Records.py:298: the cmp argument is not supported in 3.x lowest.sort(lambda a,b: cmp(a[0], b[0]))
plugins/drawreport/AncestorTree.py:86: classic int division delta = int((self.size/(2**(x))))
plugins/drawreport/AncestorTree.py:87: DeprecationWarning: classic int division new_y = int((delta/2) + (y)*delta)
plugins/drawreport/AncestorTree.py:98: classic int division delta = int(self.size/(2**x))
plugins/drawreport/AncestorTree.py:99: classic int division y = int(delta/2 + ty*delta)
plugins/drawreport/DescendTree.py:205: classic int division if col_x/2 >= self.max_generations:
plugins/drawreport/StatisticsChart.py:739: classic int division half = (len(_Extract.extractors))/2
plugins/drawreport/StatisticsChart.py:547: the cmp argument is not supported in 3.x index.sort(self.lookup_compare)
plugins/drawreport/TimeLine.py:265: classic int division low = int((low/10))*10
plugins/drawreport/TimeLine.py:266: classic int division high = int(((high+9)/10))*10
plugins/drawreport/TimeLine.py:135: the cmp argument is not supported in 3.x self.plist.sort(self.sort_func)
plugins/drawreport/TimeLine.py:225: classic int division incr = (year_high - year_low)/5
plugins/textreport/PlaceReport.py:82: the cmp argument is not supported in 3.x self.place_handles.sort(self.sort.by_place_title)
plugins/textreport/PlaceReport.py:142: the cmp argument is not supported in 3.x event_handles.sort(self.sort.by_date)
plugins/textreport/PlaceReport.py:205: the cmp argument is not supported in 3.x person_list.sort(self.sort.by_last_name)
plugins/webreport/NarrativeWeb.py:318: the cmp argument is not supported in 3.x sorted_first_letter.sort(locale.strcoll)
plugins/webreport/NarrativeWeb.py:341: classic int division nrows = (num_ltrs / 26) + 1
plugins/webreport/NarrativeWeb.py:3630: the cmp argument is not supported in 3.x temp_list.sort(locale.strcoll)
plugins/webreport/NarrativeWeb.py:3633: the cmp argument is not supported in 3.x slist.sort(lambda x, y: locale.strcoll(x[0], y[0]))
plugins/webreport/NarrativeWeb.py:2053: classic int division center = int(max_size/2)
plugins/webreport/NarrativeWeb.py:2068: classic int division gen_offset = int(max_size / pow(2, gen_nr+1))
plugins/webreport/NarrativeWeb.py:1981: classic int division top = center - _HEIGHT/2
plugins/webreport/NarrativeWeb.py:2017: classic int division (y0, x0, _HGAP/2))
plugins/webreport/NarrativeWeb.py:2019: classic int division (y0+_SHADOW, x0, _HGAP/2+_SHADOW))
plugins/webreport/NarrativeWeb.py:2027: classic int division x0 = _XOFFSET + col * _WIDTH + (col-1)*_HGAP + _HGAP/2
plugins/webreport/NarrativeWeb.py:2029: classic int division (y1, x0, _HGAP/2))
plugins/webreport/NarrativeWeb.py:2031: classic int division (y1+_SHADOW, x0+_SHADOW, _HGAP/2+_SHADOW))
plugins/webreport/NarrativeWeb.py:1574: the cmp argument is not supported in 3.x temp_keys.sort(locale.strcoll)
plugins/webreport/NarrativeWeb.py:1127: the cmp argument is not supported in 3.x handle_list.sort(sort.by_place_title)
plugins/webreport/NarrativeWeb.py:738: the cmp argument is not supported in 3.x cmp = locale.strcoll)
plugins/webreport/NarrativeWeb.py:1699: the cmp argument is not supported in 3.x keys.sort(locale.strcoll)
plugins/webreport/NarrativeWeb.py:1809: the cmp argument is not supported in 3.x mlist.sort(sort.by_media_title)
plugins/webreport/NarrativeWeb.py:3142: the cmp argument is not supported in 3.x photo_keys.sort(sort.by_media_title)
plugins/webreport/WebCal.py:1846: comparing unequal types not supported in 3.x day_list.sort()
plugins/gramplet/FanChartGramplet.py:301: classic int division self.draw_text(cr, name, radius - self.pixels_per_generation/2,
plugins/gramplet/FanChartGramplet.py:343: classic int division cr.move_to(- (width / pango.SCALE) / 2.0, - radius)
plugins/gramplet/FanChartGramplet.py:482: classic int division cx = w/2
plugins/gramplet/FanChartGramplet.py:483: classic int division cy = h/2
plugins/gramplet/GivenNameGramplet.py:86: the cmp argument is not supported in 3.x givensubname_sort.sort(lambda a,b: -cmp(a,b))
plugins/gramplet/GivenNameGramplet.py:94: the cmp argument is not supported in 3.x cloud_names.sort(lambda a,b: cmp(a[1], b[1]))
plugins/gramplet/PluginManagerGramplet.py:59: urllib.urlopen() has been removed in Python 3.0 in favor of urllib2.urlopen()
plugins/gramplet/SurnameCloudGramplet.py:99: the cmp argument is not supported in 3.x surname_sort.sort(lambda a,b: -cmp(a,b))
plugins/gramplet/SurnameCloudGramplet.py:107: the cmp argument is not supported in 3.x cloud_names.sort(lambda a,b: cmp(a[1], b[1]))
plugins/gramplet/TopSurnamesGramplet.py:83: : the cmp argument is not supported in 3.x surname_sort.sort(lambda a,b: -cmp(a,b))
plugins/lib/libcairodoc.py:1085: classic int division align_x = - layout_width / 2
plugins/lib/libcairodoc.py:1092: classic int division align_y = - layout_height / 2
plugins/quickview/all_events.py:54: the cmp argument is not supported in 3.x event_list.sort(by_date)
plugins/quickview/all_events.py:95: the cmp argument is not supported in 3.x event_list.sort(fam_sort)
plugins/quickview/all_events.py:96: the cmp argument is not supported in 3.x event_list_children.sort(fam_sort)
QuickReports.py:94: : the cmp argument is not supported in 3.x showlst.sort(by_menu_name)
ReportBase/_ReportUtils.py:1820: classic int division amount = int(num / vals[i])
ScratchPad.py:1234: RuntimeWarning: missing handler 'on_scratch_pad_delete_event' "on_help_clicked": self.on_help_clicked,
Utils.py:1198: the cmp argument is not supported in 3.x keys.sort(lambda a,b: -cmp(len(a), len(b)))
ViewManager.py:1400: : the cmp argument is not supported in 3.x lst.sort(by_menu_name)
widgets/monitoredwidgets.py:539: : the cmp argument is not supported in 3.x keys.sort(self.__by_value)