Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-bottle for openSUSE:Factory 
checked in at 2022-08-05 19:50:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bottle (Old)
 and      /work/SRC/openSUSE:Factory/.python-bottle.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-bottle"

Fri Aug  5 19:50:11 2022 rev:20 rq:992662 version:0.12.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bottle/python-bottle.changes      
2022-05-30 12:43:17.284337642 +0200
+++ /work/SRC/openSUSE:Factory/.python-bottle.new.1521/python-bottle.changes    
2022-08-05 19:50:34.825390495 +0200
@@ -1,0 +2,17 @@
+Wed Aug  3 20:24:55 UTC 2022 - Beno??t Monin <[email protected]>
+
+- update to version 0.12.23: bugfix release
+  * fix: Include keyword-only-args in getarcspec() polyfill
+- additional changes from version 0.12.22:
+  * fix: Jinja2 and mako test path issues
+  * getargspec is gone in python 3.11: so use getfullargspec on all
+    3.x versions instead
+  * fix: view decorator does not forward default values if route
+    result is None
+  * fix: Make tests runnable with both unittest and pytest
+  * fix: Cookie test falsely reports a failure for some python
+    versions
+- drop fix_cookie_test.patch: fixed upstream
+- run the tests with unittest
+
+-------------------------------------------------------------------

Old:
----
  bottle-0.12.21.tar.gz
  fix_cookie_test.patch

New:
----
  bottle-0.12.23.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-bottle.spec ++++++
--- /var/tmp/diff_new_pack.7WhSYM/_old  2022-08-05 19:50:36.105393800 +0200
+++ /var/tmp/diff_new_pack.7WhSYM/_new  2022-08-05 19:50:36.125393851 +0200
@@ -18,15 +18,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-bottle
-Version:        0.12.21
+Version:        0.12.23
 Release:        0
 Summary:        WSGI framework for small web applications
 License:        MIT
 URL:            https://bottlepy.org/
 Source:         
https://files.pythonhosted.org/packages/source/b/bottle/bottle-%{version}.tar.gz
 Source1:        http://bottlepy.org/docs/0.12/bottle-docs.pdf
-# partial import of upstream commit 8342490
-Patch0:         fix_cookie_test.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
 Requires(post): update-alternatives
@@ -56,7 +54,6 @@
 
 %prep
 %setup -q -n bottle-%{version}
-%autopatch -p1
 
 cp %{SOURCE1} .
 
@@ -68,7 +65,7 @@
 %python_clone -a %{buildroot}%{_bindir}/bottle.py
 
 %check
-%python_exec test/testall.py
+%pyunittest -v
 
 %post
 %python_install_alternative bottle.py

++++++ bottle-0.12.21.tar.gz -> bottle-0.12.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/PKG-INFO new/bottle-0.12.23/PKG-INFO
--- old/bottle-0.12.21/PKG-INFO 2022-05-26 20:46:29.381940000 +0200
+++ new/bottle-0.12.23/PKG-INFO 2022-08-03 15:42:04.593679000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: bottle
-Version: 0.12.21
+Version: 0.12.23
 Summary: Fast and simple WSGI-framework for small web-applications.
 Home-page: http://bottlepy.org/
 Author: Marcel Hellkamp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/bottle.egg-info/PKG-INFO 
new/bottle-0.12.23/bottle.egg-info/PKG-INFO
--- old/bottle-0.12.21/bottle.egg-info/PKG-INFO 2022-05-26 20:46:28.000000000 
+0200
+++ new/bottle-0.12.23/bottle.egg-info/PKG-INFO 2022-08-03 15:42:04.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: bottle
-Version: 0.12.21
+Version: 0.12.23
 Summary: Fast and simple WSGI-framework for small web-applications.
 Home-page: http://bottlepy.org/
 Author: Marcel Hellkamp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/bottle.egg-info/SOURCES.txt 
