| Age | Commit message (Collapse) | Author |
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
https://github.com/psf/black/releases/tag/25.1.0
|
|
datetime.UTC was added in Python 3.11.
|
|
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
|
|
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
|
|
|
|
|
|
This helper function reduces the amount of duplicated code and makes it
easier to ensure that we always validate the keys.
|
|
The validate_key() function should be called after make_key() to ensure
that the validation is performed on the key that will actually be
stored in the cache.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
- Replaced datetime.utcnow() with datetime.now().
- Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp().
- Replaced datetime.utctimetuple() with datetime.timetuple().
- Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
|
|
closed cursor.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
DatabaseCache._cull implementation could fail if no key was found to
perform a deletion in the table. This prevented the new cache key/value
from being correctly added.
|
|
Thanks Simon Charette for the review.
|
|
and Expression.convert_value().
Per deprecation timeline.
|
|
delete_many() for the db cache backend.
|
|
and session serializer.
|
|
|
|
On Firebird, 'value' is a reserved word and must be quoted.
|
|
|
|
|
|
Expression.convert_value().
Unused since a0d166306fbdc41f49e6fadf4ec84b17eb147daa.
|
|
|
|
Thanks Tim Graham for the review.
|
|
Thanks Tim Graham for the review.
|
|
Took advantage of the new database adapters and converters.
|
|
This mirrors convert_xxxfield_value nicely, taking advantage of the
adapter/converter terminology which is commonly used by DB-API modules.
|
|
Refs #23820.
|
|
The new signature enables better support for routing RunPython and
RunSQL operations, especially w.r.t. reusable and third-party apps.
This commit also takes advantage of the deprecation cycle for the old
signature to remove the backward incompatibility introduced in #22583;
RunPython and RunSQL won't call allow_migrate() when when the router
has the old signature.
Thanks Aymeric Augustin and Tim Graham for helping shape up the patch.
Refs 22583.
|
|
|
|
|
|
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
|
|
|
|
|
|
The precision of time.time() is OS specific and it is possible for the
resolution to be low enough to allow reading a cache key previously set
with a timeout of 0.
|
|
DatabaseCache uses raw cursors to bypass the ORM. This prevents it from
being used by database backends that require special handling of datetime
values.
There is no easy way to test this, so no tests added.
|
|
Also, streamline the use of 0 and None between cache backends.
|
|
Thanks Anssi for haggling until I implemented this.
This change alleviates the need for atomic_if_autocommit. When
autocommit is disabled for a database, atomic will simply create and
release savepoints, and not commit anything. This honors the contract of
not doing any transaction management.
This change also makes the hack to allow using atomic within the legacy
transaction management redundant.
None of the above will work with SQLite, because of a flaw in the design
of the sqlite3 library. This is a known limitation that cannot be lifted
without unacceptable side effects eg. triggering arbitrary commits.
|
|
The atomic block provides a clean rollback to a savepoint on failed writes.
The ticket reported a race condition which I don't know how to test.
|
|
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.
|
|
|
|
|
|
There was a problem caused by Postgres 9.0+ having bytea_output default
value of 'hex' and cache backend inserting the content as 'bytes' into
a column of type TEXT. Fixed by converting the bytes value to a string
before insert.
|
|
In all those occurrences, we didn't care about preserving the
lazy status of the strings, but we really wanted to obtain a
real bytestring.
|
|
|
|
|
|
This fixes a deprecation warning under Python 3.
|
|
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
|
|
This is Ian Kelly's patch from #15580 with minor modifications.
|
|
compatibility with other hash backends. Thanks aaugustin for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|