[MacPorts] #49317: python34 @3.4.3 Allow loading SQLite extensions

MacPorts noreply at macports.org
Sun Oct 18 05:08:53 PDT 2015


#49317: python34 @3.4.3 Allow loading SQLite extensions
--------------------------+----------------------
  Reporter:  m3drano@…    |      Owner:  jwa@…
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.3.4
Resolution:               |   Keywords:  haspatch
      Port:  python34     |
--------------------------+----------------------

Comment (by m3drano@…):

 I agree it should be on by default. I have tested this with the SQLite
 version provided by MacPorts (3.8.11.2) and the system default in El
 Capitan (3.8.10.2). It works perfectly with the port, both with the
 sqlite3 tool and the python library. The default sqlite3 install has
 extension loading disabled (both on the sqlite3 tool and the Python 3
 version provided).

 {{{
 $ /usr/bin/sqlite3
 SQLite version 3.8.10.2 2015-05-20 18:17:19
 Enter ".help" for usage hints.
 Connected to a transient in-memory database.
 Use ".open FILENAME" to reopen on a persistent database.
 sqlite> .load liblibsqlitefunctions.so;
 Error: unknown command or invalid arguments:  "load". Enter ".help" for
 help

 $ sqlite3
 SQLite version 3.8.11.1 2015-07-29 20:00:57
 Enter ".help" for usage hints.
 Connected to a transient in-memory database.
 Use ".open FILENAME" to reopen on a persistent database.
 sqlite> .load liblibsqlitefunctions.so

 $ /usr/bin/python
 Python 2.7.10 (default, Aug 22 2015, 20:33:39)
 [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import sqlite3
 >>> conn = sqlite3.connect('test.db')
 >>> conn.enable_load_extensions(True)
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 AttributeError: 'sqlite3.Connection' object has no attribute
 'enable_load_extensions'
 >>>

 $ python
 Python 3.4.3 (default, Oct 16 2015, 19:24:20)
 [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import sqlite3
 >>> conn = sqlite3.connect('tmp.db')
 >>> conn.enable_load_extension(True)
 >>> conn.load_extension('liblibsqlitefunctions.so')
 >>>
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/49317#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list