警告信息:
File "procesador.py", line 10, in <module>
from model import *
File "/Users/juque/Proyectos/est/patan/_patan/model.py", line 14, in <module>
b_engine = create_engine('mysql://root@localhost/intranet?charset=utf8&use_unicode=0', pool_recycle=3600, echo=False)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SQLAlchemy-0.7.1dev-py2.7-macosx-10.5-fat3.egg/sqlalchemy/engine/__init__.py", line 263, in create_engine
return strategy.create(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SQLAlchemy-0.7.1dev-py2.7-macosx-10.5-fat3.egg/sqlalchemy/engine/strategies.py", line 48, in create
u = url.make_url(name_or_url)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SQLAlchemy-0.7.1dev-py2.7-macosx-10.5-fat3.egg/sqlalchemy/engine/url.py", line 171, in make_url
return _parse_rfc1738_args(name_or_url)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SQLAlchemy-0.7.1dev-py2.7-macosx-10.5-fat3.egg/sqlalchemy/engine/url.py", line 196, in _parse_rfc1738_args
query = (len(tokens) > 1 and dict(cgi.parse_qsl(tokens[1]))) or None
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cgi.py", line 191, in parse_qsl
PendingDeprecationWarning, 2)
PendingDeprecationWarning: cgi.parse_qsl is deprecated, use urlparse.parse_qsl instead
嗯,警告非常清楚,但我不知道为什么发生这种情况如果我认为我正在使用最新版本的SQLAlchemy(0.7,稳定和开发)和python 2.7。
或者这是一个Bug吗?
非常感谢。
答案 0 :(得分:1)
来自the docs:
支持的平台
SQLAlchemy已针对以下平台进行了测试:
- cPython从版本2.4到2.xx系列
- cPython版本3,涵盖所有3.xx系列
- Jython 2.5或更高版本
- Pypy 1.5或更高
并非所有都 urlparse.parse_qsl()
。如果您认为这是一个问题,那么您应该向SQLAlchemy开发人员抱怨。