Products.statusmessages


NameProducts.statusmessages JSON
Version 5.0.6 PyPI version JSON
download
home_pagehttps://pypi.org/project/Products.statusmessages
Summarystatusmessages provides an easy way of handling internationalized status messages managed via an BrowserRequest adapter storing status messages in client-side cookies.
upload_time2023-07-13 22:17:46
maintainer
docs_urlNone
authorHanno Schlichting
requires_python>=3.8
licenseBSD
keywords zope cmf plone status messages i18n
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

statusmessages provides an easy way of handling internationalized status
messages managed via an BrowserRequest adapter storing status messages in
client-side cookies.

It is quite common to write status messages which should be shown to the user
after some action. These messages of course should be internationalized. As
these messages normally are defined in Python code, the common way to i18n-ize
these in Zope is to use zope.i18n Messages. Messages are complex objects
consisting of a translation domain and a default unicode text and might have an
additional mapping dict and a distinct id.

The usual way to provide status messages in CMF/Plone has been to add a
"?portal_status_messages=some%20text" to the URL. While this has some usability
problems it also isn't possible to i18n-ize these in the common way, as the URL
is currently limited to the ASCII charset, but an encoding providing support for
the full unicode range is required.

The solution provided by this module is to store the status messages inside a
cookie. In version 1.x a server side session like storage has been used, but
this turned out not to be caching friendly for the usual web caching strategies.

Changelog
=========

.. You should *NOT* be adding new change log entries to this file.
   You should create a file in the news directory instead.
   For helpful instructions, please see:
   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst

.. towncrier release notes start

5.0.6 (2023-07-14)
------------------

Internal:


- Update configuration files.
  [plone devs] (cc314a2b)


5.0.5 (2020-04-23)
------------------

Bug fixes:


