diff options
-rw-r--r-- | NEWS.txt | 7 | ||||
-rw-r--r-- | bs4/__init__.py | 2 | ||||
-rw-r--r-- | bs4/element.py | 7 | ||||
-rw-r--r-- | bs4/tests/test_tree.py | 7 |
4 files changed, 2 insertions, 21 deletions
@@ -1,9 +1,4 @@ -= 4.3.0 (Unreleased) = - -* A NavigableString object now has an immutable '.name' property whose - value is always None. This makes it easier to iterate over a mixed - list of tags and strings without having to check whether each - element is a tag or a string. += 4.2.1 (20130531) = * The default XML formatter will now replace ampersands even if they appear to be part of entities. That is, "<" will become diff --git a/bs4/__init__.py b/bs4/__init__.py index a949d6d..03b2416 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -17,7 +17,7 @@ http://www.crummy.com/software/BeautifulSoup/bs4/doc/ """ __author__ = "Leonard Richardson (leonardr@segfault.org)" -__version__ = "4.3.0" +__version__ = "4.2.1" __copyright__ = "Copyright (c) 2004-2013 Leonard Richardson" __license__ = "MIT" diff --git a/bs4/element.py b/bs4/element.py index 538f6b6..f6864f2 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -672,13 +672,6 @@ class NavigableString(unicode, PageElement): output = self.format_string(self, formatter) return self.PREFIX + output + self.SUFFIX - @property - def name(self): - return None - - @name.setter - def name(self, name): - raise AttributeError("A NavigableString cannot be given a name.") class PreformattedString(NavigableString): """A NavigableString not subject to the normal formatting rules. diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py index fc0e2c6..2d09f96 100644 --- a/bs4/tests/test_tree.py +++ b/bs4/tests/test_tree.py @@ -1187,13 +1187,6 @@ class TestElementObjects(SoupTest): soup = self.soup("foo<!--IGNORE-->bar") self.assertEqual(['foo', 'bar'], list(soup.strings)) - def test_string_has_immutable_name_property(self): - string = self.soup("s").string - self.assertEqual(None, string.name) - def t(): - string.name = 'foo' - self.assertRaises(AttributeError, t) - class TestCDAtaListAttributes(SoupTest): """Testing cdata-list attributes like 'class'. |