Upgrading gunicorn 26 to 27
Breaking26.2.0 → 27.0.1Breaking1Changed2Fixed55Other2
BreakingUpgrade verdict
1 breaking change.
In plain terms
- Requests that declare a body encoding other than chunked are now refused with an error instead of being read or treated as empty.
Must act 1 item needs code or config changes
What you must change
Breaking1
Rejects with 400 requests whose Transfer-Encoding does not end with chunked, such as gzip or identity alone, with or without Content-Length.
Transfer-EncodingContent-LengthAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- added:
class LifespanStartupFailed(RuntimeError)
- added:
class ChunkMissingTerminator(ParseError) - added:
method CallbackRequest.may_upgrade() - added:
property CallbackRequest.headers - added:
variable DEFAULT_MAX_FIELDS - added:
variable DEFAULT_MAX_FIELD_LINE - added:
variable MAX_UNLIMITED_REQUEST_LINE - added:
variable RFC9112_TARGET_INVALID
- added:
class ClientDisconnected(OSError) - added:
function secure_scheme_names(secure_scheme_headers) - added:
property BodyReceiver.buffered
- changed:
constructor WebSocketProtocol(transport, scope, app, log) → constructor WebSocketProtocol(transport, scope, app, log, max_message_size=…, drain=…) - added:
class WebSocketDisconnected(ClientDisconnected, RuntimeError) - added:
variable DEFAULT_MAX_MESSAGE_SIZE - added:
variable KNOWN_OPCODES - added:
variable MAX_CONTROL_PAYLOAD - added:
variable READ_BUFFER_HIGH_WATER - added:
variable RECEIVE_QUEUE_HIGH_WATER
- added:
class WebSocketMaxMessageSize(Setting) - added:
field WebSocketMaxMessageSize.cli - added:
field WebSocketMaxMessageSize.default - added:
field WebSocketMaxMessageSize.desc - added:
field WebSocketMaxMessageSize.meta - added:
field WebSocketMaxMessageSize.name - added:
field WebSocketMaxMessageSize.section - added:
field WebSocketMaxMessageSize.type - added:
field WebSocketMaxMessageSize.validator - added:
function validate_http2_stream_limit(val) - added:
function validate_http2_window_size(val) - added:
method Config.validate()
- added:
function process_owned_by_us(pid) - added:
function read_trusted_pid(path) - added:
function write_pidfile(path, pid)
- added:
method ChunkedReader.read_into(unreader, buf) - added:
variable CHUNK_EXT_RE - added:
variable DEFAULT_MAX_CHUNK_SIZE_LINE - added:
variable DEFAULT_MAX_TRAILER_SECTION - added:
variable MAX_READ_STEP
- changed:
class ChunkMissingTerminator(IOError) → class ChunkMissingTerminator(ParseException) - changed:
class InvalidChunkExtension(IOError) → class InvalidChunkExtension(ParseException) - changed:
class InvalidChunkSize(IOError) → class InvalidChunkSize(ParseException) - added:
class InvalidResponseHeader(InvalidHeader) - added:
class InvalidResponseHeaderName(InvalidHeaderName)
- added:
variable RFC9112_TARGET_INVALID
- changed:
method IterUnreader.chunk() → method IterUnreader.chunk(size_hint=…) - changed:
method SocketUnreader.chunk() → method SocketUnreader.chunk(size_hint=…) - changed:
method Unreader.chunk() → method Unreader.chunk(size_hint=…) - changed:
method Unreader.read(size=…) → method Unreader.read(size=…, read_ahead=…) - added:
field SocketUnreader.max_body_chunk
- added:
variable STATUS_RE
- added:
async method AsyncHTTP2Connection.abort_stream(stream_id, error_code) - added:
async method AsyncHTTP2Connection.send_response_headers(stream_id, headers, end_stream=…) - added:
method AsyncHTTP2Connection.abort_streams_nowait() - added:
method AsyncHTTP2Connection.acknowledge_data(stream_id, size)
- added:
method HTTP2ServerConnection.abort_stream(stream_id, error_code) - added:
method HTTP2ServerConnection.acknowledge_data(stream_id, size) - added:
method HTTP2ServerConnection.pump(stream_id=…)
- added:
function server_connection_class()
- added:
variable H2C_UPGRADE_BODY_LIMIT
- changed:
constructor HTTP2Body(data) → constructor HTTP2Body(source) - added:
property HTTP2Request.trailers
- added:
async method HTTP2Stream.wait_disconnect() - added:
method HTTP2Stream.pop_chunk() - added:
method HTTP2Stream.signal_disconnect() - added:
property HTTP2Stream.body_complete - added:
property HTTP2Stream.unacked_size
- added:
function symlink_target_dir(filename)
- changed:
method ThreadWorker.murder_keepalived() → method ThreadWorker.murder_keepalived(force=…) - added:
variable STOP_KEEPALIVE_LINGER