- Minor packaging updates. (#1)


5.0.4 (2018-09-23)
------------------

Bug fixes:

- Use Umlaut รค in tests in order to check string/bytes handling.
  Refactor test_encoding to unittest.
  [jensens]


5.0.3 (2018-06-21)
------------------

Bug fixes:

- Python 3 compatibility fixes.
  [pbauer]


5.0.2 (2018-02-05)
------------------

New features:

- Add Python 2 / 3 compatibility
  [davilima6]


5.0.1 (2017-11-26)
------------------

Bug fixes:

- Fix issue where encoding and decoding of statusmessages into cookie
  raised exception, because of
  ``TypeError: Struct() argument 1 must be string, not unicode``
  [datakurre]


5.0 (2017-08-04)
----------------

Breaking changes:

- Remove python 2.6 (and thus Plone 4.3.x) compatibility.
  [tomgross]

New features:

- Python 3 compatibility
  [tomgross]

Bug fixes:

- Update code to follow Plone styleguide.
  [gforcada]


4.1.2 (2017-02-12)
------------------

Bug fixes:

- Fix deprecated import in test.
  [pbauer]


4.1.1 (2016-08-11)
------------------

Bug fixes:

- Use zope.interface decorator.
  [gforcada]


4.1.0 (2016-05-25)
------------------

New features:

- Convert tests to plone.app.testing.
  [do3cc]


4.0 - 2010-07-18
----------------

- Use the standard libraries doctest module.
  [hannosch]


4.0b1 - 2010-03-01
------------------

- Stopped the cookie from being expired if a redirect (301, 302) or not-modified
  (304) response is sent. This means that if you set a redirect and then
  (superfluously) render a template that would show the status message, you
  won't lose the message.
  [optilude]


4.0a2 - 2009-12-17
------------------

- Changed the default type of a new message from the empty string to info.
  [hannosch]


4.0a1 - 2009-12-17
------------------

- Simplified the interface to use simpler add/show method names while keeping
  backwards compatibility.
  [hannosch]

- More code simplification. Make the code itself independent of Zope2.
  [hannosch]

- Removed a five:implements statement, as the ZPublisher.HTTPRequest is always
  an IBrowserRequest in Zope 2.12.
  [hannosch]

- This version depends on Zope 2.12+.
  [hannosch]

- Package metadata cleanup.
  [hannosch]

- Declare package and test dependencies.
  [hannosch]


3.0.3 - 2007-11-24
------------------

- Use binascii.b2a_base64 instead of base64.encodestring; the former doesn't
  inject newlines every 76 characters, which makes it easier to strip just the
  last one (slightly faster). This fixes tickets #7323 and #7325.
  [mj]


3.0.2 - 2007-11-06
------------------

- Fixed encoding format for the cookie value. The former format imposed a
  serious security risk. The full security issue is tracked at:
  http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5741. This also fixes
  http://dev.plone.org/plone/ticket/6943.
  [hannosch, witsch, mj]


3.0.1 - 2007-10-07
------------------

- Added the IAttributeAnnotatable interface assignment for the request to this
  package as well as the inclusion of the zope.annotation, as we rely on it.
  [hannosch]


3.0 - 2007-08-09
----------------

- No changes.
  [hannosch]


3.0rc1 - 2007-07-10
-------------------

- Removed useless setup.cfg.
  [hannosch]


3.0b2 - 2007-03-23
------------------

- Fixed duplicate message bug. Showing identical messages to the end user more
  than once, doesn't make any sense. This closes
  http://dev.plone.org/plone/ticket/6109.
  [hannosch]

- Added 's support for statusmessages without a redirect. This uses annotations
  on the request instead of direct values, so we avoid the possibility of
  sneaking those in via query strings.
  [tomster, hannosch]


3.0b1 - 2007-03-05
------------------

- Converted to a package in the Products namespace.
  [hannosch]

- Added explicit translation of statusmessages before storing them in the
  cookie. This makes sure we have a reasonable context to base the
  translation on.
  [hannosch]

- Changed license to BSD, to make it possible to include it as a dependency
  in Archetypes.
  [hannosch]


2.1 - 2006-10-25
----------------

- Updated test infrastructure, removed custom testrunner.
  [hannosch]

- Fixed deprecation warning for the zcml content directive.
  [hannosch]


2.0 - 2006-05-15
----------------

- Total reimplementation using cookies instead of a server-side in-memory
  storage to store status messages. The reasoning behind this change is that
  the former approach didn't play well with web caching strategies and added an
  additional burden in ZEO environments (having to use load-balancers, which
  are able to identify users and keep them connected to the same ZEO server).
  [hannosch]


1.1 - 2006-02-13
----------------

- Added tests for ThreadSafeDict.
  [hannosch]

- Fixed serious memory leak and did some code improvements.
  [hannosch, alecm]


1.0 - 2006-01-26
----------------

- Initial implementation
  [hannosch]

            

Raw data

            {
    "_id": null,
    "home_page": "https://pypi.org/project/Products.statusmessages",
    "name": "Products.statusmessages",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Zope CMF Plone status messages i18n",
    "author": "Hanno Schlichting",
    "author_email": "plone-developers@lists.sourceforge.net",
    "download_url": "https://files.pythonhosted.org/packages/57/04/ca2ad4c51d3e900f75a07b79a74652c88ee866ccc4c9d0ab9be40ea0d20c/Products.statusmessages-5.0.6.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\nstatusmessages provides an easy way of handling internationalized status\nmessages managed via an BrowserRequest adapter storing status messages in\nclient-side cookies.\n\nIt is quite common to write status messages which should be shown to the user\nafter some action. These messages of course should be internationalized. As\nthese messages normally are defined in Python code, the common way to i18n-ize\nthese in Zope is to use zope.i18n Messages. Messages are complex objects\nconsisting of a translation domain and a default unicode text and might have an\nadditional mapping dict and a distinct id.\n\nThe usual way to provide status messages in CMF/Plone has been to add a\n\"?portal_status_messages=some%20text\" to the URL. While this has some usability\nproblems it also isn't possible to i18n-ize these in the common way, as the URL\nis currently limited to the ASCII charset, but an encoding providing support for\nthe full unicode range is required.\n\nThe solution provided by this module is to store the status messages inside a\ncookie. In version 1.x a server side session like storage has been used, but\nthis turned out not to be caching friendly for the usual web caching strategies.\n\nChangelog\n=========\n\n.. You should *NOT* be adding new change log entries to this file.\n   You should create a file in the news directory instead.\n   For helpful instructions, please see:\n   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst\n\n.. towncrier release notes start\n\n5.0.6 (2023-07-14)\n------------------\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (cc314a2b)\n\n\n5.0.5 (2020-04-23)\n------------------\n\nBug fixes:\n\n\n- Minor packaging updates. (#1)\n\n\n5.0.4 (2018-09-23)\n------------------\n\nBug fixes:\n\n- Use Umlaut \u00e4 in tests in order to check string/bytes handling.\n  Refactor test_encoding to unittest.\n  [jensens]\n\n\n5.0.3 (2018-06-21)\n------------------\n\nBug fixes:\n\n- Python 3 compatibility fixes.\n  [pbauer]\n\n\n5.0.2 (2018-02-05)\n------------------\n\nNew features:\n\n- Add Python 2 / 3 compatibility\n  [davilima6]\n\n\n5.0.1 (2017-11-26)\n------------------\n\nBug fixes:\n\n- Fix issue where encoding and decoding of statusmessages into cookie\n  raised exception, because of\n  ``TypeError: Struct() argument 1 must be string, not unicode``\n  [datakurre]\n\n\n5.0 (2017-08-04)\n----------------\n\nBreaking changes:\n\n- Remove python 2.6 (and thus Plone 4.3.x) compatibility.\n  [tomgross]\n\nNew features:\n\n- Python 3 compatibility\n  [tomgross]\n\nBug fixes:\n\n- Update code to follow Plone styleguide.\n  [gforcada]\n\n\n4.1.2 (2017-02-12)\n------------------\n\nBug fixes:\n\n- Fix deprecated import in test.\n  [pbauer]\n\n\n4.1.1 (2016-08-11)\n------------------\n\nBug fixes:\n\n- Use zope.interface decorator.\n  [gforcada]\n\n\n4.1.0 (2016-05-25)\n------------------\n\nNew features:\n\n- Convert tests to plone.app.testing.\n  [do3cc]\n\n\n4.0 - 2010-07-18\n----------------\n\n- Use the standard libraries doctest module.\n  [hannosch]\n\n\n4.0b1 - 2010-03-01\n------------------\n\n- Stopped the cookie from being expired if a redirect (301, 302) or not-modified\n  (304) response is sent. This means that if you set a redirect and then\n  (superfluously) render a template that would show the status message, you\n  won't lose the message.\n  [optilude]\n\n\n4.0a2 - 2009-12-17\n------------------\n\n- Changed the default type of a new message from the empty string to info.\n  [hannosch]\n\n\n4.0a1 - 2009-12-17\n------------------\n\n- Simplified the interface to use simpler add/show method names while keeping\n  backwards compatibility.\n  [hannosch]\n\n- More code simplification. Make the code itself independent of Zope2.\n  [hannosch]\n\n- Removed a five:implements statement, as the ZPublisher.HTTPRequest is always\n  an IBrowserRequest in Zope 2.12.\n  [hannosch]\n\n- This version depends on Zope 2.12+.\n  [hannosch]\n\n- Package metadata cleanup.\n  [hannosch]\n\n- Declare package and test dependencies.\n  [hannosch]\n\n\n3.0.3 - 2007-11-24\n------------------\n\n- Use binascii.b2a_base64 instead of base64.encodestring; the former doesn't\n  inject newlines every 76 characters, which makes it easier to strip just the\n  last one (slightly faster). This fixes tickets #7323 and #7325.\n  [mj]\n\n\n3.0.2 - 2007-11-06\n------------------\n\n- Fixed encoding format for the cookie value. The former format imposed a\n  serious security risk. The full security issue is tracked at:\n  http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5741. This also fixes\n  http://dev.plone.org/plone/ticket/6943.\n  [hannosch, witsch, mj]\n\n\n3.0.1 - 2007-10-07\n------------------\n\n- Added the IAttributeAnnotatable interface assignment for the request to this\n  package as well as the inclusion of the zope.annotation, as we rely on it.\n  [hannosch]\n\n\n3.0 - 2007-08-09\n----------------\n\n- No changes.\n  [hannosch]\n\n\n3.0rc1 - 2007-07-10\n-------------------\n\n- Removed useless setup.cfg.\n  [hannosch]\n\n\n3.0b2 - 2007-03-23\n------------------\n\n- Fixed duplicate message bug. Showing identical messages to the end user more\n  than once, doesn't make any sense. This closes\n  http://dev.plone.org/plone/ticket/6109.\n  [hannosch]\n\n- Added 's support for statusmessages without a redirect. This uses annotations\n  on the request instead of direct values, so we avoid the possibility of\n  sneaking those in via query strings.\n  [tomster, hannosch]\n\n\n3.0b1 - 2007-03-05\n------------------\n\n- Converted to a package in the Products namespace.\n  [hannosch]\n\n- Added explicit translation of statusmessages before storing them in the\n  cookie. This makes sure we have a reasonable context to base the\n  translation on.\n  [hannosch]\n\n- Changed license to BSD, to make it possible to include it as a dependency\n  in Archetypes.\n  [hannosch]\n\n\n2.1 - 2006-10-25\n----------------\n\n- Updated test infrastructure, removed custom testrunner.\n  [hannosch]\n\n- Fixed deprecation warning for the zcml content directive.\n  [hannosch]\n\n\n2.0 - 2006-05-15\n----------------\n\n- Total reimplementation using cookies instead of a server-side in-memory\n  storage to store status messages. The reasoning behind this change is that\n  the former approach didn't play well with web caching strategies and added an\n  additional burden in ZEO environments (having to use load-balancers, which\n  are able to identify users and keep them connected to the same ZEO server).\n  [hannosch]\n\n\n1.1 - 2006-02-13\n----------------\n\n- Added tests for ThreadSafeDict.\n  [hannosch]\n\n- Fixed serious memory leak and did some code improvements.\n  [hannosch, alecm]\n\n\n1.0 - 2006-01-26\n----------------\n\n- Initial implementation\n  [hannosch]\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "statusmessages provides an easy way of handling internationalized status messages managed via an BrowserRequest adapter storing status messages in client-side cookies.",
    "version": "5.0.6",
    "project_urls": {
        "Homepage": "https://pypi.org/project/Products.statusmessages"
    },
    "split_keywords": [
        "zope",
        "cmf",
        "plone",
        "status",
        "messages",
        "i18n"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b56e9f338ce65ff8220a69530d56d90415a0dd5d4b8ca1ea7c80d4d745230d0f",
                "md5": "c73e78689a8ffab6a5e2669ac70e37ff",
                "sha256": "6642fab1bde75c6a6923dc7700310bcbf5eef3cbc6409165ca7c45d81c0a37b8"
            },
            "downloads": -1,
            "filename": "Products.statusmessages-5.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c73e78689a8ffab6a5e2669ac70e37ff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11770,
            "upload_time": "2023-07-13T22:17:44",
            "upload_time_iso_8601": "2023-07-13T22:17:44.931039Z",
            "url": "https://files.pythonhosted.org/packages/b5/6e/9f338ce65ff8220a69530d56d90415a0dd5d4b8ca1ea7c80d4d745230d0f/Products.statusmessages-5.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5704ca2ad4c51d3e900f75a07b79a74652c88ee866ccc4c9d0ab9be40ea0d20c",
                "md5": "9b02362a9de588a561c8a48dd6ef11c4",
                "sha256": "fc3527521a27ff1340eb90dcb0bce2f5ae45296fe44b6461d1a2aad147aea88f"
            },
            "downloads": -1,
            "filename": "Products.statusmessages-5.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "9b02362a9de588a561c8a48dd6ef11c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14998,
            "upload_time": "2023-07-13T22:17:46",
            "upload_time_iso_8601": "2023-07-13T22:17:46.619530Z",
            "url": "https://files.pythonhosted.org/packages/57/04/ca2ad4c51d3e900f75a07b79a74652c88ee866ccc4c9d0ab9be40ea0d20c/Products.statusmessages-5.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-13 22:17:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "products.statusmessages"
}
        
Elapsed time: 0.29719s