summaryrefslogtreecommitdiff
path: root/wsgitools/applications.py
AgeCommit message (Collapse)Author
2023-06-18add type hints to all of the codeHelmut Grohne
In order to use type hint syntax, we need to bump the minimum Python version to 3.7 and some of the features such as Literal and Protocol are opted in when a sufficiently recent Python is available. This does not make all of the code pass type checking with mypy. A number of typing issues remain, but the output of mypy becomes something one can read through. In adding type hints, a lot of epydoc @type annotations are removed as redundant. This update also adopts black-style line breaking.
2023-06-18drop support for Python 2.xHelmut Grohne
2015-04-18Merge branch py3kHelmut Grohne
2014-01-06switch to new-style classes entirelyHelmut Grohne
There is no reason to use old-style classes beyond laziness.
2012-07-01make StaticFile work with py3kHelmut Grohne
There is no file builtin, and binary mode gives bytes instead of str.
2012-06-29fix more bytes related issues not covered by test.pyHelmut Grohne
* applications returned errors as str instead of bytes * filters documentation updated with bytes * various filters expecting str where bytes are passed * escape_string also needs to use bytes.isalnum instead of str.isalnum * middlewares injecting str where bytes are expected
2012-06-28first part of bytes conversionHelmut Grohne
Convert the request body data from str to bytes. This replaces all StringIOs with BytesIOs (removing backwards one more backwards compatibility). Also all character sequences involved in request bodies get a b"" prefix. The StaticContent application takes bytes instead of str (no difference for py2x). The GzipWSGIFilter needs a fixed as a truncate of a BytesIO does not rewind the stream position.
2011-01-12bug fix for StaticContent and CachingMiddlewareHelmut Grohne
PEP333 says that the headers list passed to start_response may be modified by servers or middlewares. In fact this happens in DigestAuthMiddleware. The StaticContent and CachingMiddleware classes did not take this into account and returned the same headers list multiple times which is wrong and can lead to denial of service.
2009-10-25extended application.StaticContentHelmut Grohne
It gained the capability to server content to unknown methods. For a backwards-compatible API this has to be enabled by an optional boolean.
2009-03-29quite some changes for py3Helmut Grohne
These changes introduce some compatibility code. They don't make wsgitools usable with Python 3.0, but they also don't break compatibility with Python 2.5.
2009-01-31StaticFile uses wsgi.file_wrapper from environ if possibleHelmut Grohne
2008-10-14added epydoc markup to doc stringsHelmut Grohne
2008-09-22added applications.StaticFileHelmut Grohne
2008-09-22applications.StaticContent: fail on bad requestHelmut Grohne
2008-02-28refactored docstrings for epydocHelmut Grohne
2007-05-09fix too strict assertion in wsgitools.applicationsHelmut Grohne
2007-04-21added some assertionsHelmut Grohne
2007-04-20added better support for HEADHelmut Grohne
2007-04-14initial treeHelmut Grohne