rpms/python-sqlobject/EL-5 python-sqlobject-mysql-unicode.patch, NONE, 1.1 python-sqlobject.spec, 1.12, 1.13
Toshio くらとみ
toshio at fedoraproject.org
Sat Oct 18 00:19:29 UTC 2008
- Previous message (by thread): rpms/nted/F-9 .cvsignore,1.5,1.6 nted.spec,1.4,1.5 sources,1.5,1.6
- Next message (by thread): rpms/kernel/devel linux-2.6-x86-acpi-fix-resume-on-64-bit-UP-systems.patch, NONE, 1.1 TODO, 1.23, 1.24 kernel.spec, 1.1061, 1.1062
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: toshio
Update of /cvs/pkgs/rpms/python-sqlobject/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19973
Modified Files:
python-sqlobject.spec
Added Files:
python-sqlobject-mysql-unicode.patch
Log Message:
* Fri Oct 17 2008 Toshio Kuratomi <toshio at fedoraproject.org> - 0.9.7-2
- Apply a patch that fixes unicode issue with MySQL-python-1.2.1 fixes
bz#466011.
python-sqlobject-mysql-unicode.patch:
--- NEW FILE python-sqlobject-mysql-unicode.patch ---
Index: sqlobject/mysql/mysqlconnection.py
===================================================================
--- sqlobject/mysql/mysqlconnection.py (revision 3623)
+++ sqlobject/mysql/mysqlconnection.py (working copy)
@@ -28,6 +28,12 @@
self.db = db
self.user = user
self.password = password
+
+ if MySQLdb.version_info[:3] >= (1, 2, 1) and MySQLdb.version_info[:3] < (1, 2, 2):
+ self.need_unicode = True
+ else:
+ self.need_unicode = False
+
self.kw = {}
for key in ("unix_socket", "init_command",
"read_default_file", "read_default_group", "conv"):
@@ -104,6 +110,12 @@
# reconnect flag must be set when making the connection to indicate
# that autoreconnecting is desired. In MySQLdb 1.2.2 or newer this is
# done by calling ping(True) on the connection.
+ if self.need_unicode and not isinstance(query, unicode):
+ try:
+ query = unicode(query, self.dbEncoding)
+ except UnicodeError:
+ pass
+
for count in range(3):
try:
return cursor.execute(query)
Index: python-sqlobject.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-sqlobject/EL-5/python-sqlobject.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- python-sqlobject.spec 24 Aug 2008 23:51:24 -0000 1.12
+++ python-sqlobject.spec 18 Oct 2008 00:18:59 -0000 1.13
@@ -2,7 +2,7 @@
Name: python-sqlobject
Version: 0.9.7
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: SQLObject -Object-Relational Manager, aka database wrapper
Group: Development/Libraries
@@ -10,7 +10,7 @@
URL: http://sqlobject.org/
Source0: http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-%{version}.tar.gz
Patch0: %{name}-%{version}-setup.patch
-
+Patch1: %{name}-mysql-unicode.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
@@ -30,6 +30,7 @@
%prep
%setup -q -n SQLObject-%{version}
%patch0 -b .setup
+%patch1 -b .unicode
%build
%{__python} setup.py build
@@ -37,7 +38,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
%clean
@@ -52,6 +53,10 @@
%{_bindir}/*
%changelog
+* Fri Oct 17 2008 Toshio Kuratomi <toshio at fedoraproject.org> - 0.9.7-2
+- Apply a patch that fixes unicode issue with MySQL-python-1.2.1 fixes
+ bz#466011.
+
* Thu Jun 26 2008 Luke Macken <lmacken at redhat.com> - 0.9.7-1
- Update to 0.9.7 (fixes #459268)
- Previous message (by thread): rpms/nted/F-9 .cvsignore,1.5,1.6 nted.spec,1.4,1.5 sources,1.5,1.6
- Next message (by thread): rpms/kernel/devel linux-2.6-x86-acpi-fix-resume-on-64-bit-UP-systems.patch, NONE, 1.1 TODO, 1.23, 1.24 kernel.spec, 1.1061, 1.1062
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list