pkpython 0.1.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pkpython-0.1.0 → pkpython-0.2.1}/.gitignore +1 -0
- pkpython-0.2.1/CHANGELOG.md +129 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/Cargo.lock +214 -384
- {pkpython-0.1.0 → pkpython-0.2.1}/Cargo.toml +2 -2
- {pkpython-0.1.0 → pkpython-0.2.1}/Makefile +18 -1
- {pkpython-0.1.0 → pkpython-0.2.1}/PKG-INFO +2 -1
- {pkpython-0.1.0 → pkpython-0.2.1}/README.md +1 -0
- pkpython-0.2.1/docs/superpowers/plans/2026-04-28-pkpy-0.0.52-upgrade.md +1742 -0
- pkpython-0.2.1/docs/superpowers/plans/2026-04-29-pkpy-pokersession-tablenocell.md +1215 -0
- pkpython-0.2.1/docs/superpowers/specs/2026-04-28-pkpy-0.0.52-upgrade-design.md +137 -0
- pkpython-0.2.1/docs/superpowers/specs/2026-04-29-pkpy-pokersession-tablenocell-design.md +319 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/pyproject.toml +1 -1
- {pkpython-0.1.0 → pkpython-0.2.1}/python/pkpy/__init__.py +14 -0
- pkpython-0.2.1/src/bot.rs +7 -0
- pkpython-0.2.1/src/hand_history.rs +7 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/src/lib.rs +42 -9
- pkpython-0.2.1/src/session.rs +212 -0
- pkpython-0.2.1/src/stats.rs +7 -0
- pkpython-0.2.1/src/table_no_cell.rs +232 -0
- pkpython-0.2.1/tests/test_session.py +157 -0
- pkpython-0.2.1/tests/test_table_no_cell.py +140 -0
- pkpython-0.1.0/.claude/settings.local.json +0 -14
- {pkpython-0.1.0 → pkpython-0.2.1}/.github/workflows/ci.yml +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/.github/workflows/publish.yml +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/LICENSE +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/demo.py +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/docs/STACK.md +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/docs/pypi-publishing-plan.md +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/examples/calc.py +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/examples/gto.py +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/examples/the_hand.py +0 -0
- {pkpython-0.1.0 → pkpython-0.2.1}/tests/test_pkpy.py +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project tracks [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
The crate version is kept in lockstep with the underlying `pkcore` dependency.
|
|
8
|
+
|
|
9
|
+
## [0.2.1] - 2026-07-10
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Bumped `pkcore` dependency from `0.2.0` to `0.2.1`.
|
|
14
|
+
- Bumped `pkpy` crate version to `0.2.1` to stay in lockstep with `pkcore`.
|
|
15
|
+
|
|
16
|
+
### Security (inherited from `pkcore` 0.2.1)
|
|
17
|
+
|
|
18
|
+
`pkcore` 0.2.1 is a dependency-hygiene patch with **no public API, behavior, or
|
|
19
|
+
wire-format changes** — the postcard binary encoding is byte-identical, so solver
|
|
20
|
+
caches and hand-history data are unaffected. It carries two supply-chain fixes that
|
|
21
|
+
flow through to pkpy's dependency tree:
|
|
22
|
+
|
|
23
|
+
- **`crossbeam-epoch` 0.9.18 → 0.9.20 (RUSTSEC-2026-0204).** Fixes an invalid pointer
|
|
24
|
+
dereference in `crossbeam-epoch`'s `fmt::Pointer`/`Display` impl. Pulled in
|
|
25
|
+
transitively via `rayon`; a lockfile-only change.
|
|
26
|
+
- **`atomic-polyfill` (RUSTSEC-2023-0089) removed from the tree.** `pkcore` now builds
|
|
27
|
+
`postcard` with `default-features = false`, dropping the default `heapless-cas`
|
|
28
|
+
feature that pulled the unmaintained `atomic-polyfill` crate. It is gone from
|
|
29
|
+
pkpy's dependency graph after this bump.
|
|
30
|
+
|
|
31
|
+
### Migration notes
|
|
32
|
+
|
|
33
|
+
- Public Rust API of `pkcore` is **unchanged**. No method signatures, types, or
|
|
34
|
+
imports moved. pkpy compiles clean against `pkcore 0.2.1` with no source changes
|
|
35
|
+
(verified via `cargo check` against local `pkcore 0.2.1`).
|
|
36
|
+
- No Python-facing behavior changes: the same bindings, method names, and return
|
|
37
|
+
values as under `pkcore 0.2.0`.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## [0.2.0] - 2026-07-08
|
|
42
|
+
|
|
43
|
+
> **Never published to PyPI.** This version was tagged in-tree but not released; its
|
|
44
|
+
> changes reach users for the first time bundled into 0.2.1. It is the first pkpy build
|
|
45
|
+
> on the `pkcore` 0.2.x line — pkpy migrated **directly from `pkcore` 0.0.54**, skipping
|
|
46
|
+
> the 0.1.x series.
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- Bumped `pkcore` dependency from `0.0.54` to `0.2.0`, and enabled pkcore's **`store`
|
|
51
|
+
feature** explicitly. `pkcore` 0.2.0 moved storage/BCM and solver persistence behind
|
|
52
|
+
cargo features (previously always compiled in); pkpy now opts into `store` so BCM
|
|
53
|
+
loading and `SolverResult` save/load continue to work.
|
|
54
|
+
- Bumped `pkpy` crate version to `0.2.0` to stay in lockstep with `pkcore`.
|
|
55
|
+
- **Internal migration to pkcore 0.2.0's reorganized module tree** (the `casino` package
|
|
56
|
+
reorg and the `TableNoCell → Table` type rename). Import paths in the Rust binding layer
|
|
57
|
+
were updated (`casino::table::event` → `casino::action` / `casino::table_celled::event`,
|
|
58
|
+
`casino::table::seats::*` → `casino::equity::*`, `casino::table::winnings` →
|
|
59
|
+
`casino::winnings`, `casino::table_no_cell::TableNoCell` → `casino::table::Table`, etc.).
|
|
60
|
+
|
|
61
|
+
**No Python-facing class or method names changed.** pkpy deliberately preserves its
|
|
62
|
+
existing Python names — `TableNoCell`, `PlayerNoCell`, `SeatNoCell`, `SeatsNoCell`,
|
|
63
|
+
`TableAction`, `TableLog`, `SeatEquity`, `Seatbit`, `Winnings`, `PotWin`, and the rest —
|
|
64
|
+
so existing Python code imports and calls exactly the same symbols. The pkcore rename is
|
|
65
|
+
invisible from Python.
|
|
66
|
+
|
|
67
|
+
### Behavior change (inherited from `pkcore` 0.2.0)
|
|
68
|
+
|
|
69
|
+
- **`DealEval(hole_cards)` is now fallible.** The constructor previously always succeeded;
|
|
70
|
+
it now raises a Python exception when the hole cards are invalid. This follows pkcore
|
|
71
|
+
0.2.0 changing `DealEval::new` to return a `Result` as part of the panic-boundary /
|
|
72
|
+
error de-leak audit work. Wrap `DealEval(...)` in `try/except` if you pass unvalidated
|
|
73
|
+
input; the happy path is unchanged.
|
|
74
|
+
- Errors surfaced from the dealer/eval paths are now pkcore's own error enums (the 0.2.0
|
|
75
|
+
"no format-crate leak" change). pkpy still maps them to Python exceptions via the same
|
|
76
|
+
`to_py_err` path, so raised exception messages may differ slightly from 0.0.54.
|
|
77
|
+
|
|
78
|
+
### Migration notes
|
|
79
|
+
|
|
80
|
+
- **No Python source changes required** for typical usage: same class names, same methods,
|
|
81
|
+
same imports.
|
|
82
|
+
- The one behavioral gotcha is `DealEval(...)` now raising on invalid hole cards instead of
|
|
83
|
+
being infallible.
|
|
84
|
+
- Card `Display` / `FromStr` string forms (e.g. `"6♠ 6♥"`) and serialized representations
|
|
85
|
+
are unchanged, so data produced under 0.0.54 remains readable.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## [0.0.54] - 2026-04-30
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
|
|
93
|
+
- Bumped `pkcore` dependency from `0.0.53` to `0.0.54`.
|
|
94
|
+
- Bumped `pkpy` crate version to `0.0.54` to stay in lockstep with `pkcore`.
|
|
95
|
+
|
|
96
|
+
### Fixed (inherited from `pkcore` 0.0.54)
|
|
97
|
+
|
|
98
|
+
No pkpy code was modified for this release, but the upstream fix changes
|
|
99
|
+
observable behavior on one Python-exposed method, `TableNoCell.to_call()`.
|
|
100
|
+
|
|
101
|
+
- **Short-stacked big blind — call target now anchored to the configured BB.**
|
|
102
|
+
When the BB is all-in for less than the configured big blind (e.g. BB=100
|
|
103
|
+
but stack=30), `TableNoCell.to_call()` now returns the full configured BB
|
|
104
|
+
(`100`) instead of the amount the BB physically posted (`30`). Other
|
|
105
|
+
players must call the full configured amount; chip conservation is
|
|
106
|
+
preserved at showdown via side-pot stratification (multiway) or
|
|
107
|
+
uncalled-bet returns (heads-up / no second contestant at that tier).
|
|
108
|
+
This matches standard cardroom rules (TDA, WSOP).
|
|
109
|
+
- **`act_call` now degrades gracefully when the caller is short.** When a
|
|
110
|
+
caller cannot cover the call target, the action is converted to an
|
|
111
|
+
all-in for the caller's remaining stack rather than erroring on
|
|
112
|
+
insufficient chips. Surfaced through pkpy via `PokerSession.apply_action`.
|
|
113
|
+
- **`min_raise` stays anchored to the configured BB** even when the BB is
|
|
114
|
+
all-in for less. Prior behavior could allow under-sized raises in the
|
|
115
|
+
short-BB scenario.
|
|
116
|
+
|
|
117
|
+
### Migration notes
|
|
118
|
+
|
|
119
|
+
- Public Rust API of `pkcore` is **unchanged**. No method signatures, types,
|
|
120
|
+
or imports moved. pkpy compiles clean against `pkcore 0.0.54` with no
|
|
121
|
+
source changes.
|
|
122
|
+
- If you have Python code that asserts specific chip math against a
|
|
123
|
+
short-stacked-BB scenario built on pkcore 0.0.53 semantics, those
|
|
124
|
+
assertions will need to be updated. The pkpy test suite does not
|
|
125
|
+
currently exercise this scenario, so the in-tree tests remain green.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
Earlier releases pre-date this changelog. See `git log` for prior history.
|