Menu

Trac Commit Log


Commit Date  
[r10180] by cboos

#9536: rework EnvironmentStub, use context managers and support sqlite file based backend.
- convert admin tests and web tests
- no need for the mysql specific test which was run for any backend

2010-10-05 21:35:46 Tree
[r10179] by cboos

db: introduce context managers for working with a database connection.

SQL transactions can be executed this way:
{{{#!python
from trac.env import Environment
def myFunc():
env = Environment('/path/to/projenv')
with env.db_transaction as db:
cursor = db.cursor()
# Execute some SQL statements

}}}
When the `with` statement is exited normally, the transaction gets committed. Note that `myFunc()` can itself be called in such a `db_transaction` context. In that case, no commit will happen in myFunc, it's the outermost context which will take care of committing the transaction. If an exception gets raised, the `db_transaction` context manager will roll back the transaction.

Another context manager for performing "read-only" queries can be obtained via `env.db_query`. That one doesn't `commit` or `rollback`, but returns the connection to the pool when exiting the context, making that connection available to other threads as soon as possible.

See TracDev/DatabaseApi#Trac0.13API for more details.

Part of #9536.

2010-10-05 21:28:06 Tree
[r10178] by rblank

0.13dev: Added two select boxes to the "Basic Settings" admin panel, for the default timezone and default language.

Excellent initial patch by Ryan J Ollos, thanks! Closes #9581.

2010-10-05 20:06:53 Tree
[r10177] by rblank

0.13dev: Added support for `X-WR-CALDESC` and `X-WR-TIMEZONE` properties in the ics export of the roadmap.

Patch by Thijs Triemstra. Closes #9668.

2010-10-05 19:48:14 Tree
[r10176] by cboos

Patch for tests and issues revealed by tests attached.

trac/web/main.py:
- Explicitly specify encoding when sending project index.

trac/notification.py:
- Explicitly specify encoding when sending email notifications.

trac/mimeview/api.py:
- Cosmetic change that makes it explicit that stream is expected to
be a list of unicode but not a list of bytes.

trac/mimeview/tests/*
- Explicitly specify encoding when constructing streams to test against.

Patch by Simon Cross, thanks!

2010-10-05 17:32:24 Tree
[r10175] by rblank

0.13dev: Follow-up to [10153], fix breakage in the `[[TicketQuery()]]` macro.

Part of #7895.

2010-10-04 22:07:19 Tree
[r10174] by jomae

0.12.1/l10/ja: updated to r10143 (100%)

2010-10-04 13:20:58 Tree
[r10173] by osimons

Merged [10172] from 0.12-stable.

2010-10-03 19:02:24 Tree
[r10172] by osimons

0.12.1dev: Fix regression that made empty ticket changes appear in Timeline again. See #9663.

2010-10-03 18:56:17 Tree
[r10171] by zclin

0.12.1/l10n/zh_TW: translations updated (94%)
1. Fix fuzzy messages.
2. Translate messages-js.po for zh_TW done.

2010-10-03 06:53:45 Tree
Older >
MongoDB Logo MongoDB