Ignore:
Timestamp:
14 Jan 2023, 04:57:11 (2 years ago)
Author:
uli
Message:

Upgrade dolmen.beaker dependency. Requires new buildout run.

Location:
main/waeup.kofa/trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r17273 r17280  
    441.8.1.dev0 (unreleased)
    55=======================
     6
     7* Upgrade `dolmen.beaker` dependency. Removes other outdated crypto
     8  dependencies. Requires new buildout run. Moves cookie configuration from code
     9  to site.zcml session config.
    610
    711* Beautify INSTALL.txt.
  • main/waeup.kofa/trunk/etc/site.zcml.in

    r14672 r17280  
    11<configure xmlns="http://namespaces.zope.org/zope"
     2           xmlns:browser="http://namespaces.zope.org/browser"
    23           xmlns:kofa="http://namespaces.waeup.org/kofa"
    34           i18n_domain="${kofa_params:devel_pkg}">
     
    8081             principal="zope.manager" />
    8182   </configure>
     83
     84   <!-- session -->
     85   <browser:beakerSession
     86        key="waeup.kofa.session.id"
     87        secret="KofaRocks"
     88        timeout="3600"
     89        type="cookie"
     90        validate_key="thisMightBeChanged"
     91        />
     92
    8293</configure>
  • main/waeup.kofa/trunk/src/waeup/kofa/ftesting.zcml

    r9855 r17280  
    11<configure
    22   xmlns="http://namespaces.zope.org/zope"
     3   xmlns:browser="http://namespaces.zope.org/browser"
    34   xmlns:kofa="http://namespaces.waeup.org/kofa"
    45   i18n_domain="waeup.kofa"
     
    5051      principal="zope.Everybody"
    5152      />
    52   <grant 
     53  <grant
    5354      permission="waeup.Anonymous"
    5455      principal="zope.Anybody"
     
    7071  <grant role="zope.Manager" principal="zope.mgr" />
    7172
     73   <!-- session -->
     74   <browser:beakerSession
     75        key="waeup.kofa.session.id"
     76        secret="KofaRocks"
     77        timeout="3600"
     78        type="cookie"
     79        validate_key="thisMightBeChanged"
     80        />
     81
    7282</configure>
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_beaker.py

    r12110 r17280  
     1# We test beaker functionality, although we have no beaker-related code
     2# anymore. All configuration is done in ZCML snippets in
     3# site.zcml/ftesting.zcml now.
     4# The dolmen.beaker package is developed on: https://github.com/trollfot/dolmen.beaker
     5from dolmen.beaker.interfaces import ISessionConfig
     6from zope.component import queryUtility
    17from zope.component.hooks import setSite
    28from zope.publisher.browser import TestRequest
    39from zope.session.interfaces import ISession
    410from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     11
    512
    613class BeakerTests(FunctionalTestCase):
     
    1825        setSite(self.getRootFolder()) # needed to start transaction
    1926        request = TestRequest()
    20         session = ISession(request)
     27        session = ISession(request)  # this is a Zope session
    2128        self.assertTrue(session.__module__.startswith('dolmen.beaker'))
     29        self.assertTrue(session.get("_path", None) is not None)
    2230        return
     31
     32    def test_beaker_session_values(self):
     33        # Ensure we get also a beaker session
     34        # (which is part of a Zope session)
     35        try:
     36            import dolmen.beaker
     37        except ImportError:
     38            # no beaker installed, no test
     39            return
     40        setSite(self.getRootFolder()) # needed to start transaction
     41        config = ISessionConfig
     42        request = TestRequest()
     43        session = ISession(request).session
     44        self.assertEqual(session.__module__, "beaker.session")
     45        self.assertTrue(session.get("_path", None) is not None)
     46        return
     47
     48    def test_beaker_config_accessible(self):
     49        # The session config is set in site.zcml / ftesting.zcml
     50        # See beakerSession directive
     51        # See https://github.com/trollfot/dolmen.beaker/blob/master/src/dolmen/beaker/zcml.py
     52        # for options
     53        config = queryUtility(ISessionConfig)
     54        self.assertEqual(config.get("key"), "waeup.kofa.session.id")
     55        self.assertEqual(config.get("timeout"), 3600)
  • main/waeup.kofa/trunk/versions.cfg

    r16157 r17280  
    1010alabaster = 0.7.7
    1111Babel = 1.3
    12 Beaker = 1.6.4
     12Beaker = 1.11.0
    1313collective.recipe.sphinxbuilder = 0.8.2
    1414collective.recipe.template = 2.1
     
    1717distribute = 0.6.49
    1818docutils = 0.11
    19 dolmen.beaker = 0.1
     19dolmen.beaker = 0.4
    2020experimental.cssselect = 0.3
     21funcsigs = 1.0.2
    2122grok = 1.1.1
    2223grokcore.view = 1.13.5
     
    4748psutil = 2.1.3
    4849py = 1.0.2
    49 pycryptopp = 0.6.0.1206569328141510525648634803928199668821045408958
    5050Pygments = 2.0.2
    5151pyprof2calltree = 1.1.1
Note: See TracChangeset for help on using the changeset viewer.