bs4.tests.test_soup.TestWarnings.test_disk_file_warning() and bs4.tests.test_soup.TestWarnings.test_url_warning() fail with Python 3.4 and enabled warnings.
$ export PYTHONWARNINGS="d,i::ImportWarning"
$ nosetests-3.3 build/lib
............................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 396 tests in 1.426s
OK
$ nosetests-3.4 build/lib
/usr/lib64/python3.4/imp.py:32: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
PendingDeprecationWarning)
............................................................../tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The strict argument and mode are deprecated.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
/tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The value of convert_charrefs will become True in 3.5. You are encouraged to set the value explicitly.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
....................................................................................................../tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The strict argument and mode are deprecated.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
/tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The value of convert_charrefs will become True in 3.5. You are encouraged to set the value explicitly.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
...../tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The strict argument and mode are deprecated.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
/tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The value of convert_charrefs will become True in 3.5. You are encouraged to set the value explicitly.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
....................................FF/tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The strict argument and mode are deprecated.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
/tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The value of convert_charrefs will become True in 3.5. You are encouraged to set the value explicitly.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
.........../tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The strict argument and mode are deprecated.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
/tmp/beautifulsoup/build/lib/bs4/builder/_htmlparser.py:157: DeprecationWarning: The value of convert_charrefs will become True in 3.5. You are encouraged to set the value explicitly.
parser = BeautifulSoupHTMLParser(*args, **kwargs)
..................................................................................................................................................................................
======================================================================
FAIL: test_disk_file_warning (bs4.tests.test_soup.TestWarnings)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/beautifulsoup/build/lib/bs4/tests/test_soup.py", line 91, in test_disk_file_warning
self.assertEqual(0, len(w))
AssertionError: 0 != 2
======================================================================
FAIL: test_url_warning (bs4.tests.test_soup.TestWarnings)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/beautifulsoup/build/lib/bs4/tests/test_soup.py", line 101, in test_url_warning
self.assertEqual(0, len(w))
AssertionError: 0 != 2
----------------------------------------------------------------------
Ran 396 tests in 1.478s
FAILED (failures=2)
Thank you for finding this and providing a patch.