pyramid-tm


Namepyramid-tm JSON
Version 2.6 PyPI version JSON
download
home_pagehttps://github.com/Pylons/pyramid_tm
SummaryA package which allows Pyramid requests to join the active transaction
upload_time2024-11-14 07:30:54
maintainerPylons Project
docs_urlNone
authorRocky Burt, Chris McDonough
requires_python>=3.9
licenseBSD-derived (Repoze)
keywords wsgi pylons pyramid transaction
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ``pyramid_tm``
==============

.. image:: https://github.com/Pylons/pyramid_tm/actions/workflows/ci-tests.yml/badge.svg?branch=main
    :target: https://github.com/Pylons/pyramid_tm/actions/workflows/ci-tests.yml?query=branch%3Amain
    :alt: main CI Status


.. image:: https://readthedocs.org/projects/pyramid-tm/badge/?version=latest
        :target: https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/
        :alt: Documentation Status

``pyramid_tm`` is a package which allows Pyramid requests to join
the active transaction as provided by the `transaction
<https://pypi.org/project/transaction/>`_ package.

See `https://docs.pylonsproject.org/projects/pyramid_tm/en/latest/
<https://docs.pylonsproject.org/projects/pyramid_tm/en/latest/>`_ 
or ``docs/index.rst`` in this distribution for detailed
documentation.

Changes
-------

2.6 (2024-11-14)
^^^^^^^^^^^^^^^^

- Drop support for Python 3.7, and 3.8.

- Add support for Python 3.11, 3.12, and 3.13.

- rename "master" to "main"

- Fix retrying transactions with `pyramid_retry` when using veto and a datamanger
  marks the exception as retryable.

2.5 (2022-03-12)
^^^^^^^^^^^^^^^^

- 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 (2020-01-06)
^^^^^^^^^^^^^^^^

- 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 (2019-09-30)
^^^^^^^^^^^^^^^^

- 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 (2018-10-23)
^^^^^^^^^^^^^^^^^^

- Support Python 3.7.

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

2.2 (2017-07-03)
^^^^^^^^^^^^^^^^

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 (2017-06-07)
^^^^^^^^^^^^^^^^

- 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

2.0 (2017-04-11)
^^^^^^^^^^^^^^^^

Major Features
~~~~~~~~~~~~~~

- The ``pyramid_tm`` tween has been moved **over** the ``EXCVIEW`` tween.
  This means the transaction is open during exception view execution.
  See https://github.com/Pylons/pyramid_tm/pull/55

- Added a ``pyramid_tm.is_tm_active`` and a ``tm_active`` view predicate
  which may be useful in exception views that require access to the database.
  See https://github.com/Pylons/pyramid_tm/pull/60

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

- The ``tm.attempts`` setting has been removed and retry support has been moved
  into a new package named ``pyramid_retry``. If you want retry support then
  please look at that library for more information about installing and
  enabling it. See https://github.com/Pylons/pyramid_tm/pull/55

- The ``pyramid_tm`` tween has been moved **over** the ``EXCVIEW`` tween.
  If you have any hacks in your application that are opening a new transaction
  inside your exception views then it's likely you will want to remove them
  or re-evaluate when upgrading.
  See https://github.com/Pylons/pyramid_tm/pull/55

- Drop support for Pyramid < 1.5.

Minor Features
~~~~~~~~~~~~~~

- Support for Python 3.6.

1.1.1 (2016-11-21)
^^^^^^^^^^^^^^^^^^

- ``pyramid_tm`` 1.1.0 failed to fix a unicode issue related to undecodable
  request paths. The placeholder message was not unicode.
  See https://github.com/Pylons/pyramid_tm/pull/52

- Include Changes in the main docs.

1.1.0 (2016-11-19)
^^^^^^^^^^^^^^^^^^

- Support ``transaction`` 2.x.

- The transaction's request path and userid are now coerced to unicode by
  first decoding as ``utf-8`` and falling back to ``latin-1``. If the userid
  does not conform to these restrictions then set ``tm.annotate_user = no``
  in your settings. See https://github.com/Pylons/pyramid_tm/pull/50

1.0.2 (2016-11-18)
^^^^^^^^^^^^^^^^^^

- Pin to ``transaction < 1.99`` as pyramid_tm is currently incompatible with
  the new 2.x release of transaction.
  See https://github.com/Pylons/pyramid_tm/issues/49

