Mon, 25 Jul 2011 14:59:31 -0500 check-code: disallow use of hasattr()
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 14:59:31 -0500] rev 14978
check-code: disallow use of hasattr() The hasattr() builtin from Python < 3.2 [1] has slightly surprising behavior: it catches all exceptions, even KeyboardInterrupt. This causes it to have several surprising side effects, such as hiding warnings that occur during attribute load and causing mysterious failure modes when ^Cing an application. In later versions of Python 2.x [0], exception classes which do not inherit from Exception (such as SystemExit and KeyboardInterrupt) are not caught, but other types of exceptions may still silently cause returning False instead of getting a reasonable exception. [0] http://bugs.python.org/issue2196 [1] http://docs.python.org/dev/whatsnew/3.2.html
Mon, 25 Jul 2011 21:15:48 -0500 demandimport: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 21:15:48 -0500] rev 14977
demandimport: use getattr instead of hasattr We don't use util.safehasattr() here to avoid adding new dependencies for demandimport. This change may expose previously-silenced deprecation warnings to appear, as hasattr silently hides warnings that occur during module import when using demandimport.
Tue, 01 Mar 2011 23:35:22 -0600 demandimport: blacklist rfc822 and mimetools to prevent spurious warnings
Augie Fackler <durin42@gmail.com> [Tue, 01 Mar 2011 23:35:22 -0600] rev 14976
demandimport: blacklist rfc822 and mimetools to prevent spurious warnings
Mon, 25 Jul 2011 20:46:30 -0500 i18n: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 20:46:30 -0500] rev 14975
i18n: use getattr instead of hasattr Using getattr instead of util.safehasattr here to avoid adding another dependency for i18n.
Mon, 25 Jul 2011 16:09:18 -0500 win32/hgwebdir_wsgi: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:09:18 -0500] rev 14974
win32/hgwebdir_wsgi: use getattr instead of hasattr
Mon, 25 Jul 2011 16:08:57 -0500 setup.py: use getattr instead of hasdattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:08:57 -0500] rev 14973
setup.py: use getattr instead of hasdattr
Mon, 25 Jul 2011 16:07:52 -0500 setup3k: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:07:52 -0500] rev 14972
setup3k: use getattr instead of hasattr Note that hasattr is fixed on Python 3, so this is more about being concise and keeping check-code happy than actual correctness of code.
Mon, 25 Jul 2011 16:37:18 -0500 tests: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:37:18 -0500] rev 14971
tests: use getattr instead of hasattr
Mon, 25 Jul 2011 16:05:01 -0500 wireproto: use safehasattr or getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:05:01 -0500] rev 14970
wireproto: use safehasattr or getattr instead of hasattr
Mon, 25 Jul 2011 16:04:44 -0500 windows: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:04:44 -0500] rev 14969
windows: use getattr instead of hasattr
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 +30000 tip