DBI module deprecated at Python 2.5--what to use in its place?

D

dana

I have a variety of Python 2.4 scripts that utilitize the DBI and ODBC
modules together. Although I don't have Python 2.5, I've been informed
the DBI module has been deprecated at 2.5. A few questions:

1) Although deprecated, will it work at all in 2.5? Does the fact that
it is deprecrated mean it has been removed entirely, or does Python
2.5 simply issuing a warning?

2) What do I use in place of DBI for my Python 2.4. scripts that
import modules DBI and ODBC together. I don't use DBI directly. It was
simply a dependency for the ODBC module as best I knew.

Thanks.

Dana
 
J

John Machin

I have a variety of Python 2.4 scripts that utilitize the DBI and ODBC
modules together. Although I don't have Python 2.5, I've been informed
the DBI module has been deprecated at 2.5.

A few questions:

1) Although deprecated, will it work at all in 2.5? Does the fact that
it is deprecrated mean it has been removed entirely, or does Python
2.5 simply issuing a warning?

Deprecated certainly doesn't mean removed.
2) What do I use in place of DBI for my Python 2.4. scripts that
import modules DBI and ODBC together. I don't use DBI directly. It was
simply a dependency for the ODBC module as best I knew.

For a start, none of (DBI, ODBC, dbi, odbc) are standard Python-
supplied modules. Perhaps you are referring to the odbc (and dbi) from
the pywin32 package? Where did you get them from? If you can't
remember, try this:

|Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)]
on win32
| Type "help", "copyright", "credits" or "license" for more
information.
| >>> import odbc
| >>> odbc.__file__
| 'C:\\python24\\lib\\site-packages\\win32\\odbc.pyd'
| >>>

If this is what you're talking about, you should be asking on the
pywin32 dicussion list (http://mail.python.org/mailman/listinfo/python-
win32).

General advice: if you are thinking of upgrading your Python version,
go straight to 2.6. odbc is AFAIK stuck at version 1.0 of the Python
DB API; consider switching to pyodbc (http://code.google.com/p/
pyodbc/)

HTH,
John
 
D

dana

Deprecated certainly doesn't mean removed.
For a start, none of (DBI, ODBC, dbi, odbc) are standard Python-
supplied modules. Perhaps you are referring to the odbc (and dbi) from
the pywin32 package? Where did you get them from? If you can't
remember, try this:

Thanks John. I mean the lower-case dbi and odbc modules from pywin32.
Sorry for being vague. I assumed incorrectly they were part of the
standard library because they came with pywin32.
If this is what you're talking about, you should be asking on the
pywin32 dicussion list (http://mail.python.org/mailman/listinfo/python-
win32).

Thanks again.
General advice: if you are thinking of upgrading your Python version,
go straight to 2.6. odbc is AFAIK stuck at version 1.0 of the Python
DB API; consider switching to pyodbc (http://code.google.com/p/
pyodbc/)

Thanks thrice.

We "have" to use the version of Python our software vendor supports.
Presently, that's pywin32 version 2.5.

Dana
 
P

Paul Moore

2009/7/8 dana said:
Thanks John. I mean the lower-case dbi and odbc modules from pywin32.
Sorry for being vague. I assumed incorrectly they were part of the
standard library because they came with pywin32.

pywin32 isn't part of the standard library, either - it just feels
like it if you're on Windows :)

As you've already seen, the Python-Win32 list is probably of more use
to you: http://mail.python.org/mailman/listinfo/python-win32

Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top