[Bug 299796] databases/py-sqlite3: Allow loadable extensions controlled by the EXTENSIONS port option

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 23 Oct 2026 03:13:12 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299796

            Bug ID: 299796
           Summary: databases/py-sqlite3: Allow loadable extensions
                    controlled by the EXTENSIONS port option
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: python@FreeBSD.org
          Reporter: yuri@freebsd.org
             Flags: maintainer-feedback?(python@FreeBSD.org)
          Assignee: python@FreeBSD.org

Created attachment 276175
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=276175&action=edit
patch

The EXTENSIONS option allows the sqlite3 Python module to load extensions.

Rationale:
Users should be able to load extensions.

Extension examples:
* databases/py-sqlite-vec

References:
* The upstream disables this option by default
* Virtually all port systems (Debian, Redhat, Fedora, Arch, etc) extensions by
default in their sqlite3 ports.

Code example:

import sqlite3
import sqlite_vec

# Create your standard SQLite connection
conn = sqlite3.connect(":memory:")

# Enable extension loading on the underlying connection
conn.enable_load_extension(True)

# Automatically locate and load the vec0 library
sqlite_vec.load(conn)

# Optional: Disable extension loading for security
conn.enable_load_extension(False)

# Verify the extension works by checking its version
cursor = conn.cursor()
cursor.execute("select vec_version();")
print(f"sqlite-vec version: {cursor.fetchone()[0]}")

-- 
You are receiving this mail because:
You are the assignee for the bug.