summaryrefslogtreecommitdiffstats
path: root/pym/portage/versions.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-18 13:33:08 -0800
committerZac Medico <zmedico@gentoo.org>2013-01-18 13:36:47 -0800
commit71235479ab208318dff391420f9695f5cfaa9594 (patch)
treed36bc22802e3b13c8ca5dce4328540a287c6eb3f /pym/portage/versions.py
parent0d732def5d30b29ab2941f0c66919a3ec4e8eb02 (diff)
downloadportage-71235479ab208318dff391420f9695f5cfaa9594.tar.gz
portage-71235479ab208318dff391420f9695f5cfaa9594.tar.bz2
portage-71235479ab208318dff391420f9695f5cfaa9594.zip
Use unicode_literals more.
This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3.
Diffstat (limited to 'pym/portage/versions.py')
-rw-r--r--pym/portage/versions.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/versions.py b/pym/portage/versions.py
index a9b7e64fe..d78873f9e 100644
--- a/pym/portage/versions.py
+++ b/pym/portage/versions.py
@@ -1,7 +1,9 @@
# versions.py -- core Portage functionality
-# Copyright 1998-2012 Gentoo Foundation
+# Copyright 1998-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+from __future__ import unicode_literals
+
__all__ = [
'best', 'catpkgsplit', 'catsplit',
'cpv_getkey', 'cpv_getversion', 'cpv_sort_key', 'pkgcmp', 'pkgsplit',
@@ -79,7 +81,7 @@ def _get_pv_re(eapi_attrs):
else:
pv_re = _pv['dots_disallowed_in_PN']
- pv_re = re.compile(_unicode_decode('^' + pv_re + '$'), re.VERBOSE | re.UNICODE)
+ pv_re = re.compile(r'^' + pv_re + r'$', re.VERBOSE | re.UNICODE)
_pv_re_cache[cache_key] = pv_re
return pv_re