Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#477 closed defect (fixed)

"from xapian import *" in Python raises AttributeError

Reported by: Michel Pelletier Owned by: Richard Boulton
Priority: normal Milestone: 1.2.1
Component: Xapian-bindings Version: 1.2.0
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description (last modified by Olly Betts)

>>> from xapian import *
Traceback (most recent call last):
  File "<console>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Document_unserialise'
>>>

This appears to be because this name is exported by the module's __all__ but does not actually exist in the module itself:

>>> 'Document_unserialise' in xapian.__all__
True
>>> hasattr(xapian, 'Document_unserialise')
False
>>>

Attachments (1)

477-smoketest-demo.patch (262 bytes ) - added by Olly Betts 15 years ago.
patch smoketest to demonstrate this

Download all attachments as: .zip

Change History (6)

comment:1 by Michel Pelletier, 15 years ago

Sorry for the poor formatting. I should have previewed first:

>>> from xapian import *
Traceback (most recent call last):
  File "<console>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Document_unserialise'
>>> 'Document_unserialise' in xapian.__all__
True
>>> hasattr(xapian, 'Document_unserialise')
False
>>> 


comment:2 by Michel Pelletier, 15 years ago

Version: 1.1.4

I also neglected to mention this is xapian 1.1.4. I will try to verify on 1.2

by Olly Betts, 15 years ago

Attachment: 477-smoketest-demo.patch added

patch smoketest to demonstrate this

comment:3 by Olly Betts, 15 years ago

Component: OtherXapian-bindings
Description: modified (diff)
Milestone: 1.2.1
Owner: changed from Olly Betts to Richard Boulton
Version: 1.1.41.2.0

I see this with trunk, by patching smoketest with the attached patch.

Richard?

comment:4 by Richard Boulton, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r14542.

comment:5 by Olly Betts, 15 years ago

And I've just checked and this doesn't affect 1.0.x.

Note: See TracTickets for help on using tickets.