[DB-SIG] API 3.0 limiting paramstyle to ['named', 'qmark'] is okay. ('format' is not desirable)

M.-A. Lemburg mal at egenix.com
Fri May 17 16:43:07 CEST 2013

On 17.05.2013 15:59, Michael Bayer wrote:
> On May 17, 2013, at 6:42 AM, M.-A. Lemburg <mal at egenix.com> wrote:
>> On 17.05.2013 12:09, Vernon D. Cole wrote:
>>> I short time ago I commented to this forum that the 'format' paramstyle was
>>> important to keep, because of widespread use, citing django as an example.
>>> I have taken the question to the django developers group and received a
>>> response that they don't really like the 'format' paramstyle and would be
>>> happy to have a reason to change.
>>> I therefor rescind my previous objection.
>> psychopg2 uses the 'format' paramstyle and while I agree that
>> it has issues, I think the existing code base using
>> it is large enough that we cannot easily remove that
>> paramstyle :-(
>> I'd love to hear what Daniele thinks about this.
> there's no reason a DBAPI can't keep a particular paramstyle, we just want to make it so that *all* DBAPIs definitely support "named" and "qmark".  The rest are just optional.

The original plan was to simplify the DB-API by reducing the
number of possible paramstyles, but you're probably right: it's
better to just require support for a few and leave other paramstyles
as option to the module authors, if they choose to support more than
just the two basic ones.

That way people writing new code can focus on just those two
styles, while existing applications can continue to work with the
optional ones.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, May 17 2013)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
2013-05-07: Released mxODBC Zope DA 2.1.2 ...     http://egenix.com/go46
2013-05-06: Released mxODBC 3.2.3 ...             http://egenix.com/go45

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the DB-SIG mailing list