NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2550 most downloaded on PyPI
Typing stubs for Pygments
Last release 1 months ago
19 Aug 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 55 of 59 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
59 releases · first in 2021
One column per quarter.
* Update to 2.21.*
Use optional-dependencies for third-party packages
Upgrade black to 26.5.0
Upgrade black to 26.5.0 (#15801)
Drop 3.9 support for third-party packages
Drop 3.9 support for third-party packages (#15707)
Inline some unnecessary type aliases
Use dashes instead of underscores for METADATA.toml field names
Use dashes instead of underscores for METADATA.toml field names (#15614)
[Pygments] Complete stubs for filter and filters modules
[Pygments] Complete stubs for Formatter
[Pygments] Check for missing stubs outside omitted subpackages
Rename requires to dependencies in METADATA files
Rename requires to dependencies in METADATA files (#15594)
[Pygments] Use Incomplete instead of Any
[Pygments] Use Incomplete instead of Any (#15053)
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)
RawTokenFormatter always returns bytes
RawTokenFormatter always returns bytes (#14412)
Replace Incomplete | None = None in third party stubs
Replace Incomplete | None = None in third party stubs (#14063)
Replace incomplete module markers
Replace incomplete module markers (#14030)
Remove setuptools/pkg_resources
Remove setuptools/pkg_resources (#13369)
pygments: Fix return type of pygments.lexers.guess_lexer_for_filename
pygments: Fix return type of pygments.lexers.guess_lexer_for_filename (#13515)
[stubsabot] Bump Pygments to 2.19.*
[stubsabot] Bump Pygments to 2.19.* (#13370)
Release: https://pypi.org/pypi/Pygments/2.19.0 Homepage: https://pygments.org Repository: https://github.com/pygments/pygments Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/Pygments Changelog: https://github.com/pygments/pygments/blob/master/CHANGES Diff: https://github.com/pygments/pygments/compare/2.18.0...2.19.0
Stubsabot analysis of the diff between the two releases:
[stubsabot] Bump Pygments to 2.18.*
[stubsabot] Bump Pygments to 2.18.* (#11861)
Release: https://pypi.org/pypi/Pygments/2.18.0 Homepage: https://pygments.org Repository: https://github.com/pygments/pygments Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/Pygments Changelog: https://github.com/pygments/pygments/blob/master/CHANGES Diff: https://github.com/pygments/pygments/compare/2.17.2...2.18.0
Stubsabot analysis of the diff between the two releases:
pygments/lexers/mojo.py, pygments/lexers/soong.py, pygments/lexers/tact.py, pygments/lexers/typst.py, pygments/styles/coffee.py.If stubtest fails for this PR:
Note that you will need to close and re-open the PR in order to trigger CI
Co-authored-by: stubsabot <>
docutils: Use ClassVar for Directive class variables
docutils: Use ClassVar for Directive class variables (#11550)
These are intended to be set as class variables, in subclasses of Directive, rather than instance variables.
See also:
Update typing_extensions imports in third-party stubs
Update typing_extensions imports in third-party stubs (#11245)
Add some previously missing lexers.
Bump pygments to 2.17 (#11051)
Add types for pygments.lex.
Add types for pygments.lex. (#10998)
[stubsabot] Bump Pygments to 2.16.*
[stubsabot] Bump Pygments to 2.16.* (#10536)
Release: https://pypi.org/pypi/Pygments/2.16.1 Homepage: https://pygments.org Repository: https://github.com/pygments/pygments Changelog: https://github.com/pygments/pygments/blob/master/CHANGES Diff: https://github.com/pygments/pygments/compare/2.15.1...2.16.1
Stubsabot analysis of the diff between the two releases:
pygments/__init__.py, pygments/formatters/img.py, pygments/lexer.py, pygments/sphinxext.py, pygments/styles/__init__.py, pygments/token.py.Co-authored-by: stubsabot <> Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
Add an upstream_repository field to METADATA.toml
Add an upstream_repository field to METADATA.toml (#10487)
Closes: #10478
Add partial_stub metadata field
Add partial_stub metadata field (#10157)
[stubsabot] Bump Pygments to 2.15.*
[stubsabot] Bump Pygments to 2.15.* (#10030)
Release: https://pypi.org/pypi/Pygments/2.15.0 Homepage: https://pygments.org Changelog: https://github.com/pygments/pygments/blob/master/CHANGES Diff: https://github.com/pygments/pygments/compare/2.14.0...2.15.0
Stubsabot analysis of the diff between the two releases:
pygments/lexers/carbon.py, pygments/lexers/dax.py, pygments/lexers/wgsl.py.Add default values for third-party stubs beginning with 'P'
Add default values for third-party stubs beginning with 'P' (#9957)
Pygments: fix get_style_by_name return type
Pygments: fix get_style_by_name return type (#9803)
Integrate requirements-stubtest.txt into METADATA.toml
Integrate requirements-stubtest.txt into METADATA.toml (#9778)
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)
Use _typeshed.FileDescriptorOrPath in stubs
Use _typeshed.FileDescriptorOrPath in stubs (#9695)
Replace Any with Incomplete in many places
Replace Any with Incomplete in many places (#9558)
[stubsabot] Bump Pygments to 2.14.*
[stubsabot] Bump Pygments to 2.14.* (#9440)
Release: https://pypi.org/pypi/Pygments/2.14.0 Homepage: https://pygments.org/ Changelog: https://github.com/pygments/pygments/blob/master/CHANGES Diff: https://github.com/pygments/pygments/compare/2.13.0...2.14.0
Stubsabot analysis of the diff between the two releases:
pygments/__init__.py, pygments/formatters/__init__.py, pygments/formatters/html.py, pygments/formatters/irc.py, pygments/lexer.py, pygments/lexers/__init__.py, pygments/sphinxext.py.If stubtest fails for this PR:
Note that you will need to close and re-open the PR in order to trigger CI
Co-authored-by: stubsabot <>
Use Incomplete instead of Any in __getattr__
Use Incomplete instead of Any in __getattr__ (#8903)
pygments.lexers.guess_lexer_for_filename cannot return None
pygments.lexers.guess_lexer_for_filename cannot return None (#8777)
[stubsabot] Bump Pygments to 2.13.*
[stubsabot] Bump Pygments to 2.13.* (#8561)
Co-authored-by: stubsabot <>
Pygments: add pygments.__version__
Pygments: add pygments.version (#8241)
Signed-off-by: Anders Kaseorg andersk@mit.edu
[stubsabot] Bump Pygments to 2.12.*
[stubsabot] Bump Pygments to 2.12.* (#8093)
Co-authored-by: hauntsaninja <> Co-authored-by: Akuli akuviljanen17@gmail.com
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)
Use PEP 604 syntax wherever possible
Use PEP 604 syntax wherever possible (#7493)
Improve a bunch of __(deep)copy__ methods
Improve a bunch of __(deep)copy__ methods (#7148)
Found from PyCQA/flake8-pyi#135.
fix incorrect tuple[T] (#6996)
Found from PyCQA/flake8-pyi#135.
pygments: delete _TokenType.__init__
pygments: delete _TokenType.init (#6918)
Pygments: make Formatter generic and improve format/highlight
Pygments: make Formatter generic and improve format/highlight (#6819)
Co-authored-by: Akuli akuviljanen17@gmail.com
Use lowercase type everywhere
Use lowercase type everywhere (#6853)
Nothing published for this version
pygments: remove outdated TODOs
pygments: remove outdated TODOs (#6725)
Use PEP 585 syntax wherever possible
Use PEP 585 syntax wherever possible (#6717)
Always alias collections.abc.Set
Always alias collections.abc.Set (#6712)
Annotate return type of pygments.plugin.iter_entry_points
Annotate return type of pygments.plugin.iter_entry_points (#6697)
Co-authored-by: Akuli akuviljanen17@gmail.com
pygments: Annotate several generator functions (#6695)
pygments.formatters.get_all_formatters yields Formatters
pygments.formatters.get_all_formatters yields Formatters (#6636)
Add mypy error codes to '# type: ignore' comments
Add mypy error codes to '# type: ignore' comments (#6379)
Reduce use of deprecated typing aliases
Reduce use of deprecated typing aliases (#6358)
Add star to all non-0.1 versions
Add star to all non-0.1 versions (#6146)
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 →