Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Update #2

wants to merge 24 commits into
base: master


Copy link

commented Sep 6, 2017

This is my first visit to this fine repo so I have bundled all updates in a single pull request to make things easier for you to merge.

Close this pull request and delete the branch if you want me to start with single pull requests right away

Here's the executive summary:


Here's a list of all the updates bundled in this pull request. I've added some links to make it easier for you to find all the information you need.

Babel 0.9.6 » 2.5.0 PyPI | Changelog | Homepage | Docs
Flask 0.9 » 0.12.2 PyPI | Changelog | Repo
Flask-Babel 0.8 » 0.11.2 PyPI | Repo | Docs
Flask-Login 0.1.3 » 0.4.0 PyPI | Changelog | Repo | Docs
Flask-Mail 0.8.2 » 0.9.1 PyPI | Repo | Docs
Flask-OpenID 1.1.1 » 1.2.5 PyPI | Changelog | Repo | Docs
Flask-SQLAlchemy 0.16 » 2.2 PyPI | Changelog | Repo | Docs
Flask-WTF 0.8.3 » 0.14.2 PyPI | Changelog | Repo | Docs
Jinja2 2.6 » 2.9.6 PyPI | Changelog | Homepage
MySQL-python 1.2.4 » 1.2.5 PyPI | Repo
SQLAlchemy 0.7.9 » 1.1.14 PyPI | Changelog | Homepage
Tempita 0.5.1 » 0.5.2 PyPI | Homepage
WTForms 1.0.3 » 2.1 PyPI | Changelog | Homepage | Docs
Werkzeug 0.8.3 » 0.12.2 PyPI | Changelog | Homepage
Whoosh 2.4.1 » 2.7.4 PyPI | Repo | Docs
blinker 1.2 » 1.4 PyPI | Changelog | Homepage | Docs
coverage 3.6 » 4.4.1 PyPI | Changelog | Docs
decorator 3.4.0 » 4.1.2 PyPI | Changelog | Repo
flup » 1.0.3.dev20161029 PyPI | Homepage
gunicorn 0.17.2 » 19.7.1 PyPI | Changelog | Homepage
psycopg2 2.5 » PyPI | Changelog | Homepage
pytz 2013b » 2017.2 PyPI | Homepage | Docs
sqlalchemy-migrate 0.7.2 » 0.11.0 PyPI | Homepage | Docs
flask-debugtoolbar 0.10.1 » 0.10.1 PyPI | Docs


Babel 0.9.6 -> 2.5.0


New Features

  • Numbers: Add currency utilities and helpers (491) (kdeldycke)
  • Support PyInstaller (500, 505) (wodo)

Minor Improvements and bugfixes

  • Dates: Add str to DateTimePattern (515) (sfermigier)
  • Dates: Fix an invalid string to bytes comparison when parsing TZ files on Py3 (498) (rowillia)
  • Dates: Formatting zero-padded components of dates is faster (517) (akx)
  • Documentation: Fix "Good Commits" link in (511) (naryanacharya6)
  • Documentation: Fix link to Python gettext module (512) (Linkid)
  • Messages: Allow both dash and underscore separated locale identifiers in pofiles (489, 490) (akx)
  • Messages: Extract Python messages in nested gettext calls (488) (sublee)
  • Messages: Fix in-place editing of dir list while iterating (476, 492) (MarcDufresne)
  • Messages: Stabilize sort order (482) (xavfernandez)
  • Time zones: Honor the no-inherit marker for metazone names (405) (akx)


New Features

Some of these changes might break your current code and/or tests.

  • CLDR: CLDR 29 is now used instead of CLDR 28 (405) (akx)
  • Messages: Add option 'add_location' for location line formatting (438, 459) (rrader, alxpy)
  • Numbers: Allow full control of decimal behavior (410) (etanol)

Minor Improvements and bugfixes

  • Documentation: Improve Date Fields descriptions (450) (ldwoolley)
  • Documentation: Typo fixes and documentation improvements (406, 412, 403, 440, 449, 463) (zyegfryed, adamchainz, jwilk, akx, roramirez, abhishekcs10)
  • Messages: Default to UTF-8 source encoding instead of ISO-8859-1 (399) (asottile)
  • Messages: Ensure messages are extracted in the order they were passed in (424) (ngrilly)
  • Messages: Message extraction for JSX files is improved (392, 396, 425) (karloskar, georgschoelly)
  • Messages: PO file reading supports multi-line obsolete units (429) (mbirtwell)
  • Messages: Python message extractor respects unicode_literals in future (427) (sublee)
  • Messages: Roundtrip Language headers (420) (kruton)
  • Messages: units before obsolete units are no longer erroneously marked obsolete (452) (mbirtwell)
  • Numbers: parse_pattern now preserves the full original pattern (414) (jtwang)
  • Numbers: Fix float conversion in extract_operands (435) (akx)
  • Plurals: Fix plural forms for Czech and Slovak locales (373) (ykshatroff)
  • Plurals: More plural form fixes based on Mozilla and CLDR references (431) (mshenfield)

Internal improvements

  • Local times are constructed correctly in tests (411) (etanol)
  • Miscellaneous small improvements (437) (scop)
  • Regex flags are extracted from the regex strings (462) (singingwolfboy)
  • The PO file reader is now a class and has seen some refactoring (429, 452) (mbirtwell)


