commit 33da0445d2 Author: John Kristensen Date: Thu May 8 18:44:29 2014 +1000 Remove anypy.sets_ The anypy.sets_ package module is no longer used in the roundup codebase because python v2.4 is no longer supported. The anypy VERSION has been bumped to 0.2 to reflect this removal, but the version has probably never changed when other features were added in the past so this bump may be pointless. diff --git a/2to3-done.txt b/2to3-done.txt index 9b31da1b7f..a52e4f3b1b 100644 --- a/2to3-done.txt +++ b/2to3-done.txt @@ -149,7 +149,6 @@ NOTHING DONE ./roundup/actions.py ./roundup/anypy/__init__.py ./roundup/anypy/hashlib_.py -./roundup/anypy/sets_.py ./roundup/backends/blobfiles.py ./roundup/backends/indexer_xapian.py ./roundup/backends/tsearch2_setup.py diff --git a/roundup/anypy/README.txt b/roundup/anypy/README.txt index 7b0fe7281d..57be11f4ee 100644 --- a/roundup/anypy/README.txt +++ b/roundup/anypy/README.txt @@ -11,31 +11,6 @@ in this package provide the functionalities which are used by Roundup Use the modules in this package to preserve Roundup's compatibility. -sets_: sets compatibility module -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Since Python 2.4, there is a built-in type 'set'; therefore, the 'sets' -module is deprecated since version 2.6. As far as Roundup is concerned, -the usage is identical; see -http://docs.python.org/library/sets.html#comparison-to-the-built-in-set-types - -Uses the built-in type 'set' if available, and thus avoids -deprecation warnings. Simple usage: - -Change all:: - from sets import Set - -to:: - from roundup.anypy.sets_ import set - -and use 'set' instead of 'Set' (or sets.Set, respectively). -To avoid unnecessary imports, you can:: - - try: - set - except NameError: - from roundup.anypy.sets_ import set - hashlib_: md5/sha/hashlib compatibility ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/roundup/anypy/TODO.txt b/roundup/anypy/TODO.txt index 36e870995e..46e902bce8 100644 --- a/roundup/anypy/TODO.txt +++ b/roundup/anypy/TODO.txt @@ -1,4 +1,3 @@ Python compatiblity TODO ~~~~~~~~~~~~~~~~~~~~~~~~ -Remove sets_ included for Python 2.3 compatibility. diff --git a/roundup/anypy/__init__.py b/roundup/anypy/__init__.py index 21eee1e1a2..dfdde4396d 100644 --- a/roundup/anypy/__init__.py +++ b/roundup/anypy/__init__.py @@ -3,5 +3,5 @@ roundup.anypy - compatibility layer for any Python 2.3+ """ VERSION = '.'.join(map(str, (0, - 1, # hashlib_, sets_ + 2, # hashlib_ ))) diff --git a/roundup/anypy/sets_.py b/roundup/anypy/sets_.py deleted file mode 100644 index b3e7c451a8..0000000000 --- a/roundup/anypy/sets_.py +++ /dev/null @@ -1,30 +0,0 @@ -""" -anypy.sets_: sets compatibility module - -uses the built-in type 'set' if available, and thus avoids -deprecation warnings. Simple usage: - -Change all - from sets import Set -to - from roundup.anypy.sets_ import set - -and use 'set' instead of 'Set'. -To avoid unnecessary imports, you can: - - try: - set - except NameError: - from roundup.anypy.sets_ import set - -see: -http://docs.python.org/library/sets.html#comparison-to-the-built-in-set-types - -""" - -try: - set = set # built-in since Python 2.4 -except (NameError, TypeError): - from sets import Set as set # deprecated as of Python 2.6 - -# vim: ts=8 sts=4 sw=4 si et diff --git a/share/roundup/templates/devel/detectors/nosyreaction.py b/share/roundup/templates/devel/detectors/nosyreaction.py index b49d2fb8d0..f5b8d6e18e 100644 --- a/share/roundup/templates/devel/detectors/nosyreaction.py +++ b/share/roundup/templates/devel/detectors/nosyreaction.py @@ -1,5 +1,3 @@ -from roundup.anypy.sets_ import set - from roundup import roundupdb, hyperdb def nosyreaction(db, cl, nodeid, oldvalues): diff --git a/share/roundup/templates/responsive/detectors/nosyreaction.py b/share/roundup/templates/responsive/detectors/nosyreaction.py index b49d2fb8d0..f5b8d6e18e 100644 --- a/share/roundup/templates/responsive/detectors/nosyreaction.py +++ b/share/roundup/templates/responsive/detectors/nosyreaction.py @@ -1,5 +1,3 @@ -from roundup.anypy.sets_ import set - from roundup import roundupdb, hyperdb def nosyreaction(db, cl, nodeid, oldvalues): diff --git a/test/test_mailgw.py b/test/test_mailgw.py index 81bcf0a249..c0bdc5b680 100644 --- a/test/test_mailgw.py +++ b/test/test_mailgw.py @@ -32,7 +32,6 @@ from roundup import mailgw, i18n, roundupdb from roundup.mailgw import MailGW, Unauthorized, uidFromAddress, \ parseContent, IgnoreLoop, IgnoreBulk, MailUsageError, MailUsageHelp from roundup import init, instance, password, rfc2822, __version__ -from roundup.anypy.sets_ import set #import db_test_base import memorydb diff --git a/website/issues/detectors/nosyreaction.py b/website/issues/detectors/nosyreaction.py index 71a6befb16..9caed2b98a 100644 --- a/website/issues/detectors/nosyreaction.py +++ b/website/issues/detectors/nosyreaction.py @@ -1,5 +1,3 @@ -from roundup.anypy.sets_ import set - from roundup import roundupdb, hyperdb def nosyreaction(db, cl, nodeid, oldvalues):