Hello community,

here is the log from the commit of package python-Flask for openSUSE:Factory 
checked in at 2018-05-11 11:26:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Flask (Old)
 and      /work/SRC/openSUSE:Factory/.python-Flask.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Flask"

Fri May 11 11:26:01 2018 rev:19 rq:605120 version:1.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Flask/python-Flask.changes        
2018-05-06 14:55:34.581999058 +0200
+++ /work/SRC/openSUSE:Factory/.python-Flask.new/python-Flask.changes   
2018-05-11 11:26:04.097206591 +0200
@@ -1,0 +2,23 @@
+Sun May  6 05:35:06 UTC 2018 - [email protected]
+
+- update to version 1.0.2:
+  * Fix more backwards compatibility issues with merging slashes
+      between a blueprint prefix and route. (`#2748`_)
+  * Fix error with "flask routes" command when there are no routes.
+      (`#2751`_)
+
+- changes from version 1.0.1:
+  * Fix registering partials (with no "__name__") as view functions.
+      (`#2730`_)
+  * Don't treat lists returned from view functions the same as tuples.
+      Only tuples are interpreted as response data. (`#2736`_)
+  * Extra slashes between a blueprint's "url_prefix" and a route URL
+      are merged. This fixes some backwards compatibility issues with
+      the change in 1.0. (`#2731`_, `#2742`_)
+  * Only trap "BadRequestKeyError" errors in debug mode, not all
+      "BadRequest" errors. This allows "abort(400)" to continue
+      working as expected. (`#2735`_)
+  * The "FLASK_SKIP_DOTENV" environment variable can be set to "1" to
+      skip automatically loading dotenv files. (`#2722`_)
+
+-------------------------------------------------------------------

Old:
----
  Flask-1.0.tar.gz

New:
----
  Flask-1.0.2.tar.gz

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

Other differences:
------------------
++++++ python-Flask.spec ++++++
--- /var/tmp/diff_new_pack.5TcQDP/_old  2018-05-11 11:26:06.393122905 +0200
+++ /var/tmp/diff_new_pack.5TcQDP/_new  2018-05-11 11:26:06.393122905 +0200
@@ -19,7 +19,7 @@
 %define oldpython python
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-Flask
-Version:        1.0
+Version:        1.0.2
 Release:        0
 Summary:        A microframework based on Werkzeug, Jinja2 and good intentions
 License:        BSD-3-Clause

++++++ Flask-1.0.tar.gz -> Flask-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/CHANGES.rst new/Flask-1.0.2/CHANGES.rst
--- old/Flask-1.0/CHANGES.rst   2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/CHANGES.rst 2018-05-02 16:16:05.000000000 +0200
@@ -4,6 +4,46 @@
 ===============
 
 
+Version 1.0.2
+-------------
+
+Released on May 2nd 2018
+
+-   Fix more backwards compatibility issues with merging slashes between
+    a blueprint prefix and route. (`#2748`_)
+-   Fix error with ``flask routes`` command when there are no routes.
+    (`#2751`_)
+
+.. _#2748: https://github.com/pallets/flask/pull/2748
+.. _#2751: https://github.com/pallets/flask/issues/2751
+
+
+Version 1.0.1
+-------------
+
+Released on April 29th 2018
+
+-   Fix registering partials (with no ``__name__``) as view functions.
+    (`#2730`_)
+-   Don't treat lists returned from view functions the same as tuples.
+    Only tuples are interpreted as response data. (`#2736`_)
+-   Extra slashes between a blueprint's ``url_prefix`` and a route URL
+    are merged. This fixes some backwards compatibility issues with the
+    change in 1.0. (`#2731`_, `#2742`_)
+-   Only trap ``BadRequestKeyError`` errors in debug mode, not all
+    ``BadRequest`` errors. This allows ``abort(400)`` to continue
+    working as expected. (`#2735`_)
+-   The ``FLASK_SKIP_DOTENV`` environment variable can be set to ``1``
+    to skip automatically loading dotenv files. (`#2722`_)
+
+.. _#2722: https://github.com/pallets/flask/issues/2722
+.. _#2730: https://github.com/pallets/flask/pull/2730
+.. _#2731: https://github.com/pallets/flask/issues/2731
+.. _#2735: https://github.com/pallets/flask/issues/2735
+.. _#2736: https://github.com/pallets/flask/issues/2736
+.. _#2742: https://github.com/pallets/flask/issues/2742
+
+
 Version 1.0
 -----------
 
