http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/roundup/cgi/PageTemplates/MultiMapping.py Mercurial Repository: p/roundup/code: roundup/cgi/PageTemplates/MultiMapping.py history 2018-07-24T23:04:42+00:00 Python 3 preparation: update calls to dict methods. http://hg.code.sf.net:8000/p/roundup/code/#changeset-23b8e6067f7cdf5ff451f0a99cac4fb288e56859 Joseph Myers jsm@polyomino.org.uk 2018-07-24T23:04:42+00:00 2018-07-24T23:04:42+00:00
changeset 23b8e6067f7c
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: update calls to dict methods.

Tool-assisted patch. Changes of iterkeys / itervalues / iteritems to
keys / values / items are fully automated, but may make things less
efficient in Python 2. Automated tools want to add list() around many
calls to keys / values / items, but I thought most such list()
additions were unnecessary because it seemed the result of keys /
values / items was just iterated over while the set of dict keys
remained unchanged, rather than used in a way requiring an actual
list, or used while the set of keys in the dict could change. It's
quite possible I missed some cases where list() was really needed, or
left in some unnecessary list() calls.

In cases where list() was only needed because the resulting list was
then sorted in-place, I changed the code to use calls to sorted().
files
Python 3 preparation: use sum() instead of reduce(). http://hg.code.sf.net:8000/p/roundup/code/#changeset-a7bf8c4e502f55af9c65d4409f3fc2d429ab8ac2 Joseph Myers jsm@polyomino.org.uk 2018-07-24T23:01:57+00:00 2018-07-24T23:01:57+00:00
changeset a7bf8c4e502f
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: use sum() instead of reduce().

reduce() has changed from a built-in function to something in
functools in Python 3. However, since both uses were with
operator.add / operator.__add__, it seemed to make more sense to use
sum() instead of functools.reduce().
files
Python 3 preparation: change "x.has_key(y)" to "y in x". http://hg.code.sf.net:8000/p/roundup/code/#changeset-0942fe89e82e3e84d95a3d0ca5d8d15502f57348 Joseph Myers jsm@polyomino.org.uk 2018-07-24T22:08:17+00:00 2018-07-24T22:08:17+00:00
changeset 0942fe89e82e
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: change "x.has_key(y)" to "y in x".

(Also likewise "not in" where appropriate.) Tool-generated patch.
files
Python 3 preparation: "raise" syntax. http://hg.code.sf.net:8000/p/roundup/code/#changeset-35ea9b1efc1494f29fb07690e7087686de58e0f3 Joseph Myers jsm@polyomino.org.uk 2018-07-24T21:39:58+00:00 2018-07-24T21:39:58+00:00
changeset 35ea9b1efc14
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: "raise" syntax.

Changing "raise Exception, value" to "raise Exception(value)".
Tool-assisted patch. Particular cases to check carefully are the one
place in frontends/ZRoundup/ZRoundup.py where a string exception
needed to be fixed, and the one in roundup/cgi/client.py involving
raising an exception with a traceback (requires three-argument form of
raise in Python 2, which as I understand it requires exec() to avoid a
Python 3 syntax error).
files
fix nameerror. backport candidate http://hg.code.sf.net:8000/p/roundup/code/#changeset-81cb4860ca755de7fecc3f464cc94a00196577c4 Anthony Baxter anthonybaxter@users.sourceforge.net 2005-06-08T03:37:37+00:00 2005-06-08T03:37:37+00:00
changeset 81cb4860ca75
branch
bookmark
tag
user Anthony Baxter <anthonybaxter@users.sourceforge.net>
description fix nameerror. backport candidate
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
moved http://hg.code.sf.net:8000/p/roundup/code/#changeset-b9988e118055f23a0685ebfe4ca61b4b96a95d0c Richard Jones richard@users.sourceforge.net 2002-09-05T00:37:09+00:00 2002-09-05T00:37:09+00:00
changeset b9988e118055
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description moved
files