(Bugfix release, released on April 22th)


  • CLDR: The lxml library is no longer used for CLDR importing, so it should not cause strange failures either. Thanks to aronbierbaum for the bug report and jtwang for the fix. (python-babel/babel#393)
  • CLI: Every last single CLI usage regression should now be gone, and both distutils and stand-alone CLIs should work as they have in the past. Thanks to paxswill and ajaeger for bug reports. (python-babel/babel#389)


(Bugfix release, released on April 12th)


  • CLI: Usage regressions that had snuck in between 2.2 and 2.3 should be no more. (python-babel/babel#386) Thanks to ajaeger, sebdiem and jcristovao for bug reports and patches.


(Bugfix release, released on April 9th)



(Bugfix release because of deployment problems, released on April 8th)


(Feature release, released on April 8th)

Internal improvements




(Feature release, released on January 2nd 2016)


  • General: Add hash to Locale. (303) (2aa8074)
  • General: Allow files with BOM if they're UTF-8 (189) (da87edd)
  • General: localedata directory is now locale-data (109) (2d1882e)
  • General: odict: Fix pop method (0a9e97e)
  • General: Removed uses of class from *.dat files (174) (94f6830)
  • Messages: Fix plural selection for Chinese (531f666)
  • Messages: Fix typo and add semicolon in plural_forms (5784501)
  • Messages: Flatten NullTranslations.files into a list (ad11101)
  • Times: FixedOffsetTimezone: fix display of negative offsets (d816803)


  • CLDR: Update to CLDR 28 (292) (9f7f4d0)
  • General: Add copy and deepcopy to LazyProxy. (a1cc3f1)
  • General: Add official support for Python 3.4 and 3.5
  • General: Improve odict performance by making key search O(1) (6822b7f)
  • Locale: Add an ordinal_form property to Locale (270) (b3f3430)
  • Locale: Add support for list formatting (37ce4fa, be6e23d)
  • Locale: Check inheritance exceptions first (3ef0d6d)
  • Messages: Allow file locations without line numbers (279) (79bc781)
  • Messages: Allow passing a callable to extract() (289) (3f58516)
  • Messages: Support 'Language' header field of PO files (76) (3ce842b)
  • Messages: Update catalog headers from templates (e0e7ef1)
  • Numbers: Properly load and expose currency format types (201) (df676ab)
  • Numbers: Use cdecimal by default when available (b6169be)
  • Numbers: Use the CLDR's suggested number of decimals for format_currency (139) (201ed50)
  • Times: Add format_timedelta(format='narrow') support (edc5eb5)


(Bugfix/minor feature release, released on September 25th 2015)

  • Parse and honour the locale inheritance exceptions
  • Fix Locale.parse using global.dat incompatible types
  • Fix display of negative offsets in FixedOffsetTimezone
  • Improved odict performance which is used during localization file
    build, should improve compilation time for large projects
  • Add support for "narrow" format for format_timedelta
  • Add universal wheel support
  • Support 'Language' header field in .PO files
    (fixes python-babel/babel#76)
  • Test suite enhancements (coverage, broken tests fixed, etc)
  • Documentation updated


(Released on July 27th 2015, codename Second Coming)

  • Added support for looking up currencies that belong to a territory
    through the :func:babel.numbers.get_territory_currencies
  • Improved Python 3 support.
  • Fixed some broken tests for timezone behavior.
  • Improved various smaller things for dealing with dates.


(bugfix release, release date to be decided)

  • Fixed a bug that caused deprecated territory codes not being
    converted properly by the subtag resolving. This for instance
    showed up when trying to use und_UK as a language code
    which now properly resolves to en_GB.
  • Fixed a bug that made it impossible to import the CLDR data
    from scratch on windows systems.


(bugfix release, released on July 29th 2013)

  • Fixed a bug in likely-subtag resolving for some common locales.
    This primarily makes zh_CN work again which was broken
    due to how it was defined in the likely subtags combined with
    our broken resolving. This fixes :gh:37.
  • Fixed a bug that caused pybabel to break when writing to stdout
    on Python 3.
  • Removed a stray print that was causing issues when writing to
    stdout for message catalogs.


(bugfix release, released on July 27th 2013)

  • Included all tests in the tarball. Previously the include
    skipped past recursive folders.
  • Changed how tests are invoked and added separate standalone
    test command. This simplifies testing of the package for
    linux distributors.


(bugfix release, released on July 27th 2013)

  • added dummy version requirements for pytz so that it installs
    on pip 1.4.
  • Included tests in the tarball.


(Released on July 26th 2013, codename Revival)

  • support python 2.6, 2.7, 3.3+ and pypy - drop all other versions
  • use tox for testing on different pythons
  • Added support for the locale plural rules defined by the CLDR.
  • Added format_timedelta function to support localized formatting of
    relative times with strings such as "2 days" or "1 month" (:trac:126).
  • Fixed negative offset handling of Catalog._set_mime_headers (:trac:165).
  • Fixed the case where messages containing square brackets would break with
    an unpack error.
  • updated to CLDR 23
  • Make the CLDR import script work with Python 2.7.
  • Fix various typos.
  • Sort output of list-locales.
  • Make the POT-Creation-Date of the catalog being updated equal to
    POT-Creation-Date of the template used to update (:trac:148).
  • Use a more explicit error message if no option or argument (command) is
    passed to pybabel (:trac:81).
  • Keep the PO-Revision-Date if it is not the default value (:trac:148).
  • Make --no-wrap work by reworking --width's default and mimic xgettext's
    behaviour of always wrapping comments (:trac:145).
  • Add --project and --version options for commandline (:trac:173).
  • Add a ne() method to the Local class.
  • Explicitly sort instead of using sorted() and don't assume ordering
    (Jython compatibility).
  • Removed ValueError raising for string formatting message checkers if the
    string does not contain any string formattings (:trac:150).
  • Fix Serbian plural forms (:trac:213).
  • Small speed improvement in format_date() (:trac:216).
  • Fix so does not accumulate logging
    handlers (:trac:227, reported with initial patch by dfraser)
  • Fix exception if environment contains an invalid locale setting
  • use cPickle instead of pickle for better performance (:trac:225)
  • Only use bankers round algorithm as a tie breaker if there are two nearest
    numbers, round as usual if there is only one nearest number (:trac:267,
    patch by Martin)
  • Allow disabling cache behaviour in LazyProxy (:trac:208, initial patch
    from Pedro Algarvio)
  • Support for context-aware methods during message extraction (:trac:229,
    patch from David Rios)
  • "init" and "update" commands support "--no-wrap" option (:trac:289)
  • fix formatting of fraction in format_decimal() if the input value is a float
    with more than 7 significant digits (:trac:183)
  • fix format_date() with datetime parameter (:trac:282, patch from Xavier
  • fix format_decimal() with small Decimal values (:trac:214, patch from
    George Lund)
  • fix handling of messages containing '\n' (:trac:198)
  • handle irregular multi-line msgstr (no "" as first line) gracefully
  • parse_decimal() now returns Decimals not floats, API change (:trac:178)
  • no warnings when running without installed setuptools (:trac:262)
  • modified Locale.eq method so Locales are only equal if all of their
    attributes (language, territory, script, variant) are equal
  • resort to hard-coded message extractors/checkers if pkg_resources is
    installed but no egg-info was found (:trac:230)
  • format_time() and format_datetime() now accept also floats (:trac:242)
  • add class similar to gettext.NullTranslations
    but with all of Babel's new gettext methods (:trac:277)
  • "init" and "update" commands support "--width" option (:trac:284)
  • fix 'input_dirs' option for setuptools integration (:trac:232, initial
    patch by Étienne Bersac)
  • ensure .mo file header contains the same information as the source .po file
  • added support for get_language_name() on the locale objects.
  • added support for get_territory_name() on the locale objects.
  • added support for get_script_name() on the locale objects.
  • added pluralization support for currency names and added a '¤¤¤'
    pattern for currencies that includes the full name.
  • depend on pytz now and wrap it nicer. This gives us improved support
    for things like timezone transitions and an overall nicer API.
  • Added support for explicit charset to PO file reading.
  • Added experimental Python 3 support.
  • Added better support for returning timezone names.
  • Don't throw away a Catalog's obsolete messages when updating it.
  • Added basic likelySubtag resolving when doing locale parsing and no
    match can be found.

Flask 0.9 -> 0.12.2


Released on May 16 2017

  • Fix a bug in safe_join on Windows.


Bugfix release, released on March 31st 2017

  • Prevent flask run from showing a NoAppException when an ImportError occurs
    within the imported application module.
  • Fix encoding behavior of app.config.from_pyfile for Python 3. Fix
  • Use the SERVER_NAME config if it is present as default values for 2109, 2152
  • Call ctx.auto_pop with the exception object instead of None, in the
    event that a BaseException such as KeyboardInterrupt is raised in a
    request handler.


Released on December 21st 2016, codename Punsch.

  • the cli command now responds to --version.
  • Mimetype guessing and ETag generation for file-like objects in send_file
    has been removed, as per issue 104. See pull request 1849.
  • Mimetype guessing in send_file now fails loudly and doesn't fall back to
    application/octet-stream. See pull request 1988.
  • Make flask.safe_join able to join multiple paths like os.path.join
    (pull request 1730).
  • Revert a behavior change that made the dev server crash instead of returning
    a Internal Server Error (pull request 2006).
  • Correctly invoke response handlers for both regular request dispatching as
    well as error handlers.
  • Disable logger propagation by default for the app logger.
  • Add support for range requests in send_file.
  • app.test_client includes preset default environment, which can now be
    directly set, instead of per client.get.


Bugfix release, unreleased

  • Fix crash when running under PyPy3, see pull request 1814.


Bugfix release, released on June 7th 2016.

  • Fixed a bug that prevented FLASK_APP=foobar/ from working. See
    pull request 1872.


Released on May 29th 2016, codename Absinthe.

  • Added support to serializing top-level arrays to :func:flask.jsonify. This
    introduces a security risk in ancient browsers. See
    :ref:json-security for details.
  • Added before_render_template signal.
  • Added **kwargs to :meth:flask.Test.test_client to support passing
    additional keyword arguments to the constructor of
  • Added SESSION_REFRESH_EACH_REQUEST config key that controls the
    set-cookie behavior. If set to True a permanent session will be
    refreshed each request and get their lifetime extended, if set to
    False it will only be modified if the session actually modifies.
    Non permanent sessions are not affected by this and will always
    expire if the browser window closes.
  • Made Flask support custom JSON mimetypes for incoming data.
  • Added support for returning tuples in the form (response, headers)
    from a view function.
  • Added :meth:flask.Config.from_json.
  • Added :attr:flask.Flask.config_class.
  • Added :meth:flask.Config.get_namespace.
  • Templates are no longer automatically reloaded outside of debug mode. This
    can be configured with the new TEMPLATES_AUTO_RELOAD config key.
  • Added a workaround for a limitation in Python 3.3's namespace loader.
  • Added support for explicit root paths when using Python 3.3's namespace
  • Added :command:flask and the flask.cli module to start the local
    debug server through the click CLI system. This is recommended over the old method as it works faster and more reliable due to a
    different design and also replaces Flask-Script.
  • Error handlers that match specific classes are now checked first,
    thereby allowing catching exceptions that are subclasses of HTTP
    exceptions (in werkzeug.exceptions). This makes it possible
    for an extension author to create exceptions that will by default
    result in the HTTP error of their choosing, but may be caught with
    a custom error handler if desired.
  • Added :meth:flask.Config.from_mapping.
  • Flask will now log by default even if debug is disabled. The log format is
    now hardcoded but the default log handling can be disabled through the
    LOGGER_HANDLER_POLICY configuration key.
  • Removed deprecated module functionality.
  • Added the EXPLAIN_TEMPLATE_LOADING config flag which when enabled will
    instruct Flask to explain how it locates templates. This should help
    users debug when the wrong templates are loaded.
  • Enforce blueprint handling in the order they were registered for template
  • Ported test suite to py.test.
  • Deprecated request.json in favour of request.get_json().
  • Add "pretty" and "compressed" separators definitions in jsonify() method.
    Reduces JSON response size when JSONIFY_PRETTYPRINT_REGULAR=False by removing
    unnecessary white space included by default after separators.
  • JSON responses are now terminated with a newline character, because it is a
    convention that UNIX text files end with a newline and some clients don't
    deal well when this newline is missing. See
    pallets/flask#1262 -- this came up originally as a
    part of postmanlabs/httpbin#168
  • The automatically provided OPTIONS method is now correctly disabled if
    the user registered an overriding rule with the lowercase-version
    options (issue 1288).
  • flask.json.jsonify now supports the type (pull request
  • Don't leak exception info of already catched exceptions to context teardown
    handlers (pull request 1393).
  • Allow custom Jinja environment subclasses (pull request 1422).
  • flask.g now has pop() and setdefault methods.
  • Turn on autoescape for flask.templating.render_template_string by default
    (pull request 1515).
  • flask.ext is now deprecated (pull request 1484).
  • send_from_directory now raises BadRequest if the filename is invalid on
    the server OS (pull request 1763).
  • Added the JSONIFY_MIMETYPE configuration variable (pull request 1728).
  • Exceptions during teardown handling will no longer leave bad application
    contexts lingering around.


(bugfix release, release date to be announced)

  • Fixed broken test_appcontext_signals() test case.
  • Raise an :exc:AttributeError in :func:flask.helpers.find_package with a
    useful message explaining why it is raised when a PEP 302 import hook is used
    without an is_package() method.
  • Fixed an issue causing exceptions raised before entering a request or app
    context to be passed to teardown handlers.
  • Fixed an issue with query parameters getting removed from requests in
    the test client when absolute URLs were requested.
  • Made before_first_request into a decorator as intended.
  • Fixed an etags bug when sending a file streams with a name.
  • Fixed send_from_directory not expanding to the application root path
  • Changed logic of before first request handlers to flip the flag after
    invoking. This will allow some uses that are potentially dangerous but
    should probably be permitted.
  • Fixed Python 3 bug when a handler from app.url_build_error_handlers
    reraises the BuildError.


(bugfix release, released on June 14th 2013)

  • Fixed an issue where |tojson was not quoting single quotes which
    made the filter not work properly in HTML attributes. Now it's
    possible to use that filter in single quoted attributes. This should
    make using that filter with angular.js easier.
  • Added support for byte strings back to the session system. This broke
    compatibility with the common case of people putting binary data for
    token verification into the session.
  • Fixed an issue where registering the same method twice for the same endpoint
    would trigger an exception incorrectly.


Released on June 13th 2013, codename Limoncello.

  • Changed default cookie serialization format from pickle to JSON to
    limit the impact an attacker can do if the secret key leaks. See
    :ref:upgrading-to-010 for more information.
  • Added template_test methods in addition to the already existing
    template_filter method family.
  • Added template_global methods in addition to the already existing
    template_filter method family.
  • Set the content-length header for x-sendfile.
  • tojson filter now does not escape script blocks in HTML5 parsers.
  • tojson used in templates is now safe by default due. This was
    allowed due to the different escaping behavior.
  • Flask will now raise an error if you attempt to register a new function
    on an already used endpoint.
  • Added wrapper module around simplejson and added default serialization
    of datetime objects. This allows much easier customization of how
    JSON is handled by Flask or any Flask extension.
  • Removed deprecated internal flask.session module alias. Use
    flask.sessions instead to get the session module. This is not to
    be confused with flask.session the session proxy.
  • Templates can now be rendered without request context. The behavior is
    slightly different as the request, session and g objects
    will not be available and blueprint's context processors are not
  • The config object is now available to the template as a real global and
    not through a context processor which makes it available even in imported
    templates by default.
  • Added an option to generate non-ascii encoded JSON which should result
    in less bytes being transmitted over the network. It's disabled by
    default to not cause confusion with existing libraries that might expect
    flask.json.dumps to return bytestrings by default.
  • flask.g is now stored on the app context instead of the request
  • flask.g now gained a get() method for not erroring out on non
    existing items.
  • flask.g now can be used with the in operator to see what's defined
    and it now is iterable and will yield all attributes stored.
  • flask.Flask.request_globals_class got renamed to
    flask.Flask.app_ctx_globals_class which is a better name to what it
    does since 0.10.
  • request, session and g are now also added as proxies to the template
    context which makes them available in imported templates. One has to be
    very careful with those though because usage outside of macros might
    cause caching.
  • Flask will no longer invoke the wrong error handlers if a proxy
    exception is passed through.
  • Added a workaround for chrome's cookies in localhost not working
    as intended with domain names.
  • Changed logic for picking defaults for cookie values from sessions
    to work better with Google Chrome.
  • Added message_flashed signal that simplifies flashing testing.
  • Added support for copying of request contexts for better working with
  • Removed custom JSON HTTP exception subclasses. If you were relying on them
    you can reintroduce them again yourself trivially. Using them however is
    strongly discouraged as the interface was flawed.
  • Python requirements changed: requiring Python 2.6 or 2.7 now to prepare
    for Python 3.3 port.
  • Changed how the teardown system is informed about exceptions. This is now
    more reliable in case something handles an exception halfway through
    the error handling process.
  • Request context preservation in debug mode now keeps the exception
    information around which means that teardown handlers are able to
    distinguish error from success cases.
  • Added the JSONIFY_PRETTYPRINT_REGULAR configuration variable.
  • Flask now orders JSON keys by default to not trash HTTP caches due to
    different hash seeds between different workers.
  • Added appcontext_pushed and appcontext_popped signals.
  • The builtin run method now takes the SERVER_NAME into account when
    picking the default port to run on.
  • Added flask.request.get_json() as a replacement for the old
    flask.request.json property.

Flask-Login 0.1.3 -> 0.4.0


Released on October 26th, 2016

  • Fixes OPTIONS exemption from login. 244
  • Fixes use of MD5 by replacing with SHA512. 264
  • BREAKING: The login_manager.token_handler function, get_auth_token method
    on the User class, and the utils.make_secure_token utility function have
    been removed to prevent users from creating insecure auth implementations.
    Use the Alternative Tokens example from the docs instead. 291


Released on October 8th, 2015

  • Fixes Python 2.6 compatibility.
  • Updates SESSION_KEYS to include "remember".


Released on September 30th, 2015

  • Fixes removal of non-Flask-Login keys from session object when using 'strong'


Released on September 10th, 2015

  • Fixes handling of X-Forward-For header.
  • Update to use SHA512 instead of MD5 for session identifier creation.
  • Fixes session creation for every view.
  • BREAKING: UTC used to set cookie duration.
  • BREAKING: Non-fresh logins now returns HTTP 401.
  • Support unicode user IDs in cookie.
  • Fixes user_logged_out signal invocation.
  • Support for per-Blueprint login views.
  • BREAKING: The is_authenticated, is_active, and is_anonymous members of
    the user class are now properties, not methods. Applications should update
    their user classes accordingly.
  • Various other improvements including documentation and code clean up.


Released on May 19th, 2014

  • Fixes missing request loader invocation when authorization header exists.


Released on March 9th, 2014

  • Generalized request_loader introduced; ability to log users in via
    customized callback over request.
  • Fixes request context dependency by explicitly checking has_request_context.
  • Fixes remember me issues since lazy user loading changes.


Released on December 28th, 2013

  • Fixes anonymous user assignment.
  • Fixes localization in Python 3.


Released on December 21st 2013

  • Support login via authorization header. This allows login via Basic Auth, for
    example. Useful in an API presentation context.
  • Ability to override user ID method name. This is useful if the ID getter is
    named differently than the default.
  • Session data is now only read when the user is requested. This can be
    beneficial for cookie and caching control when differenting between
    requests that use user information for rendering and ones where all users
    (including anonymous) get the same result (e.g. static pages)
  • BREAKING: User must always be accessed through the current_user
    local. This breaks any previous direct access to
    This is because user is not loaded until current_user is accessed.
  • Fixes unnecessary access to the session when the user is anonymous
    and session protection is active.
    see maxcountryman/flask-login#120
  • Fixes issue where order dependency of applying the login manager
    before dependent applications was required.
    see mattupstate/flask-principal#22
  • Fixes Python 3 UserMixin hashing.
  • Fixes incorrect documentation.

Previous Versions

Prior to 0.2.8, no proper changelog was kept.

Flask-OpenID 1.1.1 -> 1.2.5



  • Added support for immediate mode requests. [Patrick Uiterwijk]
  • Fixed grammar error in docs. [Yuval Langer]
  • Fixed import path to url_quote. [Bluevalor]
  • Base64 encoding and decoding internal data. [Patrick Steele]



  • Support using the url_root as trust_root. [Patrick Uiterwijk]



  • Added shebang to example to make it easier to run. [Patrick Uiterwijk]


  • Fix compatibility issue with python<2.7 introduced in 1.2.2. [Patrick Uiterwijk]



  • Make it easier to start the example by removing init_db. [Patrick Uiterwijk]
  • Make OpenID errors more descriptive. [Patrick Uiterwijk]


  • First try to utf8 encode, but skip for python3. [evgen]
  • Make the checks for string type work. [Patrick Uiterwijk, Sergey]



  • Using print() for python 3 compatibility. [Jon Chen]
  • Make ask_for_optional optional in debug if ask_for is specified. [Samuel Miller]



  • Added support for python 3. [Dennis Glindhart, Patrick Uiterwijk]
  • Added support for python-openid extensions. [Pierre-Yves Chibon, Jeff Miller, Patrick Uiterwijk]
  • Added support for optional sreg keys. [Shay Erlichmen, Patrick Uiterwijk]
  • Added the option to declare which URL roots are safe to redirect to [Patrick Uiterwijk]


  • Small typo fix in documentation. [David Vincelli]
  • Fix the import name in the documentation. [William Ting, Amanjeev Sethi]
  • Fix pickle.loads crashing on non-ASCII chars. [Shay Erlichmen]

Flask-SQLAlchemy 0.16 -> 2.2


Released on February 27, 2017, codename Dubnium

  • Minimum SQLAlchemy version is 0.8 due to use of sqlalchemy.inspect.
  • Added support for custom query_class and model_class as args
    to the SQLAlchemy constructor. (328_)
  • Allow listening to SQLAlchemy events on db.session. (364_)
  • Allow __bind_key__ on abstract models. (373_)
  • Allow SQLALCHEMY_ECHO to be a string. (409_)
  • Warn when SQLALCHEMY_DATABASE_URI is not set. (443_)
  • Don't let pagination generate invalid page numbers. (460_)
  • Drop support of Flask < 0.10. This means the db session is always tied to
    the app context and its teardown event. (461_)
  • Tablename generation logic no longer accesses class properties unless they
    are declared_attr. (467_)

.. _328: pallets/flask-sqlalchemy#328
.. _364: pallets/flask-sqlalchemy#364
.. _373: pallets/flask-sqlalchemy#373
.. _409: pallets/flask-sqlalchemy#409
.. _443: pallets/flask-sqlalchemy#443
.. _460: pallets/flask-sqlalchemy#460
.. _461: pallets/flask-sqlalchemy#461
.. _467: pallets/flask-sqlalchemy#467


Released on October 23rd 2015, codename Caesium

  • Table names are automatically generated in more cases, including
    subclassing mixins and abstract models.
  • Allow using a custom MetaData object.
  • Add support for binds parameter to session.


Released on August 29th 2014, codename Bohrium

  • Changed how the builtin signals are subscribed to skip non Flask-SQLAlchemy
    sessions. This will also fix the attribute error about model changes
    not existing.
  • Added a way to control how signals for model modifications are tracked.
  • Made the SignallingSession a public interface and added a hook
    for customizing session creation.
  • If the bind parameter is given to the signalling session it will no
    longer cause an error that a parameter is given twice.
  • Added working table reflection support.
  • Enabled autoflush by default.
  • Consider SQLALCHEMY_COMMIT_ON_TEARDOWN harmful and remove from docs.


Released on July 20th 2013, codename Aurum

  • Added Python 3.3 support.
  • Dropped 2.5 compatibility.
  • Various bugfixes
  • Changed versioning format to do major releases for each update now.

Flask-WTF 0.8.3 -> 0.14.2


Released 2017-01-10

  • Fix bug where FlaskForm assumed meta argument was not None if it
    was passed. (278_)

.. _278: lepture/flask-wtf#278


Released 2017-01-10

  • Fix bug where the file validators would incorrectly identify an empty file as
    valid data. (276, 277)
  • FileField is no longer deprecated. The data is checked during
    processing and only set if it's a valid file.
  • has_file is deprecated; it's now equivalent to bool(
  • FileRequired and FileAllowed work with both the Flask-WTF and
    WTForms FileField classes.
  • The Optional validator now works with FileField.

.. _276: lepture/flask-wtf#276
.. _277: lepture/flask-wtf#277


Released 2017-01-06

  • Use itsdangerous to sign CSRF tokens and check expiration instead of doing it
    ourselves. (264_)
  • All tokens are URL safe, removing the url_safe parameter from
    generate_csrf. (206_)
  • All tokens store a timestamp, which is checked in validate_csrf. The
    time_limit parameter of generate_csrf is removed.
  • Remove the app attribute from CsrfProtect, use current_app.
  • CsrfProtect protects the DELETE method by default. (264_)
  • The same CSRF token is generated for the lifetime of a request. It is exposed
    as g.csrf_token for use during testing. (227, 264)
  • CsrfProtect.error_handler is deprecated. (264_)
  • Handlers that return a response work in addition to those that raise an
    error. The behavior was not clear in previous docs.
  • (200, 209, 243, 252)
  • Use Form.Meta instead of deprecated SecureForm for CSRF (and
    everything else). (216, 271)
  • csrf_enabled parameter is still recognized but deprecated. All other
    attributes and methods from SecureForm are removed. (271_)
  • Provide WTF_CSRF_FIELD_NAME to configure the name of the CSRF token.
  • validate_csrf raises wtforms.ValidationError with specific messages
    instead of returning True or False. This breaks anything that was
    calling the method directly. (239, 271)
  • CSRF errors are logged as well as raised. (239_)
  • CsrfProtect is renamed to CSRFProtect. A deprecation warning is issued
    when using the old name. CsrfError is renamed to CSRFError without
    deprecation. (271_)
  • FileField is deprecated because it no longer provides functionality over
    the provided validators. Use wtforms.FileField directly. (272_)

.. _200: lepture/flask-wtf#200
.. _209: lepture/flask-wtf#209
.. _216: lepture/flask-wtf#216
.. _227: lepture/flask-wtf#227
.. _239: lepture/flask-wtf#239
.. _243: lepture/flask-wtf#243
.. _252: lepture/flask-wtf#252
.. _264: lepture/flask-wtf#264
.. _271: lepture/flask-wtf#271
.. _272: lepture/flask-wtf#272


Released 2016/10/6

  • Deprecation warning for Form is shown during __init__ instead of immediately when subclassing. (262_)
  • Don't use pkg_resources to get version, for compatibility with GAE. (261_)

.. _261: lepture/flask-wtf#261
.. _262: lepture/flask-wtf#262


Released 2016/09/29

  • Form is renamed to FlaskForm in order to avoid name collision with WTForms's base class. Using Form will show a deprecation warning. (250_)
  • hidden_tag no longer wraps the hidden inputs in a hidden div. This is valid HTML5 and any modern HTML parser will behave correctly. (217, 193)
  • flask_wtf.html5 is deprecated. Import directly from wtforms.fields.html5. (251_)
  • is_submitted is true for PATCH and DELETE in addition to POST and PUT. (187_)
  • generate_csrf takes a token_key parameter to specify the key stored in the session. (206_)
  • generate_csrf takes a url_safe parameter to allow the token to be used in URLs. (206_)
  • can be accessed multiple times without raising an exception. (248_)
  • File extension with multiple parts (.tar.gz) can be used in the FileAllowed validator. (201_)

.. _187: lepture/flask-wtf#187
.. _193: lepture/flask-wtf#193
.. _201: lepture/flask-wtf#201
.. _206: lepture/flask-wtf#206
.. _217: lepture/flask-wtf#217
.. _248: lepture/flask-wtf#248
.. _250: lepture/flask-wtf#250
.. _251: lepture/flask-wtf#251


Released 2015/07/09

  • Abstract protect_csrf() into a separate method
  • Update reCAPTCHA configuration
  • Fix reCAPTCHA error handle


Released 2015/01/21

  • Use the new reCAPTCHA API via 164_.

.. _164: lepture/flask-wtf#164


Released 2014/11/16

  • Add configuration: WTF_CSRF_HEADERS via 159_.
  • Support customize hidden tags via 150_.
  • And many more bug fixes

.. _150: lepture/flask-wtf#150
.. _159: lepture/flask-wtf#159


Released 2014/09/03

  • Update translation for reCaptcha via 146_.

.. _146: lepture/flask-wtf#146


Released 2014/08/26

  • Update RECAPTCHA API SERVER URL via 145_.
  • Update requirement Werkzeug>=0.9.5
  • Fix CsrfProtect exempt for blueprints via 143_.

.. _145: lepture/flask-wtf#145
.. _143: lepture/flask-wtf#143


Released 2014/07/16

  • Add configuration: WTF_CSRF_METHODS
  • Support WTForms 2.0 now
  • Fix csrf validation without time limit (time_limit=False)
  • CSRF exempt supports blueprint 111_.

.. _111: lepture/flask-wtf#111


Released 2014/03/21

  • csrf_token for all template types 112_.
  • Make FileRequired a subclass of InputRequired 108_.

.. _108: lepture/flask-wtf#108
.. _112: lepture/flask-wtf#112


Released 2013/12/20

  • Bugfix for csrf module when form has a prefix
  • Compatible support for wtforms2
  • Remove file API for FileField


Released 2013/10/02

  • Fix validation of recaptcha when app in testing mode 89_.
  • Bugfix for csrf module 91_

.. _89: lepture/flask-wtf#89
.. _91: lepture/flask-wtf#91


Released 2013/9/11

  • Upgrade wtforms to 1.0.5.
  • No lazy string for i18n 77_.
  • No DateInput widget in html5 81_.
  • PUT and PATCH for CSRF 86_.

.. _77: lepture/flask-wtf#77
.. _81: lepture/flask-wtf#81
.. _86: lepture/flask-wtf#86


Released 2013/8/21

This is a patch version for backward compitable for Flask<0.10 82_.

.. _82: lepture/flask-wtf#82


Released 2013/8/15

  • Add i18n support (issue 65)
  • Use default html5 widgets and fields provided by wtforms
  • Python 3.3+ support
  • Redesign form, replace SessionSecureForm
  • CSRF protection solution
  • Drop wtforms imports
  • Fix recaptcha i18n support
  • Fix recaptcha validator for python 3
  • More test cases, it's 90%+ coverage now
  • Redesign documentation


Released 2013/3/28

  • Recaptcha Validator now returns provided message (issue 66)
  • Minor doc fixes
  • Fixed issue with tests barking because of nose/multiprocessing issue.

Jinja2 2.6 -> 2.9.6


(bugfix release, released on April 3rd 2017)

  • Fixed custom context behavior in fast resolve mode (675)


(bugfix release, released on January 28th 2017)

  • Restored the original repr of the internal _GroupTuple because this
    caused issues with ansible and it was an unintended change. (654)
  • Added back support for custom contexts that override the old resolve
    method since it was hard for people to spot that this could cause a
  • Correctly use the buffer for the else block of for loops. This caused
    invalid syntax errors to be caused on 2.x and completely wrong behavior
    on Python 3 (669)
  • Resolve an issue where the {% extends %} tag could not be used with
    async environments. (668)
  • Reduce memory footprint slightly by reducing our unicode database dump
    we use for identifier matching on Python 3 (666)
  • Fixed autoescaping not working for macros in async compilation mode. (671)


(bugfix release, released on January 10th 2017)

  • Solved some warnings for string literals. (646)
  • Increment the bytecode cache version which was not done due to an
    oversight before.
  • Corrected bad code generation and scoping for filtered loops. (649)
  • Resolved an issue where top-level output silencing after known extend
    blocks could generate invalid code when blocks where contained in if
    statements. (651)
  • Made the truncate.leeway default configurable to improve compatibility
    with older templates.


(bugfix release, released on January 8th 2017)

  • Restored the use of blocks in macros to the extend that was possible
    before. On Python 3 it would render a generator repr instead of
    the block contents. (645)
  • Set a consistent behavior for assigning of variables in inner scopes
    when the variable is also read from an outer scope. This now sets the
    intended behavior in all situations however it does not restore the
    old behavior where limited assignments to outer scopes was possible.
    For more information and a discussion see 641
  • Resolved an issue where block scoped would not take advantage of the
    new scoping rules. In some more exotic cases a variable overriden in a
    local scope would not make it into a block.
  • Change the code generation of the with statement to be in line with the
    new scoping rules. This resolves some unlikely bugs in edge cases. This
    also introduces a new internal With node that can be used by extensions.


(bugfix release, released on January 8th 2017)

  • Fixed a regression that caused for loops to not be able to use the same
    variable for the target as well as source iterator. (640)
  • Add support for a previously unknown behavior of macros. It used to be
    possible in some circumstances to explicitly provide a caller argument
    to macros. While badly buggy and unintended it turns out that this is a
    common case that gets copy pasted around. To not completely break backwards
    compatibility with the most common cases it's now possible to provide an
    explicit keyword argument for caller if it's given an explicit default.


(bugfix release, released on January 7th 2017)

  • Resolved a regression with call block scoping for macros. Nested caller
    blocks that used the same identifiers as outer macros could refer to the
    wrong variable incorrectly.


(codename Derivation, released on January 7th 2017)

  • Change cache key definition in environment. This fixes a performance
    regression introduced in 2.8.
  • Added support for generator_stop on supported Python versions
    (Python 3.5 and later)
  • Corrected a long standing issue with operator precedence of math operations
    not being what was expected.
  • Added support for Python 3.6 async iterators through a new async mode.
  • Added policies for filter defaults and similar things.
  • urlize now sets "rel noopener" by default.
  • Support attribute fallback for old-style classes in 2.x.
  • Support toplevel set statements in extend situations.
  • Restored behavior of Cycler for Python 3 users.
  • Subtraction now follows the same behavior as other operators on undefined
  • map and friends will now give better error messages if you forgot to
    quote the parameter.
  • Depend on MarkupSafe 0.23 or higher.
  • Improved the truncate filter to support better truncation in case
    the string is barely truncated at all.
  • Change the logic for macro autoescaping to be based on the runtime
    autoescaping information at call time instead of macro define time.
  • Ported a modified version of the tojson filter from Flask to Jinja2
    and hooked it up with the new policy framework.
  • Block sets are now marked safe by default.
  • On Python 2 the asciification of ASCII strings can now be disabled with
    the compiler.ascii_str policy.
  • Tests now no longer accept an arbitrary expression as first argument but
    a restricted one. This means that you can now properly use multiple
    tests in one expression without extra parentheses. In particular you can
    now write foo is divisibleby 2 or foo is divisibleby 3
    as you would expect.
  • Greatly changed the scoping system to be more consistent with what template
    designers and developers expect. There is now no more magic difference
    between the different include and import constructs. Context is now always
    propagated the same way. The only remaining differences is the defaults
    for with context and without context.
  • The with and autoescape tags are now built-in.
  • Added the new select_autoescape function which helps configuring better
    autoescaping easier.


(bugfix release, unreleased)

  • Fixed a runtime error in the sandbox when attributes of async generators
    were accessed.


(bugfix release, released on December 29th 2016)

  • Fixed the for_qs flag for urlencode.
  • Fixed regression when applying int to non-string values.
  • SECURITY: if the sandbox mode is used format expressions are now sandboxed
    with the same rules as in Jinja. This solves various information leakage
    problems that can occur with format strings.


(codename Replacement, released on July 26th 2015)

  • Added target parameter to urlize function.
  • Added support for followsymlinks to the file system loader.
  • The truncate filter now counts the length.
  • Added equalto filter that helps with select filters.
  • Changed cache keys to use absolute file names if available
    instead of load names.
  • Fixed loop length calculation for some iterators.
  • Changed how Jinja2 enforces strings to be native strings in
    Python 2 to work when people break their default encoding.
  • Added :func:make_logging_undefined which returns an undefined
    object that logs failures into a logger.
  • If unmarshalling of cached data fails the template will be
    reloaded now.
  • Implemented a block set tag.
  • Default cache size was increased to 400 from a low 50.
  • Fixed is number test to accept long integers in all Python versions.
  • Changed is number to accept Decimal as a number.
  • Added a check for default arguments followed by non-default arguments. This
    change makes {% macro m(x, y=1, z) %}...{% endmacro %} a syntax error. The
    previous behavior for this code was broken anyway (resulting in the default
    value being applied to y).
  • Add ability to use custom subclasses of jinja2.compiler.CodeGenerator and
    jinja2.runtime.Context by adding two new attributes to the environment
    (code_generator_class and context_class) (pull request 404).
  • added support for context/environment/evalctx decorator functions on
    the finalize callback of the environment.
  • escape query strings for urlencode properly. Previously slashes were not
    escaped in that place.
  • Add 'base' parameter to 'int' filter.


(bugfix release, released on June 6th 2014)

  • Security issue: Corrected the security fix for the cache folder. This
    fix was provided by RedHat.


(bugfix release, released on January 10th 2014)

  • Prefix loader was not forwarding the locals properly to
    inner loaders. This is now fixed.
  • Security issue: Changed the default folder for the filesystem cache to be
    user specific and read and write protected on UNIX systems. See Debian bug 734747_ for more information.

.. _Debian bug 734747:


(bugfix release, released on August 7th 2013)

  • Fixed a bug with call_filter not working properly on environment
    and context filters.
  • Fixed lack of Python 3 support for bytecode caches.
  • Reverted support for defining blocks in included templates as this
    broke existing templates for users.
  • Fixed some warnings with hashing of undefineds and nodes if Python
    is run with warnings for Python 3.
  • Added support for properly hashing undefined objects.
  • Fixed a bug with the title filter not working on already uppercase


(codename Translation, released on May 20th 2013)

  • Choice and prefix loaders now dispatch source and template lookup
    separately in order to work in combination with module loaders as
  • Fixed filesizeformat.
  • Added a non-silent option for babel extraction.
  • Added urlencode filter that automatically quotes values for
    URL safe usage with utf-8 as only supported encoding. If applications
    want to change this encoding they can override the filter.
  • Added keep-trailing-newline configuration to environments and
    templates to optionally preserve the final trailing newline.
  • Accessing last on the loop context no longer causes the iterator
    to be consumed into a list.
  • Python requirement changed: 2.6, 2.7 or >= 3.3 are required now,
    supported by same source code, using the "six" compatibility library.
  • Allow contextfunction and other decorators to be applied to __call__.
  • Added support for changing from newline to different signs in the wordwrap
  • Added support for ignoring memcache errors silently.
  • Added support for keeping the trailing newline in templates.
  • Added finer grained support for stripping whitespace on the left side
    of blocks.
  • Added map, select, reject, selectattr and rejectattr
  • Added support for loop.depth to figure out how deep inside a recursive
    loop the code is.
  • Disabled py_compile for pypy and python 3.

SQLAlchemy 0.7.9 -> 1.1.14


:include_notes_from: unreleased_11

.. changelog::


:released: August 3, 2017

.. changelog::


:released: July 24, 2017

.. change:: cache_order_sequence
:tags: feature, oracle, posgresql
:versions: 1.2.0b1

   Added new keywords :paramref:`.Sequence.cache` and
   :paramref:`.Sequence.order` to :class:`.Sequence`, to allow rendering
   of the CACHE parameter understood by Oracle and PostgreSQL, and the
   ORDER parameter understood by Oracle.  Pull request
   courtesy David Moore.

.. change:: 4033
:tags: bug, orm
🎟 4033
:versions: 1.2.0b2

   Fixed regression from 1.1.11 where adding additional non-entity
   columns to a query that includes an entity with subqueryload
   relationships would fail, due to an inspection added in 1.1.11 as a
   result of :ticket:`4011`.

.. change:: 4031
:tags: bug, orm
:versions: 1.2.0b2
🎟 4031

   Fixed bug involving JSON NULL evaluation logic added in 1.1 as part
   of :ticket:`3514` where the logic would not accommodate ORM
   mapped attributes named differently from the :class:`.Column`
   that was mapped.

.. change:: 4030
:tags: bug, orm
:versions: 1.2.0b2
🎟 4030

   Added ``KeyError`` checks to all methods within
   :class:`.WeakInstanceDict` where a check for ``key in dict`` is
   followed by indexed access to that key, to guard against a race against
   garbage collection that under load can remove the key from the dict
   after the code assumes its present, leading to very infrequent
   ``KeyError`` raises.

.. changelog::


:released: Monday, June 19, 2017

.. change:: 4012
:tags: bug, sql
🎟 4012
:versions: 1.2.0b1

   Fixed AttributeError which would occur in :class:`.WithinGroup`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.