pymysql python3 debian squeeze

from : previous post

มันไม่ทำงานครับ… ผมขอโทษ
ต้องทำการ patch ด้วยการ

# git clone https://github.com/petehunt/PyMySQL.git
# cd PyMySQL/
# ./build-py3k.sh 
# cd py3k/
# python3 setup.py install

example.

[email protected]:/usr/src/PyMySQL# ./build-py3k.sh 
Building Python 3.0 version in ./py3k...
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: No changes to ./setup.py
RefactoringTool: Refactored ./pymysql/__init__.py
RefactoringTool: Refactored ./pymysql/charset.py
RefactoringTool: Refactored ./pymysql/connections.py
RefactoringTool: Refactored ./pymysql/converters.py
RefactoringTool: Refactored ./pymysql/cursors.py
RefactoringTool: Refactored ./pymysql/err.py
RefactoringTool: No changes to ./pymysql/util.py
RefactoringTool: No changes to ./pymysql/constants/COMMAND.py
RefactoringTool: No changes to ./pymysql/constants/FIELD_TYPE.py
RefactoringTool: No changes to ./pymysql/tests/__init__.py
RefactoringTool: Refactored ./pymysql/tests/test_DictCursor.py
RefactoringTool: No changes to ./pymysql/tests/test_SSCursor.py
RefactoringTool: Refactored ./pymysql/tests/test_basic.py
RefactoringTool: Refactored ./pymysql/tests/test_issues.py
RefactoringTool: Refactored ./pymysql/tests/thirdparty/__init__.py
RefactoringTool: Refactored ./pymysql/tests/thirdparty/test_MySQLdb/__init__.py
RefactoringTool: Refactored ./pymysql/tests/thirdparty/test_MySQLdb/capabilities.py
RefactoringTool: Refactored ./pymysql/tests/thirdparty/test_MySQLdb/dbapi20.py
RefactoringTool: Refactored ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py
RefactoringTool: Refactored ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_dbapi20.py
RefactoringTool: Refactored ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_nonstandard.py
RefactoringTool: Files that need to be modified:
RefactoringTool: ./setup.py
RefactoringTool: ./pymysql/__init__.py
RefactoringTool: ./pymysql/charset.py
RefactoringTool: ./pymysql/connections.py
RefactoringTool: ./pymysql/converters.py
RefactoringTool: ./pymysql/cursors.py
RefactoringTool: ./pymysql/err.py
RefactoringTool: ./pymysql/util.py
RefactoringTool: ./pymysql/constants/COMMAND.py
RefactoringTool: ./pymysql/constants/FIELD_TYPE.py
RefactoringTool: ./pymysql/tests/__init__.py
RefactoringTool: ./pymysql/tests/test_DictCursor.py
RefactoringTool: ./pymysql/tests/test_SSCursor.py
RefactoringTool: ./pymysql/tests/test_basic.py
RefactoringTool: ./pymysql/tests/test_issues.py
RefactoringTool: ./pymysql/tests/thirdparty/__init__.py
RefactoringTool: ./pymysql/tests/thirdparty/test_MySQLdb/__init__.py
RefactoringTool: ./pymysql/tests/thirdparty/test_MySQLdb/capabilities.py
RefactoringTool: ./pymysql/tests/thirdparty/test_MySQLdb/dbapi20.py
RefactoringTool: ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py
RefactoringTool: ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_dbapi20.py
RefactoringTool: ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_nonstandard.py
patching file ./pymysql/__init__.py
patching file ./pymysql/charset.py
patching file ./pymysql/connections.py
patching file ./pymysql/converters.py
patching file ./pymysql/cursors.py
patching file ./pymysql/err.py
patching file ./pymysql/tests/test_DictCursor.py
patching file ./pymysql/tests/test_basic.py
patching file ./pymysql/tests/test_issues.py
patching file ./pymysql/tests/thirdparty/__init__.py
patching file ./pymysql/tests/thirdparty/test_MySQLdb/__init__.py
patching file ./pymysql/tests/thirdparty/test_MySQLdb/capabilities.py
patching file ./pymysql/tests/thirdparty/test_MySQLdb/dbapi20.py
patching file ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py
patching file ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_dbapi20.py
patching file ./pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_nonstandard.py
patching file setup.py
Hunk #1 succeeded at 33 (offset 18 lines).



