| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
In py2 an array is created and sorted, and in py3 an array of the items needs to be realized in the same fashion hence the sorted(•) fix. Otherwise the code will fail on Python 3 since dict.items() returns a view on the items which doesn't have a .sort() method.
|
| |
|
|
|
|
|
| |
If the app-iterator being passed in is not defining `next()` (e.g. running under py3 and only defined `__next__`), this will currently crash.
Fix by using `six.next` which will use `__next__` or `next` as appropriate.
|
| |
|
| |
|
|
|
| |
* add ipv6 support by setting address family
|
| |
|
|
|
|
|
|
|
|
| |
* StringIO imports differently in python 3 - use six for compatibility
* Paste requires bytes like objects. in python 2 cStringIO works fine, but in python three it needs to use io.BytesIO
* simplify imports and logic by using six.BytesIO exclusively for parsing body content
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`pytest-runner` describes itself as deprecated in its own package
description, referring to
https://github.com/pypa/setuptools/issues/1684. Using it in
`setup_requires` means that any other package that depends on Paste has
to install `pytest-runner` too, which is fairly heavyweight and
unnecessary. (I ran into this when trying to update Launchpad to a less
ancient version of Paste.)
This does mean that `python setup.py test` no longer works, but,
according to the setuptools issue above, that's deprecated anyway.
Paste already has `tox` configuration that works well.
|
|
|
|
| |
more python3 fixes
|
| |
|
|
|
|
|
|
|
|
| |
* Update auth_tkt.py urllib imports to work in python3
* Add tests for auth AuthTicket
* Adapt auth_tkt to be python2 and python3 compatible
|
|
|
|
| |
* Correct HEAD handling accept-encoding: gzip
|
|
|
|
|
| |
requests. (#44)
Fixes #43
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Use is_alive instead of isAlive for Python 3.9 compatibility.
* Use encodebytes instead of deprecated encodestring.
* Fix Python 2 and 3 compatibility for base64.
|
| |
|
| |
|
|
|
|
| |
* Avoid some reference cycles through tracebacks in httpserver.py
|
| |
|
|
|
|
| |
* Handle io.UnsupportedOperation from socket.tell()
|
|
|
| |
On Python 3, socket.makefile() returns an object with a tell() method, but one that always raises io.UnsupportedOperation.
|
|
|
| |
If we don't want to parse the request body with cgi, we can just not use cgi rather than building a fake request.
|
|
|
|
|
|
| |
* Ensure unicode URLs work in TestApp.
* Make LimitedLengthFile file return empty bytes.
* Protect against accidental close in FieldStorage.
|
|
|
| |
Passing a unicode url to get() always worked (assuming the url contained only ASCII), but it didn't work to post(), put(), or delete() if query parameters were included. This change fixes the latter cases.
|
|
|
|
| |
it's done. (#32)
|
|
|
|
|
| |
On Python 3, cgi.FieldStorage has a __del__ method that closes the underlying file [1]. This means that if the copy made from UnicodeMultiDict._decode_value is garbage collected, the file underlying the original FieldStorage will be closed! Fix this by not copying FieldStorage if it is not required by decode_keys=False. I cannot think of a nice way to fix this problem if decode_keys=True.
[1] https://github.com/python/cpython/commit/f79126f373a9d5c9b584a8db736fe490fcbfa77a
|
| |
|
|
|
| |
As the test shows, this fixes passing boths params and upload_files on Python 3.
|
| |
|
|
|
| |
Replace `isinstance(self.content, file)` with a duck type for the `read()` method. Having a read method is what PEP 333 defines as the minimum requirement for a "file-like" object.
|
|
|
| |
This fixes a deprecation warning on 3.7.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
httpservers writes an empty string or an internal server
error message, these needs to be bytes in python 3.
It might have been useful to have wsgi_write_chunk accept
either bytes or strings and do the right thing, but that
seemed too invasive to be safe.
|
|
|
|
| |
* Revert 3.0.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 78dd2ec0138467305f1686558fca4ff8ca0b2b70.
That removes the use of the so-called "thread safe" tsafe module, which
adds a lock around many messages, but did not account for the use of
that lock in the paste/httpserver.py module.
An attempt was made to just get rid of that lock, but since there is
limited testing of that area, and few resources to confirm the change,
it's been decided that keeping tsafe and allow the deprecation warning
to be exposed is the best thing to do. With luck the decpration warning
will encourage people to not use the httpserver and choose something
else instead.
Fixes #19
|
|
|
|
| |
* Quiet OpenSSL deprecation warning
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It would fail if the length of bytes and unicode differs.
It now passes non-bytes to `Form` directly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* py3 fixes for form handling in paste.fixture
It uses "not six.PY2" in contrast to other places in the code to be
forward-compatible.
I've not looked too closely, but it might make sense to decode body/text
in the beginning already, instead of having it as bytes internally?!
Also, like mentioned in [1] already, it should probably use the correct
source encoding?!
1: https://github.com/cdent/paste/blob/36e5b8bd16a6063ec654faf04541f3a20d19f7fe/paste/fixture.py#L820
* Add test, using/fixing SlowConsumer form app
|