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

Xapian nobody at xapian.org
Wed Sep 25 13:04:30 BST 2013


#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                    |        Resolution:
 Keywords:                            |        Blocked By:
 Blocking:                            |  Operating System:  All
--------------------------------------+------------------------------
\
\
\
\
\
\

Comment (by james):

 Agree on !QueryParser and specified encodings.

 You've convinced me (the values argument is the key one) that having a
 wrapper ourselves isn't really going to be feasible. I still think we're
 going to see people generating wrappers though, as people work through the
 same line of thinking I came from and come to similar unsafe conclusions.
 (I wasn't thinking either at a method or class level, but that you'd
 choose to use the entire API in str-mode. For an awful lot of simple use
 cases that would suffice; except for values, which are too common and
 useful to ignore.)

 I suspect an awful lot of people are going to move everything into py3 str
 objects anyway, but I do like the idea of not requiring it. Although I
 don't think that lack of criticism of the `dbm` API tells us much (my
 guess is most people don't need to use it, and those who do probably have
 a better understanding of what they're doing than a lot of people picking
 up python — or even xapian via python — and wanting to get stuff working),
 the utility of auto-conversion on the way in seems a good tradeoff. I
 still feel odd about it always ejecting `bytes`, but I can't think of a
 better approach. And as you say, it's easy to explain. (It will cause
 similar unicode problems to those people encounter with py2, so we'll
 probably need a FAQ at some point. Depends a bit on where you send the
 `bytes` if you fail to convert to a `str`, and what the libraries you're
 using do in those situations.)
\
\
\

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



More information about the Xapian-tickets mailing list