forked from orbit-oss/flask
remove Python 2 from docs
This commit is contained in:
parent
96b4dcafc3
commit
7673835b3d
17 changed files with 53 additions and 908 deletions
|
|
@ -191,11 +191,9 @@ class Flask(_PackageBoundObject):
|
|||
for loading the config are assumed to
|
||||
be relative to the instance path instead
|
||||
of the application root.
|
||||
:param root_path: Flask by default will automatically calculate the path
|
||||
to the root of the application. In certain situations
|
||||
this cannot be achieved (for instance if the package
|
||||
is a Python 3 namespace package) and needs to be
|
||||
manually defined.
|
||||
:param root_path: The path to the root of the application files.
|
||||
This should only be set manually when it can't be detected
|
||||
automatically, such as for namespace packages.
|
||||
"""
|
||||
|
||||
#: The class that is used for request objects. See :class:`~flask.Request`
|
||||
|
|
@ -2026,11 +2024,11 @@ class Flask(_PackageBoundObject):
|
|||
without returning, is not allowed. The following types are allowed
|
||||
for ``view_rv``:
|
||||
|
||||
``str`` (``unicode`` in Python 2)
|
||||
``str``
|
||||
A response object is created with the string encoded to UTF-8
|
||||
as the body.
|
||||
|
||||
``bytes`` (``str`` in Python 2)
|
||||
``bytes``
|
||||
A response object is created with the bytes as the body.
|
||||
|
||||
``dict``
|
||||
|
|
|
|||
|
|
@ -909,8 +909,8 @@ def _find_package_path(root_mod_name):
|
|||
package_path = os.path.abspath(os.path.dirname(filename))
|
||||
|
||||
# In case the root module is a package we need to chop of the
|
||||
# rightmost part. This needs to go through a helper function
|
||||
# because of python 3.3 namespace packages.
|
||||
# rightmost part. This needs to go through a helper function
|
||||
# because of namespace packages.
|
||||
if _matching_loader_thinks_module_is_package(loader, root_mod_name):
|
||||
package_path = os.path.dirname(package_path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue