diff --git a/qutebrowser/utils/misc.py b/qutebrowser/utils/misc.py index 014e4eac1..00dad0b37 100644 --- a/qutebrowser/utils/misc.py +++ b/qutebrowser/utils/misc.py @@ -183,16 +183,7 @@ def shell_escape(s): # black magic Microshit is doing here. return s else: - # Backported from python's shlex because that's only available since - # 3.3 and we might want to support 3.2. - find_unsafe = re.compile(r'[^\w@%+=:,./-]', re.ASCII).search - if not s: - return "''" - if find_unsafe(s) is None: - return s - # use single quotes, and put single quotes into double quotes - # the string $'b is then quoted as '$'"'"'b' - return "'" + s.replace("'", "'\"'\"'") + "'" + return shlex.quote(s) def pastebin(text): diff --git a/qutebrowser/utils/usertypes.py b/qutebrowser/utils/usertypes.py index 36c75e86e..ecb6ee969 100644 --- a/qutebrowser/utils/usertypes.py +++ b/qutebrowser/utils/usertypes.py @@ -36,7 +36,7 @@ def enum(*items, start=0): """Factory for simple enumerations. We really don't need more complex things here, so we don't use python3.4's - enum, because we'd have to backport things to 3.3 and maybe even 3.2. + enum, because we'd have to backport things to 3.3. Based on: http://stackoverflow.com/a/1695250/2085149 diff --git a/scripts/setupcommon.py b/scripts/setupcommon.py index 4fcbf4e83..483570170 100644 --- a/scripts/setupcommon.py +++ b/scripts/setupcommon.py @@ -108,7 +108,6 @@ setupdata = { 'Operating System :: Microsoft :: Windows :: Windows 7', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Topic :: Internet',