Changelog for python-chess¶
New in v1.3.0¶
chess.pgn.ChildNode, a subclass of
chess.pgn.GameNodefor all nodes other than the root node, and converted
chess.pgn.GameNodeto an abstract base class. This improves ergonomics in typed code.
The change is backwards compatible if using only documented features. However, a notable undocumented feature is the ability to create dangling nodes. This is no longer possible. If you have been using this for subclassing, override
GameNode.dangling_node(). It is now the only method that creates child nodes.
weakref-based caching in
New in v1.2.2¶
Fixed regression where releases were uploaded without the
New in v1.2.1¶
ModuleNotFoundError: No module named 'chess'after upgrading from previous versions? Run
pip install --force-reinstall chess(due to https://github.com/niklasf/python-chess/issues/680).
New in v1.2.0¶
chess.engine.Wdl, and conversions from scores:
chess.engine.Score.score(*, mate_score: int) -> intoverload.
chess.pgn.GameNode.eval()is now always relative to the side to move. The ambiguity around
[%eval #0]has been resolved to
Mate(-0). This makes sense, given that the authors of the specification probably had standard chess in mind (where a game-ending move is always a loss for the opponent). Previously, this would be parsed as
chess.engine.InfoDict["wdl"]as the new
chess.engine.PovWdl, rather than
Tuple[int, int, int]. The new type is backwards compatible, but it is recommended to use its documented fields and methods instead.
chess.engine.PovScore.__str__(). String representation falls back to
chess.Board.epd()is now typed as
Literal["legal", "fen", "xfen"]rather than
New in v1.1.0¶
chess.svg.board(..., orientation). This is a more idiomatic way to set the board orientation than
chess.Board.parse_san(). Now accepts fully specified moves like
e2e4, even if that is not a pawn move, castling notation with zeros, null moves in UCI notation, and null moves in XBoard notation.
New in v1.0.1¶
chess.svg: Restored SVG Tiny compatibility by splitting colors like
#rrggbbaainto a solid color and opacity.
New in v1.0.0¶
CHANGELOG-OLD.rst for changes up to v1.0.0.