Skip to content

Tags: bashbaugh/python-chess

Tags

v0.25.1

Toggle v0.25.1's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.25.1

Bugfixes:

* `chess.engine` did not correctly handle Windows-style line endings.
  Thanks @Bstylestuff.

v0.25.0

Toggle v0.25.0's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.25.0

New features:

* This release introduces a new **experimental API for chess engine
  communication**, `chess.engine`, based on `asyncio`. It is intended to
  eventually replace `chess.uci` and `chess.xboard`.

Bugfixes:

* Fixed race condition in LRU-cache of open Syzygy tables. The LRU-cache is
  enabled by default (*max_fds*).
* Fix deprecation warning and unclosed file in setup.py.
  Thanks Mickaël Schoentgen.

Changes:

* `chess.pgn.read_game()` now ignores BOM at the start of the stream.
* Removed deprecated items.

v0.24.2

Toggle v0.24.2's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.24.2

Bugfixes:

* `CrazyhouseBoard.root()` and `ThreeCheckBoard.root()` were not returning the
  correct pockets and number of remaining checks, respectively. Thanks @gbtami.
* `chess.pgn.skip_game()` now correctly skips PGN comments that contain
  line-breaks and PGN header tag notation.

Changes:

* Renamed `chess.pgn.GameModelCreator` to `GameCreator`. Alias kept in place
  and will be removed in a future release.
* Renamed `chess.engine` to `chess._engine`. Use re-exports from `chess.uci`
  or `chess.xboard`.
* Renamed `Board.stack` to `Board._stack`. Do not use this directly.
* Improved memory usage: `Board.legal_moves` and `Board.pseudo_legal_moves`
  no longer create reference cycles. PGN visitors can manage headers
  themselves.
* Removed previously deprecated items.

Features:

* Added `chess.pgn.BaseVisitor.visit_board()` and `chess.pgn.BoardCreator`.

v0.24.1

Toggle v0.24.1's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.24.1

Bugfixes:

* Fix `chess.Board.set_epd()` and `chess.Board.from_epd()` with semicolon
  in string operand. Thanks @jdart1.
* `chess.pgn.GameNode.uci()` was always raising an exception.
  Also included in v0.24.0.

v0.23.11

Toggle v0.23.11's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.23.11

Bugfixes:

* `chess.pgn.GameNode.uci()` was always raising an exception.
* Fix `chess.Board.set_epd()` and `chess.Board.from_epd()` with semicolon
  in string operand. Thanks @jdart1.

v0.24.0

Toggle v0.24.0's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.24.0

This release **drops support for Python 2**. The *0.23.x* branch will be
maintained for one more month.

Changes:

* **Require Python 3.4.** Thanks @hugovk.
* No longer using extra pip features:
  `pip install python-chess[engine,gaviota]` is now `pip install python-chess`.
* Various keyword arguments can now be used as **keyword arguments only**.
* `chess.pgn.GameNode.accept()` now
  **also visits the move leading to that node**.
* `chess.pgn.GameModelCreator` now requires that `begin_game()` be called.
* `chess.pgn.scan_headers()` and `chess.pgn.scan_offsets()` have been removed.
  Instead the new functions `chess.pgn.read_headers()` and
  `chess.pgn.skip_game()` can be used for a similar purpose.
* `chess.syzygy`: Invalid magic headers now raise `IOError`. Previously they
  were only checked in an assertion.
  `type(board).{tbw_magic,tbz_magic,pawnless_tbw_magic,pawnless_tbz_magic}`
  are now byte literals.
* `board.status()` constants (`STATUS_`) are now typed using `enum.IntFlag`.
  Values remain unchanged.
* `chess.svg.Arrow` is no longer a `namedtuple`.
* `chess.PIECE_SYMBOLS[0]` and `chess.PIECE_NAMES[0]` are now `None` instead
  of empty strings.
* Performance optimizations:

  * `chess.pgn.Game.from_board()`,
  * `chess.square_name()`
  * Replace `collections.deque` with lists almost everywhere.

