Antoine Pitrou <pit...@free.fr> added the comment:

Well, first it would be better with some tests.

Second, what does it do for chained redirects? E.g. let's say that there's a 
chain of 301 redirects: A --> B --> C. Does it cache the whole A --> C mapping, 
or only A --> B? If the latter, will the chaining occur when looking up the 
redirected url from the cache (it doesn't seem to)?

Third, it seems to use a global OpenerDirector object. Are there situations 
where it should rather use a request-specific object?

Fourth, you shouldn't need to define a separate http_error_301 method. Just add 
the `cacheable` argument to `http_error_302`. Also, the `_cache_301_redirect` 
attribute seems useless.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1755841>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to