[TurboGears] Add patches from upstream for building with SQLalchemy-0.7.1 https://bugzilla.redhat.com/show_bug.cg
Toshio くらとみ
toshio at fedoraproject.org
Tue Jul 5 21:06:50 UTC 2011
commit 7a194ba50c3d962ef53482a3519ca95ab0be8250
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Tue Jul 5 14:06:30 2011 -0700
Add patches from upstream for building with SQLalchemy-0.7.1
https://bugzilla.redhat.com/show_bug.cgi?id=715760
TurboGears.spec | 10 +++++++-
turbogears-sa-0.7.1.patch | 58 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 1 deletions(-)
---
diff --git a/TurboGears.spec b/TurboGears.spec
index 45816d5..0f9c583 100644
--- a/TurboGears.spec
+++ b/TurboGears.spec
@@ -4,7 +4,7 @@
Name: TurboGears
Version: 1.1.2
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Back-to-front web development in Python
Group: Development/Languages
@@ -16,6 +16,9 @@ Patch0: %{name}-1.0.8-cherrypyreq.patch
# Reported upstream http://trac.turbogears.org/ticket/2419
Patch1: turbogears-sqlcreate.patch
Patch2: turbogears-feed.patch
+# From upstream svn http://svn.code.sf.net/p/turbogears1/code/branches/1.1/
+# r7315 and r7317
+Patch3: turbogears-sa-0.7.1.patch
# Patch to allow turbogears to work with old turbokid until/unless RHEL6
# updates
Patch100: TurboGears-old-turbokid.patch
@@ -111,6 +114,7 @@ TurboGears is easy to use for a wide range of web applications.
%patch0 -b .cherrypyreq
%patch1 -p1 -b .sqlcreate
%patch2 -p1 -b .feed
+%patch3 -p0 -b .sa
%if 0%{?rhel} && 0%{?rhel} >= 6
%patch100 -p1 -b .deps
%endif
@@ -148,6 +152,10 @@ rm -rf %{buildroot}
%{python_sitelib}/turbogears/
%changelog
+* Tue Jul 5 2011 Toshio Kuratomi <toshio at feoraproject.org> - 1.1.2-5
+- Add patches from upstream for building with SQLalchemy-0.7.1
+ https://bugzilla.redhat.com/show_bug.cgi?id=715760
+
* Sat Jun 25 2011 Toshio Kuratomi <toshio at feoraproject.org> - 1.1.2-4
- Add __requires__ to quickstart templates. This is mitigation for
https://bugzilla.redhat.com/show_bug.cgi?id=670223
diff --git a/turbogears-sa-0.7.1.patch b/turbogears-sa-0.7.1.patch
new file mode 100644
index 0000000..bb40ed1
--- /dev/null
+++ b/turbogears-sa-0.7.1.patch
@@ -0,0 +1,58 @@
+# svn co http://svn.code.sf.net/p/turbogears1/code/branches/1.1/
+# svn diff -c r7315 and svn diff -c r7317
+
+Index: turbogears/database.py
+===================================================================
+--- turbogears/database.py (revision 7314)
++++ turbogears/database.py (revision 7315)
+@@ -12,7 +12,7 @@
+ import sqlalchemy, sqlalchemy.orm
+ from sqlalchemy import MetaData
+ try:
+- from sqlalchemy.orm.exc import ArgumentError, OperationalError
++ from sqlalchemy.exc import ArgumentError, OperationalError
+ except ImportError: # SQLAlchemy < 0.5
+ from sqlalchemy.exceptions import ArgumentError, OperationalError
+ except ImportError:
+
+Index: turbogears/paginate.py
+===================================================================
+--- turbogears/paginate.py (revision 7316)
++++ turbogears/paginate.py (revision 7317)
+@@ -12,6 +12,10 @@
+
+ try:
+ import sqlalchemy
++ try:
++ from sqlalchemy.exc import InvalidRequestError
++ except ImportError: # SQLAlchemy < 0.5
++ from sqlalchemy.exceptions import InvalidRequestError
+ except ImportError:
+ sqlalchemy = None
+
+@@ -404,8 +408,10 @@
+ colname = propnames.pop()
+ props = []
+ for propname in propnames:
+- prop = mapper.get_property(
+- propname, resolve_synonyms=True, raiseerr=False)
++ try:
++ prop = mapper.get_property(propname)
++ except InvalidRequestError:
++ prop = None
+ if not prop:
+ break
+ if join_props is not None:
+Index: turbogears/tests/test_session_mapper.py
+===================================================================
+--- turbogears/tests/test_session_mapper.py (revision 7316)
++++ turbogears/tests/test_session_mapper.py (revision 7317)
+@@ -5,7 +5,7 @@
+ from sqlalchemy import Table, Column, Integer, String
+ from sqlalchemy.orm import clear_mappers
+ try:
+- from sqlalchemy.orm.exc import ArgumentError
++ from sqlalchemy.exc import ArgumentError
+ except ImportError: # SQLAlchemy < 0.5
+ from sqlalchemy.exceptions import ArgumentError
+
More information about the scm-commits
mailing list