Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 346817

Summary: dev-lang/python-2.7 does not enable loading of sqlite extensions
Product: Gentoo Linux Reporter: Kovid Goyal <kovid>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Kovid Goyal 2010-11-26 03:51:47 UTC
Loading of sqlite extensions was introduced in python 2.7

See http://docs.python.org/library/sqlite3.html#sqlite3.Connection.enable_load_extension

In order for it to be enabled, line 1048 in setup.py has to be commented out by the ebuild.

Loading of sqlite extensions is very useful as it is possible to define C extensions modules to create custom functions/aggregators that are much faster than their python equivalents. Please modify the ebuild to enable this functionality in sqlite. 



Reproducible: Always

Steps to Reproduce:
1. emerge =dev-lang/python-2.7
2. python -c "import sqlite3; sqlite3.connect(':memory:').enable_load_extension(True)"



Actual Results:  
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'sqlite3.Connection' object has no attribute 'enable_load_extension'

Expected Results:  
No output

Two possible fixes:

1) ebuild should patch setup.py as I described above.

2) ebuild can define

CFLAGS="$CFLAGS -DHAVE_LOAD_EXTENSION"
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-11-28 01:16:12 UTC

*** This bug has been marked as a duplicate of bug 335505 ***