comparison planemo/lib/python3.7/site-packages/Routes-2.4.1.dist-info/DESCRIPTION.rst @ 0:d30785e31577 draft

"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author guerler
date Fri, 31 Jul 2020 00:18:57 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:d30785e31577
1 Routes is a Python re-implementation of the Rails routes system for mapping
2 URL's to Controllers/Actions and generating URL's. Routes makes it easy to
3 create pretty and concise URL's that are RESTful with little effort.
4
5 Speedy and dynamic URL generation means you get a URL with minimal cruft
6 (no big dangling query args). Shortcut features like Named Routes cut down
7 on repetitive typing.
8
9 See `the documentation for installation and usage of Routes <http://readthedocs.org/docs/routes/en/latest/>`_.
10
11 .. image:: https://secure.travis-ci.org/bbangert/routes.png?branch=master
12 :alt: Build Status
13 :target: https://secure.travis-ci.org/bbangert/routes
14
15
16 Routes Changelog
17 %%%%%%%%%%%%%%%%
18
19 Release 2.4.0 (January 1, 2017)
20 ===============================
21
22 * Release as a universal wheel. PR #75.
23 * Convert readthedocs links for their .org -> .io migration for hosted projects. PR #67.
24
25
26 Release 2.3.1 (March 30, 2016)
27 ==============================
28 * Backwards compatability fix - connect should work with mandatory
29 routename and optional path. Patch by Davanum Srinivas (PR #65).
30
31 Release 2.3 (March 28, 2016)
32 ============================
33 * Fix sub_domain equivalence check. Patch by Nikita Uvarov
34 * Add support for protocol-relative URLs generation (i.e. starting with double
35 slash ``//``). PR #60. Patch by Sviatoslav Sydorenko.
36 * Add support for the ``middleware`` extra requirement, making possible to
37 depend on ``webob`` optionally. PR #59. Patch by Sviatoslav Sydorenko.
38 * Fix matching of an empty string route, which led to exception in earlier
39 versions. PR #58. Patch by Sviatoslav Sydorenko.
40 * Add support for the ``requirements`` option when using
41 mapper.resource to create routes. PR #57. Patch by Sean Dague.
42 * Concatenation fix when using submappers with path prefixes. Multiple
43 submappers combined the path prefix inside the controller argument in
44 non-obvious ways. The controller argument will now be properly carried
45 through when using submappers. PR #28.
46
47 Release 2.2 (July 21, 2015)
48 ===========================
49 * Fix Python 3 support. Patch by Victor Stinner.
50
51 Release 2.1 (January 17, 2015)
52 ==============================
53 * Fix 3 other route matching groups in route.py to use anonymous groups for
54 optional sections to avoid exceeding regex limits. Fixes #15.
55 * Printing a mapper now includes the Controller/action parameters from the
56 route. Fixes #11.
57 * Fix regression that didn't allow passing in params 'host', 'protocol', or
58 'anchor'. They can now be passed in with a trailing '_' as was possible
59 before commit d1d1742903fa5ca24ef848a6ae895303f2661b2a. Fixes #7.
60 * URL generation with/without SCRIPT_NAME was resulting in the URL cache
61 failing to return the appropriate cached URL generation. The URL cache
62 should always include the SCRIPT_NAME, even if its empty, in the cache
63 to avoid this, and now does. Fixes #6.
64 * Extract Route creation into separate method in Mapper. Subclasses of Route
65 can be created by Mappers now.
66 * Use the first X_FORWARDED_FOR value if there are multiple proxies in the
67 path. Fixes #5.
68
69 Release 2.0 (November 17, 2013)
70 ===============================
71 * Python 3.2/3.3 Support. Fixes Issue #2. Thanks to Alejandro Sánchez for
72 the pull request!
73
74 Release 1.13 (March 12, 2012)
75 =============================
76 * Fix bug with dots forcing extension by default. The portion with the dot can
77 now be recognized. Patch by Michael Basnight.
78
79 Release 1.12.3 (June 5, 2010)
80 =============================
81 * Fix bug with URLGenerator not properly including SCRIPT_NAME when generating
82 URL's and the singleton is not present.
83
84 Release 1.12.2 (May 5, 2010)
85 ============================
86 * Fix bug with routes URLGenerator not properly including SCRIPT_NAME when
87 generating qualified URL's.
88
89 Release 1.12.1 (March 11, 2010)
90 ===============================
91 * Fix bug with routes not generating URL's with callables in defaults.
92 * Fix bug with routes not handling sub-domain defaults during generation.
93
94 Release 1.12 (February 28, 2010)
95 ================================
96 * Split up the Routes docs.
97 * Fix bug with relative URL's using qualified merging host and URL without
98 including the appropriate slash. Fixes #13.
99 * Fix bug with mapper.extend and Routes modifying their original args.
100 Fixes #24.
101 * Fix url.current() not returning current args when explicit is True.
102 * Added explicit way to directly use the Mapper to match with environ.
103 * Fix bug with improper len placement for submapper.
104 * Adding regular expression builder for entire regexp for faster rejection
105 in a single regexp match should none of the routes match.
106 * Give Mapper a tabular string representation.
107 * Make SubMapper objects nestable and add route-generation helpers.
108 * Add SubMapper-based collections.
109 * Make the deprecated Mapper.minimization False (disabled) by default.
110 * Make the mapper explicit (true) by default.
111
112 Release 1.11 (September 28, 2009)
113 =================================
114 * Extensive documentation rewrite.
115 * Added Mapper.extend function that allows one to add lists of Routes objects
116 to the mapper in one batch, optionally with a path_prefix.
117 * Added Mapper.submapper function that returns a SubMapper object to enable
118 easier declaration of routes that have multiple keyword argument options
119 in common.
120 * Mapper controller_scan argument now handles None, and lists of controller
121 names in addition to a callable.
122 * Route object now takes a name parameter, which is the name it responds to.
123 This name is automatically added when called by using Mapper's connect
124 class method.
125 * Added optional LRU object for use with Routes when URL's change too often
126 for the Routes urlcache dict to be a viable option.
127
128 Release 1.10.3 (February 8, 2009)
129 =================================
130 * Tweak to use WebOb Request rather than Paste.
131 * Performance tweaks for URL recognition.
132 * Bugfix for routes.middleware not re.escaping the path_info before moving it
133 to the script name.
134
135 Release 1.10.2 (January 11, 2009)
136 =================================
137 * Bugfix for unicode encoding problems with non-minimized Route generation.
138 Spotted by Wichert Akkerman.
139 * Bugfix for when environ is {} in unit tests.
140
141 Release 1.10.1 (September 27, 2008)
142 ===================================
143 * Removing LRU cache due to performance and threading issues. Cache does hit
144 a max-size for the given routes.
145
146 Release 1.10 (September 24, 2008)
147 =================================
148 * Adding LRU cache instead of just dict for caching generated routes. This
149 avoids slow memory leakage over long-running and non-existent route
150 generation.
151 * Adding URLGenerator object.
152 * Adding redirect routes.
153 * Static routes can now interpolate variable parts in the path if using {}
154 variable part syntax.
155 * Added sub_domain condition option to accept False or None, to require that
156 there be no sub-domain provided for the route to match.
157
158 Release 1.9.2 (July 8, 2008)
159 ============================
160 * Fixed bug in url_for which caused it to return a literal when it shouldn't
161 have.
162
163 Release 1.9.1 (June 28, 2008)
164 =============================
165 * Fixed bug in formatted route recognition with formatting being absorbed
166 into the id.
167
168 Release 1.9 (June 12, 2008)
169 ===========================
170 * Fix undefined arg bug in url_for.
171 * Fixed bug with url_for not working properly outside of a request when
172 sub-domains are active. Thanks Pavel Skvazh.
173 * Add non-minimization option to Routes and the Mapper for generation and
174 recognition.
175 * Add Routes 2.0 style syntax for making routes and regexp. For example, this
176 route will now work: '{controller}/{action}/{id}'.
177 * Fixed Routes to not use quote_plus when making URL's.
178 * WARNING: Mapper now comes with hardcode_names set to True by default. This
179 means routes generated by name must work for the URL.
180 * Actually respect having urlcache disabled.
181 * WARNING: Calling url_for with a set of args that returns None now throws an
182 exception. Code that previously checked to see if a url could be made must
183 be updated accordingly.
184 * Updated url_for to return url in a literal for use in templating that may
185 try to escape it again.
186 * Added option to use X_FORWARDED_PROTO for proxying behind https to work
187 easier.
188 * Fixed map.resource to be less restrictive on id than just spaces.
189 * Fixed Mapper.create_regs not being thread safe, particularly when
190 always_scan=True.
191
192 Release 1.8 (March 28, 2008)
193 ============================
194 * Fixed bug of map.resource not allowing spaces in id.
195 * Fixed url generation to properly handle unicode defaults in addition to
196 unicode arguments.
197 * Fixed url_for to handle lists as keyword args when generating query
198 parameters.
199 * WARNING: Changed map.resource to not use ';', for actions, but the
200 normal '/'. This means that formatted URL's will also now have the format
201 come AFTER the action. Ie: /messsages/4.xml;rss -> /messages/4/rss.xml
202
203 Release 1.7.3 (May 28th, 2008)
204 ==============================
205 * Fixed triple escaping bug, since WSGI servers are responsible for basic
206 unescaping.
207
208 Release 1.7.2 (Feb. 27th, 2008)
209 ===============================
210 * Fixed bug with keyword args not being coerced to raw string properly.
211
212 Release 1.7.1 (Nov. 16th, 2007)
213 ===============================
214 * Fixed bug with sub-domains from route defaults getting encoded to unicode
215 resulting in a unicode route which then caused url_for to throw an
216 exception.
217 * Removed duplicate assignment in map.resource. Patch by Mike Naberezny.
218 * Applied test patch fix for path checking. Thanks Mike Naberezny.
219 * Added additional checking of remaining URL, to properly swallow periods in
220 the appropriate context. Fixes #57.
221 * Added mapper.hardcode_names option which restricts url generation to the
222 named route during generation rather than using the routes default options
223 during generation.
224 * Fixed the special '_method' attribute not being recognized during POST
225 requests of Content-Type 'multipart/form-data'.
226
227 Release 1.7 (June 8th, 2007)
228 ============================
229 * Fixed url_unquoting to only apply for strings.
230 * Added _encoding option to individual routes to toggle decoding/encoding on a
231 per route basis.
232 * Fixed route matching so that '.' and other special chars are only part of the
233 match should they not be followed by that character. Fixed regexp creation so
234 that route parts with '.' in them aren't matched properly. Fixes #48.
235 * Fixed Unicode decoding/encoding so that the URL decoding and encoding can be
236 set on the mapper with mapper.encoding. Fixes #40.
237 * Don't assume environ['CONTENT_TYPE'] always exists: it may be omitted
238 according to the WSGI PEP.
239 * Fixed Unicode decode/encoding of path_info dynamic/wildcard parts so that
240 PATH_INFO will stay a raw string as it should. Fixes #51.
241 * Fixed url_for (thus redirect_to) to throw an exception if a Unicode
242 string is returned as that's an invalid URL. Fixes #46.
243 * Fixed Routes middleware to only parse POST's if the content type is
244 application/x-www-form-urlencoded for a HTML form. This properly avoids
245 parsing wsgi.input when it doesn't need to be.
246
247 Release 1.6.3 (April 10th, 2007)
248 ================================
249 * Fixed matching so that an attempt to match an empty path raises a
250 RouteException. Fixes #44.
251 * Added ability to use characters in URL's such as '-' and '_' in
252 map.resource. Patch by Wyatt Baldwin. Fixes #45.
253 * Updated Mapper.resource handling with name_prefix and path_prefix checking
254 to specify defaults. Also ensures that should either of them be set, they
255 override the prefixes should parent_resource be specified. Patch by Wyatt
256 Baldwin. Fixes #42.
257 * Added utf-8 decoding of incoming path arguments, with fallback to ignoring
258 them in the very rare cases a malformed request URL is sent. Patch from
259 David Smith.
260 * Fixed treatment of '#' character as something that can be left off and
261 used in route paths. Found by Mike Orr.
262 * Added ability to specify parent resource to map.resource command. Patch from
263 Wyatt Baldwin.
264 * Fixed formatted route issue with map.resource when additional collection
265 methods are specified. Added unit tests to verify the collection methods
266 work properly.
267 * Updated URL parsing to properly use HTTP_HOST for hostname + port info before
268 falling back to SERVER_PORT and SERVER_NAME. Fixes #43.
269 * Added member_name and collection_name setting to Route object when made with
270 map.resource.
271 * Updated routes.middleware to make the Routes matched accessible as
272 environ['routes.route'].
273 * Updating mapper object to use thread local for request data (such as
274 environ) and middleware now deletes environ references at the end of the
275 request.
276 * Added explicit option to Routes and Mapper. Routes _explicit setting will
277 prevent the Route defaults from being implicitly set, while setting Mapper
278 to explicit will prevent Route implicit defaults and stop url_for from using
279 Route memory. Fixes #38.
280 * Updated config object so that the route is attached if possible.
281 * Adding standard logging usage with debug messages.
282 * Added additional test for normal '.' match and fixed new special matching to
283 match it properly. Thanks David Smith.
284 * Fixed hanging special char issue with 'special' URL chars at the end of a URL
285 that are missing the variable afterwards.
286 * Changed Routes generation and recognition to handle other 'special' URL chars
287 , . and ; as if they were /. This lets them be optionally left out of the
288 resulting generated URL. Feature requested by David Smith.
289 * Fixed lookahead assertion in regexp builder to properly handle two grouped
290 patterns in a row.
291 * Applied patch to generation and matching to handle Unicode characters
292 properly. Reported with patch by David Smith.
293
294 Release 1.6.2 (Jan. 5, 2007)
295 ============================
296 * Fixed issue with method checking not properly handling different letter
297 cases in REQUEST_METHOD. Reported by Sean Davis.
298 * redirect_to now supports config.redirect returning a redirect, not just
299 raising one.
300
301 Release 1.6.1 (Dec. 29, 2006)
302 =============================
303 * Fixed zipsafe flag to be False.
304
305 Release 1.6 (Dec. 14th, 2006)
306 =============================
307 * Fixed append_slash to take effect in the route generation itself instead of
308 relying on url_for function. Reported by ToddG.
309 * Added additional url_for tests to ensure map.resource generates proper named
310 routes.
311 * WARNING: Changed map.resource initialization to accept individual member and
312 collection names to generate proper singular and plural route names. Those
313 using map.resource will need to update their routes and url_for statements
314 accordingly.
315 * Added additional map.resource recognition tests.
316 * Added WSGI middleware that does route resolving using new `WSGI.org Routing
317 Vars Spec <http://wsgi.org/wsgi/Specifications/routing_args>`_.
318 * Added _absolute keyword option route connect to ignore SCRIPT_NAME settings.
319 Suggested by Ian Bicking.
320
321 Release 1.5.2 (Oct. 16th, 2006)
322 ===============================
323 * Fixed qualified keyword to keep host port names when used, unless a host
324 is specifically passed in. Reported by Jon Rosebaugh.
325 * Added qualified keyword option to url_for to have it generate a full
326 URL. Resolves #29.
327 * Fixed examples in url_for doc strings so they'll be accurate.
328
329 Release 1.5.1 (Oct. 4th, 2006)
330 ==============================
331 * Fixed bug with escaping part names in the regular expression, reported by
332 James Taylor.
333
334 Release 1.5 (Sept. 19th, 2006)
335 ==============================
336 * Significant updates to map.resource and unit tests that comb it thoroughly
337 to ensure its creating all the proper routes (it now is). Increased unit
338 testing coverage to 95%.
339 * Added unit tests to ensure controller_scan works properly with nested
340 controller files and appropriately scans the directory structure. This
341 brings the Routes util module up to full code coverage.
342 * Fixed url_for so that when the protocol is changed, port information is
343 removed from the host.
344 * Added more thorough testing to _RequestConfig object and the ability to
345 set your own object. This increases testing coverage of the __init__ module
346 to 100%.
347 * Fixed bug with sub_domain not maintaining port information in url_for and
348 added unit tests. Reported by Jonathan Rosebaugh.
349 * Added unit tests to ensure sub_domain option works with named routes, cleaned
350 up url_for memory argument filtering. Fixed bug with named routes and sub_domain
351 option not working together, reported by Jonathan Rosebaugh.
352 * Changed order in which sub-domain is added to match-dict so it can be used
353 in a conditions function.
354
355 Release 1.4.1 (Sept. 6th, 2006)
356 ===============================
357 * Added sub_domains option to mapper, along with sub_domains_ignore list for
358 subdomains that are considered equivilant to the main domain. When sub_domains
359 is active, url_for will now take a sub_domain option that can alter the host
360 the route will go to.
361 * Added ability for filter functions to provide a _host, _protocol, _anchor arg
362 which is then used to create the URL with the appropriate host/protocol/anchor
363 destination.
364 * Patch applied from Ticket #28. Resolves issue with Mapper's controller_scan
365 function requiring a valid directory argument. Submitted by Zoran Isailovski.
366
367 Release 1.4 (July 21, 2006)
368 ===========================
369 * Fixed bug with map.resource related to member methods, found in Rails version.
370 * Fixed bug with map.resource member methods not requiring a member id.
371 * Fixed bug related to handling keyword argument controller.
372 * Added map.resource command which can automatically generate a batch of routes intended
373 to be used in a REST-ful manner by a web framework.
374 * Added URL generation handling for a 'method' argument. If 'method' is specified, it
375 is not dropped and will be changed to '_method' for use by the framework.
376 * Added conditions option to map.connect. Accepts a dict with optional keyword args
377 'method' or 'function'. Method is a list of HTTP methods that are valid for the route.
378 Function is a function that will be called with environ, matchdict where matchdict is
379 the dict created by the URL match.
380 * Fixed redirect_to function for using absolute URL's. redirect_to now passes all args to
381 url_for, then passes the resulting URL to the redirect function. Reported by climbus.
382
383 Release 1.3.2 (April 30th, 2006)
384 ================================
385 * Fixed _filter bug with inclusion in match dict during matching, reported by David Creemer.
386 * Fixed improper url quoting by using urllib.encode, patch by Jason Culverhouse.
387
388 Release 1.3.1 (April 4th, 2006)
389 ===============================
390 * Mapper has an optional attribute ``append_slash``. When set to ``True``, any URL's
391 generated will have a slash appended to the end.
392 * Fixed prefix option so that if the PATH_INFO is empty after prefix regexp, its set to
393 '/' so the match proceeds ok.
394 * Fixed prefix bug that caused routes after the initial one to not see the proper url
395 for matching. Caught by Jochen Kupperschmidt.
396
397 Release 1.3 (Feb. 25th, 2006)
398 =============================
399 * url_for keyword filters:
400 Named routes can now have a _filter argument that should specify a function that takes
401 a dict as its sole argument. The dict will contain the full set of keywords passed to
402 url_for, which the function can then modify as it pleases. The new dict will then be
403 used as if it was the original set of keyword args given to url_for.
404 * Fixed Python 2.3 incompatibility due to using keyword arg for a sort statement
405 when using the built-in controller scanner.
406
407 Release 1.2 (Feb. 17th, 2006)
408 =============================
409 * If a named route doesn't exist, and a url_for call is used, instead of using the
410 keyword arguments to generate a URL, they will be used as query args for the raw
411 URL supplied. (Backwards Incompatible)
412 * If Mapper has debug=True, using match will return two additional values, the route
413 that matched, if one did match. And a list of routes that were tried, and information
414 about why they didn't pass.
415 * url_for enhancements:
416 Can now be used with 'raw' URL's to generate proper url's for static content that
417 will then automatically include SCRIPT_NAME if necessary
418 Static named routes can now be used to shortcut common path information as desired.
419 * Controller Scanner will now sort controller names so that the longest one is first. This
420 ensures that the deepest nested controller is executed first before more shallow ones to
421 increase predictability.
422 * Controller Scanner now scans directories properly, the version in 1.1 left off the
423 directory prefix when created the list of controllers.
424 (Thanks to Justin for drawing my attention to it)
425
426 Release 1.1 (Jan. 13th, 2006)
427 =============================
428 * Routes Mapper additions:
429 Now takes several optional arguments that determine how it will
430 generate the regexp's.
431 Can now hold a function for use when determining what the available
432 controllers are. Comes with a default directory scanner
433 Given a directory for the default scanner or a function, the Mapper
434 will now automatically run it to get the controller list when needed
435 * Syntax available for splitting routes to allow more complex route paths, such
436 as ':controller/:(action)-:(id).html'
437 * Easier setup/integration with Routes per request. Setting the environ in a
438 WSGI environ will run match, and setup everything needed for url_for/etc.
439
440 Release 1.0.2 (Dec. 30th, 2005)
441 ===============================
442 * Routes where a default was present but None were filling in improper values.
443 * Passing a 0 would evaluate to None during generation, resulting in missing
444 URL parts
445
446 Release 1.0.1 (Dec. 18th, 2005)
447 ===============================
448 * Request Local Callable - You can now designate your own callable function that
449 should then be used to store the request_config data. This is most useful for
450 environments where its possible multiple requests might be running in a single
451 thread. The callable should return a request specific object for attributes to
452 be attached. See routes.__init__.py for more information.
453
454 Release 1.0 (Nov. 21st, 2005)
455 =============================
456 * routes.__init__ will now load the common symbols most people will
457 want to actually use.
458 Thus, you can either::
459
460 from routes import *
461
462 Or::
463
464 from routes import request_config, Mapper
465
466 The following names are available for importing from routes::
467
468 request_config, Mapper, url_for, redirect_to
469
470 * Route Names - You can now name a route, which will save a copy of the defaults
471 defined for later use by url_for or redirect_to.
472 Thus, a route and url_for looking like this::
473
474 m.connect('home', controller='blog', action='splash')
475 url_for(controller='blog', action='splash') # => /home
476
477 Can now be used with a name::
478
479 m.connect('home_url','home', controller='blog', action='splash')
480 url_for('home_url') # => /home
481
482 Additional keywords can still be added to url_for and will override defaults in
483 the named route.
484 * Trailing / - Route recognition earlier failed on trailing slashes, not really a bug,
485 not really a feature I guess. Anyways, trailing slashes are o.k. now as in the Rails
486 version.
487 * redirect_to now has two sets of tests to ensure it works properly
488
489