New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Django v1.5) confirm method removed from BaseDatabaseFeatures #95
Conversation
self.connection.features.confirm() | ||
elif hasattr(self.connection.features, 'supports_transactions'): | ||
# Django v1.5+ | ||
_ = self.connection.features.supports_transactions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have any effect, or should we just do nothing here for Django 1.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry for not responding sooner! I don't know how I missed your comment. Anyway, you are right--as far as I can tell, this has no effect. The cached property will be evaluated whenever it is accessed (I'm not sure where supports_transactions
comes into play, but in the case of 1.5, the check no longer seems to be necessary.) I'll edit my patch tomorrow.
…k_works'" AttributeError when attempting to run django_nose tests with REUSE_DB=1 on Django trunk (pre-v1.5) The confirm method has been removed from BaseDatabaseFeatures as cached properties (like "supports_transactions") now confirm their features automagically.
We're now using this patch successfully off django/django@05dbc07 (django master as of 2012-11-25) +1 for merging |
Thanks! This is helpful :) |
+1, we have the same problem with django1.5. |
+1 |
2 similar comments
+1 |
+1 |
@jbalogh merge? |
+1 |
Thanks @dvelyk for the patch, and everyone else for bumping the issue. You guys are on the hook if it breaks. :) |
+1 |
2 similar comments
+1 |
+1 |
Hello!
On Django trunk, cached properties now keep track of database features like transaction support (django/django@aa42357).
Because the confirm method was removed, attempting to run django-nose tests with
REUSE_DB=1
generates an obscure'SkipDatabaseCreation' object has no attribute '_rollback_works'
AttributeError.See patch for workaround. And thanks for your work on django-nose!