Commits

Thomas Waldmann  committed ad30359

Raise requirements to require latest flask/werkzeug/jinja2 release, latest emeraldtree.

adapt some places, URL pathes with + are (again) just + and not %2B any more. \o/

removed "timed" decorator usages at some places as it needed a context,
but is used without one from some places.

  • Participants
  • Parent commits 21c6092

Comments (0)

Files changed (7)

File MoinMoin/_tests/test_wikiutil.py

     def test_anchor_name_encoding(self):
         tests = [
             # text, expected output
-            (u'\xf6\xf6ll\xdf\xdf', 'A.2BAPYA9g-ll.2BAN8A3w-'),
+            (u'\xf6\xf6ll\xdf\xdf', 'A_APYA9g-ll_AN8A3w-'),
             (u'level 2', 'level_2'),
             (u'level_2', 'level_2'),
             (u'', 'A'),

File MoinMoin/items/__init__.py

     def subitems_prefix(self):
         return self.name + u'/' if self.name else u''
 
-    @timed()
     def get_subitem_revs(self):
         """
         Create a list of subitems of this item.
         revs = flaskg.storage.search(query, sortedby=NAME_EXACT, limit=None)
         return revs
 
-    @timed()
     def make_flat_index(self, subitems):
         """
         Create two IndexEntry lists - ``dirs`` and ``files`` - from a list of

File MoinMoin/items/content.py

     return cls
 
 
-@timed()
 def conv_serialize(doc, namespaces, method='polyglot'):
     out = array('u')
     doc.write(out.fromunicode, namespaces=namespaces, method=method)

File MoinMoin/themes/__init__.py

         return get_theme(theme_name)
 
 
-@timed()
 def render_template(template, **context):
     return render_theme_template(get_current_theme(), template, **context)
 

File MoinMoin/util/_tests/test_interwiki.py

                  # Method signature to understand the tuple parameters
                  # (item_name, wiki_name='', namespace='', rev=CURRENT, endpoint='frontend.show_item', _external=False):
                  (('SomePage', '', '', CURRENT, 'frontend.show_item', True), 'http://localhost:8080/SomePage'),
-                 (('SomePage', '', '', CURRENT, 'frontend.modify_item', False), '/%2Bmodify/SomePage'),
+                 (('SomePage', '', '', CURRENT, 'frontend.modify_item', False), '/+modify/SomePage'),
                  # FIXME if you set interwiki_map = dict(Self='http://localhost:8080', MoinMoin='http://moinmo.in/', ),
-                 # the above line make it fails, it returns http://localhost/%2Bmodify/SomePage
-                 # (('SomePage', '', '', CURRENT, 'frontend.modify_item', True), 'http://localhost:8080/%2Bmodify/SomePage'),
-                 (('SomePage', '', '', revid, 'frontend.show_item', False), '/%2Bshow/%2B{0}/SomePage'.format(revid)),
-                 (('SomePage', '', '', revid, 'frontend.show_item_meta', False), '/%2Bmeta/%2B{0}/SomePage'.format(revid)),
+                 # the above line make it fails, it returns http://localhost/+modify/SomePage
+                 # (('SomePage', '', '', CURRENT, 'frontend.modify_item', True), 'http://localhost:8080/+modify/SomePage'),
+                 (('SomePage', '', '', revid, 'frontend.show_item', False), '/+show/+{0}/SomePage'.format(revid)),
+                 (('SomePage', '', '', revid, 'frontend.show_item_meta', False), '/+meta/+{0}/SomePage'.format(revid)),
                  # Valid namespaces
                  (('SomePage', '', 'ns1', CURRENT, 'frontend.show_item', False), '/:ns1:SomePage'),
                  (('SomePage', '', 'ns1:ns2', CURRENT, 'frontend.show_item', True), 'http://localhost:8080/:ns1:ns2:SomePage'),
-                 (('SomePage', '', 'ns1', CURRENT, 'frontend.modify_item', False), '/%2Bmodify/:ns1:SomePage'),
-                 (('SomePage', '', 'ns1:ns2', CURRENT, 'frontend.show_item_meta', True), 'http://localhost:8080/%2Bmeta/:ns1:ns2:SomePage'),
-                 (('SomePage', '', 'ns1', revid, 'frontend.show_item', False), '/%2Bshow/%2B{0}/:ns1:SomePage'.format(revid)),
-                 (('SomePage', '', 'ns1:ns2', revid, 'frontend.show_item_meta', False), '/%2Bmeta/%2B{0}/:ns1:ns2:SomePage'.format(revid)),
+                 (('SomePage', '', 'ns1', CURRENT, 'frontend.modify_item', False), '/+modify/:ns1:SomePage'),
+                 (('SomePage', '', 'ns1:ns2', CURRENT, 'frontend.show_item_meta', True), 'http://localhost:8080/+meta/:ns1:ns2:SomePage'),
+                 (('SomePage', '', 'ns1', revid, 'frontend.show_item', False), '/+show/+{0}/:ns1:SomePage'.format(revid)),
+                 (('SomePage', '', 'ns1:ns2', revid, 'frontend.show_item_meta', False), '/+meta/+{0}/:ns1:ns2:SomePage'.format(revid)),
 
                  (('SomePage', 'MoinMoin', 'ns1', CURRENT, 'frontend.show_item', False), 'http://moinmo.in/:ns1:SomePage'),
                  (('SomePage', 'MoinMoin', '', CURRENT, 'frontend.show_item', False), 'http://moinmo.in/SomePage'),
                  # FIXME will exist a map for this case? maybe there should be a placeholder for it.
                  # we need that for wiki farms with common search index and search in non-current revisions.
-                 (('SomePage', 'MoinMoin', '', revid, 'frontend.show_item', False), 'http://moinmo.in/%2Bshow/%2B{0}/SomePage'.format(revid)),
+                 (('SomePage', 'MoinMoin', '', revid, 'frontend.show_item', False), 'http://moinmo.in/+show/+{0}/SomePage'.format(revid)),
                  (('SomePage', 'non-existent', '', CURRENT, 'frontend.show_item', False), '/non-existent:SomePage'),
                  (('SomePage', 'non-existent', 'ns1', CURRENT, 'frontend.show_item', False), '/non-existent:ns1:SomePage'),
                 ]