[email protected]:/usr/src/PyMySQL/py3k# python3 setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.1
creating build/lib.linux-x86_64-3.1/pymysql
copying pymysql/__init__.py -> build/lib.linux-x86_64-3.1/pymysql
copying pymysql/connections.py -> build/lib.linux-x86_64-3.1/pymysql
copying pymysql/converters.py -> build/lib.linux-x86_64-3.1/pymysql
copying pymysql/util.py -> build/lib.linux-x86_64-3.1/pymysql
copying pymysql/err.py -> build/lib.linux-x86_64-3.1/pymysql
copying pymysql/charset.py -> build/lib.linux-x86_64-3.1/pymysql
copying pymysql/cursors.py -> build/lib.linux-x86_64-3.1/pymysql
copying pymysql/times.py -> build/lib.linux-x86_64-3.1/pymysql
creating build/lib.linux-x86_64-3.1/pymysql/constants
copying pymysql/constants/__init__.py -> build/lib.linux-x86_64-3.1/pymysql/constants
copying pymysql/constants/ER.py -> build/lib.linux-x86_64-3.1/pymysql/constants
copying pymysql/constants/FLAG.py -> build/lib.linux-x86_64-3.1/pymysql/constants
copying pymysql/constants/COMMAND.py -> build/lib.linux-x86_64-3.1/pymysql/constants
copying pymysql/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.1/pymysql/constants
copying pymysql/constants/CLIENT.py -> build/lib.linux-x86_64-3.1/pymysql/constants
copying pymysql/constants/SERVER_STATUS.py -> build/lib.linux-x86_64-3.1/pymysql/constants
creating build/lib.linux-x86_64-3.1/pymysql/tests
copying pymysql/tests/test_basic.py -> build/lib.linux-x86_64-3.1/pymysql/tests
copying pymysql/tests/__init__.py -> build/lib.linux-x86_64-3.1/pymysql/tests
copying pymysql/tests/test_issues.py -> build/lib.linux-x86_64-3.1/pymysql/tests
copying pymysql/tests/test_DictCursor.py -> build/lib.linux-x86_64-3.1/pymysql/tests
copying pymysql/tests/test_SSCursor.py -> build/lib.linux-x86_64-3.1/pymysql/tests
copying pymysql/tests/base.py -> build/lib.linux-x86_64-3.1/pymysql/tests
copying pymysql/tests/test_example.py -> build/lib.linux-x86_64-3.1/pymysql/tests
running install_lib
creating /usr/local/lib/python3.1/dist-packages/pymysql
copying build/lib.linux-x86_64-3.1/pymysql/__init__.py -> /usr/local/lib/python3.1/dist-packages/pymysql
copying build/lib.linux-x86_64-3.1/pymysql/connections.py -> /usr/local/lib/python3.1/dist-packages/pymysql
copying build/lib.linux-x86_64-3.1/pymysql/converters.py -> /usr/local/lib/python3.1/dist-packages/pymysql
copying build/lib.linux-x86_64-3.1/pymysql/util.py -> /usr/local/lib/python3.1/dist-packages/pymysql
copying build/lib.linux-x86_64-3.1/pymysql/err.py -> /usr/local/lib/python3.1/dist-packages/pymysql
copying build/lib.linux-x86_64-3.1/pymysql/charset.py -> /usr/local/lib/python3.1/dist-packages/pymysql
creating /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/constants/__init__.py -> /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/constants/ER.py -> /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/constants/FLAG.py -> /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/constants/COMMAND.py -> /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/constants/FIELD_TYPE.py -> /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/constants/CLIENT.py -> /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/constants/SERVER_STATUS.py -> /usr/local/lib/python3.1/dist-packages/pymysql/constants
copying build/lib.linux-x86_64-3.1/pymysql/cursors.py -> /usr/local/lib/python3.1/dist-packages/pymysql
creating /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/tests/test_basic.py -> /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/tests/__init__.py -> /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/tests/test_issues.py -> /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/tests/test_DictCursor.py -> /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/tests/test_SSCursor.py -> /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/tests/base.py -> /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/tests/test_example.py -> /usr/local/lib/python3.1/dist-packages/pymysql/tests
copying build/lib.linux-x86_64-3.1/pymysql/times.py -> /usr/local/lib/python3.1/dist-packages/pymysql
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/connections.py to connections.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/converters.py to converters.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/util.py to util.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/err.py to err.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/charset.py to charset.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/constants/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/constants/ER.py to ER.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/constants/FLAG.py to FLAG.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/constants/COMMAND.py to COMMAND.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/constants/CLIENT.py to CLIENT.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/constants/SERVER_STATUS.py to SERVER_STATUS.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/cursors.py to cursors.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/tests/test_basic.py to test_basic.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/tests/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/tests/test_issues.py to test_issues.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/tests/test_DictCursor.py to test_DictCursor.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/tests/test_SSCursor.py to test_SSCursor.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/tests/base.py to base.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/tests/test_example.py to test_example.pyc
byte-compiling /usr/local/lib/python3.1/dist-packages/pymysql/times.py to times.pyc
running install_egg_info
Writing /usr/local/lib/python3.1/dist-packages/PyMySQL3-0.5.egg-info