[Xapian-tickets] [Xapian] #346: Python 3 support

Xapian nobody at xapian.org
Mon Jun 18 00:41:16 BST 2012


#346: Python 3 support
--------------------------------------+-------------------------------------
 Reporter:  olly                      |       Owner:  richard  
     Type:  defect                    |      Status:  assigned 
 Priority:  highest                   |   Milestone:  1.3.2    
Component:  Xapian-bindings (Python)  |     Version:  SVN trunk
 Severity:  normal                    |    Keywords:           
Blockedby:                            |    Platform:  All      
 Blocking:                            |  
--------------------------------------+-------------------------------------

Comment(by olly):

 Sorry, what's more like a 50-50 split?  I can't see where I mentioned any
 ratios, so I'm unclear what you're talking about there.

 I worry that doing half the job risks us discovering later that the
 planned approach for the second stage doesn't work so well in practice, at
 which point we either have a suboptimal API or have to go through the pain
 (as both developers and users) of deprecation.

 I'm also not really sure whether the "returns bytes" version should always
 be the one named after the wrapped C++ method with a _utf8() or _unicode()
 or whatever variant, or if it's better to switch them and have the
 unsuffixed name return a Unicode string, with _bytes() or _raw() or
 something for the bytes version.  Handling text is the more common case,
 and the parts where you're handling raw bytes seem like the "doing
 something special" case.

 I think we need to decide if making it easy to write code which works with
 both is important, and also whether minimising changes required to make
 existing code work with the python3 version is important (the two aren't
 the same).  If you have to make extensive modifications to your code to
 make it work with both, you may be happier to simply have a parallel
 version of the module for each version, and a simple wrapper to load the
 right one (like our smoketest.py).

-- 
Ticket URL: <http://trac.xapian.org/ticket/346#comment:37>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list