Skip to content
Myr

Merge branch '1.0-maintenance'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parents ac6746d, 232e5c8 · Browse files · 3 files+19 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+19 added−8 removed

  • tests:+6 added−5 removed
  • other:+13 added−3 removed

3 files+19 added−8 removed

modified:flask/cli.py+10 added-3 removed
12 unmodified lines
1314import ast15import inspect16import os17import platform18import re19import ssl20import sys21import traceback
238 unmodified lines
260261def get_version(ctx, param, value):262 if not value or ctx.resilient_parsing:263 return263 message = 'Flask %(version)s\nPython %(python_version)s'264 import werkzeug265 message = (266 'Python %(python)s\n'267 'Flask %(flask)s\n'268 'Werkzeug %(werkzeug)s'269 )270 click.echo(message % {265 'version': __version__,266 'python_version': sys.version,271 'python': platform.python_version(),272 'flask': __version__,273 'werkzeug': werkzeug.__version__,274 }, color=ctx.color)275 ctx.exit()276277
634 unmodified lines
modified:tests/test_cli.py+6 added-5 removed
239 unmodified lines
240 )241242243def test_get_version(test_apps, capsys):244 """Test of get_version."""245 from flask import __version__ as flask_ver246 from sys import version as py_ver244 from flask import __version__ as flask_version245 from werkzeug import __version__ as werkzeug_version246 from platform import python_version247248 class MockCtx(object):249 resilient_parsing = False250 color = None
2 unmodified lines
253254 ctx = MockCtx()255 get_version(ctx, None, "test")256 out, err = capsys.readouterr()257 assert flask_ver in out258 assert py_ver in out257 assert "Python " + python_version() in out258 assert "Flask " + flask_version in out259 assert "Werkzeug " + werkzeug_version in out260261262def test_scriptinfo(test_apps, monkeypatch):263 """Test of ScriptInfo."""
330 unmodified lines
modified:CHANGES.rst+3 added
31 unmodified lines
32 (ISO-8859-1). This fixes compatibility with Gunicorn, which is33 stricter about header encodings than PEP 3333. (`#2766`_)34- Allow custom CLIs using ``FlaskGroup`` to set the debug flag without35 it always being overwritten based on environment variables. (`#2765`_)36- ``flask --version`` outputs Werkzeug's version and simplifies the37 Python version. (`#2825`_)3839.. _#2766: https://github.com/pallets/flask/issues/276640.. _#2765: https://github.com/pallets/flask/pull/276541.. _#2825: https://github.com/pallets/flask/pull/2825424344Version 1.0.245-------------
911 unmodified lines