diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-09-22 14:52:35 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-09-22 15:05:31 -0700 |
commit | 0d5b0fbd79ba8b2e7dd5d2f2db7d69cad3e56766 (patch) | |
tree | b0b4aefbed5297093b5fe073affa0954e4afcc81 /pym/portage/dbapi/__init__.py | |
parent | 80f71e3fdb06e0bf5f0ee6c4aa25f2b2c7a64dfd (diff) | |
download | portage-0d5b0fbd79ba8b2e7dd5d2f2db7d69cad3e56766.tar.gz portage-0d5b0fbd79ba8b2e7dd5d2f2db7d69cad3e56766.tar.bz2 portage-0d5b0fbd79ba8b2e7dd5d2f2db7d69cad3e56766.zip |
Use re.UNICODE for category/package name regexes.
This only affects r'\w' with Python 2.x, since Python 3 already
defaults to re.UNICODE behavior when compiling unicode str objects
(unless re.ASCII is specified). If a repository wants to ban unicode
categore/package names then we can add a layout.conf setting for that,
as discussed in bug #435934.
Diffstat (limited to 'pym/portage/dbapi/__init__.py')
-rw-r--r-- | pym/portage/dbapi/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index ad22f3969..fc7c7eb3b 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -21,7 +21,7 @@ from portage.exception import InvalidData from portage.localization import _ class dbapi(object): - _category_re = re.compile(r'^\w[-.+\w]*$') + _category_re = re.compile(r'^\w[-.+\w]*$', re.UNICODE) _categories = None _use_mutable = False _known_keys = frozenset(x for x in auxdbkeys |