Skip to content

python-chess v1.3.0

Compare
Choose a tag to compare
@niklasf niklasf released this 06 Nov 16:25
· 566 commits to master since this release
v1.3.0
Changes:

* Introduced ``chess.pgn.ChildNode``, a subclass of ``chess.pgn.GameNode``
  for all nodes other than the root node, and converted ``chess.pgn.GameNode``
  to 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.add_variation()`` instead of
  ``GameNode.dangling_node()``. It is now the only method that creates child
  nodes.

Bugfixes:

* Removed broken ``weakref`` based caching in ``chess.pgn.GameNode.board()``.

New features:

* Added ``chess.pgn.GameNode.next()``.