http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/roundup/cgi/cgitb.py Mercurial Repository: p/roundup/code: roundup/cgi/cgitb.py history 2026-04-08T21:39:40-04:00 chore: remove __future print_funcion from code. http://hg.code.sf.net:8000/p/roundup/code/#changeset-9c3ec0a5c7fc88acb8a65632ecc13b2d52380314 John Rouillard rouilj@ieee.org 2026-04-08T21:39:40-04:00 2026-04-08T21:39:40-04:00
changeset 9c3ec0a5c7fc
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description chore: remove __future print_funcion from code.

Not needed as of Python 3.
files
issue2551350 - Python changes for 3.12 with roundup 2.3.0 cgitb.py http://hg.code.sf.net:8000/p/roundup/code/#changeset-6763813d9d343958d718149cf4b5b127c92a3919 John Rouillard rouilj@ieee.org 2024-05-14T21:27:28-04:00 2024-05-14T21:27:28-04:00
changeset 6763813d9d34
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2551350 - Python changes for 3.12 with roundup 2.3.0 cgitb.py

Fix change in pydoc.html.header() signature. It dropped foreground and
background color arguments in 3.11 and newer.

Also enable test code for the html function.
files
fix: cgitb crashes if there is no line number set. http://hg.code.sf.net:8000/p/roundup/code/#changeset-6c5f8da9fca74b99d3c78fb3ec19a2a5053dedf7 John Rouillard rouilj@ieee.org 2024-03-13T18:25:59-04:00 2024-03-13T18:25:59-04:00
changeset 6c5f8da9fca7
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description fix: cgitb crashes if there is no line number set.

I am not sure why:

context.position[0]

is None when an exception happens while processing templates. This
causes a second exception because of a print statement matching %d to
None. The second exception blows away any chance at getting useful
info. So fix it by passing line number -1. Hopefully people will
recognize that as bogus and interpret it as no line number was
available.

Fixing the underlying cause (in ZopeTAL???) would be better though.
files
flake8 fixes http://hg.code.sf.net:8000/p/roundup/code/#changeset-57f34b0b912cf5dea9cd93e5536878ca0ce39fb3 John Rouillard rouilj@ieee.org 2023-05-07T09:10:10-04:00 2023-05-07T09:10:10-04:00
changeset 57f34b0b912c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 fixes

move import to top, indentation, remove trailing whitespace ...
files
flake8 plus tests for cgitb.py http://hg.code.sf.net:8000/p/roundup/code/#changeset-3129d73e8535a40dcdf4caed36ed4157a77db8b0 John Rouillard rouilj@ieee.org 2022-09-14T22:35:23-04:00 2022-09-14T22:35:23-04:00
changeset 3129d73e8535
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 plus tests for cgitb.py

flake8 fixes for cgitb.py.

Also set up tests for functions in unit.
Need tests before making some other changes in cgitb.py.
files
pep8 fixes http://hg.code.sf.net:8000/p/roundup/code/#changeset-70e6b053193bf9123f42ce1f572b22f826b8d455 John Rouillard rouilj@ieee.org 2020-06-19T21:39:17-04:00 2020-06-19T21:39:17-04:00
changeset 70e6b053193b
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description pep8 fixes
files
Fix problem with cgi.escape being depricated a different way. This way http://hg.code.sf.net:8000/p/roundup/code/#changeset-883c9e90b4031a477a710c08c8686e18ba47fdbc John Rouillard rouilj@ieee.org 2019-07-06T13:12:58-04:00 2019-07-06T13:12:58-04:00
changeset 883c9e90b403
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix problem with cgi.escape being depricated a different way. This way
uses anypy and is cleaner. Also fixes incorrect/incomplete change that
resulted in escaped in TAL generated by TALInterpreter.py. The escaped
quotes break javascript etc. defined using tal string: values.

TODO: add test cases for TAL. This wouldn't have snuck through for a
month if we had good coverage of that library.
files
Call cgi.escape only on python 2. Replace with html.escapeif it can be http://hg.code.sf.net:8000/p/roundup/code/#changeset-1a835db4167402cc9a2fdf5eb4345b83b9e64607 John Rouillard rouilj@ieee.org 2019-06-11T21:29:24-04:00 2019-06-11T21:29:24-04:00
changeset 1a835db41674
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Call cgi.escape only on python 2. Replace with html.escapeif it can be
found.
files
Python 3 preparation: update tokenize use in cgitb.py. http://hg.code.sf.net:8000/p/roundup/code/#changeset-e70fe1d1215b1ab7064a54c4b583527b997e7c30 Joseph Myers jsm@polyomino.org.uk 2018-07-25T11:40:44+00:00 2018-07-25T11:40:44+00:00
changeset e70fe1d1215b
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: update tokenize use in cgitb.py.

