Webapp2

Latest version: v2.5.2

Safety actively analyzes 629723 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 7

2.0

===========================
- Added support for the (not yet released) App Engine Python 2.7 SDK.

- Deprecated webapp2_extras.local_app. WSGIApplication is now thread-safe
by default when webapp2_extras.local is available.
webapp2_extras.local_app.WSGIApplication can still be imported, but it is
just an alias to webapp2.WSGIApplication (and a deprecation warning is
emitted when it is imported).

- Like DomainRoute, PathPrefixRoute now only tests the nested routes if the
prefix matches. So now it is not only convenient but matches smartly and
faster. ;)

- Added webapp2_extras.security, with security related helpers such as secure
password hashing tools.

- webapp2_extras.sessions:
- Now uses webapp2_extras.security.create_token() to generate session IDs
instead of uuid.
- Added 'backends' configuration: get_session() can now be called passing
a more convenient 'backend' key. Default ones are 'securecookie',
'datastore' and 'memcache'.

- get_build_routes() now yields (name, route) instead of simply route. This
will allow routes with nested routes to act as a proxy to build URIs.

- webapp2.urlunsplit() was removed from the public API.

- Variables names in routes must now look like python identifiers -
this means that they can no longer start with a number, like before.

- Removed support for _anchor in uri_for() -- the documented keyword is
_fragment.

- Removed support for handler functions receiving (request, response). The
correct arguments for function handlers are (request, *args, **kwargs).

- webapp2_extras.json:
- Fixed an issue with importing json on non-GAE environments (missing
absolute import).
- Now imports simplejson directly instead of using the one from Django,
since it is now included in the App Engine SDK (since version 1.4.2).

- Added WSGIApplication.clear_globals(). Instead of
app.set_globals(app=None, request=None), use app.clear_globals().

1.8.1

=============================
- Implemented an adapter mechanism to dispatch different kind of handlers:
webapp.RequestHandler, webapp2.RequestHandler and "view functions".
Instead of monkeypatching handlers (adding a 'factory' attribute),
handlers are wrapped by adapters that do the appropriate dispatch.
How handlers are adapted can be overridden using the convenience method
``set_adapter()`` from the Router class, but the common cases are covered.

- Function views now conveniently receive (request, *args, **kwargs), like
in Django. The previous arguments will work, but they are now deprecated
and will not be supported in the future. This is a major incompatibility
with previous versions but it feels a lot better than the previous
(request, response) behavior, as adapters make it easy to have custom
dispatch arguments using a unified API.
The webapp2.RequestHandler class remain unchanged and is instantiated with
(request, response).

1.8

===========================
- webap2_extras.i18n: the functions passed to I18nStore.set_locale_selector()
and I18nStore.set_timezone_selector() now receive (store, request) instead of
(request, store), for consistency with the router custom callables.

- webap2_extras.json:
- json is imported first trying direct simplejson, then built-in json
(for Python >= 2.6), then the one from django.utils (for App Engine).
- All convenience functions now receive *args, **kwargs to be passed to
encode()/decode().

- Added webapp2_extras.mako.

- Added webapp2.redirect_to.

- Added Request.blank() parameters compatible with WebOb >= 1.0: POST and
**kwargs.

- Increased compatibility with wsgiref.headers.Headers, used by
webapp.Response.

1.7.5

=============================
- Implemented methods from ``wsgiref.headers.Headers``, used by
webapp.Response.headers.

1.7.4

=============================
- Fixed bug in response.status_message.

1.7.3

=============================
- Routes can now only match specific schemes, e.g., 'http' or 'https'.

- Added a tutorial to use webapp2 outside of App Engine.

Page 3 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.