Capomastro uses transaction.commit_unless_managed which is a no-op and will be removed in django 1.8

Bug #1414191 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Capomastro
Fix Released
High
Unassigned

Bug Description

When running tox tests for capomastro on django 1.7 I get:

Creating test database for alias 'default'...
.../capomastro/credentials/management/commands/import_sshkeypair.py:29: RemovedInDjango18Warning: 'commit_unless_managed' is now a no-op.
  transaction.commit_unless_managed()

the tests pass, but when I let the requirements.txt file install the latest matching django version (1.8a1 at the moment), the removal has taken effect and I get a test failure:

======================================================================
ERROR: test_run_command_with_key_import (credentials.management.commands.tests.test_import_sshkeypair.ImportSshKeytTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/capomastro/credentials/management/commands/tests/test_import_sshkeypair.py", line 39, in test_run_command_with_key_import
    update=False)
  File "/capomastro/.tox/py27/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
    output = self.handle(*args, **options)
  File "/capomastro/credentials/management/commands/import_sshkeypair.py", line 29, in handle
    transaction.commit_unless_managed()
AttributeError: 'module' object has no attribute 'commit_unless_managed'

Removing the call to transaction.commit_unless_managed() from credentials/management/commands/import_sshkeypair.py seems to fix this issue.

Related branches

Daniel Manrique (roadmr)
Changed in capomastro:
status: New → Triaged
importance: Undecided → High
Daniel Manrique (roadmr)
Changed in capomastro:
milestone: none → 2015-04
Daniel Manrique (roadmr)
Changed in capomastro:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.