The file_open tools may be used to create a file so it may not yet exist.
Also io.open will raise the proper exception if the file can not be open.
Closes#13230
(grafted from ad09f3e55f6f7bd6767ea44d03566322fce6b487)
--HG--
branch : 7.0
The module path is used later to join path so it must be a string.
Closes#13229
(grafted from 1cbc97959ca439d5ac1335240863ca8104c41969)
--HG--
branch : 7.0
Even if the backend allows NOTIFY query on readonly transaction, it is strange
to commit readonly transaction because the backend may not enforce the
readonly.
Also commit performs other actions that may not be wanted like commit
datamanager or clear cache.
A procedure that requires to perform a NOTIFY should have a non-readonly
transaction.
Closes#12542
(grafted from 03611153e9bc9a0d169447c4ca946ad49c81ad47)
--HG--
branch : 7.0
As model can inherit the access rules from another, the key must include the
keys of those other models.
Closes#13162
(grafted from b04f36d27c78663851f6859e266aac203afd7600)
--HG--
branch : 7.0
If user_id is accessed before view_args has been setup, we should not cache
`None` as value but instead raise an exception.
The `user_id` may be accessed before the mapping if the request is logged
because the representation of the request used the `rpc_method` which needs to
parse the request data. But since 1923117e935d parsing compressed content is
only allowed for request with `user_id`.
So we can no more include the `rpc_method` is the request has not yet been
mapped and so it has a `view_args`.
Closes#13203
(grafted from 0630029c1d5a0a2c7bd45086957f2e0fbed4c427)
--HG--
branch : 7.0
The Function fields are not copied so it is the storage field that must have a
default value.
Closes#13170
(grafted from 96d629fe11a710b395d9981881c5dfda1674becf)
--HG--
branch : 7.0
In Python bool type is a subtype of integer so it must be tested first.
Also by converting other types to int, we catch any other wrong types.
Closes#13133
(grafted from 2c7c6983eecc716cddc3dcfce7c417e902257df0)
--HG--
branch : 7.0
The commit call was added by a6624f31ff20 to release lock because Cache.resets
was called inside the transaction.
But Cache.resets was removed in a83631f4ba67 and Cache does not create any new
transaction since.
And since 2fd8c5f88265 the transaction is even committed only on module
update.
(grafted from 0548d73c7ce3b4e07b6b76007f2592ed2be945ff)
--HG--
branch : 7.0
To rollback the transaction must be done before the context manager calls stop
on exit.
Closes#13149
(grafted from 02ef3e349808c73a260ab7e83fea4eb66f37bd02)
--HG--
branch : 7.0
Since 8616fb62c5e9 some tests are decorated with transaction so the test case
needs a database to run.
(grafted from b2b78cdd6c19340652eb27ceaac620c940030a5d)
--HG--
branch : 7.0
Decimal may raise an InvalidOperation error if the context does not allow the
needed precision.
But rounding is not necessary for Decimal as we can just test the exponent
from the tuple version.
Closes#13138
(grafted from 776889be97e4c1b8917a9090338511d8008c625b)
--HG--
branch : 7.0
A Pool.refresh may be triggered on Pool.init if a cache listener is started by
the new transaction of load_modules. In such cache the pool is empty just
after the init.
Closes#13101
--HG--
branch : 7.0
The type of value may not correspond with the single_value parameter if the
domain does not apply directly to the field but to a nested field.
Closes#12843
(grafted from 411d5752ff2a1283d65fb457a5c9ac2f399dafb0)
--HG--
branch : 7.0
Since c8771e45b861 TransactionError is raised if a table is not locked at the
transaction start. The decorator must manage such exception in case the
decorated route needs to lock a table.
Closes#12962
(grafted from bced72f6282bbb1ec2c58e7af25ca1e5a941b82f)
--HG--
branch : 7.0