summaryrefslogtreecommitdiff
path: root/paste
Commit message (Collapse)AuthorAgeFilesLines
* Make iterators Python3-compatibleZane Bitter2018-10-232-0/+4
| | | | | | | | In Python3, the iterator protocol uses a method named __next__(), not next(). (For compatibility with Python 2.6, we still need to support both though.) Ensure all iterator objects support the Python3 protocol. Signed-off-by: Zane Bitter <zbitter@redhat.com>
* Don't raise StopIteration inside a generatorZane Bitter2018-10-232-3/+2
| | | | | | This will cause a runtime error in Python 3.7, due to PEP479. Signed-off-by: Zane Bitter <zbitter@redhat.com>
* Fix up testing after switch to pytestChris Dent2018-10-236-24/+24
| | | | | | | | | | | | | | pytest exposes many warnings, some but not all of which are cleaned up here. The main switch is to use html.escape instead of cgi.escape. This inspired the addition of 'future' to requirements. The remaining warnings are related to pytest deprecations or over-eager test discovery. It is perhaps ironic that the switch to pytest is to avoid nose being mostly dead, and now we are using features in pytest that pytest wants to make dead. These are left for later cleanups, which means that running the tests is noisy.
* Merged in onovy/paste (pull request #36)Chris Dent2018-10-231-1/+1
|\ | | | | | | Use correct variable when building message for exception
| * Use correct variable when building message for exceptionOnd?ej Nov?2016-03-101-1/+1
| | | | | | | | | | Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695253
| * Make add_close.next() leverage add_close.__next__()python3_wsgilib_add_close_nextMarc Abramowitz2016-03-081-1/+1
| | | | | | | | so we avoid logic duplication
| * Uncomment/cleanup paste.wsgilib.app_close.__next__Marc Abramowitz2016-03-071-2/+2
| |
| * Merge default to python3_wsgilib_add_close_nextMarc Abramowitz2016-03-071-0/+4
| |\
| | * paste.wsgilib.add_close: Add __next__ methodMarc Abramowitz2016-03-071-0/+4
| | | | | | | | | | | | to support using `add_close` objects as iterators on Python 3.
| | * Don't display invalid error message when socket in useMarc Abramowitz2015-05-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when the listening socket was already in use, this error message was displayed: ... File "/private/tmp/n/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 1106, in server_close self.thread_pool.shutdown(60) AttributeError: 'WSGIThreadPoolServer' object has no attribute 'thread_pool' We prevent this by checking if `self` has a `thread_pool` attribute before trying to reference it. Fixes issue #5 (https://bitbucket.org/ianb/paste/issue/5/invalid-error-message-when-the-socket-is)
| | * Merged in aodag/paste-py3/fix-has_key (pull request #25)Marc Abramowitz2015-05-112-2/+2
| | |\ | | | | | | | | | | | | replace ``has_key`` method to ``in`` operator #9
| | | * replace ``has_key`` method to ``in`` operator #9fix-has_keyaodag2015-05-022-2/+2
| | | |
| | | * Fix Python 3 issue in paste/fixture.pyMarc Abramowitz2015-04-301-1/+1
| | | | | | | | | | | | | | | | by wrapping `map` with `list`.
| | | * Make utility function private: _get_headersBB-4Marc Abramowitz2015-04-301-4/+9
| | | |
| | | * Make get_headers default to Python 3; fallback to Python 2Marc Abramowitz2015-04-301-4/+4
| | | | | | | | | | | | | | | | as suggested by @haypo at https://bitbucket.org/ianb/paste/pull-request/22/fix-improper-commas-in-request-headers-in/diff#comment-6583636
| | | * Make get all values of a header work on both Python 2 and 3Marc Abramowitz2015-04-281-1/+9
| | | |
| | | * Fix improper commas in request headers in wsgi_environMarc Abramowitz2015-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Revert from using `get` to `getheaders` method. fixes #4
| | | * Add tests/test_httpserver.pyMarc Abramowitz2015-04-2788-0/+33193
| | | | | | | | | | | | | | | | | | | | | which contains a test for the issue in BB-4, where the WSGI environment has strings with commas in them that don't belong. See issue #4.
| | * Merged in marsupial2k/paste (pull request #6)Marc Abramowitz2015-05-112-0/+7
| | |\ | | | | | | | | | | | | Add HTTP exception for new code 429 "Too Many Requests"
| | | * Add HTTP 429 "Too Many Requests"Neil Williams2011-12-2392-0/+37462
| | | | | | | | | | | | http://www.ietf.org/id/draft-nottingham-http-new-status-03.txt
| | * Merged in ls_/paste (pull request #20)Marc Abramowitz2015-05-111-3/+3
| | |\ | | | | | | | | | | | | Escape CGI environment variables in HTTP 404 responses
| | | * Escape CGI environment variables in HTTP 404 responsesKaan Kivilcim2014-08-2592-0/+37607
| | |
| | * Replace cgi.parse_qsl w/ six.moves.urllib.parse.parse_sqleliminate_cgi_parse_qsl_2eliminate_cgi_parse_qslMarc Abramowitz2015-04-3088-0/+33205
| | | | | | | | | | because `cgi.parse_qsl` is deprecated, according to https://docs.python.org/2/library/cgi.html#cgi.parse_qsl
| * tox.ini: Add py35 to envlisttox_add_py35Marc Abramowitz2016-03-0788-0/+33221
|
* Merged in jeblair/paste (pull request #38)Chris Dent2018-10-231-1/+5
|\ | | | | | | Fix error on httpserver shutdown
| * Fix error on httpserver shutdownJames E. Blair2017-06-0688-0/+33229
| | | | | | | | | If a worker thread takes longer than 0.5s to shut down, we try to kill it. However, if it manages to stop between the 0.5s timeout and the call to kill_worker, kill_worker will raise an exception and abort shutdown. Handle that case with an exception handler.
* Don't raise StopIteration from generator, return insteadMiro Hron?ok2018-06-0888-0/+33225
See https://www.python.org/dev/peps/pep-0479/