Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Reported-by: pylint
|
|
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.
|
|
|
|
|
|
|
|
There is no reason to use old-style classes beyond laziness.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
It can be stored inside the config attribute.
|
|
The interface and port attributes are always used together. Combine them
in order to reduce complexity.
|
|
Note that the construction of the header moved from our internal
sendheaders function to the start_response function. This way users
supplying unicode characters no representable in iso-8859-1 will get a
UnicodeEncodeError back from start_response, which is more useful than
failing later while yielding bytes.
|
|
|
|
|
|
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.
|
|
|
|
|
|
When a sendfile library is available, expose it via wsgi.file_wrapper.
This support spans both asynchronous and forkpool.
|
|
|
|
|
|
* added a number of internal links (L{...})
* some fixes
* some additions
|
|
This is useful when used in combination with e.g. systemd.
|
|
|
|
This addresses a disputed denial of service condition described in
http://bugs.python.org/issue6706. Note that wsgitools is not hit as hard as
pyftplib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Even Py2.4 can handle large parameters to int, so long is not needed.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|