beautifulsoup4: The 'text' argument to find()-type methods is deprecated
Closed this issue · 1 comments
It seems like we are currently using some deprecated beautifulsoup4 parameters:
test/test_geocaching.py::TestShortcuts::test_get_cache_by_guid
/home/me/pycaching/.env/lib/python3.10/site-packages/bs4/element.py:784: DeprecationWarning: The 'text' argument to find()-type methods is deprecated. Use 'string' instead.
warnings.warn(
The renaming happened in version 4.4.0:
The
text
argument to the find_* methods is now calledstring
, which is more accurate.text
still works, butstring
is the argument described in the documentation.text
may eventually change its meaning, but not for a very long time.
The deprecation warning has been introduced in version 4.11.0:
Some time ago, the misleadingly named "text" argument to find-type methods was renamed to the more accurate "string." But this supposed "renaming" didn't make it into important places like the method signatures or the docstrings. That's corrected in this version. "text" still works, but will give a DeprecationWarning.
See the changelog at https://bazaar.launchpad.net/%7Eleonardr/beautifulsoup/bs4/view/head:/CHANGELOG.
As we require beautifulsoup4 ~= 4.9
, id est beautifulsoup4 >= 4.9, == 4.*
, we should be safe to replace the offending sections.