@@ -215,6 +255,16 @@
 .. _#2709: https://github.com/pallets/flask/pull/2709
 
 
+Version 0.12.4
+--------------
+
+Released on April 29 2018
+
+-   Repackage 0.12.3 to fix package layout issue. (`#2728`_)
+
+.. _#2728: https://github.com/pallets/flask/issues/2728
+
+
 Version 0.12.3
 --------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/Flask.egg-info/PKG-INFO 
new/Flask-1.0.2/Flask.egg-info/PKG-INFO
--- old/Flask-1.0/Flask.egg-info/PKG-INFO       2018-04-26 21:29:03.000000000 
+0200
+++ new/Flask-1.0.2/Flask.egg-info/PKG-INFO     2018-05-02 16:16:14.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Flask
-Version: 1.0
+Version: 1.0.2
 Summary: A simple framework for building complex web applications.
 Home-page: https://www.palletsprojects.com/p/flask/
 Author: Armin Ronacher
@@ -106,6 +106,6 @@
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
 Classifier: Topic :: Software Development :: Libraries :: Application 
Frameworks
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Provides-Extra: dotenv
 Provides-Extra: dev
 Provides-Extra: docs
+Provides-Extra: dotenv
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/PKG-INFO new/Flask-1.0.2/PKG-INFO
--- old/Flask-1.0/PKG-INFO      2018-04-26 21:29:03.000000000 +0200
+++ new/Flask-1.0.2/PKG-INFO    2018-05-02 16:16:15.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Flask
-Version: 1.0
+Version: 1.0.2
 Summary: A simple framework for building complex web applications.
 Home-page: https://www.palletsprojects.com/p/flask/
 Author: Armin Ronacher
@@ -106,6 +106,6 @@
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
 Classifier: Topic :: Software Development :: Libraries :: Application 
Frameworks
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Provides-Extra: dotenv
 Provides-Extra: dev
 Provides-Extra: docs
+Provides-Extra: dotenv
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/api.rst new/Flask-1.0.2/docs/api.rst
--- old/Flask-1.0/docs/api.rst  2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/docs/api.rst        2018-05-02 02:50:32.000000000 +0200
@@ -717,7 +717,18 @@
         pass
 
 This specifies that ``/users/`` will be the URL for page one and
-``/users/page/N`` will be the URL for page `N`.
+``/users/page/N`` will be the URL for page ``N``.
+
+If a URL contains a default value, it will be redirected to its simpler
+form with a 301 redirect. In the above example, ``/users/page/1`` will
+be redirected to ``/users/``. If your route handles ``GET`` and ``POST``
+requests, make sure the default route only handles ``GET``, as redirects
+can't preserve form data. ::
+
+   @app.route('/region/', defaults={'id': 1})
+   @app.route('/region/<id>', methods=['GET', 'POST'])
+   def region(id):
+      pass
 
 Here are the parameters that :meth:`~flask.Flask.route` and
 :meth:`~flask.Flask.add_url_rule` accept.  The only difference is that
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/cli.rst new/Flask-1.0.2/docs/cli.rst
--- old/Flask-1.0/docs/cli.rst  2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/docs/cli.rst        2018-05-02 02:50:32.000000000 +0200
@@ -201,6 +201,30 @@
 control default command options.
 
 
