Package Details: python-piecash 1.2.0-1

Git Clone URL: https://aur.archlinux.org/python-piecash.git (read-only, click to copy)
Package Base: python-piecash
Description: A Python library providing a simple and pythonic interface to GnuCash files stored in SQL.
Upstream URL: https://pypi.org/project/piecash/
Keywords: finance gnucash money
Licenses: MIT
Submitter: bunburya
Maintainer: bunburya
Last Packager: bunburya
Votes: 1
Popularity: 0.000000
First Submitted: 2021-12-24 21:22 (UTC)
Last Updated: 2021-12-24 21:22 (UTC)

Dependencies (14)

Required by (0)

Sources (1)

Latest Comments

vEnhance commented on 2022-09-23 00:46 (UTC)

Small note: installation appears to fail if the locale fr_FR.UTF-8 is not installed, because (and probably also the English one, for that matter) because one of the pytests in the test suite assumes French exists and will fail with locale.Error: unsupported locale setting.

Relevant line: https://github.com/sdementen/piecash/blob/ec30cf469198cccf35f7ba968f889d360cfe1824/tests/test_session.py#L116

Relevant log:

_________________________________ test_get_system_currency_mnemonic[fr_FR.UTF-8] _________________________________

locale_set = 'fr_FR.UTF-8'

    def test_get_system_currency_mnemonic(locale_set):
        result = locales[locale_set]
>       with locale_ctx(locale_set):

tests/test_session.py:127: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.10/contextlib.py:135: in __enter__
    return next(self.gen)
tests/test_session.py:101: in locale_ctx
    locale.setlocale(locale.LC_ALL, l)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

category = 6, locale = 'fr_FR.UTF-8'

    def setlocale(category, locale=None):

        """ Set the locale for the given category.  The locale can be
            a string, an iterable of two strings (language code and encoding),
            or None.

            Iterables are converted to strings using the locale aliasing
            engine.  Locale strings are passed directly to the C lib.

            category may be given as one of the LC_* values.

        """
        if locale and not isinstance(locale, _builtin_str):
            # convert to string
            locale = normalize(_build_localename(locale))
>       return _setlocale(category, locale)
E       locale.Error: unsupported locale setting

/usr/lib/python3.10/locale.py:620: Error

Of course easy to workaround by installing French locale :)