Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

dvelyk
Copy link
Contributor

@dvelyk dvelyk commented Sep 9, 2012

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!

self.connection.features.confirm()
elif hasattr(self.connection.features, 'supports_transactions'):
# Django v1.5+
_ = self.connection.features.supports_transactions
Copy link
Contributor

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?

Copy link
Contributor Author

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.
@dmclain
Copy link

dmclain commented Nov 25, 2012

We're now using this patch successfully off django/django@05dbc07 (django master as of 2012-11-25) +1 for merging

@michaelmior
Copy link

Thanks! This is helpful :)

@ghost
Copy link

ghost commented Jan 29, 2013

+1, we have the same problem with django1.5.

@SVilgelm
Copy link

SVilgelm commented Mar 4, 2013

+1

2 similar comments
@sdfsdhgjkbmnmxc
Copy link

+1

@mattsnider
Copy link

+1

@andreif
Copy link

andreif commented Mar 27, 2013

@jbalogh merge?

@bendemboski
Copy link

+1

@jbalogh jbalogh closed this Mar 28, 2013
@jbalogh
Copy link
Contributor

jbalogh commented Mar 28, 2013

Thanks @dvelyk for the patch, and everyone else for bumping the issue. You guys are on the hook if it breaks. :)

@andrefsp
Copy link

+1

2 similar comments
@ghost
Copy link

ghost commented Aug 1, 2013

+1

@roncohen
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet