From: Mercurial C. <th...@in...> - 2015-08-09 12:43:01
|
# HG changeset patch # User John Kristensen <jo...@je...> # Date 1399538669 -36000 # Node ID 868db43b302af09dc1fb603f8c9d164008bf4f0b # Parent ae12b4b3ea9eb5c94ec9c70c2f98c9b1512475d6 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.3 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 -r ae12b4b3ea9e -r 868db43b302a 2to3-done.txt --- a/2to3-done.txt Wed Jul 01 16:11:12 2015 +0200 +++ b/2to3-done.txt Thu May 08 18:44:29 2014 +1000 @@ -147,7 +147,6 @@ ./roundup/__init__.py ./roundup/actions.py ./roundup/anypy/__init__.py -./roundup/anypy/sets_.py ./roundup/backends/blobfiles.py ./roundup/backends/indexer_xapian.py ./roundup/backends/tsearch2_setup.py diff -r ae12b4b3ea9e -r 868db43b302a roundup/anypy/README.txt --- a/roundup/anypy/README.txt Wed Jul 01 16:11:12 2015 +0200 +++ b/roundup/anypy/README.txt Thu May 08 18:44:29 2014 +1000 @@ -11,29 +11,4 @@ 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 - # vim: si diff -r ae12b4b3ea9e -r 868db43b302a roundup/anypy/TODO.txt --- a/roundup/anypy/TODO.txt Wed Jul 01 16:11:12 2015 +0200 +++ b/roundup/anypy/TODO.txt Thu May 08 18:44:29 2014 +1000 @@ -1,6 +1,4 @@ Python compatiblity TODO ~~~~~~~~~~~~~~~~~~~~~~~~ -Remove sets_ included for Python 2.3 compatibility. - Remove support for Python versions < 2.5. As they are not supported anymore. diff -r ae12b4b3ea9e -r 868db43b302a roundup/anypy/__init__.py --- a/roundup/anypy/__init__.py Wed Jul 01 16:11:12 2015 +0200 +++ b/roundup/anypy/__init__.py Thu May 08 18:44:29 2014 +1000 @@ -3,5 +3,5 @@ """ VERSION = '.'.join(map(str, (0, - 2, # set_ + 3, ))) diff -r ae12b4b3ea9e -r 868db43b302a roundup/anypy/sets_.py --- a/roundup/anypy/sets_.py Wed Jul 01 16:11:12 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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 -r ae12b4b3ea9e -r 868db43b302a share/roundup/templates/devel/detectors/nosyreaction.py --- a/share/roundup/templates/devel/detectors/nosyreaction.py Wed Jul 01 16:11:12 2015 +0200 +++ b/share/roundup/templates/devel/detectors/nosyreaction.py Thu May 08 18:44:29 2014 +1000 @@ -1,5 +1,3 @@ -from roundup.anypy.sets_ import set - from roundup import roundupdb, hyperdb def nosyreaction(db, cl, nodeid, oldvalues): diff -r ae12b4b3ea9e -r 868db43b302a share/roundup/templates/responsive/detectors/nosyreaction.py --- a/share/roundup/templates/responsive/detectors/nosyreaction.py Wed Jul 01 16:11:12 2015 +0200 +++ b/share/roundup/templates/responsive/detectors/nosyreaction.py Thu May 08 18:44:29 2014 +1000 @@ -1,5 +1,3 @@ -from roundup.anypy.sets_ import set - from roundup import roundupdb, hyperdb def nosyreaction(db, cl, nodeid, oldvalues): diff -r ae12b4b3ea9e -r 868db43b302a test/test_mailgw.py --- a/test/test_mailgw.py Wed Jul 01 16:11:12 2015 +0200 +++ b/test/test_mailgw.py Thu May 08 18:44:29 2014 +1000 @@ -31,7 +31,6 @@ from roundup.mailgw import MailGW, Unauthorized, uidFromAddress, \ parseContent, IgnoreLoop, IgnoreBulk, MailUsageError, MailUsageHelp from roundup import init, instance, password, __version__ -from roundup.anypy.sets_ import set #import db_test_base import memorydb diff -r ae12b4b3ea9e -r 868db43b302a website/issues/detectors/nosyreaction.py --- a/website/issues/detectors/nosyreaction.py Wed Jul 01 16:11:12 2015 +0200 +++ b/website/issues/detectors/nosyreaction.py Thu May 08 18:44:29 2014 +1000 @@ -1,5 +1,3 @@ -from roundup.anypy.sets_ import set - from roundup import roundupdb, hyperdb def nosyreaction(db, cl, nodeid, oldvalues): |