File MoinMoin/util/interwiki.py

                 # we know that everything left of the + belongs to script url, but we
                 # just want e.g. +show/42/FooBar to append it to the other wiki's
                 # base URL.
-                i = local_url.index('/%2B')
+                i = local_url.index('/+')
                 path = local_url[i + 1:]
                 url = wiki_base_url + path
     return url
     include_package_data=True,
     zip_safe=False,
     dependency_links=[
-        # 'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.7dev',
-        # 'https://bitbucket.org/thomaswaldmann/whoosh/get/2.4x.tar.gz#egg=Whoosh-2.4.99dev',
+        #'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.9.2-dev',
+        #'https://github.com/mitsuhiko/flask/tarball/master#egg=Flask-0.11-dev',
         'https://bitbucket.org/thomaswaldmann/whoosh/get/default.tar.gz#egg=Whoosh-2.5.99dev',
-        # fixed flask-themes, 0.1.3 does not work for flask 0.8.x, thus we use a faked 0.1.3.1:
-        'https://bitbucket.org/thomaswaldmann/flask-themes/get/24dcc703953f.tar.gz#egg=Flask-Themes-0.1.3.1',
-        'https://bitbucket.org/thomaswaldmann/emeraldtree/get/tip.tar.gz#egg=emeraldtree-0.9.2',
+        # use a pre-release and fixed flask-themes 0.2.0 as 0.1.3 does not work for flask 0.8.x:
+        'https://bitbucket.org/thomaswaldmann/flask-themes/get/a87399231886.tar.gz#egg=Flask-Themes-0.2.0',
+        # use a pre-release emeraldtree (port to 2.6/2.7/3.3):
+        'https://bitbucket.org/thomaswaldmann/emeraldtree/get/tip.tar.gz#egg=emeraldtree-0.9.3dev',
     ],
     install_requires=[
         'blinker>=1.1',  # event signalling (e.g. for change notification trigger)
         'docutils>=0.8.1',  # reST markup processing
         'Markdown>=2.1.1',  # Markdown markup processing
-        'Flask>=0.8',  # micro framework
+        'Flask>=0.10',  # micro framework
         'Flask-Babel>=0.7',  # i18n support
         'Flask-Cache>=0.3.4',  # caching support
         'Flask-Script>=0.3.3',  # scripting support
-        'Flask-Themes>=0.1.3.1',  # theme support
-        'emeraldtree>=0.9.2',  # xml processing
+        'Flask-Themes>=0.2.0',  # theme support
+        'emeraldtree>=0.9.3dev',  # xml processing
         'flatland==dev',  # repo checkout at revision 269:6c5d262d7eff works
-        'Jinja2>=2.6',  # template engine
+        'Jinja2>=2.7',  # template engine
         'pygments>=1.4',  # src code / text file highlighting
-        'Werkzeug>=0.8.1',  # wsgi toolkit
+        'Werkzeug>=0.9',  # wsgi toolkit
         'pytest>=2.1, <2.3',  # pytest is needed by unit tests
                               # note: currently 2.3.x is not compatible with our test code,
                               # likely due to the fixtures changes.