Il Thursday 03 July 2008 17:16:05 Lars Christian Raae ha scritto:
> Hello,
>
> the problem lies with the function 'record_add_field' in 'bibrecord.py'
> where 'datafield_subfield_code_value_tuples' keeps it's values between
> each call. See
> http://www.ferg.org/projects/python_gotchas.html#contents_item_6 (thanks
> Tibor!) for more information about this bug and how to fix it.
>
> Lars

Ouch and there are many of them...

$> egrep -r "def .*\(.*=\{" * --include=*.py -n
bibformat/lib/bibformatadminlib.py:482:def 
perform_request_output_format_show(bfo, ln=CFG_SITE_LANG, r_fld=[], r_val=[], 
r_tpl=[], default="", r_upd="", args={}):
bibformat/lib/bibformat_engine.py:523:def eval_format_element(format_element, 
bfo, parameters={}, verbose=0):
miscutil/lib/urlutils.py:191:def create_html_link(urlbase, urlargd, 
link_label, linkattrd={},
webjournal/lib/webjournal_utils.py:880:def make_journal_url(current_uri, 
custom_parameters={}):
websearch/lib/websearch_templates.py:403:    def build_search_url(self, 
known_parameters={}, **kargs):
websearch/lib/websearch_templates.py:430:    def 
build_search_interface_url(self, known_parameters={}, **kargs):
webstat/lib/webstat.py:394:def perform_display_keyevent(id=None, args={}, 
req=None, ln=CFG_SITE_LANG):
webstat/lib/webstat.py:474:def perform_display_customevent(ids=[], args={}, 
req=None, ln=CFG_SITE_LANG):

$> egrep -r "def .*\(.*=\[" * --include=*.py -n
bibedit/lib/bibrecord.py:526:def print_rec(rec, format=1, tags=[]):
bibedit/lib/bibrecord.py:540:def print_recs(listofrec, format=1, tags=[]):
bibedit/lib/bibrecord.py:556:def record_xml_output(rec, tags=[]):
bibformat/lib/bibformat_utils.py:43:def highlight(text, keywords=[], 
prefix_tag='<strong>', suffix_tag="</strong>"):
bibformat/lib/bibformat.py:63:def format_record(recID, of, ln=CFG_SITE_LANG, 
verbose=0, search_pattern=[],
bibformat/lib/bibformatadminlib.py:482:def 
perform_request_output_format_show(bfo, ln=CFG_SITE_LANG, r_fld=[], r_val=[], 
r_tpl=[], default="", r_upd="", args={}):
bibformat/lib/bibformatadminlib.py:874:def update_output_format_rules(code, 
rules=[], default=""):
bibformat/lib/bibformat_engine.py:1727:    def __init__(self, recID, 
ln=CFG_SITE_LANG, search_pattern=[],
bibharvest/web/admin/bibharvestadmin.py:58:def editsource(req, 
oai_src_id=None, oai_src_name='', oai_src_baseurl='', oai_src_prefix='', 
oai_src_frequency='', oai_src_config='', oai_src_post='', ln=CFG_SITE_LANG, 
mtype='', callback='yes', confirm=-1, oai_src_sets=[], oai_src_bibfilter=''):
bibharvest/web/admin/bibharvestadmin.py:96:def addsource(req, 
ln=CFG_SITE_LANG, oai_src_name='', oai_src_baseurl ='', oai_src_prefix='', 
oai_src_frequency='', oai_src_lastrun='', oai_src_config='', oai_src_post='', 
confirm=-1, oai_src_sets=[], oai_src_bibfilter=''):
bibharvest/lib/oaiarchiveadminlib.py:408:def drop_down_menu(boxname, 
list=['Select', 'selected', 'select']):
bibharvest/lib/oaiarchiveadminlib.py:634:def transform_tuple(header=[], 
tuple=[], start='', end='', extracolumn=''):
bibharvest/lib/oaiarchiveadminlib.py:691:def nice_box(header='', datalist=[], 
cls="admin_wvar"):
bibharvest/lib/bibharvestadminlib.py:119:def 
perform_request_editsource(oai_src_id=None, oai_src_name='', 
oai_src_baseurl='', oai_src_prefix='', oai_src_frequency='', 
oai_src_config='', oai_src_post='',ln=CFG_SITE_LANG, confirm=-1, 
oai_src_sets=[], oai_src_bibfilter=''):
bibharvest/lib/bibharvestadminlib.py:210:def 
perform_request_addsource(oai_src_name=None, oai_src_baseurl='', 
oai_src_prefix='', oai_src_frequency='', oai_src_lastrun='', 
oai_src_config='', oai_src_post='', ln=CFG_SITE_LANG, confirm=-1, 
oai_src_sets=[], oai_src_bibfilter=''):
bibharvest/lib/bibharvestadminlib.py:426:def modify_oai_src(oai_src_id, 
oai_src_name, oai_src_baseurl, oai_src_prefix, oai_src_frequency, 
oai_src_config, oai_src_post, oai_src_sets=[], oai_src_bibfilter=''):
bibharvest/lib/bibharvestadminlib.py:441:def add_oai_src(oai_src_name, 
oai_src_baseurl, oai_src_prefix, oai_src_frequency, oai_src_lastrun, 
oai_src_config, oai_src_post, oai_src_sets=[], oai_src_bibfilter=''):
bibindex/web/admin/bibindexadmin.py:58:def addtag(req, fldID, 
ln=CFG_SITE_LANG, value=['',-1], name='', callback='yes', confirm=-1):
bibindex/lib/bibindexadminlib.py:391:def 
perform_modifyindextranslations(idxID, ln=CFG_SITE_LANG, sel_type='', 
trans=[], confirm=-1, callback='yes'):
bibindex/lib/bibindexadminlib.py:470:def 
perform_modifyfieldtranslations(fldID, ln=CFG_SITE_LANG, sel_type='', 
trans=[], confirm=-1, callback='yes'):
bibindex/lib/bibindexadminlib.py:1015:def perform_addtag(fldID, 
ln=CFG_SITE_LANG, value=['',-1], name='', callback="yes", confirm=-1):
bibrank/lib/bibrankadminlib.py:724:def addadminbox(header='', datalist=[], 
cls="admin_wvar"):
bibrank/lib/bibrankadminlib.py:770:def tupletotable(header=[], tuple=[], 
start='', end='', extracolumn=''):
bibrank/lib/bibrankadminlib.py:839:def tupletotable_onlyselected(header=[], 
tuple=[], selected=[], start='', end='', extracolumn=''):
bibrank/lib/bibrankadminlib.py:866:def addcheckboxes(datalist=[], 
name='authids', startindex=1, checked=[]):
bibrank/lib/bibrank_record_sorter.py:166:def rank_records(rank_method_code, 
rank_limit_relevance, hitset_global, pattern=[], verbose=0):
bibsched/lib/bibsched.py:111:def get_task_ids_by_descending_date(task_name, 
statuses=['SCHEDULED']):
miscutil/lib/colorize.py:95:    def __init__(self, raw, out=sys.stdout, 
not_covered=[]):
miscutil/lib/colorize.py:194:def colorize_file(filename, outstream=sys.stdout, 
not_covered=[]):
miscutil/lib/dbquery.py:135:def run_sql_cached(sql, param=None, n=0, 
with_desc=0, affected_tables=['bibrec']):
webaccess/web/admin/webaccessadmin.py:57:def resetdefaultsettings(req, 
superusers=[], confirm=0):
webaccess/web/admin/webaccessadmin.py:65:def adddefaultsettings(req, 
superusers=[], confirm=0):
webaccess/web/admin/webaccessadmin.py:330:def modifyauthorizations(req, 
id_role="0", id_action="0", reverse=0, confirm=0, sel='', errortext='', 
authids=[]):
webaccess/lib/access_control_admin.py:997:def 
acc_delete_possible_actions(id_role=0, id_action=0, authids=[]):
webaccess/lib/access_control_admin.py:1733:def 
acc_merge_argument_groups(id_role=0, id_action=0, arglistids=[]):
webaccess/lib/access_control_admin.py:1787:def 
acc_reset_default_settings(superusers=[],
webaccess/lib/access_control_admin.py:1823:def 
acc_add_default_settings(superusers=[],
webaccess/lib/webaccessadmin_lib.py:360:def perform_resetdefaultsettings(req, 
superusers=[], confirm=0):
webaccess/lib/webaccessadmin_lib.py:440:def perform_adddefaultsettings(req, 
superusers=[], confirm=0):
webaccess/lib/webaccessadmin_lib.py:2818:def perform_modifyauthorizations(req, 
id_role="0", id_action="0", reverse=0, confirm=0, errortext='', sel='', 
authids=[]):
webaccess/lib/webaccessadmin_lib.py:3009:def modifyauthorizationsmenu(id_role, 
id_action, tuple=[], header=[],
webaccess/lib/webaccessadmin_lib.py:3087:def splitgroups(id_role=0, 
id_action=0, authids=[]):
webaccess/lib/webaccessadmin_lib.py:3121:def mergegroups(id_role=0, 
id_action=0, authids=[]):
webaccess/lib/webaccessadmin_lib.py:3153:def deleteselected(id_role=0, 
id_action=0,  authids=[]):
webbasket/lib/webbasket_templates.py:187:    def tmpl_baskets_infobox(self, 
basket_infos=[], create_link='',
webbasket/lib/webbasket_templates.py:1401:    def tmpl_add_group(self, bskid, 
selected_topic, groups=[], ln=CFG_SITE_LANG):
webbasket/lib/webbasket_templates.py:1517:    def tmpl_warnings(self, 
warnings=[], ln=CFG_SITE_LANG):
webbasket/lib/webbasket_templates.py:1558:    def tmpl_xml_basket(self, 
items=[]):
webbasket/lib/webbasket_dblayer.py:433:def add_to_basket(uid, recids=[], 
bskids=[]):
webbasket/lib/webbasket.py:358:def perform_request_add(uid, recids=[], 
bskids=[], referer='',
webbasket/lib/webbasket.py:827:def create_infobox(infos=[]):
webcomment/lib/webcommentadminlib.py:184:def 
perform_request_del_com(ln=CFG_SITE_LANG, comIDs=[]):
webcomment/lib/webcommentadminlib.py:205:def 
suppress_abuse_report(ln=CFG_SITE_LANG, comIDs=[]):
webcomment/lib/webcomment_templates.py:167:    def 
tmpl_get_first_comments_with_ranking(self, recID, ln, comments=None, 
nb_comments_total=None, avg_score=None, warnings=[]):
webcomment/lib/webcomment.py:961:def check_recID_is_in_range(recID, 
warnings=[], ln=CFG_SITE_LANG):
webjournal/web/admin/webjournaladmin.py:271:def issue_control(req, 
journal_name="", issue=[],
webmessage/lib/webmessage_templates.py:46:    def tmpl_display_inbox(self, 
messages, infos=[], warnings=[], nb_messages=0, no_quota=0, 
ln=CFG_SITE_LANG):
webmessage/lib/webmessage.py:87:def perform_request_display(uid, errors=[], 
warnings=[], infos=[], ln=CFG_SITE_LANG):
websearch/web/admin/websearchadmin.py:483:def 
update_detailed_record_options(req, colID, ln=CFG_SITE_LANG, tabs=[], 
recurse=0):
websearch/web/admin/websearchadmin.py:584:def modifyoutputformat(req, colID, 
ln=CFG_SITE_LANG, fmtID=-1, sel_type='', trans=[], confirm=-1):
websearch/lib/websearchadminlib.py:76:def perform_modifytranslations(colID, 
ln, sel_type='', trans=[], confirm=-1, callback='yes'):
websearch/lib/search_engine.py:2621:def print_results_overview(req, colls, 
results_final_nb_total, results_final_nb, cpu_time, ln=CFG_SITE_LANG, ec=[]):
websearch/lib/search_engine.py:2728:def print_records(req, recIDs, jrec=1, 
rg=10, format='hb', ot='', ln=CFG_SITE_LANG, relevances=[], 
relevances_prologue="(", relevances_epilogue="%%)", 
decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, 
print_records_epilogue_p=True, verbose=0, tab=''):
websession/lib/webgroup.py:49:def perform_request_groups_display(uid, 
infos=[], errors = [], warnings = [], \
webstat/lib/webstat.py:113:def create_customevent(id=None, name=None, 
cols=[]):
webstat/lib/webstat.py:248:def cache_keyevent_trend(ids=[]):
webstat/lib/webstat.py:294:def cache_customevent_trend(ids=[]):
webstat/lib/webstat.py:474:def perform_display_customevent(ids=[], args={}, 
req=None, ln=CFG_SITE_LANG):
webstyle/lib/webpage.py:235:def adderrorbox(header='', datalist=[]):
websubmit/lib/websubmitadmin_templates.py:174:    def _create_adminbox(self, 
header="", datalist=[], cls="admin_wvar"):
websubmit/lib/websubmit_templates.py:1157:    def tmpl_bibdoc_filelist(self, 
ln, versions=[], imageurl='', recid='', docname=''):

Cheers,
        Sam

-- 
.O.
..O
OOO

Reply via email to