Test failures with Python 3.4 and enabled warnings

Bug #1375721 reported by Arfrever Frehtes Taifersar Arahesis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Beautiful Soup
Fix Released
Undecided
Unassigned
beautifulsoup4 (Debian)
Fix Released
Unknown

Bug Description

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)

Related branches

no longer affects: debian
Changed in beautifulsoup4 (Debian):
status: Unknown → Confirmed
Changed in beautifulsoup4 (Debian):
status: Confirmed → Fix Released
Revision history for this message
Leonard Richardson (leonardr) wrote :

Thank you for finding this and providing a patch.

Changed in beautifulsoup:
status: New → Fix Committed
Changed in beautifulsoup:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.