From 71235479ab208318dff391420f9695f5cfaa9594 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 18 Jan 2013 13:33:08 -0800 Subject: Use unicode_literals more. This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3. --- pym/portage/versions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pym/portage/versions.py') 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 -- cgit v1.2.3-1-g7c22