NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #322 most downloaded on PyPI
Typing stubs for PyYAML
Last release 29 days ago
06 Sep 2026
Release timing varies
gaps range from 1 weeks to 7 months
Most releases are documented
notes for 47 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
67 releases · first in 2021
One column per quarter.
Complete PyYAML event annotations
Use _YAMLObject /Incomplete instead of Any
* Replace NoReturn with Never
NoReturn with Never (#16079)Upgrade black to 26.5.0
Upgrade black to 26.5.0 (#15801)
Add missing type hints in pyyaml.constructor
Add missing type hints in pyyaml.constructor (#15746)
This is the same as 84682a1d which missed these for some reason.
Import some items from typing instead of typing_extensions
Import some items from typing instead of typing_extensions (#15711)
Part of #13782
Use dashes instead of underscores for METADATA.toml field names
Use dashes instead of underscores for METADATA.toml field names (#15614)
Add @disjoint_base decorator to the third-party stubs
Add @disjoint_base decorator to the third-party stubs (#14716)
Add __slots__ to third-party packages using stubdefaulter
Mark stub-only private symbols as @type_check_only in third-party stubs
Mark stub-only private symbols as @type_check_only in third-party stubs (#14545)
Replace Incomplete | None = None in third party stubs
Replace Incomplete | None = None in third party stubs (#14063)
Bump ruff to 0.11.2
Bump ruff to 0.11.2 (#13757)
Add __all__
Add __all__ (#13704)
fix(yaml): SafeConstructor.construct_scalar accept MappingNode
fix(yaml): SafeConstructor.construct_scalar accept MappingNode (#13340)
Update to mypy 1.14
Update to mypy 1.14 (#13272)
PyYAML: correct return type of construct_scalar()
PyYAML: correct return type of construct_scalar() (#12664)
[PyYAML] stubtest: Ignore auto-generated methods
[PyYAML] stubtest: Ignore auto-generated methods (#12497)
Improve yaml/constructor.pyi types
Improve yaml/constructor.pyi types (#12404)
Use PEP 570 syntax in third party stubs
Use PEP 570 syntax in third party stubs (#11554)
[PyYAML] type the whole Emitter class
[PyYAML] type the whole Emitter class (#10750)
Add an upstream_repository field to METADATA.toml
Add an upstream_repository field to METADATA.toml (#10487)
Closes: #10478
[PyYAML] Improve dump/serialize types
[PyYAML] Improve dump/serialize types (#10196)
str or bytes, instead of Any.Add default values for third-party stubs beginning with 'P'
Add default values for third-party stubs beginning with 'P' (#9957)
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.
Type Loader parameter in PyYAML/yaml
Type Loader parameter in PyYAML/yaml (#9752)
[PyYAML] Accept all iterables for dump_all functions
[PyYAML] Accept all iterables for dump_all functions (#9725)
yaml: allow ReadableBuffer in represent_binary
yaml: allow ReadableBuffer in represent_binary (#9701)
Manual changes of Any union to Incomplete in stubs folder
Manual changes of Any union to Incomplete in stubs folder (#9566)
| Any and Any |)Replace Any with Incomplete in many places
Replace Any with Incomplete in many places (#9558)
PyYAML: Permit width: float for pure-Python dump(...)
PyYAML: Permit width: float for pure-Python dump(...) (#8973)
width: float for pure-Python dump(...)To prevent PyYAML from wrapping any lines, it's possible to pass
width=float("inf"), but the current type hints don't like that. This
works at runtime:
>>> s = yaml.dump({"foo": "bar" * 1000}, width=float("inf"))
>>> print(s)
foo: barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar...
but mypy says
floatwidth.py:2: error: No overload variant of "dump" matches argument types "Dict[str, str]", "float"
floatwidth.py:2: note: Possible overload variants:
floatwidth.py:2: note: def dump(data: Any, stream: _WriteStream[Any], Dumper: Any = ..., *, default_style: Optional[str] = ..., default_flow_style: Optional[bool] = ..., canonical: Optional[bool] = ..., indent: Optional[int] = ..., width: Optional[int] = ..., allow_unicode: Optional[bool] = ..., line_break: Optional[str] = ..., encoding: Optional[str] = ..., explicit_start: Optional[bool] = ..., explicit_end: Optional[bool] = ..., version: Optional[Tuple[int, int]] = ..., tags: Optional[Mapping[str, str]] = ..., sort_keys: bool = ...) -> None
floatwidth.py:2: note: def dump(data: Any, stream: None = ..., Dumper: Any = ..., *, default_style: Optional[str] = ..., default_flow_style: Optional[bool] = ..., canonical: Optional[bool] = ..., indent: Optional[int] = ..., width: Optional[int] = ..., allow_unicode: Optional[bool] = ..., line_break: Optional[str] = ..., encoding: Optional[str] = ..., explicit_start: Optional[bool] = ..., explicit_end: Optional[bool] = ..., version: Optional[Tuple[int, int]] = ..., tags: Optional[Mapping[str, str]] = ..., sort_keys: bool = ...) -> Any
Found 1 error in 1 file (checked 1 source file)
Poking through the PyYAML source, it looks the width parameter
could probably be anything "comparable", as it's only compared via
the < operator[1].
For the LibYAML implementation, however, we have to use ints:
>>> stream = StringIO()
>>> dumper = yaml.CDumper(stream, width=float("inf"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/yaml/cyaml.py", line 81, in __init__
version=version, tags=tags)
File "ext/_yaml.pyx", line 973, in _yaml.CEmitter.__init__ (ext/_yaml.c:14797)
OverflowError: cannot convert float infinity to integer
Add a couple of missing type hints in pyyaml.constructor
Add a couple of missing type hints in pyyaml.constructor (#8965)
Bump mypy to 0.981
Bump mypy to 0.981 (#8796)
PyYaml’s Serializer: annotate open, close, serialize
PyYaml’s Serializer: annotate open, close, serialize (#8383)
As seen here: https://github.com/yaml/pyyaml/blob/master/lib/yaml/serializer.py#L27-L41
Neither open nor close methods return, so None added as the return type.
Finally, serialize accepts a Node and does not return as seen here: https://github.com/yaml/pyyaml/blob/master/lib/yaml/serializer.py#L46-L58
Import Match and Pattern from re, not typing
Import Match and Pattern from re, not typing (#8277)
PyYAML: check missing defs
PyYAML: check missing defs (#8159)
PyYAML: Add types to add_constructor
PyYAML: Add types to add_constructor (#7989)
Use TypeAlias for type aliases where possible, part II
Use TypeAlias for type aliases where possible, part II (#7667)
Use TypeAlias where possible for type aliases
Use TypeAlias where possible for type aliases (#7630)
Use PEP 604 syntax wherever possible
Use PEP 604 syntax wherever possible (#7493)
Replace IO with protocols
Replace IO with protocols (#7092)
Use lowercase type everywhere
Use lowercase type everywhere (#6853)
Nothing published for this version
Add more type hints for pyyaml
Add more type hints for pyyaml (#6265)
Import from collections.abc and re where applicable
Upgrade PyYAML to version 6 (#6183)
Use lowercase tuple where possible
Use lowercase tuple where possible (#6170)
Add star to all non-0.1 versions
Add star to all non-0.1 versions (#6146)
Delete yaml.CDangerLoader and yaml.CDangerDumper
Delete yaml.CDangerLoader and yaml.CDangerDumper (#5990)
These no longer exist in PyYAML 4.2.
Add C{Full,Unsafe}Loader and UnsafeConstructor
Add C{Full,Unsafe}Loader and UnsafeConstructor (#5988)
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
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
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 →