+Disable dotenv
+~~~~~~~~~~~~~~
+
+The ``flask`` command will show a message if it detects dotenv files but
+python-dotenv is not installed.
+
+.. code-block:: none
+
+    flask run
+     * Tip: There are .env files present. Do "pip install python-dotenv" to 
use them.
+
+You can tell Flask not to load dotenv files even when python-dotenv is
+installed by setting the ``FLASK_SKIP_DOTENV`` environment variable.
+This can be useful if you want to load them manually, or if you're using
+a project runner that loads them already. Keep in mind that the
+environment variables must be set before the app loads or it won't
+configure as expected.
+
+.. code-block:: none
+
+    export FLASK_SKIP_DOTENV=1
+    flask run
+
+
 Environment Variables From virtualenv
 -------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/conf.py new/Flask-1.0.2/docs/conf.py
--- old/Flask-1.0/docs/conf.py  2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/docs/conf.py        2018-05-02 02:50:32.000000000 +0200
@@ -58,6 +58,7 @@
     'index': [
         'project.html',
         'versions.html',
+        'carbon_ads.html',
         'searchbox.html',
     ],
     '**': [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/config.rst 
new/Flask-1.0.2/docs/config.rst
--- old/Flask-1.0/docs/config.rst       2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/docs/config.rst     2018-05-02 02:50:32.000000000 +0200
@@ -112,7 +112,7 @@
 
     **Do not enable debug mode when deploying in production.**
 
-    Default: ``True`` if :data:`ENV` is ``'production'``, or ``False``
+    Default: ``True`` if :data:`ENV` is ``'development'``, or ``False``
     otherwise.
 
 .. py:data:: TESTING
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/index.rst 
new/Flask-1.0.2/docs/index.rst
--- old/Flask-1.0/docs/index.rst        2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/docs/index.rst      2018-05-02 02:50:32.000000000 +0200
@@ -6,7 +6,6 @@
 .. image:: _static/logo-full.png
     :alt: Flask: web development, one drop at a time
     :align: right
-   :align: right
 
 Welcome to Flask's documentation. Get started with :ref:`installation`
 and then get an overview with the :ref:`quickstart`. There is also a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/patterns/fileuploads.rst 
new/Flask-1.0.2/docs/patterns/fileuploads.rst
--- old/Flask-1.0/docs/patterns/fileuploads.rst 2018-04-26 21:25:36.000000000 
+0200
+++ new/Flask-1.0.2/docs/patterns/fileuploads.rst       2018-05-02 
02:50:32.000000000 +0200
@@ -65,7 +65,7 @@
             if file and allowed_file(file.filename):
                 filename = secure_filename(file.filename)
                 file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
-                return redirect(url_for('upload_file',
+                return redirect(url_for('uploaded_file',
                                         filename=filename))
         return '''
         <!doctype html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/quickstart.rst 
new/Flask-1.0.2/docs/quickstart.rst
--- old/Flask-1.0/docs/quickstart.rst   2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/docs/quickstart.rst 2018-05-02 02:50:32.000000000 +0200
@@ -293,7 +293,7 @@
 
     @app.route('/user/<username>')
     def profile(username):
-        return '{}'s profile'.format(username)
+        return '{}\'s profile'.format(username)
 
     with app.test_request_context():
         print(url_for('index'))
@@ -315,6 +315,8 @@
 of the :meth:`~flask.Flask.route` decorator to handle different HTTP methods.
 ::
 
+    from flask import request
+
     @app.route('/login', methods=['GET', 'POST'])
     def login():
         if request.method == 'POST':
@@ -323,7 +325,7 @@
             return show_the_login_form()
 
 If ``GET`` is present, Flask automatically adds support for the ``HEAD`` method
-and handles ``HEAD`` requests according to the the `HTTP RFC`_. Likewise,
+and handles ``HEAD`` requests according to the `HTTP RFC`_. Likewise,
 ``OPTIONS`` is automatically implemented for you.
 
 .. _HTTP RFC: https://www.ietf.org/rfc/rfc2068.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/docs/tutorial/static.rst 
new/Flask-1.0.2/docs/tutorial/static.rst
--- old/Flask-1.0/docs/tutorial/static.rst      2018-04-26 21:25:36.000000000 
+0200
+++ new/Flask-1.0.2/docs/tutorial/static.rst    2018-05-02 02:50:32.000000000 
+0200
@@ -55,7 +55,7 @@
 You can find a less compact version of ``style.css`` in the
 :gh:`example code <examples/tutorial/flaskr/static/style.css>`.
 
-Go to http://127.0.0.1/auth/login and the page should look like the
+Go to http://127.0.0.1:5000/auth/login and the page should look like the
 screenshot below.
 
 .. image:: flaskr_login.png
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/flask/__init__.py 
new/Flask-1.0.2/flask/__init__.py
--- old/Flask-1.0/flask/__init__.py     2018-04-26 21:29:03.000000000 +0200
+++ new/Flask-1.0.2/flask/__init__.py   2018-05-02 16:16:14.000000000 +0200
@@ -10,7 +10,7 @@
     :license: BSD, see LICENSE for more details.
 """
 
-__version__ = '1.0'
+__version__ = '1.0.2'
 
 # utilities we import from Werkzeug and Jinja2 that are unused
 # in the module but are exported as public interface.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/flask/app.py new/Flask-1.0.2/flask/app.py
--- old/Flask-1.0/flask/app.py  2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/flask/app.py        2018-05-02 02:50:32.000000000 +0200
@@ -27,9 +27,11 @@
 from .config import Config, ConfigAttribute
 from .ctx import AppContext, RequestContext, _AppCtxGlobals
 from .globals import _request_ctx_stack, g, request, session
-from .helpers import _PackageBoundObject, \
-    _endpoint_from_view_func, find_package, get_env, get_debug_flag, \
-    get_flashed_messages, locked_cached_property, url_for
+from .helpers import (
+    _PackageBoundObject,
+    _endpoint_from_view_func, find_package, get_env, get_debug_flag,
+    get_flashed_messages, locked_cached_property, url_for, get_load_dotenv
+)
 from .logging import create_logger
 from .sessions import SecureCookieSessionInterface
 from .signals import appcontext_tearing_down, got_request_exception, \
@@ -904,7 +906,7 @@
             explain_ignored_app_run()
             return
 
-        if load_dotenv:
+        if get_load_dotenv(load_dotenv):
             cli.load_dotenv()
 
             # if set, let env vars override previous values
@@ -1663,8 +1665,14 @@
 
         trap_bad_request = self.config['TRAP_BAD_REQUEST_ERRORS']
 
-        # if unset, trap based on debug mode
-        if (trap_bad_request is None and self.debug) or trap_bad_request:
+        # if unset, trap key errors in debug mode
+        if (
+            trap_bad_request is None and self.debug
+            and isinstance(e, BadRequestKeyError)
+        ):
+            return True
+
+        if trap_bad_request:
             return isinstance(e, BadRequest)
 
         return False
@@ -1923,7 +1931,7 @@
         status = headers = None
 
         # unpack tuple returns
-        if isinstance(rv, (tuple, list)):
+        if isinstance(rv, tuple):
             len_rv = len(rv)
 
             # a 3-tuple is unpacked directly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/flask/blueprints.py 
new/Flask-1.0.2/flask/blueprints.py
--- old/Flask-1.0/flask/blueprints.py   2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/flask/blueprints.py 2018-05-02 15:06:15.000000000 +0200
@@ -10,6 +10,7 @@
     :license: BSD, see LICENSE for more details.
 """
 from functools import update_wrapper
+from werkzeug.urls import url_join
 
 from .helpers import _PackageBoundObject, _endpoint_from_view_func
 
@@ -49,12 +50,8 @@
         url_prefix = self.options.get('url_prefix')
         if url_prefix is None:
             url_prefix = self.blueprint.url_prefix
-
         #: The prefix that should be used for all URLs defined on the
         #: blueprint.
-        if url_prefix and url_prefix[-1] == '/':
-            url_prefix = url_prefix[:-1]
-
         self.url_prefix = url_prefix
 
         #: A dictionary with URL defaults that is added to each and every
@@ -67,8 +64,12 @@
         to the application.  The endpoint is automatically prefixed with the
         blueprint's name.
         """
-        if self.url_prefix:
-            rule = self.url_prefix + rule
+        if self.url_prefix is not None:
+            if rule:
+                rule = '/'.join((
+                    self.url_prefix.rstrip('/'), rule.lstrip('/')))
+            else:
+                rule = self.url_prefix
         options.setdefault('subdomain', self.subdomain)
         if endpoint is None:
             endpoint = _endpoint_from_view_func(view_func)
@@ -201,7 +202,7 @@
         """
         if endpoint:
             assert '.' not in endpoint, "Blueprint endpoints should not 
contain dots"
-        if view_func:
+        if view_func and hasattr(view_func, '__name__'):
             assert '.' not in view_func.__name__, "Blueprint view function 
name should not contain dots"
         self.record(lambda s:
             s.add_url_rule(rule, endpoint, view_func, **options))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/flask/cli.py new/Flask-1.0.2/flask/cli.py
--- old/Flask-1.0/flask/cli.py  2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/flask/cli.py        2018-05-02 15:16:56.000000000 +0200
@@ -28,7 +28,7 @@
 from . import __version__
 from ._compat import getargspec, iteritems, reraise, text_type
 from .globals import current_app
-from .helpers import get_debug_flag, get_env
+from .helpers import get_debug_flag, get_env, get_load_dotenv
 
 try:
     import dotenv
@@ -544,7 +544,7 @@
         # script that is loaded here also attempts to start a server.
         os.environ['FLASK_RUN_FROM_CLI'] = 'true'
 
-        if self.load_dotenv:
+        if get_load_dotenv(self.load_dotenv):
             load_dotenv()
 
         obj = kwargs.get('obj')
@@ -583,12 +583,11 @@
 
     .. versionadded:: 1.0
     """
-
     if dotenv is None:
         if path or os.path.exists('.env') or os.path.exists('.flaskenv'):
             click.secho(
                 ' * Tip: There are .env files present.'
-                ' Do "pip install python-dotenv" to use them',
+                ' Do "pip install python-dotenv" to use them.',
                 fg='yellow')
         return
 
@@ -826,6 +825,10 @@
     """Show all registered routes with endpoints and methods."""
 
     rules = list(current_app.url_map.iter_rules())
+    if not rules:
+        click.echo('No routes were registered.')
+        return
+
     ignored_methods = set(() if all_methods else ('HEAD', 'OPTIONS'))
 
     if sort in ('endpoint', 'rule'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/flask/helpers.py 
new/Flask-1.0.2/flask/helpers.py
--- old/Flask-1.0/flask/helpers.py      2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/flask/helpers.py    2018-05-02 02:50:32.000000000 +0200
@@ -68,6 +68,21 @@
     return val.lower() not in ('0', 'false', 'no')
 
 
+def get_load_dotenv(default=True):
+    """Get whether the user has disabled loading dotenv files by setting
+    :envvar:`FLASK_SKIP_DOTENV`. The default is ``True``, load the
+    files.
+
+    :param default: What to return if the env var isn't set.
+    """
+    val = os.environ.get('FLASK_SKIP_DOTENV')
+
+    if not val:
+        return default
+
+    return val.lower() in ('0', 'false', 'no')
+
+
 def _endpoint_from_view_func(view_func):
     """Internal helper that returns the default endpoint for a given
     function.  This always is the function name.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/tests/test_basic.py 
new/Flask-1.0.2/tests/test_basic.py
--- old/Flask-1.0/tests/test_basic.py   2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/tests/test_basic.py 2018-05-02 02:50:32.000000000 +0200
@@ -1027,21 +1027,34 @@
 
 
 def test_trapping_of_bad_request_key_errors(app, client):
-    @app.route('/fail')
+    @app.route('/key')
     def fail():
         flask.request.form['missing_key']
 
-    rv = client.get('/fail')
+    @app.route('/abort')
+    def allow_abort():
+        flask.abort(400)
+
+    rv = client.get('/key')
     assert rv.status_code == 400
     assert b'missing_key' not in rv.data
+    rv = client.get('/abort')
+    assert rv.status_code == 400
 
-    app.config['TRAP_BAD_REQUEST_ERRORS'] = True
-
+    app.debug = True
     with pytest.raises(KeyError) as e:
-        client.get("/fail")
-
+        client.get("/key")
     assert e.errisinstance(BadRequest)
     assert 'missing_key' in e.value.description
+    rv = client.get('/abort')
+    assert rv.status_code == 400
+
+    app.debug = False
+    app.config['TRAP_BAD_REQUEST_ERRORS'] = True
+    with pytest.raises(KeyError):
+        client.get('/key')
+    with pytest.raises(BadRequest):
+        client.get('/abort')
 
 
 def test_trapping_of_all_http_exceptions(app, client):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/tests/test_blueprints.py 
new/Flask-1.0.2/tests/test_blueprints.py
--- old/Flask-1.0/tests/test_blueprints.py      2018-04-26 21:25:36.000000000 
+0200
+++ new/Flask-1.0.2/tests/test_blueprints.py    2018-05-02 15:06:15.000000000 
+0200
@@ -9,6 +9,7 @@
     :license: BSD, see LICENSE for more details.
 """
 
+import functools
 import pytest
 
 import flask
@@ -114,17 +115,28 @@
     assert client.get('/nope').data == b'you shall not pass'
 
 
-def test_blueprint_prefix_slash(app, client):
-    bp = flask.Blueprint('test', __name__, url_prefix='/bar/')
[email protected](('prefix', 'rule', 'url'), (
+    ('', '/', '/'),
+    ('/', '', '/'),
+    ('/', '/', '/'),
+    ('/foo', '', '/foo'),
+    ('/foo/', '', '/foo/'),
+    ('', '/bar', '/bar'),
+    ('/foo/', '/bar', '/foo/bar'),
+    ('/foo/', 'bar', '/foo/bar'),
+    ('/foo', '/bar', '/foo/bar'),
+    ('/foo/', '//bar', '/foo/bar'),
+    ('/foo//', '/bar', '/foo/bar'),
+))
+def test_blueprint_prefix_slash(app, client, prefix, rule, url):
+    bp = flask.Blueprint('test', __name__, url_prefix=prefix)
 
-    @bp.route('/foo')
-    def foo():
+    @bp.route(rule)
+    def index():
         return '', 204
 
     app.register_blueprint(bp)
-    app.register_blueprint(bp, url_prefix='/spam/')
-    assert client.get('/bar/foo').status_code == 204
-    assert client.get('/spam/foo').status_code == 204
+    assert client.get(url).status_code == 204
 
 
 def test_blueprint_url_defaults(app, client):
@@ -382,6 +394,8 @@
         )
     )
 
+    bp.add_url_rule('/bar/456', endpoint='foofoofoo', 
view_func=functools.partial(foo_foo_foo))
+
     app.register_blueprint(bp, url_prefix='/py')
 
     assert client.get('/py/foo').data == b'bp.foo'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Flask-1.0/tests/test_cli.py 
new/Flask-1.0.2/tests/test_cli.py
--- old/Flask-1.0/tests/test_cli.py     2018-04-26 21:25:36.000000000 +0200
+++ new/Flask-1.0.2/tests/test_cli.py   2018-05-02 02:50:32.000000000 +0200
@@ -474,6 +474,14 @@
     assert 'FOO' not in os.environ
 
 
+@need_dotenv
+def test_disable_dotenv_from_env(monkeypatch, runner):
+    monkeypatch.chdir(test_path)
+    monkeypatch.setitem(os.environ, 'FLASK_SKIP_DOTENV', '1')
+    runner.invoke(FlaskGroup())
+    assert 'FOO' not in os.environ
+
+
 def test_run_cert_path():
     # no key
     with pytest.raises(click.BadParameter):


Reply via email to