News¶
3.10.1¶
Correct packaging and testing when not in a clean virtualenv.
3.10.0¶
Move development to https://github.com/pasteorg/paste
Vendor cgi.FieldStorage and cgitb.Hook
More cleaning of Python 2 style code.
With version 3.10.0 Paste development moves to the pasteorg GitHub organization and will be going deeper into maintenance mode unless more active maintainers step forward to take over. “Deeper” in this case means that releases will be much less frequent and patches will only be accepted for security issues or major problems. Current consumers of Paste should prepare to migrate away to more modern solutions.
3.9.0¶
Remove dead format_environ code in watchthread.py app.
3.8.0¶
Remove remainder of Python 2 code. Thanks a-detiste.
3.7.0¶
End Python 2 support.
Remove use of distutils.
Fix double query processing in parse_formvars.
3.6.1¶
Tiny release to confirm release automation.
3.6.0¶
Provide kwarg for timestamp format in Translogger.
3.5.3¶
Use importlib instead of imp with Python 3.
3.5.2¶
Additional fixes to next in iterators.
Thanks to cjwatson.
3.5.1¶
Replace deprecated threading.currentThread, getName and setDaemon with threading.current_thread, name and daemon.
Thanks to hugovk.
3.5.0¶
Python 3 fixes to auth and wsgi.errors handling; notably making wsgi.errors text.
Thanks to brondsem.
3.4.6¶
Explicit pkg_resource dependency to easy packaging.
Thanks to mgorny.
3.4.5¶
Remove deprecated dependencies paste/fixture.py.
Thanks to jhance.
3.4.4¶
Update setup.py to work with setuptools 50.1.0+
Thanks to hrnciar for the patch.
3.4.3¶
Patch auth ticket to be python3 compatible.
Thanks to TilmanSchaefer for the patch.
3.4.2¶
Correct sorting of items() in EvalHTMLFormatter.
Thanks to amitmarkel for the patch.
3.4.1¶
Fix next in iterators in wsgilib.py.
3.4.0¶
Allow binding IPv6 address when starting a server.
Thanks to Lekinho for this patch.
3.3.0¶
Use six.BytesIO when reading wsgi.input.
Remove use of pytest-runner.
3.2.7¶
Python 3 updates for use of StringIO and auth_tkt.py.
3.2.6¶
Correctly handle HEAD requests (to send empty body) when gzip encoding requested.
3.2.4¶
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.
Thanks to tirkarthi for these fixes.
3.2.3¶
Correct
100 Continuein Python 3
3.2.2¶
Avoid some reference cycles through tracebacks in httpserver.py
3.2.1¶
Handle io.UnsupportedOperation from socket.tell()
3.2.0¶
Ensure unicode URLs work in TestApp.
Make LimitedLengthFile file return empty bytes.
Protect against accidental close in FieldStorage.
Thanks to benjaminp for many recent contributions.
3.1.1¶
TestApp.encode_multipart handles bytes filenames and params.
3.1.0¶
Allow anything that can read() for a file-like response, not just a
fileinstance.
3.0.8¶
Fix quoting of bytestrings (#23, via jelmer).
3.0.7¶
Send bytestrings when writing chunks from
paste/httpserver.py.
3.0.6¶
Revert the changes in the 3.0.5, which introduced unexpected errors in
paste/httpserver.pywhen using SSL.
3.0.5¶
Quiet a deprecation warning in OpenSSL.
3.0.4¶
Python 3 fix for deleting items from a dict.
3.0.3¶
Ensure pytest requirements set properly.
3.0.2¶
Encoding fixes in
paste.fixture.
3.0.1¶
Remove use of future for sake of html.escape and use own. Using future was causing installation loops. See: https://github.com/pasteorg/paste/issues/6
3.0.0¶
Fixes for use with Python 3.7, mostly to do with
StopIteration.Moving to https://github.com/cdent/paste to keep things maintained.
2.0.3¶
#26: Change six requirement to >=1.4.0 from [Linus Heckemann](https://bitbucket.org/sphalerite/) https://bitbucket.org/ianb/paste/pull-requests/26/change-six-requirement-to-140/diff
#28: Py3k fixes from [Nils Philippsen](https://bitbucket.org/nilsph/) https://bitbucket.org/ianb/paste/pull-requests/28/py3k-fixes/diff
#29: paste.wsgilib.add_close: Add __next__ method to support using add_close objects as iterators on Python 3. fixes https://bitbucket.org/ianb/pastedeploy/issues/18/py3-test_config_middleware-failed from [Marc Abramowitz](https://bitbucket.org/msabramo/) https://bitbucket.org/ianb/paste/pull-requests/29/pastewsgilibadd_close-add-__next__-method/diff
#30: tox.ini: Add py35 to envlist from [Marc Abramowitz](https://bitbucket.org/msabramo/) https://bitbucket.org/ianb/paste/pull-requests/30/toxini-add-py35-to-envlist/diff
#31: Enable testing with pypy from [Marc Abramowitz](https://bitbucket.org/msabramo/) https://bitbucket.org/ianb/paste/pull-requests/31/enable-testing-with-pypy/diff
#33: tox.ini: Measure test coveraage from [Marc Abramowitz](https://bitbucket.org/msabramo/) https://bitbucket.org/ianb/paste/pull-requests/33/toxini-measure-test-coverage/diff
2.0.2¶
#22: Fix improper commas in request headers in wsgi_environ (https://bitbucket.org/ianb/paste/pull-request/22/fix-improper-commas-in-request-headers-in) Fixes issue #4 (“WSGI environ totally borked”) (https://bitbucket.org/ianb/paste/issue/4/wsgi-environ-totally-borked)
#24: test_wsgirequest_charset: Use UTF-8 instead of iso-8859-1 (https://bitbucket.org/ianb/paste/pull-request/24/test_wsgirequest_charset-use-utf-8-instead) Fixes issue #7 (“Python 3 test failure”) (https://bitbucket.org/ianb/paste/issue/7/python-3-test-failure)
#23: Replace cgi.parse_qsl w/ six.moves.urllib.parse.parse_qsl (https://bitbucket.org/ianb/paste/pull-request/23/replace-cgiparse_qsl-w) Fixes issue #8 (“cgi.parse_qsl is pending deprecation”) (https://bitbucket.org/ianb/paste/issue/8/cgiparse_qsl-is-pending-deprecation)
#20: Escape CGI environment variables in HTTP 404 responses (https://bitbucket.org/ianb/paste/pull-request/20/escape-cgi-environment-variables-in-http)
#6: Add HTTP exception for new code 429 “Too Many Requests” (https://bitbucket.org/ianb/paste/pull-request/6/add-http-exception-for-new-code-429-too)
#25: replace
has_keymethod toinoperator #9 (https://bitbucket.org/ianb/paste/pull-request/25/replace-has_key-method-to-in-operator-9) Fixes #9 (“used methods removed from py3”) (https://bitbucket.org/ianb/paste/issue/9/used-methods-removed-from-py3)#5: Invalid error message when the socket is already in use (https://bitbucket.org/ianb/paste/issue/5/invalid-error-message-when-the-socket-is)
2.0.1¶
Fix setup.py for six dependency: move the six dependency from extras_require to install_requires.
Port paste.proxy to Python 3.
Fix paste.exceptions.serial_number_generator.hash_identifier() on Python 3.
Fix paste.util.threadedprint.uninstall(). Rename duplicated uninstall() function to uninstall_stdin() and fix typo in variable name (_oldstin => _oldstdin).
Add README.rst file.
2.0¶
Experimental Python 3 support.
paste now requires the six module.
Drop support of Python 2.5 and older.
Fixed
egg:Paste#cgiIn
paste.httpserver: give a 100 Continue response even when the server has been configured as an HTTP/1.0 server (clients may sendExpect: 100-Continuebefore they know the version), and wrap 100 Continueenviron['wsgi.input']files with LimitedLengthFile just like normal request bodies are wrapped, keeping WSGI applications from over-reading from the socket.Fixed parsing of paths beginning with multiple forward slashes.
Add tox.ini to run tests with tox on Python 2.6, 2.7 and 3.4.
1.7.5.1¶
Fix bug introduced in
paste.auth.auth_tkt(withurl_unquote)
1.7.5¶
Won’t install
tests/directory (also caused installation problems on some Mac systems).Fixed problem with gzip middleware and zero-length responses.
Use
X-Forwarded-Forheader inpaste.transloggerFixed problems with mimeparse code
Fixed some corner cases with CGI scripts
paste.auth.auth_tktwill URL-quote usernames, avoiding some errors with usernames with!in them.Improve handling of errors in fetching error pages in
paste.errordocument.
1.7.4¶
Fix XSS bug (security issue) with not found handlers for
paste.urlparser.StaticURLParserandpaste.urlmap.URLMap. If you ask for a path with/--><script>...that will be inserted in the error page and can execute Javascript. Reported by Tim Wintle with further details from Georg-Christian Pranschke.Replaced
paste.util.mimeparse.desired_match()
1.7.3.1¶
Removed directory name from 404 errors in
paste.urlparser.StaticURLParser.Fixed packaging to include Javascript and images for
paste.evalexception
1.7.3¶
I got a fever and the only prescription is more
paste.cowbell!Fix
paste.httpserveron Python 2.6.Fix
paste.auth.cookie, which would insert newlines for long cookies.paste.util.mimeparseparses a single*in Accept headers (sent by IE 6).Fix some problems with the
wdg_validatemiddleware.Improvements to
paste.auth.auth_tkt: add httponly support, don’t always aggressively set cookies without thewildcard_cookieoption. Also on logout, make cookies expire.In
paste.proxy.Proxyhandle Content-Length of -1.In
paste.httpexceptionsavoid some unicode errors.In
paste.httpserverhandle.read()from 100 Continue properly (because of a typo it was doing a readline).Update
paste.util.mimeparsefrom upstream.
1.7.2¶
In
paste.proxy, added some more headers that are disallowed in WSGI (e.g., Keep-Alive). Send Content-Length. Also fix the missing query string when usingpaste.proxy.Proxy(paste.proxy.TransparentProxyalready worked).Make
paste.debug.printswork with Google App Engine.Make
environ['wsgi.input']withpaste.httpserveronly have aseekmethod if it is wrapping something with a seek method (which usually it is not).In
paste.httpserverre-raise KeyboardInterrupt in worker threads.Added support for the
HttpOnlyCookie property topaste.wsgiwrappersAdded
paste.reloader.add_file_callback(), which lets you watch files based on a callback.Quiet Python 2.6 deprecation warnings.
Fix
paste.auth.cookiegenerating bad headers.Added
paste.reloader.JythonMonitorfor an experimental, optimized reloader on Jython.
1.7.1¶
Normalize and make absolute the paths passed to
paste.urlparser.StaticURLParser(before passing a relative-to-cwd path to that class would cause Forbidden errors).Deprecate
paste.fixture.setup_module()
1.7¶
Fixed bug in
paste.fixture.TestAppthat would submit forms with unnamed fields (like an unnamed submit button). Also made checkboxes with no explicitvaluesendoninstead ofchecked(which is what browsers do).Fixed bug in
paste.httpserverwhereenviron['wsgi.input'].readline(max_size)ignored the max_size argument, which can lead to large memory usage (from Jakub Stolarski)Make
paste.cascadenotice sockets that have stopped producing data. From Casey Zednick.In
paste.fixture.TestAppAccept MultiDict values for theparamsargument in requests. (Anything with a.items()method will have its items encoded as the request parameters.)Fix
paste.httpserverto allow binding to port 0.In
paste.auth.auth_tkt, set the same cookies (with the same domains) inset_cookieas get unset inlogout_user_cookie.In
paste.transloggersave REQUEST_METHOD in case it gets overridden somewhere (e.g., when using errordocuments POST would show up as GET).Exceptions with unicode messages don’t cause the collector to fail.
Sometimes
paste.exceptions.errormiddleware.ErrorMiddlewarewould not call start_response properly; this is fixed (from Andreas Kloecker).paste.fixture.TestAppcan store multiple cookie values (previously only one cookie was stored; from Andrey Lebedev)u'' in TestApp(app).get('/')will work when the body isn’t ASCII (before it would give a unicode error). This problem wasn’t present in the recommended WebTest.paste.debug.profilewon’t break when content is served with no Content-Type.Accept relative paths and paths with
/../in them forpaste.urlparser.StaticURLParser(from Eric Larson). Also fix problem with case normalization on Windows (from Ionel Maries Cristian).paste.registry.StackedObjectProxy’s now include the proxied object’s names via__dir__(for Python 2.6).Use
environ['wsgi.file_wrapper']when available (inpaste.fileapp).Make
paste.debug.printscompatible with App Engine.Fix the
domainkeyword inpaste.wsgiwrappers.WSGIResponse.delete_cookie().
1.6.1¶
Fixed bug in paste lint where PATH_INFO would become unicode.
1.6¶
Make the import of
socket.sslerrorconditional inpaste.exceptions.reporter(needed for Python interpreters compiled without SSL support).In
paste.proxy.TransparentProxy, don’t overwriteX-Forwarded-Forheader if it is already in the environment.Added
226 IM Usedstatus code topaste.wsgiwrappersIn
paste.fixture.TestApptreat<image type="image">the same as a submit button.Use
OpenSSL.tsafe.Connectionfor https withpaste.httpserver, avoiding some possible errors (sslv3 alert bad record mac).Fix small issue with
paste.cgiappand mod_wsgi.Use
BaseCookieinstead ofSimpleCookiefor storing cookies (avoids quoting cookie values).
1.5.1¶
Make
paste.cascademore tolerant of a missing or invalid Content-Length.
1.5¶
Fixed memory leak with
paste.registrynot properly removing all references to registered objects should register be called multiple times during a single context for a StackedObjectProxy.paste.httpheaders.CONTENT_RANGEreturnsbytes START-END/LENGTHinstead of justSTART-END/LENGTHIn
paste.fixture.TestAppsetCONTENT_TYPEto'application/x-www-form-urlencoded'whenever there are parameters (and no other content type was provided).In
paste.session, when cleaning files ignore files that aren’t session files.paste.httpexceptions.HTTPExceptionHandlerwill no longer catch exceptions raised during the app_iter iteration.paste.cascade.Cascadecopieswsgi.inputwhen cascading, so that one of the applications cannot read the input and leave a later application blocked when it tries to read the input.Fix assigning to
WSGIResponse.charsetbreaking the content-type.SMTP authentication is supported for the exception handler. You may now set
smtp_username,smtp_passwordandsmtp_use_tlsto control this behavior. From pthy.
1.4.2¶
Remove FreeBSD threadpool condition in paste.httpserver (which was also breaking code for Windows users).
Fix problem with
paste.wsgilib.intercept_outputand passing up exceptions.
1.4.1¶
Allow customization of the
paste.config.ConfigMiddlewareenviron key.Added a
currentmethod (an alias ofcurrent_conf) topaste.config.DispatchingConfig.Make test response
.formattribute work when you have a single named form.Try to encode any unicode input to
paste.auth.auth_tktpaste.wsgiwrappers.WSGIResponsenow has a.content_typeattribute (that does not include parameters), and a.charsetattribute (that gets the charset parameter).Inherit inherit show_exceptions_in_wsgi_errors from global configuration. Inherit
debugmore properly.
1.4¶
In
paste.httpserveradded lots of functionality to the threadpool. See the paste.httpserver threadpool documentation for details. This catches worker threads (and WSGI apps) that take too long to complete their task; killing them eventually, adding more worker threads when the pool is exhausted and it doesn’t look good that it’ll clear soon, and optionally killing the process when there are too many lost/zombie threads (you must be using some kind supervisor process for this last response to make sense).Save host and scheme information during real HTTP proxy requests to
paste.httpserver, into the keyspaste.httpserver.proxy.schemeandpaste.httpserver.proxy.hostIn
paste.exceptionsalways callstart_response; may help problems when there is an exception instart_responseitself.Added method to
paste.registry.StackedObjectProxy,_object_stack(), which returns a list of all the registered objects. Useful if you want to search through the effective history of a stacked object.Fixed infinite recursion problem with
paste.request.EnvironHeaders.keys().Fix
paste.wsgiwrappers.WSGIRequest.urlvarsto usewsgiorg.routing_argsRemove port from
paste.request.construct_urlif it’s the default port (e.g., port 80 forhttp).paste.proxyworks with headers with continuations in the response (i.e., a header that spans multiple lines). Also, treat a missing Content-Length as 0, not unlimited (may have previously caused freeze ups for some kinds of requests).StackedObjectProxysupports__call__(i.e., you can useStackedObjectProxywith callable objects).Fixed
ProfileMiddlewarenot callingclose()on consumed app_iters.httpheaders.AcceptLanguagenow won’t give an exception when there is a malformed parameter in the header.Fix
paste.auth.form.auth_formPaste Deploy entry point.Added REST methods to
paste.fixture.TestApp, so you can more easily do requests like PUT and DELETE. From Anders Pearson.Added
{{default var=default_value}}command topaste.util.template. Make{{# comment}}work.
1.3¶
In
paste.httpserverremove the reverse DNS lookup to setREMOTE_HOSTIn
paste.fileapp, if the client sends both If-None-Match and If-Modified-Since, prefer If-None-Match. Make ETags include the size as well as last modified timestamp. Make it possible to override how mimetypes are guessed.HTTPExceptionobjects now have aexc.response(environ)method that returns aWSGIResponseobject.egg:Paste#watch_threadswill show tracebacks of each thread under Python 2.5.Made
paste.util.templatetrim whitespace around statements that are on their own line.paste.fileapp.DataAppnow acceptsallowed_headers=[...]to specify the allowed headers. By default onlyGETandHEADare allowed.Added
paste.util.import_string.try_import_module, which imports modules and catchesImportError, but only if it’s an error importing the specific module, not an uncaughtImportErrorin the module being imported.
1.2.1¶
paste.httpserverdidn’t implement thereadlinethat thecgimodule wants (regression in 1.2).
1.2¶
Backward incompatible change:
paste.fileapp.FileAppproperly supports request methods, including HEAD. If you were subclassingFileApporDataAppand overriding__call__()you may have to subclassget()instead.paste.httpheaders now parses the HTTP Accept-Language header and returns a list of languages the browser supports in the order it prefers them.
paste.mimeparse module added that handles parsing HTTP Accept headers for quality and mime-types.
paste.request.construct_urlwas addingSERVER_PORTtoHTTP_HOST; butHTTP_HOST(from the Host header) generally contains a port when necessary, andSERVER_PORTshould only be used withSERVER_NAME.Added entry point for
paste.registry.RegistryManager(egg:Paste#registry).paste.request.HeaderDictfixed to know thatContent-Lengthmaps toCONTENT_LENGTH.Can use
paste.urlparser.StaticURLParserwith sub-instances other thanpaste.fileapp.FileApp(if you subclass and overridemake_app)paste.fixture.TestApp.get(status=X)takes a list of allowed status codes forX.Added a small templating system for internal use (
paste.util.template)Removed a bunch of long-deprecated modules (generally modules that have been moved to other names).
In paste.wsgiwrappers¶
paste.wsgiwrappers.WSGIRequesthas match_accept() function to screen incoming HTPT Accept values against a list of mime-types.paste.wsgiwrappers.WSGIRequest.defaultsnow accepts a new key:language:The i18n language that should be used as the fallback should a translation not occur in a language file. See docs for details.
paste.wsgiwrappers.WSGIRequestcan now optionally decode form parameters to unicode when it has acharsetvalue set.Deprecated the
paste.wsgiwrappers.settingsStackedObjectProxy dictionary forpaste.wsgiwrappers.WSGIResponse.defaults.
In paste.httpserver¶
Regression in 1.1 fixed, where Paste’s HTTP server would drop trailing slashes from paths.
paste.httpservernow puts a key in the environment when using a thread pool that allows you to track the thread pool and see any wedged threads.egg:Paste#watch_threadsis an application that can display this information.paste.httpservernow accepts all request methods, not justGET,PUT, etc. (Methods likeMKCOLwere previously rejected.)paste.httpserverhas awsgi.inputthat now does not block if you try to read past the end (it is limited to returning the number of bytes given inContent-Length). Double-reading fromwsgi.inputwon’t give you the same data, but it won’t cause blocking.
1.1.1¶
Fixed major issue with serving static files on Windows (a regression in Paste 1.1 where most static files would return 404 Not Found).
Fixed
parse_dict_querystringreturning empty dicts instead ofMultiDicts.Added
paste.config, a rewrite ofpaste.deploy.configusingpaste.registry. This version ofConfigMiddlewarewill enable use ofpaste.config.CONFIGwithin theEvalExceptioninteractive debugger.Fixed problem where
paste.recursivewould leavewsgi.inputandCONTENT_LENGTHset for recursive requests.Changed the static file servers to give 404 Not Found responses when you have extra parts after a static file, instead of 400 Bad Request (like when you request
/file.html/extra/path)
1.1¶
Security fix for
paste.urlparser.StaticURLParser. The problem allowed escaping the root (and reading files) when used withpaste.httpserver(this does not effect other servers, and does not apply when proxying requests from Apache topaste.httpserver).paste.httpserverandpaste.fixture.TestAppurl-unquoteSCRIPT_NAMEandPATH_INFO, as specified in the CGI spec. Thanks to Jon Nelson for pointing out both these issues.paste.registrynow works within theEvalExceptioninteractive debugger.Fixed
paste.auth.open_idfailures not returning a correct response.Changed
paste.httpexceptions.HTTPUnauthorizedso that theWWW-Authenticateheader is not required. 401 responses don’t have to have that header.In
paste.fixture.TestApp:<form>tags that have toactionwill preserve the existing query string. (Generally relative links that are completely empty should but were not preserving the query string)Made
paste.*compatible with py2exe by adding amodulefindercall in__init__.pyThe
paste.gzippergzipping middleware wasn’t changing the Content-Length header properly; thanks to Brad Clements for the fix.Fixed
paste.proxyto not use anything based on the dict form ofhttplib..HTTPMessage. This form folds headers together in a way that breaksSet-Cookieheaders (twoSet-Cookieheaders would be merged into one).paste.request.parse_formvarsdidn’t accept parameters inCONTENT_TYPE.prototype.jssets acharsetparameter, which caused a problem.Added a
__traceback_decorator__magic local variable, to allow arbitrary manipulation of the output ofpaste.exceptions.collectorbefore formatting.Added unicorn power to
paste.pony(from Chad Whitacre)For
paste.httpserverSSL support: add support loading an explicit certificate context, and usingssl_pem='*'create an unsigned SSL certificate (from Jason Kirtland).Fix some cases where
paste.httpservercan have an orphaned thread pool (causing the process to not shut down properly). Patch from jek.
1.0¶
Fixed
parsed_formvarspotentially locking up on wsgi.input after modification ofQUERY_STRING.Fixed problem where
paste.exceptions.errormiddlewaredidn’t expose the.close()method of the app_iter that it wraps (to catch exceptions). This is a problem if the server about the errormiddleware aborts the request; it should then call.close(), but won’t necessarily exhaust the iterator to do so.Added entry point for
paste.translogger(egg:Paste#translogger)Fixed some cases where long data (e.g., a file upload) would show up in the error report, creating a very very large report. Also, put in a monkeypatch for the
cgimodule so thatrepr(uploaded_field)won’t load the entire field into memory (from its temporary file location).Added a
force_hostoption topaste.proxy.TransparentProxy, which will force all incoming requests to the same host, but leave theHostheader intact.Added automatic cleanup of old sessions for
paste.session, from Amir Salihefendic.Quote the function name in tracebacks in the exception formatter; Genshi has function names that use
<>.
0.9.9¶
Fixed
paste.response.HeaderDictgetandsetdefaultmethods to be case insensitiveFix use of
TestApp().post(params={'key': ['list of', 'values']})as reported by Syver Enstad.paste.fileapp.DataAppis now directly usable (was previously only usable as an abstract base class).
0.9.8¶
Fixed
wsgiwrappers.WSGIResponse.delete_cookie. It also now takes optional path and domain argumentswsgiwrappers.WSGIResponsenow handles generator/iterator content more cleanly, and properly encodes unicode content according to its specified charsetFixed
wsgiwrappers.WSGIResponsemishandling multiple headers of the same nameAdded a Paste Deploy entry point for
paste.auth.cookieMoved Paste Deploy dependencies out of top-level modules and into Paste-Deploy-specific entry point functions. This should make Paste more-or-less Paste Deploy independent.
paste.urlparserandpaste.exceptions.errormiddlewarestill have some leftover bits.Added another redirector type to
paste.recursive,environ['paste.recursive.include_app_iter']which gives access to the original app_iter.Bug with
wsgilib.catch_errorsand app_iters with noclose()method.Long words in tracebacks weren’t being wrapped correctly at all. Also, large data would cause the wrapping routine to give a recursion error. Now large data is truncated (at 1000 characters), and recursion won’t be a problem. Also, wrapping shouldn’t lose characters.
Better exception if you try to put a non-str into environ when using
paste.auth.cookiepaste.exceptions.collectorproduces anexc_data.exception_typethat is a class, not a string. This helps it get formatted better in Python 2.5.All the tests pass on Python 2.5!
Added
paste.proxy.TransparentProxy, which just sends the request described in the WSGI environ on without any modification. More useful for WSGI clients than servers, it effectively allows any WSGI-based request mechanism to act like an httplib-based request mechanism.Added a
cache_max_ageargument topaste.urlparser.StaticURLParser, which allows you to encourage the caching of static files. Patch from Brad Clements.Added
suppress_http_headerstopaste.proxy.Proxy, which will filter out HTTP headers from the request before passing it on. Patch from Brad Clements.
0.9.7¶
The
EvalException‘full traceback’ button is now only displayed when the full traceback differs from the regular (includes hidden frames).Fixed
EvalExceptionreturning a Content-type of ‘text-html’ instead of ‘text/html’ in some cases.
0.9.6¶
Renamed the
paste.util.multidict.multidictclass topaste.util.multidict.MultiDict
0.9.5¶
Fixed a security vulnerability in
paste.urlparser’s StaticURLParser and PkgResourcesParser where, with some servers, you could escape the document root.Significantly improved
paste.httpserver’s (egg:Paste#http) performance. It now uses a thread pool: previously it created a new thread for every request. To revert back to the old, slower behavior, set:use_threadpool = false
in the [server:main] section of the config file.
More control of where the output of
paste.debug.printsgoes.Added a warning to
paste.wsgilib.add_closeif the upstream app_iter consumer doesn’t call theapp_iter.close()method.Fixed
testapp.post(params={})Fixed
paste.translogger.TransLoggerto log to the Apache combined log format as advertised.Fixed
paste.urlparserclasses to handle quoted characters (e.g. %20) in URL paths.Changed
paste.sessionto allow manipulating a session for the first time afterstart_responseis called.Added
paste.wsgilib.add_start_closewhich calls a function just before returning the first chunk of the app_iter.Changed
paste.urlmapso that it matches domain-specific mappings before domain-neutral mappings.Fixed IE 6 potentially receiving the following
"400 Bad Request"error on file downloads:Please check your system clock. According to this server, the time provided in the If-Modified-Since header is in the future.
Added a ‘no’ keyword argument to
TestResponse.mustcontain, so you can assert that a response does contain some strings at the same time that you assert that a response does not contain other strings, like:res = app.get('/') res.mustcontain('this must be there', no=['error', 'unexpected'])
Fixed
fileapp.FileAppto pay attention to theIf-None-Matchheader, which does ETag matching; before onlyIf-Modified-Sincewas supported, even though anETagheader was being sent; in particular Firefox would then only sendIf-None-Matchand so conditional requests never worked.Changed usage of
paste.request.MultiDicttopaste.util.multidict, particularly inpaste.wsgiwrapperswhererequest.GETreturns a new style of dictionary interface.Be more careful in
paste.request.parse_formvarsnot to let thecgimodule read fromwsgi.inputwhen there are no parsable variables in the input (based onCONTENT_TYPE).
0.9.4¶
This released was lost in a tragic clerical accident.
0.9.3¶
0.9.2 Included a version of MochiKit that was no longer compatible with evalexception; 0.9.3 reverts to a previous version.
Change wsgi.run_once=False for
paste.httpserverAdded entry points for debug apps
0.9.2¶
Fix in paste.urlmap when connecting with host:port.
Added
/_debug/summaryto evalexception, which gives a JSON-formatted list of all the exceptions in memory.
0.9.1¶
A fix for paste.errordocument, when doing an internal redirect from a POST request (the request is rewritten as a GET request)
0.9¶
Added paste.request.WSGIRequest, a request object that wraps the WSGI environment.
Added paste.registry, which is middleware for registering threadlocal objects in a request.
Avoid annoying warning from paste.recursive
paste.httpservernow removes HTTPServer’s transaction logging, which was doing a reverse DNS lookup.Added
has_sessiontopaste.sessionAllow for conditional
paste.wsgilib.intercept_outputwhich should be slightly faster (and streamable) compared to doing the condition manually.Added entry point for paste.proxy, plus improvements from Brad Clements (support path in target, filter request methods)
Added paste.pony so pony power can be added to any WSGI application.
Added port matching to
paste.urlmap.
0.5¶
Added paste.auth.auth_tkt
Added paste.auth.grantip
0.4.1¶
Some bug fixes to the built-in HTTP server.
Experimental paste.progress middleware for tracking upload progress
Some tweaking of how paste.reload works, especially with respect to shutdown.
0.4¶
Fixed up paste documentation (especially for new packages/modules)
Added paste.auth package for authentication related WSGI middle-ware components:
basicanddigestHTTP authentication as described by RFC 2617support for Yale’s Central Authentication System (
cas)open_idsupports single sign-on originally developed for LiveJournal (see http://openid.net)cookiedigitally signs cookies to record the current authenticated user (REMOTE_USER), session identifier (REMOTE_SESSION), and other WSGI entries in theenviron.a
formmodule (to be used withcookieor an equivalent) provides a simple HTML based form authentication.the
multimodule is an experimental mechanism for choosing an authentication mechanism based on the WSGIenviron
Added paste.httpserver module which provides a very simple WSGI server built upon python’s
BaseHTTPServer; this server has support for several features:support for SSL connections via OpenSSL
support for HTTP/1.1
100 Continuemessages as required by the WSGI specification (many HTTP server implementations don’t do this)implemented as a Mix-In so that it can be used with other more enchanted versions of
BaseHTTPServersupport for ‘Keep-Alive’ (standard in HTTP/1.1) by either providing a content-length or closing a connection if one is not available
Improved the paste.httpexceptions module:
added missing exception objects, and better descriptions
fixed several bugs in how exceptions are caught and propagated
usage as a
wsgi_application()enables exceptions to be returned without throwing or catching the errorsupport for plain/text messages for text-only clients such as curl, python’s urllib, or Microsoft Excel
allows customization of the HTML template for higher-level frameworks
Added paste.httpheaders module to provide a uniform mechanism to access/update standard HTTP headers in a WSGI
environandresponse_headerscollection; it includes specific support for:providing “common” header names and sorting them as suggested by RFC 2616
validated support for
Cache-Controlheader constructionvalidated support for
Content-Dispositionheader constructionparsing of
If-Modified-Sinceand other date oriented headersparsing of Range header for partial-content delivery
composition of HTTP/1.1 digest
Authorizationresponses
Improved paste.fileapp to support:
static in-memory resources
incremental downloading of files from disk
responding to ‘Range’ requests to handle partial downloads
allowing cache settings to be easily provided; including support for HTTP/1.0 ‘Expires’ and HTTP/1.1 ‘Cache-Control’
Added an experimental paste.transaction module for handling commit/rollback of standard DBAPI database connections
Added a paste.util.datetimeutil module for parsing standard date/time user-generated text values
Added a debug package, which includes:
previous top-level modules
prints,profile,wdg_validateanddoctest_webappa
testservermodule suitable to test HTTP socket connections viapytest
Re-factored paste.wsgilib into several other modules:
functions regarding header manipulation moved to paste.response
functions regarding cookies and arguments moved to paste.request
Significant improvements to
wsgiutils.wsgilibmodule:added a
dump_environapplication to help debuggingfixes to
raw_interactiveto comply with WSGI specificationsraw_interactivenow logs all 5xx exceptions and sets HTTP_HOST
Added an argument
no_profileto paste.debug.profile.profile_decorator; if that option is false, then don’t profile the function at all.Changed paste.lint to check that the status contains a message (e.g.,
"404 Not Found"instead of just"404"). Check that environmental variablesHTTP_CONTENT_TYPEandHTTP_CONTENT_LENGTHare no present. Made unknownREQUEST_METHODa warning (not an error).Added parameter
cwdto TestFileEnvironment.run-
Form filling code (use
response.forms[0]to get a form object)Added click method.
Better attribute errors.
You can force set hidden fields using
form.fields[name].force_value(value)(normally setting the value of a hidden field is an error).Frameworks can now add custom attributes to the response object.
paste.wsgilib.capture_outputis deprecated in favor of paste.wsgilib.intercept_outputRemove use of exceptions in paste.cascade.Cascade, which causes weird effects in some cases. Generally we aren’t using exceptions internally now, only return status codes. Also in cascade, be careful to keep cascaded requests from sharing the same environment.
paste.wsgilib.error_responseis deprecated (paste.httpexceptions replaces this with exception’s.wsgi_applicationmethod).Moved
paste.loginto the attic, since paste.auth pretty much replaces it.paste.urlparser improvements:
Added an application urlparser.StaticURLParser for serving static files.
Added an application urlparser.PkgResourcesParser for serving static files found with
pkg_resources(e.g., out of zipped Eggs).Be less picky about ambiguous filenames when using URLParser; if an exact file match exists, use that. (
file.gif.bakwould cause a request forfile.gifto be ambiguous before)Now looks for a
.wsgi_applicationattribute when serving Python files/modules, as a general hook for returning a WSGI application version of an object.
The ErrorMiddleware:
Returns trimmed-down exceptions if there is a
_GET variable in the request (which is meant to signal an XMLHttpRequest). Exceptions displayed in this context are best when they are smaller and easier to display.Includes a text version of the traceback, for easier copy-and-paste.
Avoid printing exceptions to
wsgi.errorsif they are already displayed elsewhere (at least by default).Highlight Python code.
Use
pkg_resources.declare_namespaceso that there are less problems about confusing thepastepackage that is provided by Paste, Paste Script, Paste Deploy, and Paste WebKit. Before you could get one of these at random if you didn’t usepkg_resources.requirefirst.Cleaned up use of
exc_infoargument instart_responsecalls (both accepting and producing), in a variety of places.