Upgrading Werkzeug 0.5 to 0.6
Breaking0.5.1 → 0.6.2Breaking3Deprecated3New20Changed12Fixed17Other1
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- A misspelled attribute on the request object has been renamed to its correct spelling, so code using the old name must be updated.
- Features that were announced for removal in earlier versions are now gone.
- Response objects are no longer modified in place when evaluated as WSGI applications; fix_headers is still called for backwards compatibility but get_wsgi_headers should be used.
- Deprecates cached_property.writeable.
Must act Top 5 of 6 that need code or config changes
What you must change
Breaking3
Renames the request attribute implicit_seqence_conversion to implicit_sequence_conversion.
implicit_seqence_conversionimplicit_sequence_conversionRemoves pending deprecations.
Response objects are no longer modified in place when evaluated as WSGI applications; fix_headers is still called for backwards compatibility but get_wsgi_headers should be used.
fix_headersget_wsgi_headersDeprecations to plan for
Deprecated3
Deprecates cached_property.writeable.
cached_property.writeableDeprecates non-silent usage of werkzeug.LimitedStream.
werkzeug.LimitedStreamDeprecates the charset parameter of BaseResponse.iter_encoded.
BaseResponse.iter_encodedAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
class Player(object) - removed:
class Server(Syncable) - removed:
class ServerBrowser(Syncable) - removed:
class ServerError(Exception) - removed:
class Syncable(object) - removed:
constructor Player(server, name, score) - removed:
constructor Server(addr, server_id) - removed:
constructor ServerBrowser(cup) - removed:
field Syncable.last_sync - removed:
method Syncable.sync() - removed:
variable GAMETYPES
- removed:
variable Session - added:
field Blog.query - added:
field Entry.query - added:
variable session
- added:
field URL.query
- removed:
variable Session - added:
variable session
- added:
field Page.query - added:
field Revision.query - added:
field RevisionedPage.query
- removed:
class LimitedStream(_SilentLimitedStream) - removed:
constructor LimitedStream(environ, limit)
- removed:
class BaseReporterStream(object) - removed:
constructor BaseReporterStream(environ, threshold) - removed:
method BaseReporterStream.processed() - removed:
method BaseReporterStream.read(size=…) - removed:
method BaseReporterStream.readline(*args) - removed:
method BaseReporterStream.readlines(hint=…)
- removed:
field SecureCookie.should_save - removed:
method SecureCookie.should_save() - added:
property SecureCookie.should_save
- removed:
class FilesystemSessionStore(SessionStore) - removed:
class ModificationTrackingDict(CallbackDict) - removed:
class Session(ModificationTrackingDict) - removed:
class SessionMiddleware(object) - removed:
class SessionStore(object) - removed:
constructor FilesystemSessionStore(path=…, filename_template=…, session_class=…) - removed:
constructor ModificationTrackingDict(*args, **kwargs) - removed:
constructor Session(data, sid, new=…) - removed:
constructor SessionMiddleware(app, store, cookie_name=…, cookie_age=…, cookie_expires=…, cookie_path=…, cookie_domain=…, cookie_secure=…, cookie_httponly=…, environ_key=…) - removed:
constructor SessionStore(session_class=…) - removed:
function generate_key(salt=…) - removed:
method FilesystemSessionStore.delete(session) - removed:
method FilesystemSessionStore.get(sid) - removed:
method FilesystemSessionStore.get_session_filename(sid) - removed:
method FilesystemSessionStore.save(session) - removed:
method ModificationTrackingDict.copy() - removed:
method SessionStore.delete(session) - removed:
method SessionStore.generate_key(salt=…) - removed:
method SessionStore.get(sid) - removed:
method SessionStore.is_valid_key(key) - removed:
method SessionStore.new() - removed:
method SessionStore.save(session) - removed:
method SessionStore.save_if_modified(session) - removed:
property Session.should_save
- added:
class DynamicCharsetRequestMixin(object) - added:
class DynamicCharsetResponseMixin(object) - added:
field DynamicCharsetRequestMixin.default_charset - added:
field DynamicCharsetResponseMixin.charset - added:
field DynamicCharsetResponseMixin.default_charset - added:
function is_known_charset(charset) - added:
method DynamicCharsetRequestMixin.unknown_charset(charset) - added:
property DynamicCharsetRequestMixin.charset
- removed:
class CacheControl(ResponseCacheControl) - removed:
constructor CacheControl(values=…, on_update=…) - removed:
field CacheControl.max_stale - removed:
field CacheControl.min_fresh - removed:
field CacheControl.no_transform - removed:
field CacheControl.only_if_cached - removed:
field MultiDict.lists - changed:
method Headers.set(key, value) → method Headers.set(_key, _value, **kw) - added:
class FileStorage(object) - added:
class ImmutableOrderedMultiDict(ImmutableMultiDictMixin, OrderedMultiDict) - added:
class OrderedMultiDict(MultiDict) - added:
constructor FileStorage(stream=…, filename=…, name=…, content_type=…, content_length=…, headers=…) - added:
constructor OrderedMultiDict(mapping=…) - added:
field OrderedMultiDict.KeyError - added:
function iter_multi_items(mapping) - added:
method Accept.best_match(matches, default=…) - added:
method Accept.quality(key) - added:
method FileStorage.close() - added:
method FileStorage.save(dst, buffer_size=…) - added:
method ImmutableMultiDictMixin.add(key, value) - added:
method ImmutableOrderedMultiDict.copy() - added:
method MultiDict.add(key, value) - added:
method MultiDict.lists() - added:
method OrderedMultiDict.add(key, value) - added:
method OrderedMultiDict.getlist(key, type=…) - added:
method OrderedMultiDict.iteritems(multi=…) - added:
method OrderedMultiDict.iterkeys() - added:
method OrderedMultiDict.iterlists() - added:
method OrderedMultiDict.iterlistvalues() - added:
method OrderedMultiDict.itervalues() - added:
method OrderedMultiDict.pop(key, default=…) - added:
method OrderedMultiDict.popitem() - added:
method OrderedMultiDict.popitemlist() - added:
method OrderedMultiDict.poplist(key) - added:
method OrderedMultiDict.setlist(key, new_list) - added:
method OrderedMultiDict.setlistdefault(key, default_list=…) - added:
method OrderedMultiDict.update(mapping)
- removed:
field HTTPException.name - removed:
field HTTPException.wrap - removed:
method HTTPException.name() - changed:
method HTTPException.wrap(exception, name=…) → static method HTTPException.wrap(exception, name=…) - added:
property HTTPException.name
- added:
function default_stream_factory(total_content_length, filename, content_type, content_length=…) - added:
function is_valid_multipart_boundary(boundary) - added:
function parse_form_data(environ, stream_factory=…, charset=…, errors=…, max_form_memory_size=…, max_content_length=…, cls=…, silent=…) - added:
function parse_multipart(file, boundary, content_length, stream_factory=…, charset=…, errors=…, buffer_size=…, max_form_memory_size=…) - added:
function parse_multipart_headers(iterable)
- removed:
function default_stream_factory(total_content_length, filename, content_type, content_length=…) - removed:
function is_valid_multipart_boundary(boundary) - removed:
function parse_multipart(file, boundary, content_length, stream_factory=…, charset=…, errors=…, buffer_size=…, max_form_memory_size=…) - removed:
function parse_multipart_headers(iterable) - changed:
function unquote_header_value(value) → function unquote_header_value(value, is_filename=…)
- changed:
constructor LocalProxy(local, name) → constructor LocalProxy(local, name=…) - added:
class LocalStack(object) - added:
constructor LocalStack() - added:
function release_local(local) - added:
method LocalStack.pop() - added:
method LocalStack.push(obj) - added:
property LocalStack.top
- added:
function rename(src, dst) - added:
variable can_rename_open_file - added:
variable rename
- changed:
method MapAdapter.build(endpoint, values=…, method=…, force_external=…) → method MapAdapter.build(endpoint, values=…, method=…, force_external=…, append_unknown=…) - changed:
method MapAdapter.match(path_info=…, method=…) → method MapAdapter.match(path_info=…, method=…, return_rule=…) - changed:
method Rule.bind(map) → method Rule.bind(map, rebind=…) - changed:
method Rule.build(values) → method Rule.build(values, append_unknown=…) - changed:
method Rule.suitable_for(values, method) → method Rule.suitable_for(values, method=…) - added:
field Map.default_converters - added:
method Rule.refresh()
- added:
function check_password_hash(pwhash, password) - added:
function gen_salt(length) - added:
function generate_password_hash(password, method=…, salt_length=…) - added:
variable SALT_CHARS
- added:
class Href(object) - added:
constructor Href(base=…, charset=…, sort=…, key=…) - added:
function iri_to_uri(iri, charset=…) - added:
function uri_to_iri(uri, charset=…, errors=…) - added:
function url_decode(s, charset=…, decode_keys=…, include_empty=…, errors=…, separator=…, cls=…) - added:
function url_encode(obj, charset=…, encode_keys=…, sort=…, key=…, separator=…) - added:
function url_fix(s, charset=…) - added:
function url_quote(s, charset=…, safe=…) - added:
function url_quote_plus(s, charset=…, safe=…) - added:
function url_unquote(s, charset=…, errors=…) - added:
function url_unquote_plus(s, charset=…, errors=…)
- removed:
class ClosingIterator(object) - removed:
class DispatcherMiddleware(object) - removed:
class FileStorage(object) - removed:
class FileWrapper(object) - removed:
class Href(object) - removed:
class LimitedStream(object) - removed:
class SharedDataMiddleware(object) - removed:
constructor ClosingIterator(iterable, callbacks=…) - removed:
constructor DispatcherMiddleware(app, mounts=…) - removed:
constructor FileStorage(stream=…, filename=…, name=…, content_type=…, content_length=…) - removed:
constructor FileWrapper(file, buffer_size=…) - removed:
constructor Href(base=…, charset=…, sort=…, key=…) - removed:
constructor LimitedStream(stream, limit, silent=…) - removed:
constructor SharedDataMiddleware(app, exports, disallow=…, cache=…, cache_timeout=…) - removed:
function create_environ(*args, **kwargs) - removed:
function get_current_url(environ, root_only=…, strip_querystring=…, host_only=…) - removed:
function get_host(environ) - removed:
function make_line_iter(stream, limit=…, buffer_size=…) - removed:
function parse_form_data(environ, stream_factory=…, charset=…, errors=…, max_form_memory_size=…, max_content_length=…, cls=…, silent=…) - removed:
function peek_path_info(environ) - removed:
function pop_path_info(environ) - removed:
function responder(f) - removed:
function run_wsgi_app(*args, **kwargs) - removed:
function url_decode(s, charset=…, decode_keys=…, include_empty=…, errors=…, separator=…, cls=…) - removed:
function url_encode(obj, charset=…, encode_keys=…, sort=…, key=…, separator=…) - removed:
function url_fix(s, charset=…) - removed:
function url_quote(s, charset=…, safe=…) - removed:
function url_quote_plus(s, charset=…, safe=…) - removed:
function url_unquote(s, charset=…, errors=…) - removed:
function url_unquote_plus(s, charset=…, errors=…) - removed:
function wrap_file(environ, file, buffer_size=…) - removed:
method ClosingIterator.close() - removed:
method ClosingIterator.next() - removed:
method FileStorage.close() - removed:
method FileStorage.save(dst, buffer_size=…) - removed:
method FileWrapper.close() - removed:
method FileWrapper.next() - removed:
method LimitedStream.exhaust(chunk_size=…) - removed:
method LimitedStream.next() - removed:
method LimitedStream.on_exhausted() - removed:
method LimitedStream.read(size=…) - removed:
method LimitedStream.readline(size=…) - removed:
method LimitedStream.readlines(size=…) - removed:
method SharedDataMiddleware.generate_etag(mtime, file_size, real_filename) - removed:
method SharedDataMiddleware.get_directory_loader(directory) - removed:
method SharedDataMiddleware.get_file_loader(filename) - removed:
method SharedDataMiddleware.get_package_loader(package, package_path) - removed:
method SharedDataMiddleware.is_allowed(filename) - removed:
property LimitedStream.is_exhausted
- added:
field BaseRequest.dict_storage_class - added:
field BaseRequest.list_storage_class - added:
field BaseRequest.parameter_storage_class - added:
field BaseResponse.implicit_sequence_conversion - added:
method BaseResponse.call_on_close(func) - added:
method BaseResponse.get_app_iter(environ) - added:
method BaseResponse.get_wsgi_headers(environ) - added:
method BaseResponse.get_wsgi_response(environ) - added:
method BaseResponse.make_sequence() - added:
property BaseRequest.url_charset - added:
property BaseResponse.is_sequence
- added:
class ClosingIterator(object) - added:
class DispatcherMiddleware(object) - added:
class FileWrapper(object) - added:
class LimitedStream(object) - added:
class SharedDataMiddleware(object) - added:
constructor ClosingIterator(iterable, callbacks=…) - added:
constructor DispatcherMiddleware(app, mounts=…) - added:
constructor FileWrapper(file, buffer_size=…) - added:
constructor LimitedStream(stream, limit, silent=…) - added:
constructor SharedDataMiddleware(app, exports, disallow=…, cache=…, cache_timeout=…, fallback_mimetype=…) - added:
function extract_path_info(environ_or_baseurl, path_or_url, charset=…, errors=…, collapse_http_schemes=…) - added:
function get_current_url(environ, root_only=…, strip_querystring=…, host_only=…) - added:
function get_host(environ) - added:
function make_line_iter(stream, limit=…, buffer_size=…) - added:
function peek_path_info(environ) - added:
function pop_path_info(environ) - added:
function responder(f) - added:
function wrap_file(environ, file, buffer_size=…) - added:
method ClosingIterator.close() - added:
method ClosingIterator.next() - added:
method FileWrapper.close() - added:
method FileWrapper.next() - added:
method LimitedStream.exhaust(chunk_size=…) - added:
method LimitedStream.next() - added:
method LimitedStream.on_exhausted() - added:
method LimitedStream.read(size=…) - added:
method LimitedStream.readline(size=…) - added:
method LimitedStream.readlines(size=…) - added:
method SharedDataMiddleware.generate_etag(mtime, file_size, real_filename) - added:
method SharedDataMiddleware.get_directory_loader(directory) - added:
method SharedDataMiddleware.get_file_loader(filename) - added:
method SharedDataMiddleware.get_package_loader(package, package_path) - added:
method SharedDataMiddleware.is_allowed(filename) - added:
property LimitedStream.is_exhausted