gnucash future: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sun Sep 27 00:22:57 EDT 2026
Updated via https://github.com/Gnucash/gnucash/commit/2765929b (commit)
via https://github.com/Gnucash/gnucash/commit/94c1e445 (commit)
via https://github.com/Gnucash/gnucash/commit/0e302675 (commit)
via https://github.com/Gnucash/gnucash/commit/83a193dd (commit)
via https://github.com/Gnucash/gnucash/commit/7755418c (commit)
via https://github.com/Gnucash/gnucash/commit/d8f0e151 (commit)
via https://github.com/Gnucash/gnucash/commit/5ed56e2b (commit)
via https://github.com/Gnucash/gnucash/commit/5888a04a (commit)
via https://github.com/Gnucash/gnucash/commit/3bbf74a7 (commit)
via https://github.com/Gnucash/gnucash/commit/3cf1352c (commit)
via https://github.com/Gnucash/gnucash/commit/0dc41c12 (commit)
via https://github.com/Gnucash/gnucash/commit/fbcb9f5e (commit)
via https://github.com/Gnucash/gnucash/commit/89448ffd (commit)
via https://github.com/Gnucash/gnucash/commit/973a64ce (commit)
via https://github.com/Gnucash/gnucash/commit/5b687ae1 (commit)
via https://github.com/Gnucash/gnucash/commit/f21fec06 (commit)
from https://github.com/Gnucash/gnucash/commit/670f239e (commit)
commit 2765929b8143f6af07a4530a8de6b674e62898e8
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Sep 26 20:18:01 2026 -0700
Remove deprecated guile and python bindings for gnc_price_set_source_string.
commit 94c1e4458f2a2a5690b0b97c86116ff2b430d2af
Merge: 670f239e35 0e302675ff
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Sep 26 20:13:32 2026 -0700
Merge branch 'stable' into future
commit 0e302675fff4bf6dccf62ba876c7d306b7152d0e
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Sep 26 12:58:12 2026 -0700
Release GnuCash 5.17
commit 83a193dd8dd7706348e143bfb7aee65e0ec30f54
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Aug 20 12:12:10 2026 -0700
Bug 797872 - Multiple check printing results in nothing sent to print queue after first check
commit 7755418cb80ff8195ca3918018e6d08244638dfc
Merge: d8f0e151a7 5ed56e2b3d
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Sep 26 11:19:33 2026 -0700
Merge Chris Lam's 'acc-templated-split-iterator' into stable.
commit d8f0e151a7333d587879d2ca6833ade4504539a9
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Sep 26 09:04:12 2026 -0700
engine.i: Fix typo.
commit 5ed56e2b3de39c839c1c5552b500fdda459e5d16
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Sep 26 20:41:26 2026 +0800
[engine.i] use gnc_account_foreach_split_between_dates
avoids calling callback on splits before start_date
commit 5888a04a8e9c89a6e6b66eb270d17ede456202d5
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Sep 26 20:41:17 2026 +0800
[account.cpp] use gnc_account_foreach_split_between_dates
commit 3bbf74a7306698533c3b1b278362089f41f5e5df
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Sep 26 20:40:03 2026 +0800
[account.hpp] introduce gnc_account_foreach_split_between_dates
A templated account->splits iterator, will target splits from
start_date to end_date, inclusive of date boundaries. Also optionally
include descendants.
commit 3cf1352cbb2aa8405bbd6df38c047bf3cee9f938
Merge: fbcb9f5e75 0dc41c1212
Author: John Ralls <jralls at ceridwen.us>
Date: Fri Sep 25 16:10:42 2026 -0700
Merge Noah Noerr's 'python-guard-price-set-source-string' into stable.
commit 0dc41c1212028c163c3717235c182fe34d08ed4c
Author: Noerr <Noerr at users.noreply.github.com>
Date: Wed Sep 23 02:06:17 2026 -0700
[bindings/python] Deprecate set_source_string; remove it from the Guile bindings
gnc_price_set_source_string maps a source string to the PriceSource enum and
silently leaves the source unchanged for anything it doesn't recognize -- a
silent no-op a naive Python or Guile script can hit. Steer callers to
set_source() with a PriceSource member (added in #2317) instead.
Python bindings:
- Deprecate GncPrice.set_source_string(): it now emits a DeprecationWarning
pointing at set_source(PriceSource.<...>). It still works during the
deprecation period and still guards -- if the string is not recognized (the
round-tripped source no longer equals the input) it raises ValueError rather
than silently doing nothing.
- Fix the deprecated() decorator in deprecation.py: it referenced the undefined
DeprecationWarnig and inspect.current_frame(), so it raised instead of
warning (the one existing @deprecated use was latently broken).
Guile bindings:
- mark gnc-price-set-source-string deprecated in engine.i.
(Python and Guile use separate SWIG interface files, so Python is
handled separately). The only in-tree Guile caller is the QIF importer, updated to
gnc-price-set-source with PRICE-SOURCE-USER-PRICE; the redundant
set-source-string in test-engine-extras.scm's fixture helper is dropped.
Tests (test_price_and_wrapping.py):
- TestSetSourceStringGuard covers the guard (still raises on an unrecognized
string) and the new DeprecationWarning.
Removing set_source_string from the Python bindings is a follow-up.
commit fbcb9f5e756321a161a1ecf478a81d866b1d03a8
Merge: 973a64ceda 89448ffd34
Author: John Ralls <jralls at ceridwen.us>
Date: Fri Sep 25 14:38:24 2026 -0700
Merge Noah Noerr's 'bug799796-price-example-getvalue' into stable.
commit 89448ffd3420ae563a4fece75b9e6ec9a9db5927
Author: Noerr <Noerr at users.noreply.github.com>
Date: Wed Sep 23 01:05:21 2026 -0700
[bindings/python] Fix and modernize the price example scripts (Bug 799796)
PR #2187 made GncPrice.get_value() return a GncNumeric wrapper and clone() a
fully wrapped GncPrice. The price example scripts still used the pre-5.15 raw
_gnc_numeric idiom and broke -- reported as Bug 799796 (cloned prices silently
kept the original value).
Example scripts (bindings/python/example_scripts/):
* quotes_historic.py -- reworked to the modern idiom; it now actually runs on
5.x (it had further latent breakage beyond the reported one):
- Construct each price directly with GncPrice(book) + setters instead of
cloning an existing price, so the script no longer needs a pre-existing
price in the book. Look the pricing currency (USD) up from the commodity
table rather than deriving it from a split.
- Build the value with the double->GncNumeric constructor at GnuCash's
standard price precision -- the pricing currency's SCU * COMMODITY_DENOM_MULT
rounded HALF_UP (gnc-pricedb.h "Price policy") -- dropping the
Fraction.from_float().limit_denominator(100000) dance and its import.
- Set the source with the PriceSource enum -- set_source(PriceSource.FINANCE_QUOTE)
(the enum added in #2317). The original set_source("Finance::Quotes::Historic")
passed a string to what has been an enum setter since 2.6, which raises
TypeError on modern bindings.
- Open with Session(url), which defaults to SESSION_NORMAL_OPEN. The old
Session(url, True, False, False) passed the deprecated ignore_lock=True,
silently bypassing the book's lock file.
* priceDB_test.py, price_database_example.py -- num/denom are methods now, so
read v.num() / v.denom().
Prevent silent recurrence (gnucash_core.py):
The write path failed *silently*, which is how this slipped through review and
CI. num/denom are read-only accessor methods, so assigning to them merely
shadows the method and changes nothing. Add a GncNumeric.__setattr__ that raises
AttributeError on assignment to num/denom, pointing at the correct idiom
GncNumeric(num, denom).
Test (bindings/python/tests/test_numeric.py):
New test_num_denom_read_only covering the guard. It needs no backend, so it runs
in the existing python-bindings CTest on all platforms.
The wiki page Stocks/get_prices, which the reporter copied from, is being
updated separately.
commit 973a64ceda5a2f0201472caf9c3a6553c857d2c6
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Sep 24 15:58:38 2026 -0700
Correct the summary and description for the chart-tooltip-position preference schema.
Thanks to Simon Arlott for noticing and reporting it.
commit 5b687ae193648337f8b602a1956cb09c97f804c9
Merge: c8317b15a0 f21fec06be
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Sep 24 13:26:12 2026 -0700
Merge Noah Noerr's 'python-pricesource-enum' into stable.
commit f21fec06be967c4017ba7538c7ea28bb6dfddfa7
Author: Noerr <Noerr at users.noreply.github.com>
Date: Thu Sep 24 00:06:16 2026 -0700
[bindings/python] Add a PriceSource enum for gnc_price_set_source()
Setting a price's source from Python meant reaching into gnucash_core_c for the
raw PRICE_SOURCE_* constants. Add a PriceSource(IntEnum) alongside SessionOpenMode,
with values sourced from the C enum (via gnucash_core_c) so they can't drift, so a
script can write price.set_source(PriceSource.FINANCE_QUOTE) with a plain top-level
import.
Add test_price_and_wrapping.TestPriceSourceEnum:
- test_values_match_c_enum asserts the Python enum covers the C PRICE_SOURCE_*
value set exactly, so adding, removing, or renumbering a C value fails CI until
PriceSource is updated to match. (Member names are a Python-side choice --
FINANCE_QUOTE spells out FQ -- so the check is on values.)
- test_set_source_accepts_enum confirms a member flows through set_source() and
round-trips.
Summary of changes:
NEWS | 93 ++++++++++++++++++++++
bindings/engine.i | 37 +++------
bindings/guile/test/test-engine-extras.scm | 1 -
bindings/python/deprecation.py | 6 +-
bindings/python/example_scripts/priceDB_test.py | 4 +-
.../example_scripts/price_database_example.py | 2 +-
bindings/python/example_scripts/quotes_historic.py | 52 +++++-------
bindings/python/gnucash_core.i | 1 +
bindings/python/gnucash_core.py | 39 +++++++--
bindings/python/tests/test_numeric.py | 13 +++
bindings/python/tests/test_price_and_wrapping.py | 82 +++++++++++++++++++
gnucash/gnome-utils/print-session.c | 5 ++
.../gschemas/org.gnucash.GnuCash.gschema.xml.in | 4 +-
gnucash/import-export/qif-imp/qif-to-gnc.scm | 2 +-
libgnucash/engine/Account.cpp | 16 +---
libgnucash/engine/Account.hpp | 40 ++++++++++
16 files changed, 312 insertions(+), 85 deletions(-)
More information about the gnucash-patches
mailing list