new/bottle-0.12.23/bottle.egg-info/SOURCES.txt
--- old/bottle-0.12.21/bottle.egg-info/SOURCES.txt      2022-05-26 
20:46:29.000000000 +0200
+++ new/bottle-0.12.23/bottle.egg-info/SOURCES.txt      2022-08-03 
15:42:04.000000000 +0200
@@ -8,6 +8,7 @@
 bottle.egg-info/SOURCES.txt
 bottle.egg-info/dependency_links.txt
 bottle.egg-info/top_level.txt
+test/__init__.py
 test/servertest.py
 test/test_auth.py
 test/test_cli.py
@@ -32,7 +33,6 @@
 test/test_server.py
 test/test_stpl.py
 test/test_wsgi.py
-test/testall.py
 test/tools.py
 test/views/jinja2_base.tpl
 test/views/jinja2_inherit.tpl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/bottle.py new/bottle-0.12.23/bottle.py
--- old/bottle-0.12.21/bottle.py        2022-05-26 20:36:26.000000000 +0200
+++ new/bottle-0.12.23/bottle.py        2022-08-03 15:39:27.000000000 +0200
@@ -16,7 +16,7 @@
 from __future__ import with_statement
 
 __author__ = 'Marcel Hellkamp'
-__version__ = '0.12.21'
+__version__ = '0.12.23'
 __license__ = 'MIT'
 
 # The gevent server adapter needs to patch some modules before they are 
imported
@@ -41,7 +41,6 @@
 from datetime import date as datedate, datetime, timedelta
 from tempfile import TemporaryFile
 from traceback import format_exc, print_exc
-from inspect import getargspec
 from unicodedata import normalize
 
 
@@ -93,6 +92,12 @@
     import pickle
     from io import BytesIO
     from configparser import ConfigParser
+    from inspect import getfullargspec
+    def getargspec(func):
+        spec = getfullargspec(func)
+        kwargs = makelist(spec[0]) + makelist(spec.kwonlyargs)
+        return kwargs, spec[1], spec[2], spec[3]
+
     basestring = str
     unicode = str
     json_loads = lambda s: json_lds(touni(s))
@@ -110,6 +115,7 @@
     from imp import new_module
     from StringIO import StringIO as BytesIO
     from ConfigParser import SafeConfigParser as ConfigParser
+    from inspect import getargspec
     if py25:
         msg  = "Python 2.5 support may be dropped in future versions of 
Bottle."
         warnings.warn(msg, DeprecationWarning)
@@ -3682,7 +3688,7 @@
                 tplvars.update(result)
                 return template(tpl_name, **tplvars)
             elif result is None:
-                return template(tpl_name, defaults)
+                return template(tpl_name, **defaults)
             return result
         return wrapper
     return decorator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/__init__.py 
