Skip to content

Commit 8ad4f47

Browse files
committed
Merge branch 'master' into jrmccarthy-master
2 parents a23ce46 + f4a1ca8 commit 8ad4f47

File tree

159 files changed

+3165
-1959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+3165
-1959
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGES merge=union

.github/ISSUE_TEMPLATE.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The issue tracker is a tool to address bugs.
2+
Please use the #pocoo IRC channel on freenode or Stack Overflow for questions.

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44
env
55
env*
66
dist
7+
build
78
*.egg
89
*.egg-info
910
_mailinglist
1011
.tox
12+
.cache/
13+
.idea/
14+
15+
# Coverage reports
16+
htmlcov
17+
.coverage
18+
.coverage.*
19+
*,cover

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "docs/_themes"]
22
path = docs/_themes
3-
url = git://github.com/mitsuhiko/flask-sphinx-themes.git
3+
url = https://github.com/mitsuhiko/flask-sphinx-themes.git

.travis.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,36 @@ python:
77
- "pypy"
88
- "3.3"
99
- "3.4"
10+
- "3.5"
11+
- "3.6"
1012

1113
env:
1214
- REQUIREMENTS=lowest
15+
- REQUIREMENTS=lowest-simplejson
1316
- REQUIREMENTS=release
17+
- REQUIREMENTS=release-simplejson
1418
- REQUIREMENTS=devel
19+
- REQUIREMENTS=devel-simplejson
1520

1621
matrix:
1722
exclude:
1823
# Python 3 support currently does not work with lowest requirements
1924
- python: "3.3"
2025
env: REQUIREMENTS=lowest
26+
- python: "3.3"
27+
env: REQUIREMENTS=lowest-simplejson
2128
- python: "3.4"
2229
env: REQUIREMENTS=lowest
23-
30+
- python: "3.4"
31+
env: REQUIREMENTS=lowest-simplejson
32+
- python: "3.5"
33+
env: REQUIREMENTS=lowest
34+
- python: "3.5"
35+
env: REQUIREMENTS=lowest-simplejson
36+
- python: "3.6"
37+
env: REQUIREMENTS=lowest
38+
- python: "3.6"
39+
env: REQUIREMENTS=lowest-simplejson
2440

2541
install:
2642
- pip install tox

AUTHORS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ Patches and Suggestions
1515
- Chris Grindstaff
1616
- Christopher Grebs
1717
- Daniel Neuhäuser
18+
- Dan Sully
19+
- David Lord @davidism
1820
- Edmond Burnett
1921
- Florent Xicluna
2022
- Georg Brandl
23+
- Jeff Widman @jeffwidman
24+
- Joshua Bronson @jab
2125
- Justin Quick
2226
- Kenneth Reitz
2327
- Keyan Pishdadian

CHANGES

Lines changed: 89 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,87 @@ Flask Changelog
33

44
Here you can see the full list of changes between each Flask release.
55

