summaryrefslogtreecommitdiff
path: root/src/zope/security/checker.py
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2017-09-07 17:52:15 -0500
committerJason Madden <jamadden@gmail.com>2017-09-07 17:52:15 -0500
commitc0807b6ca629731510ae41ccbcab27570d687546 (patch)
treece768e8ec100e65869e924dbe896ee367e86f056 /src/zope/security/checker.py
parentf2de4625c116085404958724468899dbe784bce6 (diff)
downloadzope-security-remove_u.tar.gz
Simplify _compat.py now that we only run on newer Pythonsremove_u
- We have u'literals' so we don't need a _u() function. For the record the Emacs replacement regex was `_u(\(['"]\)\([^)]*\)\1) -> u\1\2\1`. Amazingly, I typed that right on the first try. A few things were only used in one (test) file or function, so it was better to keep the use, if any, local and out of the "public" api: - We can use io.StringIO everywhere and it's fast. It was only imported in one file anyway. - We can just import pickle. It was only imported in one file anyway. - TEXT was only used in one test function, `type(u'')` is just as clear (especially since the usual name is `text_type`). - reload was only used in one test function, so move the definition there.
Diffstat (limited to 'src/zope/security/checker.py')
-rw-r--r--src/zope/security/checker.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/zope/security/checker.py b/src/zope/security/checker.py
index f870a13..d275b51 100644
--- a/src/zope/security/checker.py
+++ b/src/zope/security/checker.py
@@ -49,7 +49,6 @@ from zope.security.interfaces import Unauthorized
from zope.security._definitions import thread_local
from zope.security._compat import CLASS_TYPES
from zope.security._compat import PYTHON2
-from zope.security._compat import _u
from zope.security.proxy import Proxy
from zope.security.proxy import getChecker
@@ -687,7 +686,7 @@ BasicTypes_examples = {
}
if PYTHON2:
- BasicTypes_examples[unicode] = _u('uabc')
+ BasicTypes_examples[unicode] = u'uabc'
BasicTypes_examples[long] = long(65536)