New beancount user, v2 or v3 in 2022?

890 views
Skip to first unread message

Colin Ingarfield

unread,
Feb 8, 2022, 6:33:38 AM2/8/22
to Beancount
Hello,

About a year ago I evaluated beancount to organize my finances.  As recommended at the time I used v2.  Made some good progress but my project fell to the wayside.

Now I'm giving it another shot, and wondering if I should use v2 or v3?  Getting all my financial info together is a fair bit of work, and I'd rather not change it all if v3 becomes "official" later this year.

FWIW I'm a software developer, so if v3 requires use of git, C++ compilers, etc., that's not an issue.  But if it's unstable then I'd rather move ahead with v2.

Thanks for such a great tool.

-- Colin

Alan H

unread,
Feb 8, 2022, 8:33:00 AM2/8/22
to Beancount
My understanding is (I'm on v2) is that v3 is syntax-compatible with v2 so the penalty (if there is one) for starting with V2 would be small. The areas where there are clear gaps (to my mind) are:
  •  web frontend - AFAICT Fava is Beancount v2 only. 
  • importers have changed substantially 
  • some third party systems might not yet support v3 (beancount-import comes to mind - upon which I rely heavily).
Pivoting this to the positive; I'd love to hear from folks using v3 and what they use for 'favs-like' reporting / browsing and how they manage imports.
I might be missing a trick here where you can switch between v2 and v3 seamlessly (for example) and still do reporting using a v2 env and select what you want from v3.? 

Anyone using V3 (and V2?) feel like commenting?

Thanks
Alan


Ben Blount

unread,
Feb 8, 2022, 2:06:45 PM2/8/22
to Beancount
Fava, importers, and beancount-import all work fine with v3 and I personally use all 3 with v3. I do recall some very minor patching being required at one point, primarily to update import names. As you've said by far the biggest change is in the importer structure.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/355eb4cb-0189-4679-af63-d10725289578n%40googlegroups.com.

Hawrylyshen, Alan

unread,
Feb 8, 2022, 2:46:41 PM2/8/22
to bean...@googlegroups.com
Super cool. I should try to update my world a little and see how much I can take advantage of v3 ( out of personal interest ). Thanks for the anecdata Ben.
Alan

You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/h3YHCz44lIU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CACGEkZszOAU7fk28wSPKyg0C8Ow04Xdak43kQWur8fFRvqWJXA%40mail.gmail.com.


--
a l a n a t p o l y p h a s e d o t c a

Daniele Nicolodi

unread,
Feb 8, 2022, 5:43:31 PM2/8/22
to bean...@googlegroups.com
Unless you are planning to hack on Beancount or related tools, there is
little to no reason to switch to Beancount v3. Beancount v3 is currently
interchangeable with v2 but this is not a constraint to which we will
necessarily adhere during the development of Beancount v3.

The only major change is in the importers frameworks, which has moved to
the beangulp project and evolved substantially. While the old APIs are
still there (under a different import path) the recommended way to
interact with the importers changes significantly and I plan more
changes before cutting a release. In principle beangulp could be used on
top of Beancount v2, but... please see a message of mine to the mailing
list a while ago for an explanation.

I suggest new users to stay with v2 for now. Read on for more details.

Beancount v3 is mostly plans for a partial port of the Beancount
codebase to C++ to improve performance on large ledgers and clean up
some internal structure. As of now, only the parser has been ported to
C++, switching from Flex to Re/Flex as scanner generator, resulting in a
somehow stricter and more correct parser. However, this code is not used
in a standard install of the v3 branch, which still uses the v2 parser,
thus is of very little consequence for users.

The break of API backward compatibility inherent in the port is also an
excuse to introduce backward incompatibilities at the application level.
With the intent of reducing the scope of the Beancount codebase and
increase the pace of development some parts of Beancount (that most
likely no one will miss) have been removed and some (bean-price,
bean-query, and the importers framework, now respectively beanprice,
beanquery, and beangulp) have been split off from the main repository.
Other than that, only very minor API cleanup happened in the v3 branch.
I use v2 and v3 interchangeably. I know that Martin uses v3.

While the API is almost identical, most projects that build on Beancount
as a library expect and v2 only. One consequence is that Python
packaging may have to be coerced into accepting Beancount v3 as a
dependency, and if any of the functionality moved to the side
repositories is used, imports need to be modified accordingly (other
than that, for the moment, I try to maintain API compatibility with v2).

Beancount v3 is the only branch where development continues. Only
serious bug fixes are (sporadically, for lack of time) applied to v2. I
don't expect anything major to happen in the v3 development any time soon.

Cheers,
Dan

cantas...@gmail.com

unread,
Apr 7, 2022, 2:07:02 PM4/7/22
to Beancount
Hi,
You mention here you required some changes to import names in fava. Can you please share your changes?
Does v3 support multiple includes without having to repeat options in each file?

Thanks!

Ben Blount

unread,
Apr 7, 2022, 2:14:17 PM4/7/22
to Beancount
Here you go. My process was just to attempt running Fava and fix imports until it works.

diff --git a/src/fava/core/ingest.py b/src/fava/core/ingest.py
index d94a8bce..7d483bbf 100644
--- a/src/fava/core/ingest.py
+++ b/src/fava/core/ingest.py
@@ -14,9 +14,9 @@ from typing import Tuple
 from typing import TYPE_CHECKING

 from beancount.core.data import Entries
-from beancount.ingest import cache  # type: ignore
-from beancount.ingest import extract
-from beancount.ingest import identify
+from beangulp import cache  # type: ignore
+from beangulp import extract
+from beangulp import identify

 from fava.core.module_base import FavaModule
 from fava.helpers import BeancountError
diff --git a/tests/data/import.config b/tests/data/import.config
index a3b7353e..7c9b2f10 100644
--- a/tests/data/import.config
+++ b/tests/data/import.config
@@ -6,7 +6,7 @@ from dateutil.parser import parse
 from beancount.core.number import D
 from beancount.core import data
 from beancount.core import amount
-from beancount.ingest import importer
+from beangulp import importer




Stefano Mihai Canta

unread,
Apr 7, 2022, 2:17:39 PM4/7/22
to bean...@googlegroups.com
Thank you!
I had those changes already, but I don't have a fix for this one yet.

    from beancount.utils.text_utils import replace_numbers
ModuleNotFoundError: No module named 'beancount.utils.text_utils'


Reply all
Reply to author
Forward
0 new messages