1.0.1 (2016-10-24)
^^^^^^^^^^^^^^^^^^

- Removes the ``AttributeError`` when ``request.tm`` is accessed outside the
  tween. It turns out this broke subrequests as well as ``pshell`` and
  ``pyramid.paster.bootstrapp`` CLI scripts, especially when using the
  global transaction manager which can be tracked outside of the tween.
  See https://github.com/Pylons/pyramid_tm/pull/48

1.0 (2016-09-12)
^^^^^^^^^^^^^^^^

- Drop Python 2.6, 3.2 and 3.3 support.

- Add Python 3.5 support.

- Subtle bugs can occur if you use the transaction manager during a request
  in which ``pyramid_tm`` is disabled via an ``activate_hook``. To combat these
  types of errors, attempting to access ``request.tm`` will now raise an
  ``AttributeError`` when ``pyramid_tm`` is inactive.
  See https://github.com/Pylons/pyramid_tm/pull/46

0.12.1 (2015-11-25)
^^^^^^^^^^^^^^^^^^^

- Fix compatibility with 1.2 and 1.3 again. This wasn't fully fixed in the
  0.12 release as the tween was relying on request properties working (which
  they do not inside tweens in older versions).
  See https://github.com/Pylons/pyramid_tm/pull/39

0.12 (2015-05-20)
^^^^^^^^^^^^^^^^^

- Expose a ``tm.annotate_user`` option to avoid computing
  ``request.unauthenticated_userid`` on every request.
  See https://github.com/Pylons/pyramid_tm/pull/36

- Restore compatibility with Pyramid 1.2 and 1.3.

0.11 (2015-02-04)
^^^^^^^^^^^^^^^^^

- Add a hook to override creation of the transaction manager (the default
  remains the thread-local one accessed through ``transaction.manager``).
  See: https://github.com/Pylons/pyramid_tm/pull/31

0.10 (2015-01-06)
^^^^^^^^^^^^^^^^^

- Fix recording transactions with non-text, non-bytes userids.
  See: https://github.com/Pylons/pyramid_tm/issues/28

0.9 (2014-12-30)
^^^^^^^^^^^^^^^^

- Work around recording transaction userid containing unicode.
  See https://github.com/Pylons/pyramid_tm/pull/15, although the fix
  is different, to ensure Python3 compatibility.

- Work around recording transaction notes containing unicode.
  https://github.com/Pylons/pyramid_tm/pull/25

0.8 (2014-11-12)
^^^^^^^^^^^^^^^^

- Add a new ``tm.activate_hook`` hook which can control when the
  transaction manager is active. For example, this may be useful in
  situations where the manager should be disabled for a particular URL.
  https://github.com/Pylons/pyramid_tm/pull/12

- Fix unit tests under Pyramid 1.5.

- Fix a bug preventing retryable exceptions from actually being retried.
  https://github.com/Pylons/pyramid_tm/pull/8

- Don't call ``setUser`` on transaction if there is no user logged in.
  This could cause the username set on the transaction to be a strange
  string: " None". https://github.com/Pylons/pyramid_tm/pull/9

- Avoid crash when the ``path_info`` cannot be decoded from the request
  object. https://github.com/Pylons/pyramid_tm/pull/19

0.7 (2012-12-30)
^^^^^^^^^^^^^^^^

- Write unauthenticated userid and ``request.path_info`` as transaction
  metadata via ``t.setUser`` and ``t.note`` respectively during a commit.

0.6 (2012-12-26)
^^^^^^^^^^^^^^^^

- Disuse the confusing and bug-ridden generator-plus-context-manager "attempts"
  mechanism from the transaction package for retrying retryable exceptions
  (e.g. ZODB ConflictError).  Use a simple while loop plus a counter and
  imperative logic instead.

0.5 (2012-06-26)
^^^^^^^^^^^^^^^^

Bug Fixes
~~~~~~~~~

- When a non-retryable exception was raised as the result of a call to
  ``transaction.manager.commit``, the exception was not reraised properly.
  Symptom: an unrecoverable exception such as ``Unsupported: Storing blobs in
  <somestorage> is not supported.`` would be swallowed inappropriately.

0.4 (2012-03-28)
^^^^^^^^^^^^^^^^

Bug Fixes
~~~~~~~~~

- Work around failure to retry ConflictError properly at commit time by the
  ``transaction`` 1.2.0 package.  See
  https://mail.zope.org/pipermail/zodb-dev/2012-March/014603.html for
  details.

