Skip to content

Releases: niklasf/python-chess

python-chess v1.10.0

27 Jul 16:33
v1.10.0
cfda9c0
Compare
Choose a tag to compare
New features:

* Use ``chess.engine.Opponent`` to send opponent information to engines.
* Inform engines about the game result using
  ``chess.engine.Protocol.send_game_result()``.
* Add ``chess.engine.Limit.clock_id``.
* Add ``chess.svg.board(..., borders=True)``.
* Avoid rendering background behind SVG boards to better support transparency.
* Add ``chess.pgn.BaseVisitor.begin_parse_san()``.
* Introduce new distance metrics ``chess.square_manhattan_distance()`` and
  ``chess.square_knight_distance()``.

Bugfixes:

* Fix ``chess.pgn.GameNode.eval()`` sometimes off by one centipawn.
* Fix handling of additional spaces between UCI option tokens.
* Handle implicit XBoard engine resignation via output like
  ``0-1 {White resigns}``.

Changes:

* Add model ``sf16`` for ``chess.engine.Score.wdl()``, the new default.
* Update ``lichess`` WDL model.
* Keep PGN headers that do not belong to the Seven Tag Roster in insertion
  order.
* Halve the number of open file descriptors maintained by tablebases
  and opening books.
* Reduce verbosity of logged ``chess.pgn`` errors.

python-chess v1.9.4

22 Dec 11:33
v1.9.4
b04275a
Compare
Choose a tag to compare
Bugfixes:

* Fix ``PovScore.wdl()`` ignored ``model`` and ``ply`` parameters.
* ``chess.syzygy``: Check that board matches tablebase variant.

New features:

* Add model ``sf15.1`` for ``chess.engine.Score.wdl()``.
* Raise more specific exceptions: ``chess.IllegalMoveError``,
  ``chess.AmbiguousMoveError``, and ``chess.InvalidMoveError``.

python-chess v1.9.3

16 Sep 12:34
v1.9.3
da82a9b
Compare
Choose a tag to compare
Bugfixes:

* Fix some valid characters were not accepted in PGN tag names.

Changes:

* Skip over syntactically invalid PGN tags.
* Detect Antichess insufficient material with two opposing knights.

New features:

* Add ``chess.Board.unicode(..., orientation=chess.WHITE)``.

python-chess v1.9.2

17 Jun 13:37
v1.9.2
Compare
Choose a tag to compare
Bugfixes:

* Fix recursive Crazyhouse move generation sometimes failing with
  with ``RuntimeError``.
* Fix rendering of black pawn SVG on dark background.

New features:

* Add ``chess.engine.AnalysisResult.would_block()``.

python-chess v1.9.1

28 May 10:51
v1.9.1
Compare
Choose a tag to compare
Bugfixes:

* Reject pawn capture SAN if the original file is not specified, e.g.,
  ``d5`` will no longer match ``cxd5``.

Changes:

* Tweak handling of whitespace in PGN comments: When parsing, any leading
  and trailing whitespace (beyond one space) is preserved. When joining
  multiple PGN comments, they are now separated with a space instead of a
  newline character. When removing annotations from comments, leftover
  whitespace is avoided.

New features:

* Add model ``sf15`` for ``chess.engine.Score.wdl()``.

python-chess v1.9.0

18 Mar 11:36
v1.9.0
Compare
Choose a tag to compare
Bugfixes:

* Expand position validation to detect check conflicting with en passant
  square.

New features:

* Add ``chess.svg.board(..., fill=...)``.
* Let ``chess.svg.board()`` add ASCII board as description of SVG.
* Add hint when engine process dies due to illegal instruction.

python-chess v1.8.0

23 Dec 14:50
v1.8.0
Compare
Choose a tag to compare
Bugfixes:

* Fix ``SquareSet.issuperset()`` and ``SquareSet.issubset()`` by swapping
  their respective implementations.

New features:

* Read and write PGN comments like ``[%emt 0:05:21]``.

python-chess v1.7.0

07 Oct 17:15
v1.7.0
Compare
Choose a tag to compare
New features:

* Added new models for ``chess.engine.Score.wdl()``: ``sf`` (the new default)
  and ``sf14``.
* Added ``chess.Board.piece_map()``.

Bugfixes:

* ``chess.pgn``: Fix skipping with nested variations.
* ``chess.svg``: Make check gradient compatible with QtSvg.

python-chess v1.6.1

12 Jun 08:23
v1.6.1
Compare
Choose a tag to compare
Bugfixes:

* Make ``chess.engine.SimpleEngine.play(..., draw_offered=True)`` available.
  Previously only added for ``chess.engine.Protocol``.

python-chess v1.6.0

11 Jun 14:21
v1.6.0
Compare
Choose a tag to compare
New features:

* Allow offering a draw to XBoard engines using
  ``chess.engine.Protocol.play(..., draw_offered=True)``.
* Now detects insufficient material in Horde. Thanks @stevepapazis!

Changes:

* ``chess.engine.popen_engine(..., setpgrp=True)`` on Windows now merges
  ``CREATE_NEW_PROCESS_GROUP`` into ``creationflags`` instead of overriding.
  On Unix it now uses ``start_new_session`` instead of calling ``setpgrp`` in
  ``preexec_fn``.
* Declare that ``chess.svg`` produces SVG Tiny 1.2, and prepare SVG 2 forwards
  compatibility.

Bugfixes:

* Fix slightly off-center pawns in ``chess.svg``.
* Fix typing error in Python 3.10 (due to added ``int.bit_count``).