On Fri, 2012-04-20 at 17:14 -0700, Toshio Kuratomi wrote:
> On Sat, Apr 21, 2012 at 12:46:38AM +0200, Volker Froehlich wrote:
> > Hello!
> > 
> > I noticed, our Python 2.7 package does not allow to load SQLite
> > extensions from shared libraries. This must be configured at
> > build-time. 
> > 
> > Is there a strong reason for this configuration, or could we possibly
> > change that, if necessary?
> > 
> Not sure what you're asking for here.
> 
> $ python
> 
> >>> import sqlite3
> >>>
> 
> 
> $ rpm -ql python-libs |grep sqlite3.so
> /usr/lib64/python2.7/lib-dynload/_sqlite3.so
> 
> The sqlite module seems to be built into our python just fine....
> 
> -Toshio

Yes, that's all fine, but:

"Connection.enable_load_extension(enabled)
        
        This routine allows/disallows the SQLite engine to load SQLite
        extensions from shared libraries. SQLite extensions can define
        new functions, aggregates or whole new virtual table
        implementations. One well-known extension is the fulltext-search
        extension distributed with SQLite.
        
        Loadable extensions are disabled by default. See [1].
        
        New in version 2.7.
"

http://docs.python.org/library/sqlite3.html#f1


[makerpm@desktop fedora-packaging]$
python                                       
Python 2.7.2 (default, Oct 27 2011,
01:40:22)                                    
[GCC 4.6.1 20111003 (Red Hat 4.6.1-10)] on
linux2                                
Type "help", "copyright", "credits" or "license" for more
information.           
>>> import
sqlite3                                                               
>>>                                                                             
>>>  
>>> con =
sqlite3.connect(":memory:")                                            
>>>                                                                             
>>>  
>>> # enable extension
loading                                                   
... con.enable_load_extension(True)
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
AttributeError: 'sqlite3.Connection' object has no attribute
'enable_load_extension'

Volker


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to