summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-10-02 09:46:59 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-10-02 09:46:59 -0400
commit81b1a39ab4a233c4fb5fe8aa77e81cd67c44dc78 (patch)
tree957e2200e7e3c3825e840c07c85feab79152386f
parent031ff0e51d01ef4ab09b47916f342f9f77e13daf (diff)
Restored the helpful syntax error that happens when you try to
import the Python 2 edition of Beautiful Soup under Python 3. [bug=1213387]
-rw-r--r--NEWS.txt6
-rw-r--r--bs4/__init__.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/NEWS.txt b/NEWS.txt
index 88a60a2..45e4e4d 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,9 @@
+= 4.3.3 (Unreleased) =
+
+* Restored the helpful syntax error that happens when you try to
+ import the Python 2 edition of Beautiful Soup under Python
+ 3. [bug=1213387]
+
= 4.3.2 (20131002) =
* Fixed a bug in which short Unicode input was improperly encoded to
diff --git a/bs4/__init__.py b/bs4/__init__.py
index 7ba3426..a0049ad 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -45,7 +45,7 @@ from .element import (
# The very first thing we do is give a useful error if someone is
# running this code under Python 3 without converting it.
-syntax_error = u'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work. You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'
+'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>'You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'
class BeautifulSoup(Tag):
"""