- 11 Mar, 2013 40 kayıt (commit)
-
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
-
Claude Paroz yazdı
Tests that require USE_I18N, LOGIN_URL or certain MIDDLEWARE_CLASSES should be decorated appropriately.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
Fixed #2227: `atomic` supports nesting. Fixed #6623: `commit_manually` is deprecated and `atomic` doesn't suffer from this defect. Fixed #8320: the problem wasn't identified, but the legacy transaction management is deprecated. Fixed #10744: the problem wasn't identified, but the legacy transaction management is deprecated. Fixed #10813: since autocommit is enabled, it isn't necessary to rollback after errors any more. Fixed #13742: savepoints are now implemented for SQLite. Fixed #13870: transaction management in long running processes isn't a problem any more, and it's documented. Fixed #14970: while it digresses on transaction management, this ticket essentially asks for autocommit on PostgreSQL. Fixed #15694: `atomic` supports nesting. Fixed #17887: autocommit makes it impossible for a connection to stay "idle of transaction".
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
It isn't necessary to disable set_autocommit since its use is prohibited inside an atomic block. It's still necessary to disable the legacy transaction management methods for backwards compatibility, until they're removed.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
Since unmanaged == autocommit, there's nothing to commit or roll back.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
There isn't much else to say, really.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
Apparently django.db.transaction used to be an object.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
Replaced them with per-database options, for proper multi-db support. Also toned down the recommendation to tie transactions to HTTP requests. Thanks Jeremy for sharing his experience.
-
Aymeric Augustin yazdı
It disables transaction management entirely when AUTOCOMMIT is False.
-
Aymeric Augustin yazdı
Thanks Florian again.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
Currently it only works in autocommit mode. Based on @xact by Christophe Pettus.
-
Aymeric Augustin yazdı
Technically speaking they aren't usable yet.
-
Aymeric Augustin yazdı
Prepared for using savepoints within transactions in autocommit mode.
-
Aymeric Augustin yazdı
These methods are only called when uses_savepoints = True anyway.
-
Aymeric Augustin yazdı
It's synchronized with the autocommit flag.
-
Aymeric Augustin yazdı
Since "unless managed" now means "if database-level autocommit", committing or rolling back doesn't have any effect. Restored transactional integrity in a few places that relied on automatically-started transactions with a transitory API.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
This is mostly a documentation change. It has the same backwards-incompatibility consequences as those described for PostgreSQL in a previous commit.
-
Aymeric Augustin yazdı
The goal is to make all databases share a common, autocommit-based, implementation.
-
Aymeric Augustin yazdı
This API is useful because autocommit cannot be managed without an open connection.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
For users who didn't activate autocommit in their database options, this is backwards-incompatible in "non-managed" aka "auto" transaction state. This state now uses database-level autocommit instead of ORM-level autocommit. Also removed the uses_autocommit feature which lost its purpose.
-
Aymeric Augustin yazdı
Autocommit cannot be manipulated independently from an open connection. This commit introduces a minor change in behavior: entering transaction management forces opening a databasse connection. This shouldn't be backwards incompatible in any practical use case.
-
Aymeric Augustin yazdı
-
Aymeric Augustin yazdı
enter_transaction_management() was nearly always followed by managed(). In three places it wasn't, but they will all be refactored eventually. The "forced" keyword argument avoids introducing behavior changes until then. This is mostly backwards-compatible, except, of course, for managed itself. There's a minor difference in _enter_transaction_management: the top self.transaction_state now contains the new 'managed' state rather than the previous one. Django doesn't access self.transaction_state in _enter_transaction_management.
-
Aymeric Augustin yazdı
-