• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / transaction / 16399678488

18 Sep 2024 07:25AM UTC coverage: 99.793% (+0.1%) from 99.696%
16399678488

push

github

dataflake
- vb [ci skip]

299 of 306 branches covered (97.71%)

Branch coverage included in aggregate %.

3083 of 3083 relevant lines covered (100.0%)

1.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/transaction/__init__.py
1
############################################################################
2
#
3
# Copyright (c) 2001, 2002, 2004 Zope Foundation and Contributors.
4
# All Rights Reserved.
5
#
6
# This software is subject to the provisions of the Zope Public License,
7
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
# FOR A PARTICULAR PURPOSE.
12
#
13
############################################################################
14
"""``transaction`` module: Exported transaction functions.
15

16
"""
17

18
# isort: off
19

20
#: Default implementation of `~ITransaction`
21
from transaction._transaction import Transaction  # noqa: F401 unused import
1✔
22
#: Default implementation of `~ISavepoint`
23
from transaction._transaction import Savepoint  # noqa: F401 unused import
1✔
24
#: A single-threaded `~ITransactionManager`
25
from transaction._manager import TransactionManager  # noqa: F401 unused import
1✔
26
#: A thread-safe `~ITransactionManager`
27
from transaction._manager import ThreadTransactionManager
1✔
28

29
# NB: "with transaction:" does not work because they worked
30
# really hard to break looking up special methods like __enter__ and __exit__
31
# via getattr and getattribute; see http://bugs.python.org/issue12022.
32
# You must use ``with transaction.manager`` instead.
33

34
#: The default transaction manager (a `~.ThreadTransactionManager`). All other
35
#: functions in this module refer to this object.
36
manager = ThreadTransactionManager()
1✔
37
#: See `.ITransactionManager.get`
38
get = __enter__ = manager.get
1✔
39
#: See `.ITransactionManager.begin`
40
begin = manager.begin
1✔
41
#: See `.ITransactionManager.commit`
42
commit = manager.commit
1✔
43
#: See `.ITransactionManager.abort`
44
abort = manager.abort
1✔
45
__exit__ = manager.__exit__
1✔
46
#: See `.ITransactionManager.doom`
47
doom = manager.doom
1✔
48
#: See `.ITransactionManager.isDoomed`
49
isDoomed = manager.isDoomed
1✔
50
#: See `.ITransactionManager.savepoint`
51
savepoint = manager.savepoint
1✔
52
#: See `.ITransactionManager.attempts`
53
attempts = manager.attempts
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc