Skip to content

Commit

Permalink
MNT: fix compatibility with beautifulsoup4 4.13.0b2
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Apr 1, 2024
1 parent 73fd026 commit 9dd29c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,10 @@ class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):

def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
from bs4 import SoupStrainer

self._strainer = SoupStrainer("table")

def _parse_tables(self, document, match, attrs):
element_name = self._strainer.name
element_name = "table"
tables = document.find_all(element_name, attrs=attrs)
if not tables:
raise ValueError("No tables found")
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ psycopg2-binary>=2.9.6
pyarrow>=10.0.1
pymysql>=1.0.2
pyreadstat>=1.2.0
tables>=3.8.0
#tables>=3.8.0
python-calamine>=0.1.7
pyxlsb>=1.0.10
s3fs>=2022.11.0
Expand Down

0 comments on commit 9dd29c6

Please sign in to comment.