From bb8d57c4f83fa180f34cf5673b359ab27f805dd9 Mon Sep 17 00:00:00 2001 From: Niklas Fiekas Date: Thu, 24 Sep 2020 17:03:40 +0200 Subject: [PATCH] Prepare 1.0.0 --- CHANGELOG.rst | 34 ++++++++++++++++++++++++++++++++++ chess/engine.py | 2 -- chess/syzygy.py | 3 --- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bb99529cd..e89ca38bf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,40 @@ Changelog for python-chess ========================== +New in v1.0.0 +------------- + +Changes: + +* Now requires Python 3.7+. +* `chess.engine` will now cut off illegal principal variations at the first + illegal move instead of discarding them entirely. +* `chess.engine.EngineProtocol` renamed to `chess.engine.Protocol`. +* `chess.engne.Option` is no longer a named tuple. +* Renamed `chess.gaviota` internals. +* Relaxed type annotations of `chess.pgn.GameNode.variation()` and related + methods. +* Documentation improvements. Will now show type aliases like `chess.Square` + instead of `int`. + +Bugfixes: + +* Fix insufficient material with same-color bishops on both sides. +* Clarify that `chess.Board.can_claim_draw()` and related methods refer to + claims by the player to move. Three-fold repetition could already be claimed + before making the final repeating move. `chess.Board.can_claim_fifty_moves()` + now also allows a claim before the final repeating move. The previous + behavior is `chess.Board.is_fifty_moves()`. +* Fix parsing of green arrows/circles in `chess.pgn.GameNode.arrows()`. +* Fix overloaded type signature of `chess.engine.Protocol.engine()`. + +New features: + +* Added `chess.parse_square()`, to be used instead of + `chess.SQUARE_NAMES.index()`. +* Added `chess.Board.apply_mirror()`. +* Added `chess.svg.board(..., colors)`, to allow overriding the default theme. + New in v0.31.4 -------------- diff --git a/chess/engine.py b/chess/engine.py index 93b63b3e8..47325326a 100644 --- a/chess/engine.py +++ b/chess/engine.py @@ -879,8 +879,6 @@ async def popen(cls: Type[ProtocolT], command: Union[str, List[str]], *, setpgrp return await asyncio.get_running_loop().subprocess_exec(cls, *command, **popen_args) # type: ignore -EngineProtocol = Protocol # TODO: Remove before 1.0 - class CommandState(enum.Enum): New = 1 diff --git a/chess/syzygy.py b/chess/syzygy.py index 0f4690c84..4f8a30813 100644 --- a/chess/syzygy.py +++ b/chess/syzygy.py @@ -380,9 +380,6 @@ def is_tablename(name: str, *, one_king: bool = True, piece_count: Optional[int] (not normalized or normalize_tablename(name) == name) and (not one_king or (name != "KvK" and name.startswith("K") and "vK" in name))) -def is_table_name(name: str) -> bool: # TODO: Remove before 1.0 - return is_tablename(name, one_king=False) - def tablenames(*, one_king: bool = True, piece_count: int = 6) -> Iterator[str]: first = "K" if one_king else "P"