Chess

Latest version: v1.10.0

Safety actively analyzes 638646 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.8.0

-----------------------------

Bugfixes:

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

New features:

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

1.7.0

----------------------------

New features:

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

Bugfixes:

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

1.6.1

-----------------------------

Bugfixes:

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

1.6.0

-----------------------------

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``).

1.5.0

----------------------------

Bugfixes:

* Fixed typing of ``chess.pgn.Mainline.__reversed__()``. It is now a generator,
and ``chess.pgn.ReverseMainline`` has been **removed**.
This is a breaking change but a required bugfix.
* Implement UCI **ponderhit** for consecutive calls to
``chess.engine.Protocol.play(..., ponder=True)``. Previously, the pondering
search was always stopped and restarted.
* Provide the full move stack, not just the position, for UCI pondering.
* Fixed XBoard level in sudden death games.
* Ignore trailing space after ponder move sent by UCI engine.
Previously, such a move would be rejected.
* Prevent cancelling engine commands after they have already been cancelled or
completed. Some internals (``chess.engine.BaseCommand``) have been changed to
accomplish this.

New features:

* Added ``chess.Board.outcome()``.
* Implement and accept usermove feature for XBoard engines.

Special thanks to MarkZH for many of the engine related changes in this
release!

1.4.0

-----------------------------

New features:

* Let ``chess.pgn.GameNode.eval()`` accept PGN comments like
``[%eval 2.5,11]``, meaning 250 centipawns at depth 11.
Use ``chess.pgn.GameNode.eval_depth()`` and
``chess.pgn.GameNode.set_eval(..., depth)`` to get and set the depth.
* Read and write PGN comments with millisecond precision like
``[%clk 1:23:45.678]``.

Changes:

* Recover from invalid UTF-8 sent by an UCI engine, by ignoring that
(and only that) line.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.