delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/10/28/11:46:42

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4632B3851156
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=content-transfer-encoding:mime-version:user-agent:date:to:from
:subject:message-id:from:to:cc:subject:date:message-id:reply-to;
bh=5Si7HsR1d1QsAACiJotNmRX4dMfwz+++t35THXeDx0U=;
b=eYZT7nIcd99QT9+28rUzLaYV/STVsMWc2cSIJRCAVNpqpzWnrG4DR5jfaGE2Zt45o1
pOUXfDTRv2mD1hBcq9olMXv/He6ZWV9Ax3n+2JX951BoX90AK+foB/tjO7fh477IIHi5
/K/SV8HRk7W87zny4lozeqrtClChTR9yCFp2liM7zPnJ6EAv4yiYq8f2XRER1WzvOTf+
F1H+OoYGNZvP+o0OwGNiHp06Ya+D/22lLMWYQSQ3BlOl5e51zPQBuBJNeqDep/KK551Y
goGaekvDHUwAnTp2dThv51Lk9yTGJgxMiIhnGmjxLVRuXoBWzCmT7jiV2GxefBeYUTS1
2udg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=content-transfer-encoding:mime-version:user-agent:date:to:from
:subject:message-id:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=5Si7HsR1d1QsAACiJotNmRX4dMfwz+++t35THXeDx0U=;
b=V7HGPwKSYd1RhiXFXzVAfZuZ7XMrsvhEYgjlbCYkOqlO+bPkMJ1vhk5Sj36VYLOvud
de4SjWZKrIQA2UF/ae5ENdFDn0SoAiEtM8zB8zQMTbAO7Ed7nLTqGqK5UE18B+aW12uO
Q5E9doACwSpx3qpVLycuqy5XDUnCX/tJjSfs65xiAP/v3Zjaw9IDMNTTYlbdmRAkNQzc
z5lGiylmTLFwxTatQzLNPDfcgaLJ4mvVFO5bwBvnHoNkdXBBJoDoEjtQ2m4BY8lNhvnB
8R1IN8btFT4AZ75CfzwGNtpt4964PU9KGDoy5LTwkC+99UkzAdoDKmQsfUbzshP1UMOe
hqcw==
X-Gm-Message-State: ACrzQf3tUlwN3K686M+kZ6R0C71WwiG3Y6/SBiVCKgz5BcnloD9vpgNa
AuKkrKNuKJRHFeJ7H2QakvxX5Cx0umy4Wg==
X-Google-Smtp-Source: AMsMyM56ywqm4ffgUAHZIMVOURL3YMvd7XoYmc8UkY2RKRLEBIst9JdgRQS1vJxZidbqWrJBsNFY5A==
X-Received: by 2002:a05:600c:35cf:b0:3c6:e957:b403 with SMTP id
r15-20020a05600c35cf00b003c6e957b403mr10526649wmq.162.1666971928375;
Fri, 28 Oct 2022 08:45:28 -0700 (PDT)
Message-ID: <d30b13fee7e571fc176543df0bddb043c210f356.camel@gmail.com>
Subject: Python: enable loadable SQLite extension support
From: Martin Carpenter <martin DOT carpenter AT gmail DOT com>
To: cygwin AT cygwin DOT com
Date: Fri, 28 Oct 2022 17:45:26 +0200
User-Agent: Evolution 3.36.5-0ubuntu1
MIME-Version: 1.0
X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

Hi,

Can I please request that the Python 3 package be compiled with "
--enable-loadable-sqlite-extensions"?

I'm trying to use a Python 3 app (datasette) to load an SQLite
extension but it fails with:

AttributeError: 'sqlite3.Connection' object has no attribute
'enable_load_extension'

The Python docs say that --enable-loadable-sqlite-extensions should be
passed at build to enable this (new for 3.6) . See:

 * 
https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension
 * 
https://docs.python.org/3/using/configure.html#cmdoption-enable-loadable-sqlite-extensions


The shipped sqlite3 supports extensions (".load ext.so" works).
Python's sysconfig module shows that Python 3.9.10 on Cygwin does not
have this feature enabled:

>>> import sysconfig
>>> list(filter(lambda x: 'enable' in x,
sysconfig.get_config_vars('CONFIG_ARGS')[0].split(' ')))
["'--enable-shared'", "'--enable-ipv6'"]


For comparison, Python 3.8.10 on Ubuntu 20.04:

>>> list(filter(lambda x: 'enable' in x,
sysconfig.get_config_vars('CONFIG_ARGS')[0].split(' ')))
["'--enable-shared'", "'--enable-ipv6'", "'--enable-loadable-sqlite-
extensions'"]


Equivalent issue from NixOS for reference: 
https://github.com/NixOS/nixpkgs/issues/66526


Thanks,

Martin.





-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019