[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 20:12:49 CEST 2013
On 17.05.2013 19:52, Vernon D. Cole wrote:
> I am worried about what the module-level attribute does to thread-safety.
We should clearly document the fact that the module level
attribute serves as default value for new connections - it
should really only be set right after importing the module
or before opening any connections.
> If this feature is kept, it should be a class attribute, not a module
> attribute. We should be doing connections using new style classes.
>
> conn = dbapi_module.Connection()
> conn.paramstyle = 'oddball'
> conn.connect(your, parameters, here)
>
> or
>
> dbapi_module.Connection.paramstyle = 'oddball'
> conn = dbapi_module.Connection().connect(parameters)
Hmm, setting attributes on connections or cursors
isn't thread-safe either, so I'm not sure what the
above would solve.
It also introduces problems with the notion of connection objects
always having an open transaction and be a significant change
in the API.
--
Marc-Andre Lemburg
eGenix.com
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
http://www.egenix.com/company/contact/
More information about the DB-SIG
mailing list