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 #8

Merged
merged 5 commits into from
Mar 5, 2017
Merged

Initial Update #8

merged 5 commits into from
Mar 5, 2017

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Mar 5, 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:

Updates

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.

flask 0.12 » 0.12 PyPI | Changelog | Repo
jinja2 2.9.5 » 2.9.5 PyPI | Changelog | Homepage
jsbeautifier 1.6.11 » 1.6.11 PyPI | Changelog | Homepage
sqlalchemy 1.1.6 » 1.1.6 PyPI | Homepage
psycopg2 2.7 » 2.7 PyPI | Changelog | Homepage | Docs

Changelogs

flask -> 0.12

0.12


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.

0.11.2


Bugfix release, unreleased

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

0.11.1


Bugfix release, released on June 7th 2016.

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

0.11


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
    :attr:flask.Flask.test_client_class.
  • 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
    packages.
  • 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
    flask.run() 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
    loading.
  • 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
    Add JSONIFY_END_WITH_NEWLINE config variable pallets/flask#1262 -- this came up originally as a
    part of https://github.com/kennethreitz/httpbin/issues/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 datetime.date type (pull request
    1326).
  • 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.

0.10.2


(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
    correctly.
  • 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.

0.10.1


(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.

0.10


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
    called.
  • 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
    context.
  • 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
    greenlets.
  • 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.

0.9


Released on July 1st 2012, codename Campari.

  • The :func:flask.Request.on_json_loading_failed now returns a JSON formatted
    response by default.
  • The :func:flask.url_for function now can generate anchors to the
    generated links.
  • The :func:flask.url_for function now can also explicitly generate
    URL rules specific to a given HTTP method.
  • Logger now only returns the debug log setting if it was not set
    explicitly.
  • Unregister a circular dependency between the WSGI environment and
    the request object when shutting down the request. This means that
    environ werkzeug.request will be None after the response was
    returned to the WSGI server but has the advantage that the garbage
    collector is not needed on CPython to tear down the request unless
    the user created circular dependencies themselves.
  • Session is now stored after callbacks so that if the session payload
    is stored in the session you can still modify it in an after
    request callback.
  • The :class:flask.Flask class will avoid importing the provided import name
    if it can (the required first parameter), to benefit tools which build Flask
    instances programmatically. The Flask class will fall back to using import
    on systems with custom module hooks, e.g. Google App Engine, or when the
    import name is inside a zip archive (usually a .egg) prior to Python 2.7.
  • Blueprints now have a decorator to add custom template filters application
    wide, :meth:flask.Blueprint.app_template_filter.
  • The Flask and Blueprint classes now have a non-decorator method for adding
    custom template filters application wide,
    :meth:flask.Flask.add_template_filter and
    :meth:flask.Blueprint.add_app_template_filter.
  • The :func:flask.get_flashed_messages function now allows rendering flashed
    message categories in separate blocks, through a category_filter
    argument.
  • The :meth:flask.Flask.run method now accepts None for host and port
    arguments, using default values when None. This allows for calling run
    using configuration values, e.g. app.run(app.config.get('MYHOST'), app.config.get('MYPORT')), with proper behavior whether or not a config
    file is provided.
  • The :meth:flask.render_template method now accepts a either an iterable of
    template names or a single template name. Previously, it only accepted a
    single template name. On an iterable, the first template found is rendered.
  • Added :meth:flask.Flask.app_context which works very similar to the
    request context but only provides access to the current application. This
    also adds support for URL generation without an active request context.
  • View functions can now return a tuple with the first instance being an
    instance of :class:flask.Response. This allows for returning
    jsonify(error="error msg"), 400 from a view function.
  • :class:~flask.Flask and :class:~flask.Blueprint now provide a
    :meth:~flask.Flask.get_send_file_max_age hook for subclasses to override
    behavior of serving static files from Flask when using
    :meth:flask.Flask.send_static_file (used for the default static file
    handler) and :func:~flask.helpers.send_file. This hook is provided a
    filename, which for example allows changing cache controls by file extension.
    The default max-age for send_file and static files can be configured
    through a new SEND_FILE_MAX_AGE_DEFAULT configuration variable, which is
    used in the default get_send_file_max_age implementation.
  • Fixed an assumption in sessions implementation which could break message
    flashing on sessions implementations which use external storage.
  • Changed the behavior of tuple return values from functions. They are no
    longer arguments to the response object, they now have a defined meaning.
  • Added :attr:flask.Flask.request_globals_class to allow a specific class to
    be used on creation of the :data:~flask.g instance of each request.
  • Added required_methods attribute to view functions to force-add methods
    on registration.
  • Added :func:flask.after_this_request.
  • Added :func:flask.stream_with_context and the ability to push contexts
    multiple times without producing unexpected behavior.

0.8.1


Bugfix release, released on July 1st 2012

  • Fixed an issue with the undocumented flask.session module to not
    work properly on Python 2.5. It should not be used but did cause
    some problems for package managers.

0.8


Released on September 29th 2011, codename Rakija

  • Refactored session support into a session interface so that
    the implementation of the sessions can be changed without
    having to override the Flask class.
  • Empty session cookies are now deleted properly automatically.
  • View functions can now opt out of getting the automatic
    OPTIONS implementation.
  • HTTP exceptions and Bad Request errors can now be trapped so that they
    show up normally in the traceback.
  • Flask in debug mode is now detecting some common problems and tries to
    warn you about them.
  • Flask in debug mode will now complain with an assertion error if a view
    was attached after the first request was handled. This gives earlier
    feedback when users forget to import view code ahead of time.
  • Added the ability to register callbacks that are only triggered once at
    the beginning of the first request. (:meth:Flask.before_first_request)
  • Malformed JSON data will now trigger a bad request HTTP exception instead
    of a value error which usually would result in a 500 internal server
    error if not handled. This is a backwards incompatible change.
  • Applications now not only have a root path where the resources and modules
    are located but also an instance path which is the designated place to
    drop files that are modified at runtime (uploads etc.). Also this is
    conceptually only instance depending and outside version control so it's
    the perfect place to put configuration files etc. For more information
    see :ref:instance-folders.
  • Added the APPLICATION_ROOT configuration variable.
  • Implemented :meth:~flask.testing.TestClient.session_transaction to
    easily modify sessions from the test environment.
  • Refactored test client internally. The APPLICATION_ROOT configuration
    variable as well as SERVER_NAME are now properly used by the test client
    as defaults.
  • Added :attr:flask.views.View.decorators to support simpler decorating of
    pluggable (class-based) views.
  • Fixed an issue where the test client if used with the "with" statement did not
    trigger the execution of the teardown handlers.
  • Added finer control over the session cookie parameters.
  • HEAD requests to a method view now automatically dispatch to the get
    method if no handler was implemented.
  • Implemented the virtual :mod:flask.ext package to import extensions from.
  • The context preservation on exceptions is now an integral component of
    Flask itself and no longer of the test client. This cleaned up some
    internal logic and lowers the odds of runaway request contexts in unittests.

0.7.3


Bugfix release, release date to be decided

  • Fixed the Jinja2 environment's list_templates method not returning the
    correct names when blueprints or modules were involved.

0.7.2


Bugfix release, released on July 6th 2011

  • Fixed an issue with URL processors not properly working on
    blueprints.

0.7.1


Bugfix release, released on June 29th 2011

  • Added missing future import that broke 2.5 compatibility.
  • Fixed an infinite redirect issue with blueprints.

0.7


Released on June 28th 2011, codename Grappa

  • Added :meth:~flask.Flask.make_default_options_response
    which can be used by subclasses to alter the default
    behavior for OPTIONS responses.
  • Unbound locals now raise a proper :exc:RuntimeError instead
    of an :exc:AttributeError.
  • Mimetype guessing and etag support based on file objects is now
    deprecated for :func:flask.send_file because it was unreliable.
    Pass filenames instead or attach your own etags and provide a
    proper mimetype by hand.
  • Static file handling for modules now requires the name of the
    static folder to be supplied explicitly. The previous autodetection
    was not reliable and caused issues on Google's App Engine. Until
    1.0 the old behavior will continue to work but issue dependency
    warnings.
  • fixed a problem for Flask to run on jython.
  • added a PROPAGATE_EXCEPTIONS configuration variable that can be
    used to flip the setting of exception propagation which previously
    was linked to DEBUG alone and is now linked to either DEBUG or
    TESTING.
  • Flask no longer internally depends on rules being added through the
    add_url_rule function and can now also accept regular werkzeug
    rules added to the url map.
  • Added an endpoint method to the flask application object which
    allows one to register a callback to an arbitrary endpoint with
    a decorator.
  • Use Last-Modified for static file sending instead of Date which
    was incorrectly introduced in 0.6.
  • Added create_jinja_loader to override the loader creation process.
  • Implemented a silent flag for config.from_pyfile.
  • Added teardown_request decorator, for functions that should run at the end
    of a request regardless of whether an exception occurred. Also the behavior
    for after_request was changed. It's now no longer executed when an exception
    is raised. See :ref:upgrading-to-new-teardown-handling
  • Implemented :func:flask.has_request_context
  • Deprecated init_jinja_globals. Override the
    :meth:~flask.Flask.create_jinja_environment method instead to
    achieve the same functionality.
  • Added :func:flask.safe_join
  • The automatic JSON request data unpacking now looks at the charset
    mimetype parameter.
  • Don't modify the session on :func:flask.get_flashed_messages if there
    are no messages in the session.
  • before_request handlers are now able to abort requests with errors.
  • it is not possible to define user exception handlers. That way you can
    provide custom error messages from a central hub for certain errors that
    might occur during request processing (for instance database connection
    errors, timeouts from remote resources etc.).
  • Blueprints can provide blueprint specific error handlers.
  • Implemented generic :ref:views (class-based views).

0.6.1


Bugfix release, released on December 31st 2010

  • Fixed an issue where the default OPTIONS response was
    not exposing all valid methods in the Allow header.
  • Jinja2 template loading syntax now allows "./" in front of
    a template load path. Previously this caused issues with
    module setups.
  • Fixed an issue where the subdomain setting for modules was
    ignored for the static folder.
  • Fixed a security problem that allowed clients to download arbitrary files
    if the host server was a windows based operating system and the client
    uses backslashes to escape the directory the files where exposed from.

0.6


Released on July 27th 2010, codename Whisky

  • after request functions are now called in reverse order of
    registration.
  • OPTIONS is now automatically implemented by Flask unless the
    application explicitly adds 'OPTIONS' as method to the URL rule.
    In this case no automatic OPTIONS handling kicks in.
  • static rules are now even in place if there is no static folder
    for the module. This was implemented to aid GAE which will
    remove the static folder if it's part of a mapping in the .yml
    file.
  • the :attr:~flask.Flask.config is now available in the templates
    as config.
  • context processors will no longer override values passed directly
    to the render function.
  • added the ability to limit the incoming request data with the
    new MAX_CONTENT_LENGTH configuration value.
  • the endpoint for the :meth:flask.Module.add_url_rule method
    is now optional to be consistent with the function of the
    same name on the application object.
  • added a :func:flask.make_response function that simplifies
    creating response object instances in views.
  • added signalling support based on blinker. This feature is currently
    optional and supposed to be used by extensions and applications. If
    you want to use it, make sure to have blinker_ installed.
  • refactored the way URL adapters are created. This process is now
    fully customizable with the :meth:~flask.Flask.create_url_adapter
    method.
  • modules can now register for a subdomain instead of just an URL
    prefix. This makes it possible to bind a whole module to a
    configurable subdomain.

.. _blinker: https://pypi.python.org/pypi/blinker

0.5.2


Bugfix Release, released on July 15th 2010

  • fixed another issue with loading templates from directories when
    modules were used.

0.5.1


Bugfix Release, released on July 6th 2010

  • fixes an issue with template loading from directories when modules
    where used.

0.5


Released on July 6th 2010, codename Calvados

  • fixed a bug with subdomains that was caused by the inability to
    specify the server name. The server name can now be set with
    the SERVER_NAME config key. This key is now also used to set
    the session cookie cross-subdomain wide.
  • autoescaping is no longer active for all templates. Instead it
    is only active for .html, .htm, .xml and .xhtml.
    Inside templates this behavior can be changed with the
    autoescape tag.
  • refactored Flask internally. It now consists of more than a
    single file.
  • :func:flask.send_file now emits etags and has the ability to
    do conditional responses builtin.
  • (temporarily) dropped support for zipped applications. This was a
    rarely used feature and led to some confusing behavior.
  • added support for per-package template and static-file directories.
  • removed support for create_jinja_loader which is no longer used
    in 0.5 due to the improved module support.
  • added a helper function to expose files from any directory.

0.4


Released on June 18th 2010, codename Rakia

  • added the ability to register application wide error handlers
    from modules.
  • :meth:~flask.Flask.after_request handlers are now also invoked
    if the request dies with an exception and an error handling page
    kicks in.
  • test client has not the ability to preserve the request context
    for a little longer. This can also be used to trigger custom
    requests that do not pop the request stack for testing.
  • because the Python standard library caches loggers, the name of
    the logger is configurable now to better support unittests.
  • added TESTING switch that can activate unittesting helpers.
  • the logger switches to DEBUG mode now if debug is enabled.

0.3.1


Bugfix release, released on May 28th 2010

  • fixed a error reporting bug with :meth:flask.Config.from_envvar
  • removed some unused code from flask
  • release does no longer include development leftover files (.git
    folder for themes, built documentation in zip and pdf file and
    some .pyc files)

0.3


Released on May 28th 2010, codename Schnaps

  • added support for categories for flashed messages.
  • the application now configures a :class:logging.Handler and will
    log request handling exceptions to that logger when not in debug
    mode. This makes it possible to receive mails on server errors
    for example.
  • added support for context binding that does not require the use of
    the with statement for playing in the console.
  • the request context is now available within the with statement making
    it possible to further push the request context or pop it.
  • added support for configurations.

0.2


Released on May 12th 2010, codename Jägermeister

  • various bugfixes
  • integrated JSON support
  • added :func:~flask.get_template_attribute helper function.
  • :meth:~flask.Flask.add_url_rule can now also register a
    view function.
  • refactored internal request dispatching.
  • server listens on 127.0.0.1 by default now to fix issues with chrome.
  • added external URL support.
  • added support for :func:~flask.send_file
  • module support and internal request handling refactoring
    to better support pluggable applications.
  • sessions can be set to be permanent now on a per-session basis.
  • better error reporting on missing secret keys.
  • added support for Google Appengine.

0.1


First public preview release.

jinja2 -> 2.9.5

2.9.5


(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
    regression.
  • 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)

2.9.4


(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.

2.9.3


(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.

2.9.2


(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.
    (642)

2.9.1


(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.

2.9


(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
    values.
  • 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.

2.8.2


(bugfix release, unreleased)

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

2.8.1


(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.

2.8


(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.

2.7.3


(bugfix release, released on June 6th 2014)

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

2.7.2


(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: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734747

2.7.1


(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
    strings.

2.7


(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
    advertised.
  • 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
    filter.
  • 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
    filters.
  • 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.

2.6


(codename Convolution, released on July 24th 2011)

  • internal attributes now raise an internal attribute error now instead
    of returning an undefined. This fixes problems when passing undefined
    objects to Python semantics expecting APIs.
  • traceback support now works properly for PyPy. (Tested with 1.4)
  • implemented operator intercepting for sandboxed environments. This
    allows application developers to disable builtin operators for better
    security. (For instance limit the mathematical operators to actual
    integers instead of longs)
  • groupby filter now supports dotted notation for grouping by attributes
    of attributes.
  • scoped blocks now properly treat toplevel assignments and imports.
    Previously an import suddenly "disappeared" in a scoped block.
  • automatically detect newer Python interpreter versions before loading code
    from bytecode caches to prevent segfaults on invalid opcodes. The segfault
    in earlier Jinja2 versions here was not a Jinja2 bug but a limitation in
    the underlying Python interpreter. If you notice Jinja2 segfaulting in
    earlier versions after an upgrade of the Python interpreter you don't have
    to upgrade, it's enough to flush the bytecode cache. This just no longer
    makes this necessary, Jinja2 will automatically detect these cases now.
  • the sum filter can now sum up values by attribute. This is a backwards
    incompatible change. The argument to the filter previously was the
    optional starting index which defaults to zero. This now became the
    second argument to the function because it's rarely used.
  • like sum, sort now also makes it possible to order items by attribute.
  • like sum and sort, join now also is able to join attributes of objects
    as string.
  • the internal eval context now has a reference to the environment.
  • added a mapping test to see if an object is a dict or an object with
    a similar interface.

2.5.5


(re-release of 2.5.4 with built documentation removed for filesize.
Released on October 18th 2010)

  • built documentation is no longer part of release.

2.5.4


(bugfix release, released on October 17th 2010)

  • Fixed extensions not loading properly with overlays.
  • Work around a bug in cpython for the debugger that causes segfaults
    on 64bit big-endian architectures.

2.5.3


(bugfix release, released on October 17th 2010)

  • fixed an operator precedence error introduced in 2.5.2. Statements
    like "-foo.bar" had their implicit parentheses applied around the
    first part of the expression ("(-foo).bar") instead of the more
    correct "-(foo.bar)".

2.5.2


(bugfix release, released on August 18th 2010)

  • improved setup.py script to better work with assumptions people
    might still have from it (--with-speedups).
  • fixed a packaging error that excluded the new debug support.

2.5.1


(bugfix release, released on August 17th 2010)

  • StopIteration exceptions raised by functions called from templates
    are now intercepted and converted to undefineds. This solves a
    lot of debugging grief. (StopIteration is used internally to
    abort template execution)
  • improved performance of macro calls slightly.
  • babel extraction can now properly extract newstyle gettext calls.
  • using the variable num in newstyle gettext for something else
    than the pluralize count will no longer raise a :exc:KeyError.
  • removed builtin markup class and switched to markupsafe. For backwards
    compatibility the pure Python implementation still exists but is
    pulled from markupsafe by the Jinja2 developers. The debug support
    went into a separate feature called "debugsupport" and is disabled
    by default because it is only relevant for Python 2.4
  • fixed an issue with unary operators having the wrong precedence.

2.5


(codename Incoherence, released on May 29th 2010)

  • improved the sort filter (should have worked like this for a
    long time) by adding support for case insensitive searches.
  • fixed a bug for getattribute constant folding.
  • support for newstyle gettext translations which result in a
    nicer in-template user interface and more consistent
    catalogs. (:ref:newstyle-gettext)
  • it's now possible to register extensions after an environment
    was created.

2.4.1


(bugfix release, released on April 20th 2010)

  • fixed an error reporting bug for undefineds.

2.4


(codename Correlation, released on April 13th 2010)

  • the environment template loading functions now transparently
    pass through a template object if it was passed to it. This
    makes it possible to import or extend from a template object
    that was passed to the template.
  • added a :class:ModuleLoader that can load templates from
    precompiled sources. The environment now features a method
    to compile the templates from a configured loader into a zip
    file or folder.
  • the _speedups C extension now supports Python 3.
  • added support for autoescaping toggling sections and support
    for evaluation contexts (:ref:eval-context).
  • extensions have a priority now.

2.3.1


(bugfix release, released on February 19th 2010)

  • fixed an error reporting bug on all python versions
  • fixed an error reporting bug on Python 2.4

2.3


(3000 Pythons, released on February 10th 2010)

  • fixes issue with code generator that causes unbound variables
    to be generated if set was used in if-blocks and other small
    identifier problems.
  • include tags are now able to select between multiple templates
    and take the first that exists, if a list of templates is
    given.
  • fixed a problem with having call blocks in outer scopes that
    have an argument that is also used as local variable in an
    inner frame (360).
  • greatly improved error message reporting (339)
  • implicit tuple expressions can no longer be totally empty.
    This change makes {% if %}...{% endif %} a syntax error
    now. (364)
  • added support for translator comments if extracted via babel.
  • added with-statement extension.
  • experimental Python 3 support.

2.2.1


(bugfix release, released on September 14th 2009)

  • fixes some smaller problems for Jinja2 on Jython.

2.2


(codename Kong, released on September 13th 2009)

  • Include statements can now be marked with ignore missing to skip
    non existing templates.
  • Priority of not raised. It's now possible to write not foo in bar
    as an alias to foo not in bar like in python. Previously the grammar
    required parentheses (not (foo in bar)) which was odd.
  • Fixed a bug that caused syntax errors when defining macros or using the
    {% call %} tag inside loops.
  • Fixed a bug in the parser that made {{ foo[1, 2] }} impossible.
  • Made it possible to refer to names from outer scopes in included templates
    that were unused in the callers frame (327)
  • Fixed a bug that caused internal errors if names where used as iteration
    variable and regular variable after the loop if that variable was unused
    before the loop. (331)
  • Added support for optional scoped modifier to blocks.
  • Added support for line-comments.
  • Added the meta module.
  • Renamed (undocumented) attribute "overlay" to "overlayed" on the
    environment because it was clashing with a method of the same name.
  • speedup extension is now disabled by default.

2.1.1


(Bugfix release)

  • Fixed a translation error caused by looping over empty recursive loops.

2.1


(codename Yasuzō, released on November 23rd 2008)

  • fixed a bug with nested loops and the special loop variable. Before the
    change an inner loop overwrote the loop variable from the outer one after
    iteration.
  • fixed a bug with the i18n extension that caused the explicit pluralization
    block to look up the wrong variable.
  • fixed a limitation in the lexer that made {{ foo.0.0 }} impossible.
  • index based subscribing of variables with a constant value returns an
    undefined object now instead of raising an index error. This was a bug
    caused by eager optimizing.
  • the i18n extension looks up foo.ugettext now followed by foo.gettext
    if an translations object is installed. This makes dealing with custom
    translations classes easier.
  • fixed a confusing behavior with conditional extending. loops were partially
    executed under some conditions even though they were not part of a visible
    area.
  • added sort filter that works like dictsort but for arbitrary sequences.
  • fixed a bug with empty statements in macros.
  • implemented a bytecode cache system. (:ref:bytecode-cache)
  • the template context is now weakref-able
  • inclusions and imports "with context" forward all variables now, not only
    the initial context.
  • added a cycle helper called cycler.
  • added a joining helper called joiner.
  • added a compile_expression method to the environment that allows compiling
    of Jinja expressions into callable Python objects.
  • fixed an escaping bug in urlize

2.0


(codename jinjavitus, released on July 17th 2008)

  • the subscribing of objects (looking up attributes and items) changed from
    slightly. It's now possible to give attributes or items a higher priority
    by either using dot-notation lookup or the bracket syntax. This also
    changed the AST slightly. Subscript is gone and was replaced with
    :class:~jinja2.nodes.Getitem and :class:~jinja2.nodes.Getattr.

For more information see :ref:the implementation details <notes-on-subscriptions>.

  • added support for preprocessing and token stream filtering for extensions.
    This would allow extensions to allow simplified gettext calls in template
    data and something similar.
  • added :meth:jinja2.environment.TemplateStream.dump.
  • added missing support for implicit string literal concatenation.
    {{ "foo" "bar" }} is equivalent to {{ "foobar" }}
  • else is optional for conditional expressions. If not given it evaluates
    to false.
  • improved error reporting for undefined values by providing a position.
  • filesizeformat filter uses decimal prefixes now per default and can be
    set to binary mode with the second parameter.
  • fixed bug in finalizer

2.0rc1


(no codename, released on June 9th 2008)

  • first release of Jinja2

jsbeautifier -> 1.6.11

1.6.11

Description
Reverted 1117 - Preserve newlines broken

Closed Issues

1.6.10

Description
Added preserver_newlines to css beautifier

Closed Issues

1.6.9

Description

  • Fixed html formatting issue with attribute wrap (Thanks, HookyQR!)
  • Fixed python package publishing

Closed Issues

  • Wrong HTML beautification starting with v1.6.5 (1115)
  • Ignore linebreak when meet handlebar (1104)
  • Lines are not un-indented correctly when attributes are wrapped (1103)
  • force-aligned is not aligned when indenting with tabs (1102)
  • Python package fails to publish (1101)
  • Explaination of 'operator_position' is absent from README.md (1047)

1.6.8

Description

  • Fixed a batch of comment and semicolon-less code bugs

Closed Issues

  • Incorrect indentation after loop with comment (1090)
  • Extra newline is inserted after beautifying code with anonymous function (1085)
  • end brace with next comment line make bad indent (1043)
  • Javascript comment in last line doesn't beautify well (964)
  • indent doesn't work with comment (jsdoc) (913)
  • Wrong indentation, when new line between chained methods (892)
  • Comments in a non-semicolon style have extra indent (815)
  • [bug] Incorrect indentation due to commented line(s) following a function call with a function argument. (713)
  • Wrong indent formatting (569)

1.6.7

Description
Added content_unformatted option (Thanks arai-a)

Closed Issues

  • HTML pre code indentation (928)
  • Beautify script/style tags but ignore their inner JS/CSS content (906)

1.6.6

Description

  • Added support for editorconfig from stdin
  • Added js-beautify to cdnjs
  • Fixed CRLF to LF for HTML and CSS on windows
  • Added inheritance/overriding to config format (Thanks DaniGuardiola and HookyQR)
  • Added force-align to wrap-attributes (Thanks Lukinos)
  • Added force-expand-multiline to wrap-attributes (Thanks tobias-zucali)
  • Added preserve-inline as independent brace setting (Thanks Coburn37)
  • Fixed handlebars with angle-braces (Thanks mmsqe)

Closed Issues

  • Wrong indentation for comment after nested unbraced control constructs (1079)
  • Should prefer breaking the line after operator ? instead of before operator < (1073)
  • New option "force-expand-multiline" for "wrap_attributes" (1070)
  • Breaks if html file starts with comment (1068)
  • collapse-preserve-inline restricts users to collapse brace_style (1057)
  • Parsing failure on numbers with "e" (1054)
  • Issue with Browser Instructions (1053)
  • Add preserve inline function for expand style braces (1052)
  • Update years in LICENSE (1038)
  • JS. Switch with template literals. Unexpected indentation. (1030)
  • The object with spread object formatted not correctly (1023)
  • Bad output generator function in class (1013)
  • Support editorconfig for stdin (1012)
  • Publish to cdnjs (992)
  • breaks if handlebars comments contain handlebars tags (930)
  • Using jsbeautifyrc is broken (929)
  • Option to put HTML attributes on their own lines, aligned (916)
  • Erroneously changes CRLF to LF on Windows in HTML and CSS (899)
  • Weird space in {get } vs { normal } (888)
  • Bad for-of formatting with constant Array (875)
  • Problems with filter property in css and scss (755)
  • Add "collapse-one-line" option for non-collapse brace styles (487)

1.6.4

Description

  • Fixed JSX multi-line root element handling
  • Fixed CSS Combinator spacing (NOTE: use space_around_combinator option)
  • Fixed (more) CSS pseudo-class and pseudo-element selectors (Thanks Konamiman!)
  • Fixed Shorthand generator functions and yield* (Thanks jgeurts!)
  • Added EditorConfig support (Thanks ethanluoyc!)
  • Added indent_body_inner_html and indent_head_inner_html (Thanks spontaliku-softaria!)
  • Added js-beautify to https://cdn.rawgit.com (Thanks zxqfox)

Closed Issues

  • css-beautify sibling combinator space issue (1001)
  • Bug: Breaks when the source code it found an unclosed multiline comment. (996)
  • CSS: Preserve white space before pseudo-class and pseudo-element selectors (985)
  • Spelling error in token definition (984)
  • collapse-preserve-inline does not preserve simple, single line ("return") statements (982)
  • Publish the library via cdn (971)
  • Bug with css calc() function (957)
  • &:first-of-type:not(:last-child) when prettified insert erroneous white character (952)
  • Shorthand generator functions are formatting strangely (941)
  • Add handlebars support on cli for html (935)
  • Do not put a space within yield* generator functions. (920)
  • Possible to add an indent_inner_inner_html option? (Prevent indenting second-level tags) (917)
  • Messing up jsx formatting (914)
  • Bug report: Closing 'body' tag isn't formatted correctly (900)
  • { throw … } not working with collapse-preserve-inline (898)
  • ES6 concise method not propely indented (889)
  • CSS beautify changing symantics (883)
  • Dojo unsupported script types. (874)
  • Readme version comment (868)
  • Extra space after pseudo-elements within :not() (618)
  • space in media queries after colon &: selectors (565)
  • Integrating editor config (551)
  • Preserve short expressions/statements on single line (338)

1.6.3

Description
Bug fixes

Closed Issues

  • CLI broken when output path is not set (933)
  • huge memory leak (909)
  • don't print unpacking errors on stdout (python) (884)
  • Fix incomplete list of non-positionable operators (python lib) (878)
  • Fix Issue 844 (873)
  • assignment exponentiation operator (864)
  • Bug in Less mixins (844)
  • Can't Nest Conditionals (680)
  • ternary operations (670)
  • Support newline before logical or ternary operator (605)
  • Provide config files for format and linting (336)

1.6.2

Description

Closed Issues

  • Add missing 'collapse-preserve-inline' option to js module (861)

1.6.1

Description

1.6.0

Description

  • Inline/short object and json preservation (all rejoice!)
  • ES6 annotations, module import/export, arrow functions, concise methods, and more
  • JSX spread attributes
  • HTML wrap attributes, inline element fixes, doctype and php fixes
  • Test framework hardening
  • Windows build fixed and covered by appveyor continuous integration

Closed Issues

  • Individual tests pollute options object (855)
  • Object attribute assigned fat arrow function with implicit return of a ternary causes next line to indent (854)
  • Treat php tags as single in html (850)
  • Read piped input by default (849)
  • Replace makefile dependency with bash script (848)
  • list of HTML inline elements incomplete; wraps inappropriately (840)
  • Beautifying bracket-less if/elses (838)
  • <col> elements within a <colgroup> are getting indented incorrectly (836)
  • single attribute breaks jsx beautification (834)
  • Improve Python packaging (831)
  • Erroneously changes CRLF to LF on Windows. (829)
  • Can't deal with XHTML5 (828)
  • HTML after PHP is indented (826)
  • exponentiation operator (825)
  • Add support for script type "application/ld+json" (821)
  • package.json: Remove "preferGlobal" option (820)
  • Don't use array.indexOf() to support legacy browsers (816)
  • ES6 Object Shortand Indenting Weirdly Sometimes (810)
  • Implicit Return Function on New Line not Preserved (806)
  • Misformating "0b" Binary Strings (803)
  • Beautifier breaks ES6 nested template strings (797)
  • Misformating "0o" Octal Strings (792)
  • Do not

@ajinabraham ajinabraham merged commit d209684 into master Mar 5, 2017
@ajinabraham ajinabraham deleted the pyup-initial-update branch March 5, 2017 07:22
@devinrhode2
Copy link

Does NodeJsScan work with experimental babel syntax? I am trying to use optional chaining but getting a syntax error. I see mentions of "babel extraction" in this thread, which appear to be commit messages, but searching this repo for "babel" shows nothing.

@devinrhode2
Copy link

I see jsbeautifier is being used and probably the piece that would need to use babel for parsing javascript... I think it'd be easier to use prettier+babel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants