Routes

Latest version: v2.5.1

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

Scan your dependencies

Page 5 of 8

1.7.1

===============================
* Fixed bug with sub-domains from route defaults getting encoded to unicode
resulting in a unicode route which then caused url_for to throw an
exception.
* Removed duplicate assignment in map.resource. Patch by Mike Naberezny.
* Applied test patch fix for path checking. Thanks Mike Naberezny.
* Added additional checking of remaining URL, to properly swallow periods in
the appropriate context. Fixes 57.
* Added mapper.hardcode_names option which restricts url generation to the
named route during generation rather than using the routes default options
during generation.
* Fixed the special '_method' attribute not being recognized during POST
requests of Content-Type 'multipart/form-data'.

1.7

============================
* Fixed url_unquoting to only apply for strings.
* Added _encoding option to individual routes to toggle decoding/encoding on a
per route basis.
* Fixed route matching so that '.' and other special chars are only part of the
match should they not be followed by that character. Fixed regexp creation so
that route parts with '.' in them aren't matched properly. Fixes 48.
* Fixed Unicode decoding/encoding so that the URL decoding and encoding can be
set on the mapper with mapper.encoding. Fixes 40.
* Don't assume environ['CONTENT_TYPE'] always exists: it may be omitted
according to the WSGI PEP.
* Fixed Unicode decode/encoding of path_info dynamic/wildcard parts so that
PATH_INFO will stay a raw string as it should. Fixes 51.
* Fixed url_for (thus redirect_to) to throw an exception if a Unicode
string is returned as that's an invalid URL. Fixes 46.
* Fixed Routes middleware to only parse POST's if the content type is
application/x-www-form-urlencoded for a HTML form. This properly avoids
parsing wsgi.input when it doesn't need to be.

1.6.3

================================
* Fixed matching so that an attempt to match an empty path raises a
RouteException. Fixes 44.
* Added ability to use characters in URL's such as '-' and '_' in
map.resource. Patch by Wyatt Baldwin. Fixes 45.
* Updated Mapper.resource handling with name_prefix and path_prefix checking
to specify defaults. Also ensures that should either of them be set, they
override the prefixes should parent_resource be specified. Patch by Wyatt
Baldwin. Fixes 42.
* Added utf-8 decoding of incoming path arguments, with fallback to ignoring
them in the very rare cases a malformed request URL is sent. Patch from
David Smith.
* Fixed treatment of '' character as something that can be left off and
used in route paths. Found by Mike Orr.
* Added ability to specify parent resource to map.resource command. Patch from
Wyatt Baldwin.
* Fixed formatted route issue with map.resource when additional collection
methods are specified. Added unit tests to verify the collection methods
work properly.
* Updated URL parsing to properly use HTTP_HOST for hostname + port info before
falling back to SERVER_PORT and SERVER_NAME. Fixes 43.
* Added member_name and collection_name setting to Route object when made with
map.resource.
* Updated routes.middleware to make the Routes matched accessible as
environ['routes.route'].
* Updating mapper object to use thread local for request data (such as
environ) and middleware now deletes environ references at the end of the
request.
* Added explicit option to Routes and Mapper. Routes _explicit setting will
prevent the Route defaults from being implicitly set, while setting Mapper
to explicit will prevent Route implicit defaults and stop url_for from using
Route memory. Fixes 38.
* Updated config object so that the route is attached if possible.
* Adding standard logging usage with debug messages.
* Added additional test for normal '.' match and fixed new special matching to
match it properly. Thanks David Smith.
* Fixed hanging special char issue with 'special' URL chars at the end of a URL
that are missing the variable afterwards.
* Changed Routes generation and recognition to handle other 'special' URL chars
, . and ; as if they were /. This lets them be optionally left out of the
resulting generated URL. Feature requested by David Smith.
* Fixed lookahead assertion in regexp builder to properly handle two grouped
patterns in a row.
* Applied patch to generation and matching to handle Unicode characters
properly. Reported with patch by David Smith.

1.6.2

============================
* Fixed issue with method checking not properly handling different letter
cases in REQUEST_METHOD. Reported by Sean Davis.
* redirect_to now supports config.redirect returning a redirect, not just
raising one.

1.6.1

=============================
* Fixed zipsafe flag to be False.

1.6

=============================
* Fixed append_slash to take effect in the route generation itself instead of
relying on url_for function. Reported by ToddG.
* Added additional url_for tests to ensure map.resource generates proper named
routes.
* WARNING: Changed map.resource initialization to accept individual member and
collection names to generate proper singular and plural route names. Those
using map.resource will need to update their routes and url_for statements
accordingly.
* Added additional map.resource recognition tests.
* Added WSGI middleware that does route resolving using new `WSGI.org Routing
Vars Spec <http://wsgi.org/wsgi/Specifications/routing_args>`_.
* Added _absolute keyword option route connect to ignore SCRIPT_NAME settings.
Suggested by Ian Bicking.

Page 5 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.