| Issue 7: | Python 2.6 switch '-3' produces DeprecationWarning on import of pyodbc | |
| 2 people starred this issue and may be notified of changes. | Back to list |
The '-3' switch was added to Python 2.6 in order to provide warnings for
deprecated usages in Py3k. Currently the only warning I have seen is the
following, upon import:
pyodbc.pyd:6: DeprecationWarning: the sha module is deprecated; use the
hashlib module instead
This will break compatibility with Python 3.0 (although I'm not sure this
is even in the immediate roadmap)
However, given that hashlib was introduced in 2.5, you will need to use
some sort of try/except import hack to maintain the current level of
backwards compatibility. Something along the lines of:
try:
from hashlib import sha1 as sha
except ImportError:
from sha import sha
Dec 1, 2008
Project Member
#1
mkleehammer
Status:
Accepted
Dec 5, 2008
Fixed in 2.1.2
Status:
Fixed
Nov 21, 2010
(No comment was entered for this change.)
Status:
Complete
|