Note that the same interface that has changed incompatibly is also
used in tools/pygettext.py. That file also needs fixing, but this
patch does *not* attempt such a fix.
files
Python 3 preparation: avoid string.join(). http://hg.code.sf.net:8000/p/roundup/code/#changeset-1ab2c81a64df050a52ab16121a0131882e6acef0 Joseph Myers jsm@polyomino.org.uk 2018-07-25T10:43:40+00:00 2018-07-25T10:43:40+00:00
changeset 1ab2c81a64df
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: avoid string.join().
files
Python 3 preparation: avoid string.split(). http://hg.code.sf.net:8000/p/roundup/code/#changeset-86b6cea7a9752bc3caecd69f924796c73e904cc0 Joseph Myers jsm@polyomino.org.uk 2018-07-25T10:42:42+00:00 2018-07-25T10:42:42+00:00
changeset 86b6cea7a975
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: avoid string.split().
files
Python 3 preparation: avoid obsolete types.*Type names. http://hg.code.sf.net:8000/p/roundup/code/#changeset-7172c201dec2e47276a3c88dace034e7b5b0cc5d Joseph Myers jsm@polyomino.org.uk 2018-07-25T09:10:46+00:00 2018-07-25T09:10:46+00:00
changeset 7172c201dec2
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: avoid obsolete types.*Type names.

There are references to types.ListType (not actually used),
types.TupleType (for which tuple is a sufficient replacement) and
types.InstanceType (also removed from the types module in Python 3, it
was the type of instances of old-style classes only). Where
InstanceType is used it's testing whether an exception is a class or
not; support for non-class exceptions was removed in Python 3 and
patch 3 in this series removed the sole instance of one in Roundup, so
making the code in question unconditional seems reasonable.
files
Python 3 preparation: convert print to a function. http://hg.code.sf.net:8000/p/roundup/code/#changeset-64b05e24dbd889f52bf8f773d3456bd0135baa27 Joseph Myers jsm@polyomino.org.uk 2018-07-24T09:54:52+00:00 2018-07-24T09:54:52+00:00
changeset 64b05e24dbd8
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: convert print to a function.

Tool-assisted patch. It is possible that some "from __future__ import
print_function" are not in fact needed, if a file only uses print()
with a single string as an argument and so would work fine in Python 2
without that import.
files
Remove keyword expansions from CVS. All regression tests passed afterwards. http://hg.code.sf.net:8000/p/roundup/code/#changeset-6e3e4f24c75376f61ae0bf0e9ee334567585c38e Eric S. Raymond esr@thyrsus.com 2011-11-16T09:51:38-05:00 2011-11-16T09:51:38-05:00
changeset 6e3e4f24c753
branch
bookmark
tag
user Eric S. Raymond <esr@thyrsus.com>
description Remove keyword expansions from CVS. All regression tests passed afterwards.
files
more modernisation http://hg.code.sf.net:8000/p/roundup/code/#changeset-74476eaac38aba2f682d09951a669f673065592f Richard Jones richard@users.sourceforge.net 2010-02-26T00:38:53+00:00 2010-02-26T00:38:53+00:00
changeset 74476eaac38a
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description more modernisation
files
Improve error reporting. http://hg.code.sf.net:8000/p/roundup/code/#changeset-b1e614c6759f0f42b08a0ba7d7ca8e0728dbf740 Stefan Seefeld stefan@seefeld.name 2009-10-09T13:13:32+00:00 2009-10-09T13:13:32+00:00
changeset b1e614c6759f
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description Improve error reporting.
files
message translator is passed by the client in function arguments; http://hg.code.sf.net:8000/p/roundup/code/#changeset-7500a9bb8bf9b3ec800a9ac7f37738a2bbe0ed39 Alexander Smishlajev a1s@users.sourceforge.net 2004-07-13T10:18:00+00:00 2004-07-13T10:18:00+00:00
changeset 7500a9bb8bf9
branch
bookmark
tag
user Alexander Smishlajev <a1s@users.sourceforge.net>
description message translator is passed by the client in function arguments;

more messages marked for translation, especially in pt_html();

