Pyramid-tm

Latest version: v2.5

Safety actively analyzes 620800 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

2.5

^^^^^^^^^^^^^^^^

- Drop support for Python 2.7, 3.4, 3.5, and 3.6.

- Add support for Python 3.8, 3.9, and 3.10.

- Blackify project source.

2.4

^^^^^^^^^^^^^^^^

- Allow overriding ``pyramid_tm`` via the environ for testing purposes.
See https://github.com/Pylons/pyramid_tm/pull/72

- When ``tm.annotate_user`` is enabled, use ``request.authenticated_userid``
instead of ``request.unauthenticated_userid``. The latter is deprecated in
Pyramid 2.0.
See https://github.com/Pylons/pyramid_tm/pull/72

2.3

^^^^^^^^^^^^^^^^

- Mark all ``transaction.interfaces.TransientError`` exceptions
automatically as retryable by ``pyramid_retry`` if it is installed.
See https://github.com/Pylons/pyramid_tm/pull/71

2.2.1

^^^^^^^^^^^^^^^^^^

- Support Python 3.7.

- Fix error handling when using ``transaction >= 2.4.0``.
See https://github.com/Pylons/pyramid_tm/pull/68

2.2

^^^^^^^^^^^^^^^^

Backward Incompatibilities
~~~~~~~~~~~~~~~~~~~~~~~~~~

- This is a backward-incompatible change for anyone using the
``tm.commit_veto`` hook. Anyone else is unaffected.

The ``tm.commit_veto`` hook will now be consulted for any squashed
exceptions instead of always aborting. Previously, if an exception
was handled by an exception view, the transaction would always be aborted.
Now, the ``commit_veto`` can inspect ``request.exception`` and the generated
``response`` to determine whether to commit or abort.

The new behavior when using the ``pyramid_tm.default_commit_veto`` is that
a squashed exception may be committed if either of the following conditions
are true:

- The response contains the ``x-tm`` header set to ``commit``.

- The response's status code does not start with ``4`` or ``5``.

In most cases the response would result in 4xx or 5xx exception and would
be aborted - this behavior remains the same. However, if the squashed
exception rendered a response that is 3xx or 2xx (such as raising
``pyramid.httpexceptions.HTTPFound``), then the transaction will be
committed instead of aborted.

See https://github.com/Pylons/pyramid_tm/pull/65

2.1

^^^^^^^^^^^^^^^^

- On Pyramid >= 1.7 any errors raised from ``pyramid_tm`` invoking
``request.tm.abort`` and ``request.tm.commit`` will be caught and used
to lookup and execute an exception view to return an error response. This
exception view will be executed with an inactive transaction manager.
See https://github.com/Pylons/pyramid_tm/pull/61

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.