Releases: niklasf/python-chess
python-chess v0.8.1
Improvements in this bugfix release:
- Fixed pondering mode in uci module. For example
ponderhit()was blocking
indefinitely. Thanks to Valeriy Huz for reporting this. - Patch by Richard C. Gerkin: Moved searchmoves to the end of the UCI go
command, where it will not cause other command parameters to be ignored. - Added missing check or checkmate suffix to castling SANs, e.g.
O-O-O#. - Fixed off-by-one error in polyglot opening book binary search. This would
not have caused problems for real opening books. - Fixed Python 3 support for reverse polyglot opening book iteration.
- Bestmoves may be literally
(none)in UCI protocol, for example in
checkmate positions. Fix parser and returnNoneas the bestmove in this
case. - Fixed spelling of repetition (was repitition).
can_claim_threefold_repetition()andis_fivefold_repetition()are the
affected method names. Aliases are there for now, but will be removed in the
next release. Thanks to Jimmy Patrick for reporting this. - Added
SquareSet.__reversed__(). - Use containerized tests on Travis CI, test against Stockfish 6, improved
test coverage amd various minor clean-ups.
python-chess v0.8.0
New in this release:
- Implement Syzygy endgame tablebase probing.
https://syzygy-tables.info is an example project that provides a public API using the new features. - The interface for aynchronous UCI command has changed to mimic
concurrent.futures.is_done()is now justdone(). Callbacks will receive the command object as a single argument instead of the result. Theresultproperty andwait()have been removed in favor of a synchronously waitingresult()method. - The result of the
stopandgoUCI commands are now named tuples (instead of just normal tuples). - Add alias
BoardforBitboard. - Fixed race condition during UCI engine startup. Lines received during engine startup sometimes needed to be processed before the Engine object was fully initialized.
python-chess v0.7.0
New in this release:
- Implement UCI engine communication.
- Patch by Matthew Lai:
Add caching for gameNode.board().
python-chess v0.6.0
New in this release:
- If there are comments in a game before the first move, these are now assigned
toGame.commentinstead ofGame.starting_comment.Game.starting_comment
is ignored from now on.Game.starts_variation()is no longer true.
The first child node of a game can no longer have a starting comment.
It is possible to have a game withGame.commentset, that is otherwise
completely empty. - Fix export of games with variations. Previously the moves were exported in
an unusual (i.e. wrong) order. - Install
gmpy2orgmpyif you want to use slightly faster binary
operations. - Ignore superfluous variation opening brackets in PGN files.
- Add
GameNode.san(). - Remove
sparse_pop_count(). Just usepop_count(). - Remove
next_bit(). Now usebit_scan().
python-chess v0.5.0
New in this release:
-
PGN parsing is now more robust:
read_game()ignores invalid tokens.
Still exceptions are going to be thrown on illegal or ambiguous moves, but
this behaviour can be changed by passing anerror_handlerargument.>>> # Raises ValueError: >>> game = chess.pgn.read_game(file_with_illegal_moves) >>> # Silently ignores errors and continues parsing: >>> game = chess.pgn.read_game(file_with_illegal_moves, None) >>> # Logs the error, continues parsing: >>> game = chess.pgn.read_game(file_with_illegal_moves, logger.exception)If there are too many closing brackets this is now ignored.
Castling moves like 0-0 (with zeros) are now accepted in PGNs.
TheBitboard.parse_san()method remains strict as always, though.Previously the parser was strictly following the PGN spefification in that
empty lines terminate a game. So a game like[Event "?"] { Starting comment block } 1. e4 e5 2. Nf3 Nf6 *would have ended directly after the starting comment. To avoid this, the
parser will now look ahead until it finds at least one move or a termination
marker like*,1-0,1/2-1/2or0-1. -
Introduce a new function
scan_headers()to quickly scan a PGN file for
headers without having to parse the full games. -
Minor testcoverage improvements.
python-chess v0.4.2
New in this release:
- Fix bug where
pawn_moves_from()and consequentlyis_legal()weren't
handling en-passant correctly. Thanks to Norbert Naskov for reporting.
python-chess v0.4.1
New in this release:
- Fix
is_fivefold_repitition(): The new fivefold repitition rule requires
the repititions to occur on alternating consecutive moves. - Minor testing related improvements: Close PGN files, allow running via
setuptools. - Add recently introduced features to README.
python-chess v0.4.0
New in this release:
- Introduce
can_claim_draw(),can_claim_fifty_moves()and
can_claim_threefold_repitition(). - Since the first of July 2014 a game is also over (even without claim by one
of the players) if there were 75 moves without a pawn move or capture or
a fivefold repitition. Letis_game_over()respect that. Introduce
is_seventyfive_moves()andis_fivefold_repitition(). Other means of
ending a game take precedence. - Threefold repitition checking requires efficient hashing of positions
to build the table. So performance improvements were needed there. The
default polyglot compatible zobrist hashes are now built incrementally. - Fix low level rotation operations
l90(),l45()andr45(). There was
no problem in core because correct versions of the functions were inlined. - Fix equality and inequality operators for
Bitboard,MoveandPiece.
Also make them robust against comparisons with incompatible types. - Provide equality and inequality operators for
SquareSetand
polyglot.Entry. - Fix return values of incremental arithmetical operations for
SquareSet. - Make
polyglot.Entryacollections.namedtuple. - Determine and improve test coverage.
- Minor coding style fixes.
python-chess v0.3.1
New in this release:
Bitboard.status()now correctly detectsSTATUS_INVALID_EP_SQUARE,
instead of errors or false reports.- Polyglot opening book reader now correctly handles knight underpromotions.
- Minor coding style fixes, including removal of unused imports.
python-chess v0.3.0
New in this release:
-
Rename property
half_movesofBitboardtohalfmove_clock. -
Rename property
plyofBitboardtofullmove_number. -
Let PGN parser handle symbols like
!,?,!?and so on by converting
them to NAGs. -
Add a human readable string representation for Bitboards.
>>> print(chess.Bitboard()) r n b q k b n r p p p p p p p p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P P P P P P P P R N B Q K B N R -
Various documentation improvements.