fix vim modeline
files
use templating translation service instead of commandline-oriented gettext() http://hg.code.sf.net:8000/p/roundup/code/#changeset-cafdf8b7cc697ad9089313bf58894cecb80fb1d4 Alexander Smishlajev a1s@users.sourceforge.net 2004-06-09T09:20:01+00:00 2004-06-09T09:20:01+00:00
changeset cafdf8b7cc69
branch
bookmark
tag
user Alexander Smishlajev <a1s@users.sourceforge.net>
description use templating translation service instead of commandline-oriented gettext()
files
documentation cleanup http://hg.code.sf.net:8000/p/roundup/code/#changeset-fc52d57c6c3e1527f340677f484744a40f645ad4 Richard Jones richard@users.sourceforge.net 2004-02-11T23:55:10+00:00 2004-02-11T23:55:10+00:00
changeset fc52d57c6c3e
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description documentation cleanup
files
[maint-0.6] fix #white in cgitb http://hg.code.sf.net:8000/p/roundup/code/#changeset-15a7aae3f34c3d6d8ff1faebcb3c0506ffee1e4e Richard Jones richard@users.sourceforge.net 2003-12-05T03:38:47+00:00 2003-12-05T03:38:47+00:00
changeset 15a7aae3f34c
branch maint-0.6
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description fix #white in cgitb
files
fix #white in cgitb http://hg.code.sf.net:8000/p/roundup/code/#changeset-0e19e99075e3e4f95a0aafaef880be6bd1443f2f Richard Jones richard@users.sourceforge.net 2003-12-05T03:38:47+00:00 2003-12-05T03:38:47+00:00
changeset 0e19e99075e3
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description fix #white in cgitb
files
extra info in template error report http://hg.code.sf.net:8000/p/roundup/code/#changeset-cce5b430900514376c1fb49a7fe43ddebfde39f1 Richard Jones richard@users.sourceforge.net 2003-01-21T23:54:28+00:00 2003-01-21T23:54:28+00:00
changeset cce5b4309005
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description extra info in template error report
files
Replaced the content() callback ickiness with Page Template macro usage http://hg.code.sf.net:8000/p/roundup/code/#changeset-b862bbf2067a91539a08bca37a4437e01fa6b579 Richard Jones richard@users.sourceforge.net 2002-09-25T02:10:25+00:00 2002-09-25T02:10:25+00:00
changeset b862bbf2067a
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description Replaced the content() callback ickiness with Page Template macro usage

changed the default CSS style to be less offensive to some ;)

better handling of Page Template compilation errors

removed dependency on ComputedAttribute
files
added generic item editing http://hg.code.sf.net:8000/p/roundup/code/#changeset-7e193bbda38e66b8573d6099806cb5ee2cb397fa Richard Jones richard@users.sourceforge.net 2002-09-13T03:31:19+00:00 2002-09-13T03:31:19+00:00
changeset 7e193bbda38e
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description added generic item editing

. much nicer layout of template rendering errors
. added context/is_edit_ok and context/is_view_ok convenience methods and
implemented use of them in the classic template
files
more Log removal http://hg.code.sf.net:8000/p/roundup/code/#changeset-e5826025eeb79f39c9c73309727d89b1b24372a8 Richard Jones richard@users.sourceforge.net 2002-09-10T01:07:06+00:00 2002-09-10T01:07:06+00:00
changeset e5826025eeb7
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description more Log removal
files
removed some property name clashes http://hg.code.sf.net:8000/p/roundup/code/#changeset-04b44df7af1df053253566f9a3dda08e3265499e Richard Jones richard@users.sourceforge.net 2002-09-09T05:28:48+00:00 2002-09-09T05:28:48+00:00
changeset 04b44df7af1d
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description removed some property name clashes
files
tweak http://hg.code.sf.net:8000/p/roundup/code/#changeset-cf22c87d6fce51c4f99d5a084361fe7ee8903584 Richard Jones richard@users.sourceforge.net 2002-09-06T07:23:29+00:00 2002-09-06T07:23:29+00:00
changeset cf22c87d6fce
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description tweak
files
much nicer error messages when there's a templating error http://hg.code.sf.net:8000/p/roundup/code/#changeset-0f9aa62917bdb381c0f09d306b559d9ca0c48e40 Richard Jones richard@users.sourceforge.net 2002-09-06T07:21:31+00:00 2002-09-06T07:21:31+00:00
changeset 0f9aa62917bd
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description much nicer error messages when there's a templating error
files
New CGI interface support http://hg.code.sf.net:8000/p/roundup/code/#changeset-55ab0c5b49f9d642e645ea95bdfc789a5285021e Richard Jones richard@users.sourceforge.net 2002-08-30T08:28:44+00:00 2002-08-30T08:28:44+00:00
changeset 55ab0c5b49f9
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description New CGI interface support
files