• Jérome Perrin's avatar
    ZMySQLDA: fix string_literal usage · 8a5f5b5b
    Jérome Perrin authored
    MySQLdb's string_literal is a method from the C API and the name is not
    natural for python programmers, because it manipulates bytes. It
    supports str, unless they have non ASCII characters, so it's better to
    always pass bytes.
    
    On python2, this change repairs a regression visible when searching
    catalog with translated related keys. This regression was introduced in
    the merge of zope4 support, more specifically with 610972af (py3:
    Update Shared.DC.ZRDB.{sqltest,sqlvar} monkey patches., 2022-04-16),
    because with the new version of the patches this method gets passed
    unicode strings, which is fine, unless they contain non ASCII characters.
    8a5f5b5b
DA.py 8.19 KB