Skip to content

Minor bug in WSGIContainer docstring. #2960

@tangentstorm

Description

@tangentstorm

return ["Hello world!\n"]

This line (in a docstring showing how to use WSGIContainer) is wrong.

It should say:

         return [b"Hello world!\n"] 

... because WSGI requires a sequence of bytestrings in modern python. Without this change, the example fails with:

TypeError: sequence item 0: expected a bytes-like object, str found

in python 3.9 (and probably any python 3).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions