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

Discussion in 'Python' started by dana, Jul 7, 2009.

  1. dana

    dana Guest

    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
    dana, Jul 7, 2009
    #1
    1. Advertising

  2. dana

    Kevin Dwyer Guest

    Hello,

    I think this is discussed PEP 249 - see the "major changes" section.

    http://www.python.org/dev/peps/pep-0249/

    Kev

    On Tue, 07 Jul 2009 10:05:07 -0700, dana wrote:

    > 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
    Kevin Dwyer, Jul 7, 2009
    #2
    1. Advertising

  3. dana

    John Machin Guest

    On Jul 8, 3:05 am, dana <> wrote:
    > 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
    John Machin, Jul 8, 2009
    #3
  4. dana

    dana Guest

    On Jul 8, 12:30 am, John Machin <> wrote:
    > 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
    dana, Jul 8, 2009
    #4
  5. dana

    Paul Moore Guest

    2009/7/8 dana <>:
    > On Jul 8, 12:30 am, John Machin <> wrote:
    >> 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.


    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.
    Paul Moore, Jul 8, 2009
    #5
  6. dana

    dana Guest

    dana, Jul 14, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Barney Barumba
    Replies:
    0
    Views:
    552
    Barney Barumba
    Jul 23, 2003
  2. Virgil Stokes

    "Deprecated sets module" with Python 2.6

    Virgil Stokes, Jul 28, 2009, in forum: Python
    Replies:
    4
    Views:
    652
    Virgil Stokes
    Jul 29, 2009
  3. thunk
    Replies:
    1
    Views:
    292
    thunk
    Mar 30, 2010
  4. thunk
    Replies:
    0
    Views:
    458
    thunk
    Apr 1, 2010
  5. thunk
    Replies:
    14
    Views:
    605
    thunk
    Apr 3, 2010
Loading...

Share This Page