Started getting DeprecationWarning for strip_cdata option of HTMLParser() in _lxml.py:124

61 views
Skip to first unread message

Nathaniel Mills

unread,
Nov 13, 2024, 10:33:00 PM11/13/24
to beautifulsoup
When running unittests I am now getting the following warning printed out:

```

/Users/wnm3/python/venv/lib/python3.12/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.

  parser = parser(

```

We are using 4.12.3 of bs4

Isaac Muse

unread,
Nov 16, 2024, 9:08:50 AM11/16/24
to beautifulsoup
I believe LXML has deprecated that parameter. Beautiful Soup has removed usage of it in the main branch, but there hasn't been a stable release yet. Currently, it is just a warning and nothing should break, but it seems like it will be fixed in the next stable release.
Reply all
Reply to author
Forward
0 new messages