Testing
~~~~~~~

- No longer tested under Python 2.5 by ``tox.ini`` (and therefore no longer
  tested under 2.5 by the Pylons Jenkins server).  The package may still work
  under 2.5, but automated tests will no longer show breakage when it changes
  in ways that break 2.5 support.

- Squash test deprecation warnings under Python 3.2.

0.3 (2011-09-27)
^^^^^^^^^^^^^^^^

Features
~~~~~~~~

- The transaction manager has been converted to a Pyramid 1.2 "tween"
  (instead of an event subscriber).  It will be slotted directly "below" the
  exception view handler, meaning it will have a chance to handle exceptions
  before they are turned into responses.  This means it's best to "raise
  HTTPFound(...)" instead of "return HTTPFound(...)" if you want an HTTP
  exception to abort the transaction.

- The transaction manager will now retry retryable exceptions (such as a ZODB
  conflict error) if ``tm.attempts`` is configured to be more than the
  default of ``1``.  See the ``Retrying`` section of the documentation.

- Python 3.2 compatibility (requires Pyramid 1.3dev+).

Backwards Incompatibilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Incompatible with Pyramid < 1.2a1.  Use ``pyramid_tm`` version 0.2 if you
  need compatibility with an older Pyramid installation.

- The ``default_commit_veto`` commit veto callback is no longer configured
  into the system by default.  Use ``tm.commit_veto =
  pyramid_tm.default_commit_veto`` in the deployment settings to add it.
  This is for parity with ``repoze.tm2``, which doesn't configure in a commit
  veto by default either.

- The ``default_commit_veto`` no longer checks for the presence of the
  ``X-Tm-Abort`` header when attempting to figure out whether the transaction
  should be aborted (although it still checks for the ``X-Tm`` header).  Use
  version 0.2 or a custom commit veto function if your application depends on
  the ``X-Tm-Abort`` header.

- A commit veto is now called with two arguments: ``request`` and
  ``response``.  The ``request`` is the webob request that caused the
  transaction manager to become active.  The ``response`` is the response
  returned by the Pyramid application.  This call signature is incompatible
  with older versions.  The call signature of a ``pyramid_tm`` 0.2 and older
  commit veto accepted three arguments: ``environ``, ``status``, and
  ``headers``.  If you're using a custom ``commit_veto`` function, you'll
  need to either convert your existing function to use the new calling
  convention or use a wrapper to make it compatible with the new calling
  convention.  Here's a simple wrapper function
  (``bwcompat_commit_veto_wrapper``) that will allow you to use your existing
  custom commit veto function::

     def bwcompat_commit_veto_wrapper(request, response):
         return my_custom_commit_veto(request.environ, response.status,
                                      response.headerlist)

Deprecations
~~~~~~~~~~~~

- The ``pyramid_tm.commit_veto`` configuration setting is now canonically
  spelled as ``tm.commit_veto``.  The older spelling will continue to work,
  but may raise a deprecation error when used.

0.2 (2011-07-18)
^^^^^^^^^^^^^^^^

- A new header ``X-Tm`` is now honored by the ``default_commit_veto`` commit
  veto hook. If this header exists in the headerlist, its value must be a
  string. If its value is ``commit``, the transaction will be committed
  regardless of the status code or the value of ``X-Tm-Abort``. If the value
  of the ``X-Tm`` header is ``abort`` (or any other string value except
  ``commit``), the transaction will be aborted, regardless of the status code
  or the value of ``X-Tm-Abort``.

0.1 (2011-02-23)
^^^^^^^^^^^^^^^^