6-
Version 1.0
7-
-----------
6+
Version 0.13
7+
------------
8+
9+
Major release, unreleased
10+
11+
- Make `app.run()` into a noop if a Flask application is run from the
12+
development server on the command line. This avoids some behavior that
13+
was confusing to debug for newcomers.
14+
- Change default configuration `JSONIFY_PRETTYPRINT_REGULAR=False`. jsonify()
15+
method returns compressed response by default, and pretty response in
16+
debug mode.
17+
- Change Flask.__init__ to accept two new keyword arguments, ``host_matching``
18+
and ``static_host``. This enables ``host_matching`` to be set properly by the
19+
time the constructor adds the static route, and enables the static route to
20+
be properly associated with the required host. (``#1559``)
21+
- ``send_file`` supports Unicode in ``attachment_filename``. (`#2223`_)
22+
- Pass ``_scheme`` argument from ``url_for`` to ``handle_build_error``.
23+
(`#2017`_)
24+
25+
.. _#2017: https://github.com/pallets/flask/pull/2017
26+
.. _#2223: https://github.com/pallets/flask/pull/2223
27+
28+
Version 0.12.1
29+
--------------
30+
31+
Bugfix release, released on March 31st 2017
32+
33+
- Prevent `flask run` from showing a NoAppException when an ImportError occurs
34+
within the imported application module.
35+
- Fix encoding behavior of ``app.config.from_pyfile`` for Python 3. Fix
36+
``#2118``.
37+
- Use the ``SERVER_NAME`` config if it is present as default values for
38+
``app.run``. ``#2109``, ``#2152``
39+
- Call `ctx.auto_pop` with the exception object instead of `None`, in the
40+
event that a `BaseException` such as `KeyboardInterrupt` is raised in a
41+
request handler.
42+
43+
Version 0.12
44+
------------
45+
46+
Released on December 21st 2016, codename Punsch.
47+
48+
- the cli command now responds to `--version`.
49+
- Mimetype guessing and ETag generation for file-like objects in ``send_file``
50+
has been removed, as per issue ``#104``. See pull request ``#1849``.
51+
- Mimetype guessing in ``send_file`` now fails loudly and doesn't fall back to
52+
``application/octet-stream``. See pull request ``#1988``.
53+
- Make ``flask.safe_join`` able to join multiple paths like ``os.path.join``
54+
(pull request ``#1730``).
55+
- Revert a behavior change that made the dev server crash instead of returning
56+
a Internal Server Error (pull request ``#2006``).
57+
- Correctly invoke response handlers for both regular request dispatching as
58+
well as error handlers.
59+
- Disable logger propagation by default for the app logger.
60+
- Add support for range requests in ``send_file``.
61+
- ``app.test_client`` includes preset default environment, which can now be
62+
directly set, instead of per ``client.get``.
63+
64+
Version 0.11.2
65+
--------------
66+
67+
Bugfix release, unreleased
68+
69+
- Fix crash when running under PyPy3, see pull request ``#1814``.
70+
71+
Version 0.11.1
72+
--------------
73+
74+
Bugfix release, released on June 7th 2016.
75+
76+
- Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from working. See
77+
pull request ``#1872``.
78+
79+
Version 0.11
80+
------------
881

9-
(release date to be announced, codename to be selected)
82+
Released on May 29th 2016, codename Absinthe.
1083

84+
- Added support to serializing top-level arrays to :func:`flask.jsonify`. This
85+
introduces a security risk in ancient browsers. See
86+
:ref:`json-security` for details.
1187
- Added before_render_template signal.
1288
- Added `**kwargs` to :meth:`flask.Test.test_client` to support passing
1389
additional keyword arguments to the constructor of
@@ -23,7 +99,7 @@ Version 1.0
2399
from a view function.
24100
- Added :meth:`flask.Config.from_json`.
25101
- Added :attr:`flask.Flask.config_class`.
26-
- Added :meth:`flask.config.Config.get_namespace`.
102+
- Added :meth:`flask.Config.get_namespace`.
27103
- Templates are no longer automatically reloaded outside of debug mode. This
28104
can be configured with the new ``TEMPLATES_AUTO_RELOAD`` config key.
29105
- Added a workaround for a limitation in Python 3.3's namespace loader.
@@ -57,7 +133,7 @@ Version 1.0
57133
- JSON responses are now terminated with a newline character, because it is a
58134
convention that UNIX text files end with a newline and some clients don't
59135
deal well when this newline is missing. See
60-
https://github.com/mitsuhiko/flask/pull/1262 -- this came up originally as a
136+
https://github.com/pallets/flask/pull/1262 -- this came up originally as a
61137
part of https://github.com/kennethreitz/httpbin/issues/168
62138
- The automatically provided ``OPTIONS`` method is now correctly disabled if
63139
the user registered an overriding rule with the lowercase-version
@@ -73,6 +149,12 @@ Version 1.0
73149
- Added support for `provide_automatic_options` in :meth:`add_url_rule` to
74150
turn off automatic OPTIONS when the `view_func` argument is not a class
75151
(pull request ``#1489``).
152+
- ``flask.ext`` is now deprecated (pull request ``#1484``).
153+
- ``send_from_directory`` now raises BadRequest if the filename is invalid on
154+
the server OS (pull request ``#1763``).
155+
- Added the ``JSONIFY_MIMETYPE`` configuration variable (pull request ``#1728``).
156+
- Exceptions during teardown handling will no longer leave bad application
157+
contexts lingering around.
76158

77159
Version 0.10.2
78160
--------------
@@ -115,7 +197,7 @@ Version 0.10.1
115197
Version 0.10
116198
------------
117199

118-
Released on June 13nd 2013, codename Limoncello.
200+
Released on June 13th 2013, codename Limoncello.
119201

120202
- Changed default cookie serialization format from pickle to JSON to
121203
limit the impact an attacker can do if the secret key leaks. See
@@ -295,7 +377,7 @@ Released on September 29th 2011, codename Rakija
295377
- Applications now not only have a root path where the resources and modules
296378
are located but also an instance path which is the designated place to
297379
drop files that are modified at runtime (uploads etc.). Also this is
298-
conceptionally only instance depending and outside version control so it's
380+
conceptually only instance depending and outside version control so it's
299381
the perfect place to put configuration files etc. For more information
300382
see :ref:`instance-folders`.
301383
- Added the ``APPLICATION_ROOT`` configuration variable.

CONTRIBUTING.rst

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Support questions
1010
Please, don't use the issue tracker for this. Check whether the ``#pocoo`` IRC
1111
channel on Freenode can help with your issue. If your problem is not strictly
1212
Werkzeug or Flask specific, ``#python`` is generally more active.
13-
`StackOverflow <https://stackoverflow.com/>`_ is also worth considering.
13+
`Stack Overflow <https://stackoverflow.com/>`_ is also worth considering.
1414

1515
Reporting issues
1616
================
@@ -28,44 +28,87 @@ Submitting patches
2828
clearly under which circumstances the bug happens. Make sure the test fails
2929
without your patch.
3030

31-
- Try to follow `PEP8 <http://legacy.python.org/dev/peps/pep-0008/>`_, but you
31+
- Try to follow `PEP8 <https://www.python.org/dev/peps/pep-0008/>`_, but you
3232
may ignore the line-length-limit if following it would make the code uglier.
3333

3434

3535
Running the testsuite
3636
---------------------
3737

3838
You probably want to set up a `virtualenv
39-
<http://virtualenv.readthedocs.org/en/latest/index.html>`_.
39+
<https://virtualenv.readthedocs.io/en/latest/index.html>`_.
4040

41-
The minimal requirement for running the testsuite is ``py.test``. You can
41+
The minimal requirement for running the testsuite is ``pytest``. You can
4242
install it with::
4343

4444
pip install pytest
4545

4646
Clone this repository::
4747

48-
git clone https://github.com/mitsuhiko/flask.git
48+
git clone https://github.com/pallets/flask.git
4949

5050
Install Flask as an editable package using the current source::
5151

52+
cd flask
5253
pip install --editable .
5354

5455
Then you can run the testsuite with::
5556

56-
py.test
57+
pytest
5758

58-
With only py.test installed, a large part of the testsuite will get skipped
59+
With only pytest installed, a large part of the testsuite will get skipped
5960
though. Whether this is relevant depends on which part of Flask you're working
6061
on. Travis is set up to run the full testsuite when you submit your pull
6162
request anyways.
6263

6364
If you really want to test everything, you will have to install ``tox`` instead
64-
of ``pytest``. Currently we're depending on a development version of Tox
65-
because the released version is missing features we absolutely need. You can
66-
install it with::
65+
of ``pytest``. You can install it with::
6766

68-
pip install hg+https://bitbucket.org/hpk42/tox
67+
pip install tox
6968

7069
The ``tox`` command will then run all tests against multiple combinations
7170
Python versions and dependency versions.
71+
72+
Running test coverage
73+
---------------------
74+
Generating a report of lines that do not have unit test coverage can indicate where
75+
to start contributing. ``pytest`` integrates with ``coverage.py``, using the ``pytest-cov``
76+
plugin. This assumes you have already run the testsuite (see previous section)::
77+
78+
pip install pytest-cov
79+
80+
After this has been installed, you can output a report to the command line using this command::
81+
82+
pytest --cov=flask tests/
83+
84+
Generate a HTML report can be done using this command::
85+
86+
pytest --cov-report html --cov=flask tests/
87+
88+
Full docs on ``coverage.py`` are here: https://coverage.readthedocs.io
89+
90+
Caution
91+
=======
92+
pushing
93+
-------
94+
This repository contains several zero-padded file modes that may cause issues when pushing this repository to git hosts other than github. Fixing this is destructive to the commit history, so we suggest ignoring these warnings. If it fails to push and you're using a self-hosted git service like Gitlab, you can turn off repository checks in the admin panel.
95+
96+
97+
cloning
98+
-------
99+
The zero-padded file modes files above can cause issues while cloning, too. If you have
100+
101+
::
102+
103+
[fetch]
104+
fsckobjects = true
105+
106+
or
107+
108+
::
109+
110+
[receive]
111+
fsckObjects = true
112+
113+
114+
set in your git configuration file, cloning this repository will fail. The only solution is to set both of the above settings to false while cloning, and then setting them back to true after the cloning is finished.

MANIFEST.in

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
include Makefile CHANGES LICENSE AUTHORS
2-
recursive-include artwork *
3-
recursive-include tests *
4-
recursive-include examples *
5-
recursive-include docs *
6-
recursive-exclude docs *.pyc
7-
recursive-exclude docs *.pyo
8-
recursive-exclude tests *.pyc
9-
recursive-exclude tests *.pyo
10-
recursive-exclude examples *.pyc
11-
recursive-exclude examples *.pyo
2+
3+
graft artwork
4+
graft tests
5+
graft examples
6+
graft docs
7+
8+
global-exclude *.py[co]
9+
1210
prune docs/_build
1311
prune docs/_themes

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
all: clean-pyc test
44

55
test:
6-
py.test tests examples
7-
8-
tox-test:
9-
tox
6+
pip install -r test-requirements.txt
7+
tox -e py-release
108

119
audit:
1210
python setup.py audit

README

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@
3333

3434
Good that you're asking. The tests are in the
3535
tests/ folder. To run the tests use the
36-
`py.test` testing tool:
36+
`pytest` testing tool:
3737

38-
$ py.test
38+
$ pytest
39+
40+
Details on contributing can be found in CONTRIBUTING.rst
3941

4042
~ Where can I get help?
4143

0 commit comments

Comments
 (0)