Releases: niklasf/python-chess
Releases · niklasf/python-chess
python-chess v0.22.0
Changes: * `len(board.legal_moves)` **replaced by** `board.legal_moves.count()`. Previously `list(board.legal_moves)` was generating moves twice, resulting in a considerable slowdown. Thanks to Martin C. Doege for reporting. * XBoard: `offer_draw` renamed to `draw`. New features: * XBoard: Added `DrawHandler`.
python-chess v0.21.2
Changes: * `chess.svg` is now fully SVG Tiny 1.2 compatible.
python-chess v0.21.1
Bugfixes: * `Board.set_piece_at()` no longer shadows optional `promoted` argument from `BaseBoard`. * Fixed `ThreeCheckBoard.is_irreversible()` and `ThreeCheckBoard._transposition_key()`. New features: * Added `Game.without_tag_roster()`. `chess.pgn.StringExporter()` can now handle games without any headers. * XBoard: `white`, `black`, `random`, `nps`, `optim`, `undo`, `remove`. Thanks to Manik Charan. Changes: * Documentation fixes and tweaks by Boštjan Mejak. * Changed unicode character for empty squares in `Board.unicode()`.
python-chess v0.21.0
Bugfixes: * `Board.set_piece_at()` no longer shadows optional `promoted` argument from `BaseBoard`. * Fixed `ThreeCheckBoard.is_irreversible()` and `ThreeCheckBoard._transposition_key()`. Changes: * `chess.pgn.read_pgn()` **no longer adds the default 7 tag roster.** For example `game.headers["White"]` may now raise `KeyError` instead of providing the default value `?`. Use `game.headers.get("White", "?")` for equivalent behavior. * Documentation fixes and tweaks by Boštjan Mejak. * Changed unicode character for empty squares in `Board.unicode()`. New features: * XBoard: `white`, `black`, `random`, `nps`, `optim`, `undo`, `remove`. Thanks to Manik Charan.
python-chess v0.20.1
Bugfixes: * Fix arrow positioning on SVG boards. * Documentation fixes and improvements, making most doctests runnable.
python-chess v0.20.0
Bugfixes: * Some XBoard commands were not returning futures. * Support semicolon comments in PGNs. Changes: * Changed FEN and EPD formatting options. It is now possible to include en passant squares in FEN and X-FEN style, or to include only strictly relevant en passant squares. * Relax en passant square validation in `Board.set_fen()`. * Ensure `is_en_passant()`, `is_capture()`, `is_zeroing()` and `is_irreversible()` strictly return bools. * Accept `Z0` as a null move in PGNs. New features: * XBoard: Add `memory`, `core`, `stop` and `movenow` commands. Abstract `post`/`nopost`. Initial `FeatureMap` support. Support `usermove`. * Added `Board.has_pseudo_legal_en_passant()`. * Added `Board.piece_map()`. * Added `SquareSet.carry_rippler()`. * Factored out some (unstable) low level APIs: `BB_CORNERS`, `_carry_rippler()`, `_edges()`.
python-chess v0.19.0
New features: * **Experimental XBoard engine support.** Thanks to Manik Charan and Cash Costello. Expect breaking changes in future releases. * Added an undocumented `chess.polyglot.ZobristHasher` to make Zobrist hashing easier to extend. Bugfixes: * Merely pseudo-legal en passant does no longer count for repetitions. * Fixed repetition detection in Three-Check and Crazyhouse. (Previously check counters and pockets were ignored.) * Checking moves in Three-Check are now considered as irreversible by `ThreeCheckBoard.is_irreversible()`. * `chess.Move.from_uci("")` was raising `IndexError` instead of `ValueError`. Thanks Jonny Balls. Changes: * `chess.syzygy.Tablebases` constructor no longer supports directly opening a directory. Use `chess.syzygy.open_tablebases()`. * `chess.gaviota.PythonTablebases` and `NativeTablebases` constructors no longer support directly opening a directory. Use `chess.gaviota.open_tablebases()`. * `chess.Board` instances are now compared by the position they represent, not by exact match of the internal data structures (or even move history). * Relaxed castling right validation in Chess960: Kings/rooks of opposing sites are no longer required to be on the same file. * Removed misnamed `Piece.__unicode__()` and `BaseBoard.__unicode__()`. Use `Piece.unicode_symbol()` and `BaseBoard.unicode()` instead. * Changed `chess.SquareSet.__repr__()`. * Support `[Variant "normal"]` in PGNs. * `pip install python-chess[engine]` instead of `python-chess[uci]` (since the extra dependencies are required for both UCI and XBoard engines). * Mixed documentation fixes and improvements.
python-chess v0.18.4
Changes: * Support `[Variant "fischerrandom"]` in PGNs for Cutechess compability. Thanks to Steve Maughan for reporting.
python-chess v0.18.3
Bugfixes: * `chess.gaviota.NativeTablebases.get_dtm()` and `get_wdl()` were missing.
python-chess v0.18.2
Bugfixes: * Fixed castling in atomic chess when there is a rank attack. * The halfmove clock in Crazyhouse is no longer incremented unconditionally. `CrazyhouseBoard.is_zeroing(move)` now considers pawn moves and captures as zeroing. Added `Board.is_irreversible(move)` that can be used instead. * Fixed an inconsistency where the `chess.pgn` tokenizer accepts long algebraic notation but `Board.parse_san()` did not. Changes: * Added more NAG constants in `chess.pgn`.