- Initial release, based on repoze.tm2


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Pylons/pyramid_tm",
    "name": "pyramid-tm",
    "maintainer": "Pylons Project",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "pylons-discuss@googlegroups.com",
    "keywords": "wsgi pylons pyramid transaction",
    "author": "Rocky Burt, Chris McDonough",
    "author_email": "pylons-discuss@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/cf/b3/d6db704d25fc7b03d96a753fcc7e63f4ea2f93aedeb7c072472744d33267/pyramid_tm-2.6.tar.gz",
    "platform": null,
    "description": "``pyramid_tm``\n==============\n\n.. image:: https://github.com/Pylons/pyramid_tm/actions/workflows/ci-tests.yml/badge.svg?branch=main\n    :target: https://github.com/Pylons/pyramid_tm/actions/workflows/ci-tests.yml?query=branch%3Amain\n    :alt: main CI Status\n\n\n.. image:: https://readthedocs.org/projects/pyramid-tm/badge/?version=latest\n        :target: https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/\n        :alt: Documentation Status\n\n``pyramid_tm`` is a package which allows Pyramid requests to join\nthe active transaction as provided by the `transaction\n<https://pypi.org/project/transaction/>`_ package.\n\nSee `https://docs.pylonsproject.org/projects/pyramid_tm/en/latest/\n<https://docs.pylonsproject.org/projects/pyramid_tm/en/latest/>`_ \nor ``docs/index.rst`` in this distribution for detailed\ndocumentation.\n\nChanges\n-------\n\n2.6 (2024-11-14)\n^^^^^^^^^^^^^^^^\n\n- Drop support for Python 3.7, and 3.8.\n\n- Add support for Python 3.11, 3.12, and 3.13.\n\n- rename \"master\" to \"main\"\n\n- Fix retrying transactions with `pyramid_retry` when using veto and a datamanger\n  marks the exception as retryable.\n\n2.5 (2022-03-12)\n^^^^^^^^^^^^^^^^\n\n- Drop support for Python 2.7, 3.4, 3.5, and 3.6.\n\n- Add support for Python 3.8, 3.9, and 3.10.\n\n- Blackify project source.\n\n2.4 (2020-01-06)\n^^^^^^^^^^^^^^^^\n\n- Allow overriding ``pyramid_tm`` via the environ for testing purposes.\n  See https://github.com/Pylons/pyramid_tm/pull/72\n\n- When ``tm.annotate_user`` is enabled, use ``request.authenticated_userid``\n  instead of ``request.unauthenticated_userid``. The latter is deprecated in\n  Pyramid 2.0.\n  See https://github.com/Pylons/pyramid_tm/pull/72\n\n2.3 (2019-09-30)\n^^^^^^^^^^^^^^^^\n\n- Mark all ``transaction.interfaces.TransientError`` exceptions\n  automatically as retryable by ``pyramid_retry`` if it is installed.\n  See https://github.com/Pylons/pyramid_tm/pull/71\n\n2.2.1 (2018-10-23)\n^^^^^^^^^^^^^^^^^^\n\n- Support Python 3.7.\n\n- Fix error handling when using ``transaction >= 2.4.0``.\n  See https://github.com/Pylons/pyramid_tm/pull/68\n\n2.2 (2017-07-03)\n^^^^^^^^^^^^^^^^\n\nBackward Incompatibilities\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- This is a backward-incompatible change for anyone using the\n  ``tm.commit_veto`` hook. Anyone else is unaffected.\n\n  The ``tm.commit_veto`` hook will now be consulted for any squashed\n  exceptions instead of always aborting. Previously, if an exception\n  was handled by an exception view, the transaction would always be aborted.\n  Now, the ``commit_veto`` can inspect ``request.exception`` and the generated\n  ``response`` to determine whether to commit or abort.\n\n  The new behavior when using the ``pyramid_tm.default_commit_veto`` is that\n  a squashed exception may be committed if either of the following conditions\n  are true:\n\n  - The response contains the ``x-tm`` header set to ``commit``.\n\n  - The response's status code does not start with ``4`` or ``5``.\n\n  In most cases the response would result in 4xx or 5xx exception and would\n  be aborted - this behavior remains the same. However, if the squashed\n  exception rendered a response that is 3xx or 2xx (such as raising\n  ``pyramid.httpexceptions.HTTPFound``), then the transaction will be\n  committed instead of aborted.\n\n  See https://github.com/Pylons/pyramid_tm/pull/65\n\n2.1 (2017-06-07)\n^^^^^^^^^^^^^^^^\n\n- On Pyramid >= 1.7 any errors raised from ``pyramid_tm`` invoking\n  ``request.tm.abort`` and ``request.tm.commit`` will be caught and used\n  to lookup and execute an exception view to return an error response. This\n  exception view will be executed with an inactive transaction manager.\n  See https://github.com/Pylons/pyramid_tm/pull/61\n\n2.0 (2017-04-11)\n^^^^^^^^^^^^^^^^\n\nMajor Features\n~~~~~~~~~~~~~~\n\n- The ``pyramid_tm`` tween has been moved **over** the ``EXCVIEW`` tween.\n  This means the transaction is open during exception view execution.\n  See https://github.com/Pylons/pyramid_tm/pull/55\n\n- Added a ``pyramid_tm.is_tm_active`` and a ``tm_active`` view predicate\n  which may be useful in exception views that require access to the database.\n  See https://github.com/Pylons/pyramid_tm/pull/60\n\nBackward Incompatibilities\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- The ``tm.attempts`` setting has been removed and retry support has been moved\n  into a new package named ``pyramid_retry``. If you want retry support then\n  please look at that library for more information about installing and\n  enabling it. See https://github.com/Pylons/pyramid_tm/pull/55\n\n- The ``pyramid_tm`` tween has been moved **over** the ``EXCVIEW`` tween.\n  If you have any hacks in your application that are opening a new transaction\n  inside your exception views then it's likely you will want to remove them\n  or re-evaluate when upgrading.\n  See https://github.com/Pylons/pyramid_tm/pull/55\n\n- Drop support for Pyramid < 1.5.\n\nMinor Features\n~~~~~~~~~~~~~~\n\n- Support for Python 3.6.\n\n1.1.1 (2016-11-21)\n^^^^^^^^^^^^^^^^^^\n\n- ``pyramid_tm`` 1.1.0 failed to fix a unicode issue related to undecodable\n  request paths. The placeholder message was not unicode.\n  See https://github.com/Pylons/pyramid_tm/pull/52\n\n- Include Changes in the main docs.\n\n1.1.0 (2016-11-19)\n^^^^^^^^^^^^^^^^^^\n\n- Support ``transaction`` 2.x.\n\n- The transaction's request path and userid are now coerced to unicode by\n  first decoding as ``utf-8`` and falling back to ``latin-1``. If the userid\n  does not conform to these restrictions then set ``tm.annotate_user = no``\n  in your settings. See https://github.com/Pylons/pyramid_tm/pull/50\n\n1.0.2 (2016-11-18)\n^^^^^^^^^^^^^^^^^^\n\n- Pin to ``transaction < 1.99`` as pyramid_tm is currently incompatible with\n  the new 2.x release of transaction.\n  See https://github.com/Pylons/pyramid_tm/issues/49\n\n1.0.1 (2016-10-24)\n^^^^^^^^^^^^^^^^^^\n\n- Removes the ``AttributeError`` when ``request.tm`` is accessed outside the\n  tween. It turns out this broke subrequests as well as ``pshell`` and\n  ``pyramid.paster.bootstrapp`` CLI scripts, especially when using the\n  global transaction manager which can be tracked outside of the tween.\n  See https://github.com/Pylons/pyramid_tm/pull/48\n\n1.0 (2016-09-12)\n^^^^^^^^^^^^^^^^\n\n- Drop Python 2.6, 3.2 and 3.3 support.\n\n- Add Python 3.5 support.\n\n- Subtle bugs can occur if you use the transaction manager during a request\n  in which ``pyramid_tm`` is disabled via an ``activate_hook``. To combat these\n  types of errors, attempting to access ``request.tm`` will now raise an\n  ``AttributeError`` when ``pyramid_tm`` is inactive.\n  See https://github.com/Pylons/pyramid_tm/pull/46\n\n0.12.1 (2015-11-25)\n^^^^^^^^^^^^^^^^^^^\n\n- Fix compatibility with 1.2 and 1.3 again. This wasn't fully fixed in the\n  0.12 release as the tween was relying on request properties working (which\n  they do not inside tweens in older versions).\n  See https://github.com/Pylons/pyramid_tm/pull/39\n\n0.12 (2015-05-20)\n^^^^^^^^^^^^^^^^^\n\n- Expose a ``tm.annotate_user`` option to avoid computing\n  ``request.unauthenticated_userid`` on every request.\n  See https://github.com/Pylons/pyramid_tm/pull/36\n\n- Restore compatibility with Pyramid 1.2 and 1.3.\n\n0.11 (2015-02-04)\n^^^^^^^^^^^^^^^^^\n\n- Add a hook to override creation of the transaction manager (the default\n  remains the thread-local one accessed through ``transaction.manager``).\n  See: https://github.com/Pylons/pyramid_tm/pull/31\n\n0.10 (2015-01-06)\n^^^^^^^^^^^^^^^^^\n\n- Fix recording transactions with non-text, non-bytes userids.\n  See: https://github.com/Pylons/pyramid_tm/issues/28\n\n0.9 (2014-12-30)\n^^^^^^^^^^^^^^^^\n\n- Work around recording transaction userid containing unicode.\n  See https://github.com/Pylons/pyramid_tm/pull/15, although the fix\n  is different, to ensure Python3 compatibility.\n\n- Work around recording transaction notes containing unicode.\n  https://github.com/Pylons/pyramid_tm/pull/25\n\n0.8 (2014-11-12)\n^^^^^^^^^^^^^^^^\n\n- Add a new ``tm.activate_hook`` hook which can control when the\n  transaction manager is active. For example, this may be useful in\n  situations where the manager should be disabled for a particular URL.\n  https://github.com/Pylons/pyramid_tm/pull/12\n\n- Fix unit tests under Pyramid 1.5.\n\n- Fix a bug preventing retryable exceptions from actually being retried.\n  https://github.com/Pylons/pyramid_tm/pull/8\n\n- Don't call ``setUser`` on transaction if there is no user logged in.\n  This could cause the username set on the transaction to be a strange\n  string: \" None\". https://github.com/Pylons/pyramid_tm/pull/9\n\n- Avoid crash when the ``path_info`` cannot be decoded from the request\n  object. https://github.com/Pylons/pyramid_tm/pull/19\n\n0.7 (2012-12-30)\n^^^^^^^^^^^^^^^^\n\n- Write unauthenticated userid and ``request.path_info`` as transaction\n  metadata via ``t.setUser`` and ``t.note`` respectively during a commit.\n\n0.6 (2012-12-26)\n^^^^^^^^^^^^^^^^\n\n- Disuse the confusing and bug-ridden generator-plus-context-manager \"attempts\"\n  mechanism from the transaction package for retrying retryable exceptions\n  (e.g. ZODB ConflictError).  Use a simple while loop plus a counter and\n  imperative logic instead.\n\n0.5 (2012-06-26)\n^^^^^^^^^^^^^^^^\n\nBug Fixes\n~~~~~~~~~\n\n- When a non-retryable exception was raised as the result of a call to\n  ``transaction.manager.commit``, the exception was not reraised properly.\n  Symptom: an unrecoverable exception such as ``Unsupported: Storing blobs in\n  <somestorage> is not supported.`` would be swallowed inappropriately.\n\n0.4 (2012-03-28)\n^^^^^^^^^^^^^^^^\n\nBug Fixes\n~~~~~~~~~\n\n- Work around failure to retry ConflictError properly at commit time by the\n  ``transaction`` 1.2.0 package.  See\n  https://mail.zope.org/pipermail/zodb-dev/2012-March/014603.html for\n  details.\n\nTesting\n~~~~~~~\n\n- No longer tested under Python 2.5 by ``tox.ini`` (and therefore no longer\n  tested under 2.5 by the Pylons Jenkins server).  The package may still work\n  under 2.5, but automated tests will no longer show breakage when it changes\n  in ways that break 2.5 support.\n\n- Squash test deprecation warnings under Python 3.2.\n\n0.3 (2011-09-27)\n^^^^^^^^^^^^^^^^\n\nFeatures\n~~~~~~~~\n\n- The transaction manager has been converted to a Pyramid 1.2 \"tween\"\n  (instead of an event subscriber).  It will be slotted directly \"below\" the\n  exception view handler, meaning it will have a chance to handle exceptions\n  before they are turned into responses.  This means it's best to \"raise\n  HTTPFound(...)\" instead of \"return HTTPFound(...)\" if you want an HTTP\n  exception to abort the transaction.\n\n- The transaction manager will now retry retryable exceptions (such as a ZODB\n  conflict error) if ``tm.attempts`` is configured to be more than the\n  default of ``1``.  See the ``Retrying`` section of the documentation.\n\n- Python 3.2 compatibility (requires Pyramid 1.3dev+).\n\nBackwards Incompatibilities\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Incompatible with Pyramid < 1.2a1.  Use ``pyramid_tm`` version 0.2 if you\n  need compatibility with an older Pyramid installation.\n\n- The ``default_commit_veto`` commit veto callback is no longer configured\n  into the system by default.  Use ``tm.commit_veto =\n  pyramid_tm.default_commit_veto`` in the deployment settings to add it.\n  This is for parity with ``repoze.tm2``, which doesn't configure in a commit\n  veto by default either.\n\n- The ``default_commit_veto`` no longer checks for the presence of the\n  ``X-Tm-Abort`` header when attempting to figure out whether the transaction\n  should be aborted (although it still checks for the ``X-Tm`` header).  Use\n  version 0.2 or a custom commit veto function if your application depends on\n  the ``X-Tm-Abort`` header.\n\n- A commit veto is now called with two arguments: ``request`` and\n  ``response``.  The ``request`` is the webob request that caused the\n  transaction manager to become active.  The ``response`` is the response\n  returned by the Pyramid application.  This call signature is incompatible\n  with older versions.  The call signature of a ``pyramid_tm`` 0.2 and older\n  commit veto accepted three arguments: ``environ``, ``status``, and\n  ``headers``.  If you're using a custom ``commit_veto`` function, you'll\n  need to either convert your existing function to use the new calling\n  convention or use a wrapper to make it compatible with the new calling\n  convention.  Here's a simple wrapper function\n  (``bwcompat_commit_veto_wrapper``) that will allow you to use your existing\n  custom commit veto function::\n\n     def bwcompat_commit_veto_wrapper(request, response):\n         return my_custom_commit_veto(request.environ, response.status,\n                                      response.headerlist)\n\nDeprecations\n~~~~~~~~~~~~\n\n- The ``pyramid_tm.commit_veto`` configuration setting is now canonically\n  spelled as ``tm.commit_veto``.  The older spelling will continue to work,\n  but may raise a deprecation error when used.\n\n0.2 (2011-07-18)\n^^^^^^^^^^^^^^^^\n\n- A new header ``X-Tm`` is now honored by the ``default_commit_veto`` commit\n  veto hook. If this header exists in the headerlist, its value must be a\n  string. If its value is ``commit``, the transaction will be committed\n  regardless of the status code or the value of ``X-Tm-Abort``. If the value\n  of the ``X-Tm`` header is ``abort`` (or any other string value except\n  ``commit``), the transaction will be aborted, regardless of the status code\n  or the value of ``X-Tm-Abort``.\n\n0.1 (2011-02-23)\n^^^^^^^^^^^^^^^^\n\n- Initial release, based on repoze.tm2\n\n",
    "bugtrack_url": null,
    "license": "BSD-derived (Repoze)",
    "summary": "A package which allows Pyramid requests to join the active transaction",
    "version": "2.6",
    "project_urls": {
        "Changelog": "https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/changes.html",
        "Documentation": "https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/index.html",
        "Homepage": "https://github.com/Pylons/pyramid_tm",
        "Issue Tracker": "https://github.com/Pylons/pyramid_tm/issues"
    },
    "split_keywords": [
        "wsgi",
        "pylons",
        "pyramid",
        "transaction"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "687877ac3fbfb73339bd09f4c33a6d79947ad58c5d4d8062fbdbc2be1ddcac57",
                "md5": "0fe7127fb7cd159de5abad78d9e766e8",
                "sha256": "665a4ee1d6f41f0c7ffa5e54d9b01d70cd3e8e5bd76277529acbdd6b6bd6fe9e"
            },
            "downloads": -1,
            "filename": "pyramid_tm-2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0fe7127fb7cd159de5abad78d9e766e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 10792,
            "upload_time": "2024-11-14T07:30:52",
            "upload_time_iso_8601": "2024-11-14T07:30:52.428074Z",
            "url": "https://files.pythonhosted.org/packages/68/78/77ac3fbfb73339bd09f4c33a6d79947ad58c5d4d8062fbdbc2be1ddcac57/pyramid_tm-2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cfb3d6db704d25fc7b03d96a753fcc7e63f4ea2f93aedeb7c072472744d33267",
                "md5": "34f9d2dce26b5df2fe9eb4801e73d520",
                "sha256": "8148d2191285280c9a0c23e6df1018b3514b4cef02115b872dd0350a4d78709c"
            },
            "downloads": -1,
            "filename": "pyramid_tm-2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "34f9d2dce26b5df2fe9eb4801e73d520",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 40028,
            "upload_time": "2024-11-14T07:30:54",
            "upload_time_iso_8601": "2024-11-14T07:30:54.256318Z",
            "url": "https://files.pythonhosted.org/packages/cf/b3/d6db704d25fc7b03d96a753fcc7e63f4ea2f93aedeb7c072472744d33267/pyramid_tm-2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 07:30:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Pylons",
    "github_project": "pyramid_tm",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "pyramid-tm"
}
        
Elapsed time: 0.73466s