NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2110 most downloaded on PyPI
Typing stubs for beautifulsoup4
Last release 1 years ago
16 May 2025
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 50 of 56 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
56 releases · first in 2021
One column per quarter.
Replace Incomplete | None = None in third party stubs
Replace Incomplete | None = None in third party stubs (#14063)
[stubsabot] Mark beautifulsoup4 as obsolete since 4.13.0
[stubsabot] Mark beautifulsoup4 as obsolete since 4.13.0 (#13455)
Release: https://pypi.org/pypi/beautifulsoup4/4.13.0 Homepage: https://www.crummy.com/software/BeautifulSoup/bs4/ Repository: https://git.launchpad.net/beautifulsoup/tree Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/beautifulsoup4
Improve typing for BS4 element.Tag's get and get_attribute_list.
Improve typing for BS4 element.Tag's get and get_attribute_list. (#12840)
beautifulsoup4: Accept void_element_close_prefix=None
beautifulsoup4: Accept void_element_close_prefix=None (#12621)
stubs: [BeautifulSoup] fix incomplete type specs for formatter
stubs: [BeautifulSoup] fix incomplete type specs for formatter (#11885)
Add indent argument to HTMLFormatter and XMLFormatter inits
Add indent argument to HTMLFormatter and XMLFormatter inits (#11855)
bs4: Make Tag.attrs more permissive
bs4: Make Tag.attrs more permissive (#11487)
Make Tag.attrs more permissive to be in line with actual code
Tag.attrs is a dict can technically have list[str] as a valid value, not just str. Making the value type a union with Any allows list[str] to be valid in a type checker's eyes if a user narrows it.
Based on discussion in, and fixes, #8755.
Update typing_extensions imports in third-party stubs
Update typing_extensions imports in third-party stubs (#11245)
Remove many redundant inheritances from Generic[]
Remove many redundant inheritances from Generic[] (#10933)
Fill in all missing upstream_repository fields
Fill in all missing upstream_repository fields (#10571)
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
Add partial_stub metadata field
Add partial_stub metadata field (#10157)
bs4: NavigableString accepts ReadableBuffer
bs4: NavigableString accepts ReadableBuffer (#10106)
It delegates to str.new.
Release: https://pypi.org/project/beautifulsoup4/4.12.2/
bs4: update for 4.12.2 (#10026)
Release: https://pypi.org/project/beautifulsoup4/4.12.2/
bs4: update for 4.12.1
bs4: update for 4.12.1 (#10015)
Add defaults for third-party stubs A-D
Add defaults for third-party stubs A-D (#9952)
[stubsabot] Bump beautifulsoup4 to 4.12.*
[stubsabot] Bump beautifulsoup4 to 4.12.* (#9910)
Release: https://pypi.org/pypi/beautifulsoup4/4.12.0 Homepage: https://www.crummy.com/software/BeautifulSoup/bs4/
Stubtest settings: change ignore_missing_stub default to false
Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
Use typing_extensions.Self instead of _typeshed.Self
Use typing_extensions.Self instead of _typeshed.Self (#9702)
Fix stubtest errors on beautifulsoup4
Fix stubtest errors on beautifulsoup4 (#9648)
Fixes #9645.
Replace Any with Incomplete in many places
Replace Any with Incomplete in many places (#9565)
Replace Any with Incomplete in many places
Replace Any with Incomplete in many places (#9558)
Add types-html5lib as a dependency of types-beautifulsoup4
Add types-html5lib as a dependency of types-beautifulsoup4 (#9462)
Remove the need for subclassing Any
Annotate known magic-method return types
Annotate known magic-method return types (#9131)
[bs4] More precise types for bs4.Tag.select(_one)
[bs4] More precise types for bs4.Tag.select(_one) (#8687)
Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com
Support extras in stubtest_third_party.py
Support extras in stubtest_third_party.py (#8467)
beautifulsoup4: Fix type of Tag.__iter__
beautifulsoup4: Fix type of Tag.iter (#8357)
Import Match and Pattern from re, not typing
Import Match and Pattern from re, not typing (#8277)
Fix TypeVars in beautifulsoup and SQLAlchemy
Fix TypeVars in beautifulsoup and SQLAlchemy (#8087)
beautifulsoup4: small fixes and updates
beautifulsoup4: small fixes and updates (#7816)
Co-authored-by: hauntsaninja <>
bs4: update to 4.11 (#7785)
Co-authored-by: hauntsaninja <>
Third-party stubs: import from collections.abc where possible
Third-party stubs: import from collections.abc where possible (#7637)
Use TypeAlias where possible for type aliases
Use TypeAlias where possible for type aliases (#7630)
Replace Union with union operator
Replace Union with union operator (#7596)
Mark many attributes as read-only properties
Mark many attributes as read-only properties (#7591)
Add mypy error codes to type: ignores, remove unused ignores
Add mypy error codes to type: ignores, remove unused ignores (#7504)
Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com
Use PEP 604 syntax wherever possible
Use PEP 604 syntax wherever possible (#7493)
bs4: expose several other classes
bs4: expose several other classes (#7420)
On the same lines as #7419
These are all imports that are not used within bs4/init.py My main interest here is in exposing NavigableString
Co-authored-by: hauntsaninja <>
This is generally useful. It's also imported in the source without being used in bs4/__init__.py which in well maintained packages is a pretty good ma
bs4: expose bs4.PageElement (#7419)
This is generally useful. It's also imported in the source without being used in bs4/init.py which in well maintained packages is a pretty good marker of intention to export
Co-authored-by: hauntsaninja <>
Tag.attrs is a dict, instead of an immutable Mapping
Tag.attrs is a dict, instead of an immutable Mapping (#7253)
bs4: Expose bs4.SoupStrainer and bs4.Tag
bs4: Expose bs4.SoupStrainer and bs4.Tag (#7002)
Use lowercase type everywhere
Use lowercase type everywhere (#6853)
Update pyright
Update pyright (#6840)
Nothing published for this version
Use PEP 585 syntax wherever possible
Use PEP 585 syntax wherever possible (#6717)
Fix third-party issues found by stubtest
Fix third-party issues found by stubtest (#6667)
Reduce use of deprecated typing aliases
Reduce use of deprecated typing aliases (#6358)
Cleanup: use lower-case list and dict, add a test
Cleanup: use lower-case list and dict, add a test (#6161)
Put Generic last in base class list
Put Generic last in base class list (#6155)
Add star to all non-0.1 versions
Add star to all non-0.1 versions (#6146)
PageElement.find_all() can return any subclass of PageElement
PageElement.find_all() can return any subclass of PageElement (#6081)
Update for beautifulsoup4 for version 4.10
Update for beautifulsoup4 for version 4.10 (#6059)
Tighten types and add missing fields
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →