Skip to content
Myr

Merge branch 'master' of github.com:mitsuhiko/flask

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

authored by Armin Ronacher · committed by Armin Ronacher · parents 05161d3, 29f3a1a · Browse files · 6 files+26 added−4 removed
This commit

State

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

Diff stats

6 files+26 added−4 removed

  • other:+26 added−4 removed

6 files+26 added−4 removed

modified:docs/deploying/fastcgi.rst+1 added
147 unmodified lines
148149 url.rewrite-once = (150 "^(/static($|/.*))$" => "$1",151 "^(/.*)$" => "/yourapplication.fcgi$1"152 )153154Remember to enable the FastCGI, alias and rewrite modules. This configuration155binds the application to `/yourapplication`. If you want the application to156work in the URL root you have to work around a lighttpd bug with the
83 unmodified lines
modified:docs/api.rst+1 added-1 removed
348 unmodified lines
349350Flask uses ``simplejson`` for the JSON implementation. Since simplejson351is provided both by the standard library as well as extension Flask will352try simplejson first and then fall back to the stdlib json module. On top353of that it will delegate access to the current application's JSOn encoders353of that it will delegate access to the current application's JSON encoders354and decoders for easier customization.355356So for starters instead of doing::357
389 unmodified lines
modified:flask/testsuite/config.py+13 added
14 unmodified lines
15import pkgutil16import unittest17from contextlib import contextmanager18from flask.testsuite import FlaskTestCase19from flask._compat import PY2202122# config keys used for the ConfigTestCase23TEST_KEY = 'foo'
267 unmodified lines
291 sys.path.remove(egg_path)292 if 'site_egg' in sys.modules:293 del sys.modules['site_egg']294295 if PY2:296 def test_meta_path_loader_without_is_package(self):297 class Loader(object):298 def find_module(self, name):299 return self300 sys.meta_path.append(Loader())301 try:302 with self.assert_raises(AttributeError):303 flask.Flask(__name__)304 finally:305 sys.meta_path.pop()306307308def suite():309 suite = unittest.TestSuite()310 suite.addTest(unittest.makeSuite(ConfigTestCase))311 suite.addTest(unittest.makeSuite(InstanceTestCase))
1 unmodified line
modified:flask/app.py+1 added-1 removed
1545 unmodified lines
1546 and buffered as response object1547 :class:`tuple` A tuple in the form ``(response, status,1548 headers)`` where `response` is any of the1549 types defined here, `status` is a string1550 or an integer and `headers` is a list of1550 or an integer and `headers` is a list or1551 a dictionary with header values.1552 ======================= ===========================================15531554 :param rv: the return value from the view function
287 unmodified lines
modified:flask/helpers.py+7 added-2 removed
677 unmodified lines
678 __import__(import_name)679 filename = sys.modules[import_name].__file__680 package_path = os.path.abspath(os.path.dirname(filename))681 # package_path ends with __init__.py for a package682 if hasattr(loader, 'is_package'):682 if loader.is_package(root_mod_name):683 package_path = os.path.dirname(package_path)683 if loader.is_package(root_mod_name):684 package_path = os.path.dirname(package_path)685 else:686 raise AttributeError(687 ('%s.is_package() method is missing but is '688 'required by Flask of PEP 302 import hooks') % loader.__class__.__name__)689690 site_parent, site_folder = os.path.split(package_path)691 py_prefix = os.path.abspath(sys.prefix)692 if package_path.startswith(py_prefix):
162 unmodified lines
modified:CHANGES+3 added
19 unmodified lines
2021(bugfix release, release date to be announced)2223- Fixed broken `test_appcontext_signals()` test case.24- Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package` with a25 useful message explaining why it is raised when a PEP 302 import hook is used26 without an `is_package()` method.2728Version 0.10.129--------------30
457 unmodified lines