# Our own AEB43 parser

**URL:** https://discuss.tryton.org/t/our-own-aeb43-parser/6829
**Category:** Organisation
**Created:** [December 31, 2023, 4:39pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829 "2023-12-31T16:39:00Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [December 31, 2023, 4:39pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/1 "2023-12-31T16:39:01Z")

</div>

Following [account\_statement\_aeb43 fails with Python 3.12 (#12811) · Issues · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/issues/12811) I reviewed a little bit the code of csb43 package. The package does not seem to be actively maintained. But I found also the code quite complex and difficult to understand. Also it does much more than what we need.

I though I could write a simpler parser based on [https://downloads.tryton.org/standards/aeb43.pdf](https://downloads.tryton.org/standards/aeb43.pdf)  
So here is [https://foss.heptapod.net/tryton/aeb43](https://foss.heptapod.net/tryton/aeb43) which is less than 200 lines.  
It will be great to have some testing feedback before doing a first release.

I plan to [update the module `account_statement_aeb43` to use it](https://foss.heptapod.net/tryton/tryton/-/issues/12881) for the next series.  
If the fix for [account\_statement\_aeb43 fails with Python 3.12 (#12811) · Issues · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/issues/12811) is not published fast enough, I think I will add `setuptools` as dependency for our module.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 2, 2024, 12:02pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/2 "2024-01-02T12:02:49Z")

</div>

> [@ced](#):
>
> I reviewed a little bit the code of csb43 package. The package does not seem to be actively maintained

Of course, because the library format did not change for 10 years, so I do not think you must expect a lot of changes in a parser of a format which is already fixed. Same happens for [coda](https://foss.heptapod.net/tryton/mt940/-/commits/branch/default?ref_type=heads) and [mt940](https://foss.heptapod.net/tryton/mt940/-/commits/branch/default?ref_type=heads) which did not receive any change for more than our year (from sept 2021 to March 2023). Last change of csb43 package was on October 2022, just a year and two months ago.

Having said that I do not understand what is the problem with tests. Why is the code now failing for python 3.12? The code already worked for the 7.0 series release where we added support for python 3.12 and it was already tested.

Reading the test log I see the problem is:

`FileNotFoundError: No such file or directory: 'account_statement_aeb43/tryton.cfg' `

Which seems compltetly unrelated to the parser library used.

I’m concerned about such rewrite of the parser because there are now three libraries to parse such files:

- Nantic retrofix ones: [python-retrofix/retrofix/c43.py at main · NaN-tic/python-retrofix · GitHub](https://github.com/NaN-tic/python-retrofix/blob/main/retrofix/c43.py) (which was used as [first proposal](https://foss.heptapod.net/tryton/tryton/-/issues/7082#note_234328) for the implementation)
- The existing csb43 library which we contributed to make this moduel a success.
- A new one under the Tryton project

So instead of sharing efforts we are just reinverting the wheel 🤷‍♂️ 🤷‍♂️ For me this is against of the objective of open source software.

---

<div class="post-metadata">

### Author: ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)
#### Post date: [January 2, 2024, 12:41pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/3 "2024-01-02T12:41:50Z")

</div>

> [@pokoli](#):
>
> FileNotFoundError: No such file or directory: ‘account\_statement\_aeb43/tryton.cfg’

I think it’s a wrong fallback in the setup.py when a depends is missing. I already had the same error message and it was because a package was not installed in my environment.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 2, 2024, 12:45pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/4 "2024-01-02T12:45:21Z")

</div>

You are right, but what I’m pointing is that I did not understand how we ended writing a new parser for aeb43 following this error which is unrelated to the parser.

I think it is important to understand the root of the problem before taking any action, which it seems we are already late

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 2, 2024, 4:20pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/5 "2024-01-02T16:20:54Z")

</div>

External dependencies are a pain for maintenance, especially small libraries.  
They force us to proxy maintain them in some case (and have to deal with non interesting parts) or they block us in the upgrade processes.

So basically I want to reduce as much possible our dependencies.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 2, 2024, 4:50pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/6 "2024-01-02T16:50:08Z")

</div>

> [@ced](#):
>
> They force us to proxy maintain them in some case (and have to deal with non interesting parts) or they block us in the upgrade processes.

Your [proposed fix](https://bitbucket.org/wmj/csb43/pull-requests/7) is just 6 lines of code instead of newly 200 lines to maintain. 🤔

Also, the library never had been blocking, but on the other hand all changes where included and released.

We are on some holidays, I do not think we can assume any maintainer to review a MR in just 4 days in such period (nor or normal days).

> [@ced](#):
>
> So basically I want to reduce as much possible our dependencies.

Then just include the parser as part of module instead of creating a new dependency which you will need to maintain. Other software can just reuse the existing libraries.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 2, 2024, 4:53pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/7 "2024-01-02T16:53:41Z")

</div>

> [@pokoli](#):
>
> Your [proposed fix](https://bitbucket.org/wmj/csb43/pull-requests/7) is just 6 lines of code instead of newly 200 lines to maintain. 🤔

And it was simpler to write a parser.

> [@pokoli](#):
>
> Then just include the parser as part of module instead of creating a new dependency which you will need to maintain.

I’m free to choose what ever I want to maintain.  
The internal dependency of the Tryton project are not the dependencies that create troubles.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 2, 2024, 4:56pm UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/8 "2024-01-02T16:56:52Z")

</div>

> [@ced](#):
>
> I’m free to choose what ever I want to maintain.

Of course you are free to do whatever you want.

For me it is clear that is has been some time that you are already going alone in this boat without wanting anyone else to join. I’m not blamining you for that but I’m not feeling confortable in this situation. 😢

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [January 13, 2024, 7:14am UTC](https://discuss.tryton.org/t/our-own-aeb43-parser/6829/9 "2024-01-13T07:14:36Z")

</div>

> [@ced](#):
>
> If the fix for [account\_statement\_aeb43 fails with Python 3.12 (#12811) · Issues · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/issues/12811) is not published fast enough

The fix has been released in version 0.9.3:

> **[Client Challenge](https://pypi.org/project/csb43/)**
