From 96854a468c68ad5644dd6f7564e200012517405a Mon Sep 17 00:00:00 2001 From: Jonathan Goldsmith Date: Sat, 15 Nov 2014 11:01:22 -0500 Subject: [PATCH] v1.4 featuring WikipediaPage.categories --- CHANGELOG.md | 5 +++++ wikipedia/__init__.py | 2 +- wikipedia/wikipedia.py | 3 +-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bb4a6b..aa9e017 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Current +## Version 1.4 + +* Test wikipdia library on Python v3.4. PR [#52](https://github.com/goldsmith/Wikipedia/pull/52) by [frewsxcv](https://github.com/frewsxcv) +* Add WikipediaPage.categories attribute. PR [#59](https://github.com/goldsmith/Wikipedia/pull/59) by [@willf](https://github.com/willf) + ### Version 1.3.1 * Determine package version without importing ``wikipedia`` in setup.py. Fixes [#50](https://github.com/goldsmith/Wikipedia/issues/50) reported by [@arcolife](https://github.com/arcolife) diff --git a/wikipedia/__init__.py b/wikipedia/__init__.py index d06e5a8..0a6ee25 100644 --- a/wikipedia/__init__.py +++ b/wikipedia/__init__.py @@ -1,4 +1,4 @@ from .wikipedia import * from .exceptions import * -__version__ = (1, 3, 1) +__version__ = (1, 4, 0) diff --git a/wikipedia/wikipedia.py b/wikipedia/wikipedia.py index 5aa0589..04426e4 100644 --- a/wikipedia/wikipedia.py +++ b/wikipedia/wikipedia.py @@ -619,11 +619,10 @@ def links(self): def categories(self): ''' List of categories of a page. - ''' if not getattr(self, '_categories', False): - self._categories = [re.sub("^Category:","",x) for x in + self._categories = [re.sub(r'^Category:', '', x) for x in [link['title'] for link in self.__continued_query({ 'prop': 'categories',