## 4.12.0.20250516 (2025-05-16)

Replace `Incomplete | None = None` in third party stubs ([#14063](https://github.com/python/typeshed/pull/14063))

## 4.12.0.20250204 (2025-02-04)

[stubsabot] Mark beautifulsoup4 as obsolete since 4.13.0 ([#13455](https://github.com/python/typeshed/pull/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

## 4.12.0.20241020 (2024-10-20)

Improve typing for BS4 element.Tag's `get` and `get_attribute_list`. ([#12840](https://github.com/python/typeshed/pull/12840))

## 4.12.0.20240907 (2024-09-07)

beautifulsoup4: Accept void_element_close_prefix=None ([#12621](https://github.com/python/typeshed/pull/12621))

## 4.12.0.20240511 (2024-05-11)

stubs: [BeautifulSoup] fix incomplete type specs for formatter ([#11885](https://github.com/python/typeshed/pull/11885))

## 4.12.0.20240504 (2024-05-04)

Add indent argument to HTMLFormatter and XMLFormatter inits ([#11855](https://github.com/python/typeshed/pull/11855))

## 4.12.0.20240229 (2024-02-29)

bs4: Make `Tag.attrs` more permissive ([#11487](https://github.com/python/typeshed/pull/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.

## 4.12.0.20240106 (2024-01-06)

Update typing_extensions imports in third-party stubs ([#11245](https://github.com/python/typeshed/pull/11245))

## 4.12.0.7 (2023-10-27)

Remove many redundant inheritances from `Generic[]` ([#10933](https://github.com/python/typeshed/pull/10933))

## 4.12.0.6 (2023-08-13)

Fill in all missing `upstream_repository` fields ([#10571](https://github.com/python/typeshed/pull/10571))

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

## 4.12.0.5 (2023-05-10)

Add `partial_stub` metadata field ([#10157](https://github.com/python/typeshed/pull/10157))

## 4.12.0.4 (2023-04-29)

bs4: NavigableString accepts ReadableBuffer ([#10106](https://github.com/python/typeshed/pull/10106))

It delegates to str.__new__.

## 4.12.0.3 (2023-04-09)

bs4: update for 4.12.2 ([#10026](https://github.com/python/typeshed/pull/10026))

Release: https://pypi.org/project/beautifulsoup4/4.12.2/

## 4.12.0.2 (2023-04-06)

bs4: update for 4.12.1 ([#10015](https://github.com/python/typeshed/pull/10015))

## 4.12.0.1 (2023-03-27)

Add defaults for third-party stubs A-D ([#9952](https://github.com/python/typeshed/pull/9952))

## 4.12.0.0 (2023-03-21)

[stubsabot] Bump beautifulsoup4 to 4.12.* ([#9910](https://github.com/python/typeshed/pull/9910))

Release: https://pypi.org/pypi/beautifulsoup4/4.12.0
Homepage: https://www.crummy.com/software/BeautifulSoup/bs4/

## 4.11.6.7 (2023-02-21)

Stubtest settings: change `ignore_missing_stub` default to `false` ([#9779](https://github.com/python/typeshed/pull/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.

## 4.11.6.6 (2023-02-15)

Use `typing_extensions.Self` instead of `_typeshed.Self` ([#9702](https://github.com/python/typeshed/pull/9702))

## 4.11.6.5 (2023-02-01)

Fix stubtest errors on `beautifulsoup4` ([#9648](https://github.com/python/typeshed/pull/9648))

Fixes #9645.

## 4.11.6.4 (2023-01-18)

Replace `Any` with `Incomplete` in many places ([#9565](https://github.com/python/typeshed/pull/9565))

## 4.11.6.3 (2023-01-18)

Replace `Any` with `Incomplete` in many places ([#9558](https://github.com/python/typeshed/pull/9558))

## 4.11.6.2 (2023-01-05)

Add `types-html5lib` as a dependency of `types-beautifulsoup4` ([#9462](https://github.com/python/typeshed/pull/9462))

Remove the need for subclassing `Any`

## 4.11.6.1 (2022-11-09)

Annotate known magic-method return types ([#9131](https://github.com/python/typeshed/pull/9131))

## 4.11.6 (2022-09-06)

[bs4] More precise types for bs4.Tag.select(_one) ([#8687](https://github.com/python/typeshed/pull/8687))

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

## 4.11.5 (2022-08-18)

Support extras in stubtest_third_party.py ([#8467](https://github.com/python/typeshed/pull/8467))

## 4.11.4 (2022-07-21)

beautifulsoup4: Fix type of Tag.__iter__ ([#8357](https://github.com/python/typeshed/pull/8357))

## 4.11.3 (2022-07-12)

Import `Match` and `Pattern` from `re`, not `typing` ([#8277](https://github.com/python/typeshed/pull/8277))

## 4.11.2 (2022-06-16)

Fix `TypeVar`s in `beautifulsoup` and `SQLAlchemy` ([#8087](https://github.com/python/typeshed/pull/8087))

## 4.11.1 (2022-05-10)

beautifulsoup4: small fixes and updates ([#7816](https://github.com/python/typeshed/pull/7816))

## 4.11.0 (2022-05-06)

bs4: update to 4.11 ([#7785](https://github.com/python/typeshed/pull/7785))

Co-authored-by: hauntsaninja <>

## 4.10.20 (2022-04-16)

Third-party stubs: import from `collections.abc` where possible ([#7637](https://github.com/python/typeshed/pull/7637))

## 4.10.19 (2022-04-16)

Use `TypeAlias` where possible for type aliases ([#7630](https://github.com/python/typeshed/pull/7630))

## 4.10.18 (2022-04-05)

Replace Union with union operator ([#7596](https://github.com/python/typeshed/pull/7596))

## 4.10.17 (2022-04-05)

Mark many attributes as read-only properties ([#7591](https://github.com/python/typeshed/pull/7591))

## 4.10.16 (2022-03-19)

Add mypy error codes to `type: ignore`s, remove unused ignores ([#7504](https://github.com/python/typeshed/pull/7504))

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

## 4.10.15 (2022-03-16)

Use PEP 604 syntax wherever possible ([#7493](https://github.com/python/typeshed/pull/7493))

## 4.10.14 (2022-03-02)

bs4: expose several other classes ([#7420](https://github.com/python/typeshed/pull/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 <>

## 4.10.13 (2022-03-02)

bs4: expose bs4.PageElement ([#7419](https://github.com/python/typeshed/pull/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 <>

## 4.10.12 (2022-02-18)

Tag.attrs is a dict, instead of an immutable Mapping ([#7253](https://github.com/python/typeshed/pull/7253))

## 4.10.11 (2022-01-23)

bs4: Expose bs4.SoupStrainer and bs4.Tag ([#7002](https://github.com/python/typeshed/pull/7002))

## 4.10.10 (2022-01-08)

Use lowercase `type` everywhere ([#6853](https://github.com/python/typeshed/pull/6853))

## 4.10.9 (2022-01-07)

Update pyright ([#6840](https://github.com/python/typeshed/pull/6840))

## 4.10.7 (2021-12-28)

Use PEP 585 syntax wherever possible ([#6717](https://github.com/python/typeshed/pull/6717))

## 4.10.6 (2021-12-23)

Fix third-party issues found by stubtest ([#6667](https://github.com/python/typeshed/pull/6667))

## 4.10.5 (2021-11-23)

Reduce use of deprecated `typing` aliases ([#6358](https://github.com/python/typeshed/pull/6358))

## 4.10.4 (2021-10-13)

Cleanup: use lower-case list and dict, add a test ([#6161](https://github.com/python/typeshed/pull/6161))

## 4.10.3 (2021-10-12)

Put Generic last in base class list ([#6155](https://github.com/python/typeshed/pull/6155))

## 4.10.2 (2021-10-12)

Add star to all non-0.1 versions ([#6146](https://github.com/python/typeshed/pull/6146))

## 4.10.1 (2021-09-27)

PageElement.find_all() can return any subclass of PageElement ([#6081](https://github.com/python/typeshed/pull/6081))

## 4.10.0 (2021-09-22)

Update for beautifulsoup4 for version 4.10 ([#6059](https://github.com/python/typeshed/pull/6059))

Tighten types and add missing fields