* Renamed symbols (aliases will be removed in the next release):

  * `chess.BB_VOID` -> `BB_EMPTY`
  * `chess.bswap()` -> `flip_vertical()`
  * `chess.pgn.GameNode.main_line()` -> `mainline_moves()`
  * `chess.pgn.GameNode.is_main_line()` -> `is_mainline()`
  * `chess.variant.BB_HILL` -> `chess.BB_CENTER`
  * `chess.syzygy.open_tablebases()` -> `open_tablebase()`
  * `chess.syzygy.Tablebases` -> `Tablebase`
  * `chess.syzygy.Tablebase.open_directory()` -> `add_directory()`
  * `chess.gaviota.open_tablebases()` -> `open_tablebase()`
  * `chess.gaviota.open_tablebases_native()` -> `open_tablebase_native()`
  * `chess.gaviota.NativeTablebases` -> `NativeTablebase`
  * `chess.gaviota.PythonTablebases` -> `PythonTablebase`
  * `chess.gaviota.NativeTablebase.open_directory()` -> `add_directory()`
  * `chess.gaviota.PythonTablebase.open_directory()` -> `add_directory()`

Bugfixes:

* The PGN parser now gives the visitor a chance to handle unknown chess
  variants and continue parsing.
* `chess.pgn.GameNode.uci()` was always raising an exception.

New features:

* `chess.SquareSet` now extends `collections.abc.MutableSet` and can be
  initialized from iterables.
* `board.apply_transform(f)` and `board.transform(f)` can apply bitboard
  transformations to a position. Examples:
  `chess.flip_{vertical,horizontal,diagonal,anti_diagonal}`.
* `chess.pgn.GameNode.mainline()` iterates over nodes of the mainline.
  Can also be used with `reversed()`. Reversal is now also supported for
  `chess.pgn.GameNode.mainline_moves()`.
* `chess.svg.Arrow(tail, head, color="niklasf#888")` gained an optional *color*
  argument.
* `chess.pgn.BaseVisitor.parse_san(board, san)` is used by parsers and can
  be overwritten to deal with non-standard input formats.
* `chess.pgn`: Visitors can advise the parser to skip games or variations by
  returning the special value `chess.pgn.SKIP` from `begin_game()`,
  `end_headers()` or `begin_variation()`. This is only a hint.
  The corresponding `end_game()` or `end_variation()` will still be called.
* Added `chess.svg.MARGIN`.

v0.23.10

Toggle v0.23.10's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.23.10

Bugfixes:

* `chess.SquareSet` now correctly handles negative masks. Thanks @hasnul.
* `chess.pgn` now accepts `[Variant "chess 960"]` (with the space).

v0.23.9

Toggle v0.23.9's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.23.9

Changes:

* Updated `Board.is_fivefold_repetition()`. FIDE rules have changed and the
  repetition no longer needs to occur on consecutive alternating moves.
  Thanks @LegionMammal978.

v0.23.8

Toggle v0.23.8's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.23.8

Bugfixes:

* `chess.syzygy`: Correctly initialize wide DTZ map for experimental 7 piece
  table KRBBPvKQ.

v0.23.7

Toggle v0.23.7's commit message

Verified

This tag was signed with the committer’s verified signature.
niklasf Niklas Fiekas
python-chess v0.23.7

Bugfixes:

* Fixed `ThreeCheckBoard.mirror()` and `CrazyhouseBoard.mirror()`, which
  were previously resetting remaining checks and pockets respectively.
  Thanks @QueensGambit.

Changes:

* `Board.move_stack` is now guaranteed to be UCI compatible with respect to
  the representation of castling moves and `board.chess960`.
* Drop support for Python 3.3, which is long past end of life.
* `chess.uci`: The `position` command now manages `UCI_Chess960` and
  `UCI_Variant` automatically.
* `chess.uci`: The `position` command will now always send the entire history
  of moves from the root position.
* Various coding style fixes and improvements. Thanks @hugovk.

New features:

* Added `Board.root()`.