Permalink
Browse files

Merge in Roger's SQLAlchemy connection pooling fix. Bump version to 1…

….0.1.

And stop repeating myself in the changelog. That was bothering me.
  • Loading branch information...
2 parents 40e20ba + c7e2d5d commit 7df102052a8a9b5e7d8748ab123eb8c5f81b63ce @erikrose erikrose committed Mar 13, 2012
Showing with 15 additions and 17 deletions.
  1. +4 −0 README.rst
  2. +1 −15 changelog.txt
  3. +1 −1 django_nose/__init__.py
  4. +8 −0 django_nose/runner.py
  5. +1 −1 setup.py
View
@@ -194,6 +194,10 @@ http://pypi.python.org/pypi/django-nose/0.0.3.
Recent Version History
----------------------
+1.0.1
+ * Fixed an error that would surface when using SQLAlchemy with connection
+ pooling. (Roger Hu)
+
1.0 (2012-03-12)
* New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
* Moved FastFixtureTestCase in from test-utils, so now all the
View
@@ -1,18 +1,4 @@
-- 1.0
- * New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
- * Moved FastFixtureTestCase in from test-utils, so now all the
- fixture-bundling stuff is in one library. (Erik Rose)
- * Added the REUSE_DB setting for faster startup and shutdown. (Erik Rose)
- * Fixed a crash when printing options with certain verbosities. (Daniel Abel)
- * Broke hard dependency on MySQL. Support PostgreSQL. (Roger Hu)
- * Support SQLite, both memory- and disk-based. (Roger Hu and Erik Rose)
- * Nail down versions of the package requirements. (Daniel Mizyrycki)
-
-- 0.1.3 (04-15-10)
- * Even better coverage support (rozza)
- * README fixes (carljm and ionelmc)
- * optparse OptionGroups are handled better (outofculture)
- * nose plugins are loaded before listing options
+(Later entries are in the readme.)
- 0.1.2 (08-14-10)
* run_tests API support (carjm)
View
@@ -1,4 +1,4 @@
-VERSION = (1, 0, 0)
+VERSION = (1, 0, 1)
__version__ = '.'.join(map(str, VERSION))
from django_nose.runner import *
View
@@ -285,6 +285,14 @@ def setup_databases(self):
if _should_create_database(connection):
# We're not using _skip_create_test_db, so put the DB name back:
connection.settings_dict['NAME'] = orig_db_name
+
+ # Since we replaced the connection with the test DB, closing the connection
+ # will avoid pooling issues with SQLAlchemy. The issue is trying
+ # to CREATE/DROP the test database using a connection to a DB that
+ # was established with that test DB. MySQLdb doesn't allow it
+ # and SQLAlchemy attempts to reuse the existing connection from
+ # its pool.
+ connection.close()
else:
# Reset auto-increment sequences. Apparently, SUMO's tests are
# horrid and coupled to certain numbers.
View
@@ -6,7 +6,7 @@
setup(
name='django-nose',
- version='1.0',
+ version='1.0.1',
description='Django test runner that uses nose',
long_description=open(os.path.join(ROOT, 'README.rst')).read(),
author='Jeff Balogh',

0 comments on commit 7df1020

Please sign in to comment.