diff --git a/CHANGES.rst b/CHANGES.rst index 6603e12..ec8c332 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,7 +8,7 @@ Alterações [hvelarde] - Adiciona suporte para Python 3 e dependencia com o future. - [caduvieira] + [caduvieira, hvelarde] - Remove suporte para Python 2.6 e Plone 4.2. [hvelarde] diff --git a/src/brasil/gov/vcge/vocabulary.py b/src/brasil/gov/vcge/vocabulary.py index fcf3d5c..877cb3b 100644 --- a/src/brasil/gov/vcge/vocabulary.py +++ b/src/brasil/gov/vcge/vocabulary.py @@ -33,9 +33,9 @@ class VCGEVocabulary(object): def __call__(self, context): items = [] termos = load_skos() - items = termos.items() + # XXX: calling .items() in Python 2 is inefficient items = [SimpleTerm(key, key, value['title']) - for (key, value) in items] + for (key, value) in termos.items()] return SimpleVocabulary(items)