Mercurial > p > roundup > code
diff doc/upgrading.txt @ 5332:d0689aaa83db
Applied patch 0038 from issue2550960 to upgrade code examples in
documentation to be compatible with both python 2 and 3. Patch
supplied by Joseph Myers.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 12 Jun 2018 20:27:04 -0400 |
| parents | ba1ce44254df |
| children | dd242cd7a182 392f887652f0 |
line wrap: on
line diff
--- a/doc/upgrading.txt Thu Jun 07 12:39:31 2018 +0200 +++ b/doc/upgrading.txt Tue Jun 12 20:27:04 2018 -0400 @@ -872,7 +872,7 @@ if op == '-': affected [i] = 1 break - print ', '.join(sorted(affected.iterkeys())) + print(', '.join(sorted(affected.keys()))) To find out which files where attached before you can look in the history of the affected issue. For fixing issues you can re-attach the @@ -923,6 +923,7 @@ search for this property:: #!/usr/bin/python + from __future__ import print_function import os from roundup import instance @@ -930,14 +931,14 @@ db = tracker.open('admin') for cl in sorted(db.getclasses()): - print "Class:", cl + print("Class:", cl) for p in sorted(db.getclass(cl).getprops(protected=True).keys()): - print " Property:", p + print(" Property:", p) roles = [] - for role in sorted(db.security.role.iterkeys()): + for role in sorted(db.security.role.keys()): if db.security.roleHasSearchPermission(cl,p,role): roles.append(role) - print " roles may search:", ', '.join(roles) + print(" roles may search:", ', '.join(roles)) Migrating from 1.4.x to 1.4.12
