comparison env/lib/python3.9/site-packages/Routes-2.5.1.dist-info/METADATA @ 0:4f3585e2f14b draft default tip

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