summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-18add a wsgitools.scgi.asyncio moduleHelmut Grohne
This adds an asyncio implementation of the server side of the SCGI protocol, because asyncore is being deprecated. Unlike the asyncore implementation, this does not yet support sendfile.
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
2023-06-18drop deprecated wsgitools.adaptersHelmut Grohne
2023-06-18add testcase for scgi.forkpoolHelmut Grohne
2023-06-18add testcase for scgi.asynchronous and fix reusesocketHelmut Grohne
2023-06-18reraise py3 exceptions as advised in pep3333Helmut Grohne
2023-06-18CachingMiddleware: avoid using a heterogeneous list for the cached requestHelmut Grohne
Type checkers tend to deal badly with heterogeneous lists and we cannot use a tuple here, because it needs to be modifiable. The attachment of names also improves clarity.
2023-06-17scgi.asynchronous: remove unused address argument and attributeHelmut Grohne
2022-12-06add a pyproject.tomlHelmut Grohne
2022-12-06wsgitools.digest: relax checking of PATH_INFOHelmut Grohne
Apache mod_proxy_scgi seems to insert an additional slash at the start of PATH_INFO deal with this rather than rejecting authentication.
2022-02-14switch from distutils to setuptoolsHelmut Grohne
distutils will be removed from Python 3.12.
2020-04-02avoid changing variable typesHelmut Grohne
The mypy type checker deals badly when a binding changes its type. To ease porting to mypy, avoid changing the type of variables. In some cases, variables can be eliminated. In other cases, they are renamed.
2020-04-01fix type mismatch in TracebackMiddlewareHelmut Grohne
cgitb.html returns str, but wsgi must return bytes.
2020-04-01don't call secrets.compare_digest with a None valueHelmut Grohne
The __call__ method may return None to indicate failure. Using compare_digest with a None value results in a TypeError. Fixes: ab06a888e216 ("use secrets.compare_digest when available")
2020-03-10release version 0.3.1wsgitools-0.3.1Helmut Grohne
2020-03-09setup.py: stop pretending we do python2Helmut Grohne
2020-03-09remove unnecessary pass statementsHelmut Grohne
Reported-by: pylint
2020-03-09deprecate wsgitools.adaptersHelmut Grohne
The potential wsgi 2.0 standard didn't happen. Schedule adapters for removal.
2019-03-10README: update version information to something saneHelmut Grohne
2019-03-10fix DeprecationWarnings in test.pyHelmut Grohne
2019-03-10scgi.forkpool: fix SIGTERM handler in the presence of PEP475Helmut Grohne
Since PEP475 or Python 3.5, select retries an interrupted system call. However, we were relying on the previous behaviour. Thus we must interrupt select using some other measure. Another socketpair is created and the signal handler transfers a byte on shutdown.
2019-03-10wsgitools.scgi.forkpool: improve debugging broken wsgi appsHelmut Grohne
2019-01-17ContentLengthMiddleware: don't duplicate the headerHelmut Grohne
When an iterable is returned and a Content-Length header is already present, don't add a second one.
2018-12-27fix ContentLengthMiddleware(..., maxstore=()) on Py3kHelmut Grohne
On Python 2.x, any integer sorts below the empty tuple. That was exploited in the maxstore parameter, but fails on Python 3 with a TypeError. Also add a regression test. Reported-by: Dominik Brodowski <mail@dominikbrodowski.net>
2018-02-25update WSGI 2.0 referenceHelmut Grohne
2017-03-26scgi.asynchronous: fix wrong assertion on py3kHelmut Grohne
2017-03-26use secrets.compare_digest when availableHelmut Grohne
2017-03-26port wsgitools.digest to use the new secrets moduleHelmut Grohne
2015-04-18release version 0.3wsgitools-0.3Helmut 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.
2013-12-09fix possible uncaught ValueError from scgi serversHelmut Grohne
With unicode strings it no longer holds that if s.isdigit() then you can safely int(s), because there are more digits (such as ^3 \xb3) accepted by isdigit. This can cause an uncaught ValueError in certain places if the remote scgi server presents bogus data. Thanks to Klaus Aehlig for pointing out what isdigit accepts.
2013-06-06fix RequestLogWSGIFilterTestHelmut Grohne
Clarify the type of the log file-like passed to RequestLogWSGIFilter.
2013-06-06fix the py3k part of RequestLogWSGIFilterTestHelmut Grohne
2013-06-06port CachingMiddlewareTest to py3kHelmut Grohne
2013-06-06Merge tag 'wsgitools-0.2.4' into py3kHelmut Grohne
The intent is to port the changes from 0.2.4 to py3k. Conflicts: README test.py wsgitools/scgi/forkpool.py All conflicts were resolved in a minimal way. The test suite now fails for all python versions.
2013-03-14release version 0.2.4wsgitools-0.2.4Helmut Grohne
2013-03-12extend copyrightHelmut Grohne
2013-03-12update Python versions in READMEHelmut Grohne
2013-03-11MANIFEST.in: include the test suiteHelmut Grohne
2013-03-10forkpool: add a per-request timelimitHelmut Grohne
2012-11-28added test for CachingMiddlewareHelmut Grohne
2012-11-01scgi.forkpool: implement RLIMIT_CPUHelmut Grohne
The limit is only set on workers does not apply to the master. Upon reaching the soft limit the worker terminates after finished the current request.
2012-11-01scgi.forkpool: fixed wrong assertionHelmut Grohne
The forkpool server was incompatible with dumb generators. They only call start_response when being asked for the first output element, but the forkpool server was wrongly requiring start_response to be called before returning the iterator.
2012-11-01scgi.forkpool: similarly drop the error attributeHelmut Grohne
It can be stored inside the config attribute.
2012-11-01scgi.forkpool: reduce instance attributesHelmut Grohne
The interface and port attributes are always used together. Combine them in order to reduce complexity.
2012-07-02added RequestLogWSGIFilterTestHelmut Grohne
2012-07-01make HtdigestTokenGenerator work with py3kHelmut Grohne
Define a textopen function that returns "native strings" (in the sense of pep3333). Therefore textopen needs to decode using iso-8859-1 iff running on py3k. Additionally use a with construct to close the file being read in all circumstances.
2012-07-01make StaticFile work with py3kHelmut Grohne
There is no file builtin, and binary mode gives bytes instead of str.