new/bottle-0.12.23/test/__init__.py
--- old/bottle-0.12.21/test/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/bottle-0.12.23/test/__init__.py 2022-08-03 15:07:28.000000000 +0200
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+try:
+    import coverage
+    coverage.process_startup()
+except ImportError:
+    pass
+
+import bottle
+bottle.debug(True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_auth.py 
new/bottle-0.12.23/test/test_auth.py
--- old/bottle-0.12.21/test/test_auth.py        2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_auth.py        2022-06-12 20:07:45.000000000 
+0200
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 import bottle
-from tools import ServerTestBase
+from .tools import ServerTestBase
 
 class TestBasicAuth(ServerTestBase):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_environ.py 
new/bottle-0.12.23/test/test_environ.py
--- old/bottle-0.12.21/test/test_environ.py     2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_environ.py     2022-08-03 15:07:28.000000000 
+0200
@@ -6,7 +6,7 @@
 
 import bottle
 from bottle import request, tob, touni, tonat, json_dumps, _e, HTTPError, 
parse_date
-import tools
+from . import tools
 import wsgiref.util
 import base64
 
@@ -624,7 +624,7 @@
         response.delete_cookie('name')
         cookies = [value for name, value in response.headerlist
                    if name.title() == 'Set-Cookie']
-        self.assertTrue('name=;' in cookies[0])
+        self.assertTrue('name=;' in cookies[0] or 'name="";' in cookies[0])
 
     def test_set_header(self):
         response = BaseResponse()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_jinja2.py 
new/bottle-0.12.23/test/test_jinja2.py
--- old/bottle-0.12.21/test/test_jinja2.py      2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_jinja2.py      2022-08-03 15:07:28.000000000 
+0200
@@ -1,8 +1,10 @@
 # -*- coding: utf-8 -*-
 import unittest
 from bottle import Jinja2Template, jinja2_template, jinja2_view, touni
-from tools import warn
+from .tools import warn
+import os
 
+views_dir = os.path.join(os.path.dirname(__file__), 'views')
 
 class TestJinja2Template(unittest.TestCase):
 
@@ -13,12 +15,12 @@
 
     def test_file(self):
         """ Templates: Jinja2 file"""
-        t = Jinja2Template(name='./views/jinja2_simple.tpl').render(var='var')
+        t = Jinja2Template(name=views_dir + os.sep + 
'jinja2_simple.tpl').render(var='var')
         self.assertEqual('start var end', ''.join(t))
 
     def test_name(self):
         """ Templates: Jinja2 lookup by name """
-        t = Jinja2Template(name='jinja2_simple', 
lookup=['./views/']).render(var='var')
+        t = Jinja2Template(name='jinja2_simple', 
lookup=[views_dir]).render(var='var')
         self.assertEqual('start var end', ''.join(t))
 
     def test_notfound(self):
@@ -31,7 +33,7 @@
 
     def test_inherit(self):
         """ Templates: Jinja2 lookup and inherience """
-        t = Jinja2Template(name='jinja2_inherit', lookup=['./views/']).render()
+        t = Jinja2Template(name='jinja2_inherit', lookup=[views_dir]).render()
         self.assertEqual('begin abc end', ''.join(t))
 
     def test_custom_filters(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_mako.py 
new/bottle-0.12.23/test/test_mako.py
--- old/bottle-0.12.21/test/test_mako.py        2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_mako.py        2022-08-03 15:07:28.000000000 
+0200
@@ -1,6 +1,9 @@
 import unittest
-from tools import warn
+from .tools import warn
 from bottle import MakoTemplate, mako_template, mako_view, touni
+import os
+
+views_dir = os.path.join(os.path.dirname(__file__), 'views')
 
 class TestMakoTemplate(unittest.TestCase):
     def test_string(self):
@@ -10,12 +13,12 @@
 
     def test_file(self):
         """ Templates: Mako file"""
-        t = MakoTemplate(name='./views/mako_simple.tpl').render(var='var')
+        t = MakoTemplate(name=views_dir + os.sep + 
'mako_simple.tpl').render(var='var')
         self.assertEqual('start var end\n', t)
 
     def test_name(self):
         """ Templates: Mako lookup by name """
-        t = MakoTemplate(name='mako_simple', 
lookup=['./views/']).render(var='var')
+        t = MakoTemplate(name='mako_simple', 
lookup=[views_dir]).render(var='var')
         self.assertEqual('start var end\n', t)
 
     def test_notfound(self):
@@ -28,11 +31,11 @@
 
     def test_inherit(self):
         """ Templates: Mako lookup and inherience """
-        t = MakoTemplate(name='mako_inherit', 
lookup=['./views/']).render(var='v')
+        t = MakoTemplate(name='mako_inherit', 
lookup=[views_dir]).render(var='v')
         self.assertEqual('o\ncvc\no\n', t)
-        t = MakoTemplate('<%inherit file="mako_base.tpl"/>\nc${var}c\n', 
lookup=['./views/']).render(var='v')
+        t = MakoTemplate('<%inherit file="mako_base.tpl"/>\nc${var}c\n', 
lookup=[views_dir]).render(var='v')
         self.assertEqual('o\ncvc\no\n', t)
-        t = MakoTemplate('<%inherit file="views/mako_base.tpl"/>\nc${var}c\n', 
lookup=['./']).render(var='v')
+        t = MakoTemplate('<%inherit file="views/mako_base.tpl"/>\nc${var}c\n', 
lookup=[os.path.dirname(views_dir)]).render(var='v')
         self.assertEqual('o\ncvc\no\n', t)
 
     def test_template_shortcut(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_mount.py 
new/bottle-0.12.23/test/test_mount.py
--- old/bottle-0.12.21/test/test_mount.py       2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_mount.py       2022-08-03 15:07:28.000000000 
+0200
@@ -1,5 +1,5 @@
 import bottle
-from tools import ServerTestBase
+from .tools import ServerTestBase
 from bottle import response
 
 class TestAppMounting(ServerTestBase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_outputfilter.py 
new/bottle-0.12.23/test/test_outputfilter.py
--- old/bottle-0.12.21/test/test_outputfilter.py        2022-05-24 
20:27:52.000000000 +0200
+++ new/bottle-0.12.23/test/test_outputfilter.py        2022-08-03 
15:07:28.000000000 +0200
@@ -4,7 +4,7 @@
 import unittest
 import bottle
 from bottle import tob, touni
-from tools import ServerTestBase, tobs, warn
+from .tools import ServerTestBase, tobs, warn
 
 class TestOutputFilter(ServerTestBase):
     ''' Tests for WSGI functionality, routing and output casting (decorators) 
'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_plugins.py 
new/bottle-0.12.23/test/test_plugins.py
--- old/bottle-0.12.21/test/test_plugins.py     2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_plugins.py     2022-08-03 15:07:28.000000000 
+0200
@@ -1,7 +1,6 @@
 # -*- coding: utf-8 -*-
 import unittest
-import tools
-
+from . import tools
 
 class MyPlugin(object):
     def __init__(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_route.py 
new/bottle-0.12.23/test/test_route.py
--- old/bottle-0.12.21/test/test_route.py       2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_route.py       2022-08-03 15:07:28.000000000 
+0200
@@ -1,6 +1,6 @@
 import unittest
 import bottle
-from tools import api
+from .tools import api
 
 
 class TestRoute(unittest.TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_sendfile.py 
new/bottle-0.12.23/test/test_sendfile.py
--- old/bottle-0.12.21/test/test_sendfile.py    2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_sendfile.py    2022-08-03 15:07:28.000000000 
+0200
@@ -5,6 +5,9 @@
 import tempfile
 import time
 
+basename = os.path.basename(__file__)
+root = os.path.dirname(__file__)
+
 class TestDateParser(unittest.TestCase):
     def test_rfc1123(self):
         """DateParser: RFC 1123 format"""
@@ -39,13 +42,13 @@
 
     def test_valid(self):
         """ SendFile: Valid requests"""
-        out = static_file(os.path.basename(__file__), root='./')
+        out = static_file(basename, root=root)
         self.assertEqual(open(__file__,'rb').read(), out.body.read())
 
     def test_invalid(self):
         """ SendFile: Invalid requests"""
-        self.assertEqual(404, static_file('not/a/file', root='./').status_code)
-        f = static_file(os.path.join('./../', os.path.basename(__file__)), 
root='./views/')
+        self.assertEqual(404, static_file('not/a/file', root=root).status_code)
+        f = static_file(os.path.join('./../', basename), root='./views/')
         self.assertEqual(403, f.status_code)
         try:
             fp, fn = tempfile.mkstemp()
@@ -57,41 +60,39 @@
 
     def test_mime(self):
         """ SendFile: Mime Guessing"""
-        f = static_file(os.path.basename(__file__), root='./')
+        f = static_file(basename, root=root)
         self.assertTrue(f.headers['Content-Type'].split(';')[0] in 
('application/x-python-code', 'text/x-python'))
-        f = static_file(os.path.basename(__file__), root='./', 
mimetype='some/type')
+        f = static_file(basename, root=root, mimetype='some/type')
         self.assertEqual('some/type', f.headers['Content-Type'])
-        f = static_file(os.path.basename(__file__), root='./', 
mimetype='text/foo')
+        f = static_file(basename, root=root, mimetype='text/foo')
         self.assertEqual('text/foo; charset=UTF-8', f.headers['Content-Type'])
-        f = static_file(os.path.basename(__file__), root='./', 
mimetype='text/foo', charset='latin1')
+        f = static_file(basename, root=root, mimetype='text/foo', 
charset='latin1')
         self.assertEqual('text/foo; charset=latin1', f.headers['Content-Type'])
 
     def test_ims(self):
         """ SendFile: If-Modified-Since"""
         request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b 
%Y %H:%M:%S GMT", time.gmtime())
-        res = static_file(os.path.basename(__file__), root='./')
+        res = static_file(basename, root=root)
         self.assertEqual(304, res.status_code)
         self.assertEqual(int(os.stat(__file__).st_mtime), 
parse_date(res.headers['Last-Modified']))
         self.assertAlmostEqual(int(time.time()), 
parse_date(res.headers['Date']))
         request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b 
%Y %H:%M:%S GMT", time.gmtime(100))
-        self.assertEqual(open(__file__,'rb').read(), 
static_file(os.path.basename(__file__), root='./').body.read())
+        self.assertEqual(open(__file__,'rb').read(), static_file(basename, 
root=root).body.read())
 
     def test_download(self):
         """ SendFile: Download as attachment """
-        basename = os.path.basename(__file__)
-        f = static_file(basename, root='./', download=True)
+        f = static_file(basename, root=root, download=True)
         self.assertEqual('attachment; filename="%s"' % basename, 
f.headers['Content-Disposition'])
         request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b 
%Y %H:%M:%S GMT", time.gmtime(100))
-        f = static_file(os.path.basename(__file__), root='./')
+        f = static_file(basename, root=root)
         self.assertEqual(open(__file__,'rb').read(), f.body.read())
 
     def test_range(self):
-        basename = os.path.basename(__file__)
         request.environ['HTTP_RANGE'] = 'bytes=10-25,-80'
-        f = static_file(basename, root='./')
-        c = open(basename, 'rb'); c.seek(10)
+        f = static_file(basename, root=root)
+        c = open(__file__, 'rb'); c.seek(10)
         self.assertEqual(c.read(16), tob('').join(f.body))
-        self.assertEqual('bytes 10-25/%d' % len(open(basename, 'rb').read()),
+        self.assertEqual('bytes 10-25/%d' % len(open(__file__, 'rb').read()),
                          f.headers['Content-Range'])
         self.assertEqual('bytes', f.headers['Accept-Ranges'])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_server.py 
new/bottle-0.12.23/test/test_server.py
--- old/bottle-0.12.21/test/test_server.py      2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_server.py      2022-08-03 15:07:28.000000000 
+0200
@@ -1,13 +1,13 @@
 # -*- coding: utf-8 -*-
 import unittest
 import time
-from tools import tob
+from .tools import tob
 import sys
 import os
 import signal
 import socket
 from subprocess import Popen, PIPE
-import tools
+from . import tools
 from bottle import _e
 
 try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_stpl.py 
new/bottle-0.12.23/test/test_stpl.py
--- old/bottle-0.12.21/test/test_stpl.py        2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_stpl.py        2022-08-03 15:07:28.000000000 
+0200
@@ -1,13 +1,15 @@
 # -*- coding: utf-8 -*-
 import unittest
 from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, 
html_quote
-import re
+import re, os
 import traceback
 
+views_dir = os.path.join(os.path.dirname(__file__), 'views')
+
 class TestSimpleTemplate(unittest.TestCase):
     def assertRenders(self, tpl, to, *args, **vars):
         if isinstance(tpl, str):
-            tpl = SimpleTemplate(tpl)
+            tpl = SimpleTemplate(tpl, lookup=[views_dir])
         self.assertEqual(touni(to), tpl.render(*args, **vars))
 
     def test_string(self):
@@ -18,11 +20,11 @@
         self.assertRenders('start {{self}} end', 'start var end', 
{'self':'var'})
 
     def test_file(self):
-        t = SimpleTemplate(name='./views/stpl_simple.tpl')
+        t = SimpleTemplate(name=views_dir + os.sep + 'stpl_simple.tpl')
         self.assertRenders(t, 'start var end\n', var='var')
 
     def test_name(self):
-        t = SimpleTemplate(name='stpl_simple', lookup=['./views/'])
+        t = SimpleTemplate(name='stpl_simple', lookup=[views_dir])
         self.assertRenders(t, 'start var end\n', var='var')
 
     def test_unicode(self):
@@ -31,7 +33,7 @@
 
     def test_unicode_code(self):
         """ Templates: utf8 code in file"""
-        t = SimpleTemplate(name='./views/stpl_unicode.tpl')
+        t = SimpleTemplate(name='stpl_unicode.tpl', lookup=[views_dir])
         self.assertRenders(t, 'start ???? ?????? end\n', var=touni('??????'))
 
     def test_import(self):
@@ -148,12 +150,12 @@
 
     def test_include(self):
         """ Templates: Include statements"""
-        t = SimpleTemplate(name='stpl_include', lookup=['./views/'])
+        t = SimpleTemplate(name='stpl_include', lookup=[views_dir])
         self.assertRenders(t, 'before\nstart var end\nafter\n', var='var')
 
     def test_rebase(self):
         """ Templates: %rebase and method passing """
-        t = SimpleTemplate(name='stpl_t2main', lookup=['./views/'])
+        t = SimpleTemplate(name='stpl_t2main', lookup=[views_dir])
         result='+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n'
         self.assertRenders(t, result, content='1234')
 
@@ -233,7 +235,7 @@
         self.assertEqual(touni('start middle end'), test())
 
     def test_view_decorator_issue_407(self):
-        @view('stpl_no_vars')
+        @view('stpl_no_vars', template_lookup=[views_dir])
         def test():
             pass
         self.assertEqual(touni('hihi'), test())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/test_wsgi.py 
new/bottle-0.12.23/test/test_wsgi.py
--- old/bottle-0.12.21/test/test_wsgi.py        2022-05-24 20:27:52.000000000 
+0200
+++ new/bottle-0.12.23/test/test_wsgi.py        2022-08-03 15:07:28.000000000 
+0200
@@ -1,8 +1,9 @@
 # -*- coding: utf-8 -*-
 import unittest
 import bottle
-from tools import ServerTestBase
+from .tools import ServerTestBase
 from bottle import tob
+import os.path
 
 class TestWsgi(ServerTestBase):
     ''' Tests for WSGI functionality, routing and output casting (decorators) 
'''
@@ -274,7 +275,7 @@
     def test_view(self):
         """ WSGI: Test view-decorator (should override autojson) """
         @bottle.route('/tpl')
-        @bottle.view('stpl_t2main')
+        @bottle.view('stpl_t2main', 
template_lookup=[os.path.join(os.path.dirname(__file__), 'views')])
         def test():
             return dict(content='1234')
         result = 
'+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bottle-0.12.21/test/testall.py 
new/bottle-0.12.23/test/testall.py
--- old/bottle-0.12.21/test/testall.py  2022-05-24 20:27:52.000000000 +0200
+++ new/bottle-0.12.23/test/testall.py  1970-01-01 01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-try:
-    import coverage
-    coverage.process_startup()
-except ImportError:
-    pass
-
-import unittest
-import sys, os, glob
-
-test_root = os.path.dirname(os.path.abspath(__file__))
-test_files = glob.glob(os.path.join(test_root, 'test_*.py'))
-
-os.chdir(test_root)
-sys.path.insert(0, os.path.dirname(test_root))
-sys.path.insert(0, test_root)
-test_names = [os.path.basename(name)[:-3] for name in test_files]
-
-if 'help' in sys.argv or '-h' in sys.argv:
-    sys.stdout.write('''Command line arguments:
-    fast: Skip server adapter tests.
-    verbose: Print tests even if they pass.
-    ''')
-    sys.exit(0)
-
-if 'fast' in sys.argv:
-    sys.stderr.write("Warning: The 'fast' keyword skipps server tests.\n")
-    test_names.remove('test_server')
-
-suite = unittest.defaultTestLoader.loadTestsFromNames(test_names)
-
-def run():
-    import bottle
-
-    bottle.debug(True)
-    vlevel = 2 if 'verbose' in sys.argv else 0
-    result = unittest.TextTestRunner(verbosity=vlevel).run(suite)
-
-    sys.exit((result.errors or result.failures) and 1 or 0)
-
-if __name__ == '__main__':
-    run()
-

Reply via email to