Skip to content

Conversation

@renovate
Copy link

@renovate renovate bot commented Mar 24, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
py-moneyed ==0.8.0 -> ==3.0 age adoption passing confidence

Release Notes

py-moneyed/py-moneyed (py-moneyed)

v3.0

Compare Source

  • Added SLE & VED currencies.
  • Removed support for Python 3.6.
  • Added support for Python 3.10 & 3.11.

v2.0

Compare Source

  • Dropped support for Python 2.7 and 3.5 and PyPy 2.
  • Added pyupgrade pre-commit hook.
  • Added black pre-commit hook and reformatted codebase.
  • Updated pre-commit hooks.
  • Replaced custom flake8, isort and check-manifest Github Action jobs with a generic
    pre-commit job.
  • Dropped the moneyed.localization module that was deprecated and announced for
    removal in 1.0.
  • Added type hints along with a mypy pre-commit hook.
  • Added action for building and publishing releases, along with the
    check-github-workflows pre-commit hook for validating Github Action workflow files.
  • Removed undocumented DEFAULT_CURRENCY and DEFAULT_CURRENCY_CODE constants, and
    change to make instantiating Money without providing a currency a type error. This
    used to result in an object with a made-up "XYZ" currency, which could lead to
    surprising behaviors and bugs.
  • Added zero property to Currency to conveniently access the zero value of a
    given currency.
  • Moved to use setuptool's declarative packaging config and PEP 517 isolated builds.
  • Removed requirements files and instead specified test requirements using extras.

v1.2

  • Money.__add__ returns NotImplemented instead of raising an exception when another operand has unsupported type.

v1.1

  • Changed the numeric attribute values to None for currencies that don't have assigned ISO numeric codes: IMP, TVD, XFO, XFU.
  • Restored the previous definition for the XXX currency, including its name and countries attributes.
  • Fixed get_currency returning obsolete currencies.

v1.0

Compare Source

  • Dropped official support for Python 2.6, 3.2, 3.3, 3.4 (mainly because
    our test tools don't support them any more).

  • Added support for getting amount in sub units (fixed point)

  • Format Money instances using CLDR and Babel. This is a large change with lots of parts.
    Many thanks to @​pooyamb for all the hard work that went into this and other
    related changes.

    • Added new moneyed.l10n module, containing a new format_money
      function. This is a very thin wrapper around babel.numbers.format_currency <http://babel.pocoo.org/en/latest/api/numbers.html#babel.numbers.format_currency>_
      and has all the same options. This allows us to get the official CLDR
      formats for currencies, in all the different locales.

      See docs in README.

      Note especially that you need to specify locale (e.g.
      locale="en_US"), or you will get the LC_NUMERIC default.

    • Deprecated the format_money function in moneyed.localization. There
      is no immediate plan to remove, but it should not be relied on. Also, this
      function relies on our own manually entered data for formatting of
      currencies in different locales. This data is very incomplete and will not
      be updated any more.

      So you need to use moneyed.l10n.format_money instead now.

      If you were relying on the decimal_places argument to the old function,
      there is no exact equivalent in the new format_money function, but see
      the decimal_quantization option (documented in
      babel.numbers.format_currency <http://babel.pocoo.org/en/latest/api/numbers.html#babel.numbers.format_currency>_)

    • Money.__str__ (Money.__unicode__ on Python 2) now uses new
      format_money with the default locale LC_NUMERIC, which can produce
      different results from the old function. Use the new format_money to control
      output.

    • On Python 2, Money.__str__ (bytestring) output has changed to be more
      basic. You should use the new format_money function to control output.

  • Get currency names from Babel data. Several changes, including:

    • For all built-in currencies, Currency.name now comes from Babel ("en_US"
      locale). This means there have been various corrections to currency names.

      If you pass a non-None name to the Currency constructor, you can
      still specify any name you want.

    • Currency.get_name(locale) has been added.

  • Get currency 'countries' from Babel data. Several changes, including:

    • Currency.countries now sources from Babel, so some names may be different.

    • Currency.country_codes has been added.

    • Currency.countries is deprecated, because it is not the most useful form
      for the data (e.g. upper cased strings, and names in US English only). It is
      recommended to use Currency.country_codes and convert to names using
      get_country_name.

  • Changed the repr of Money so that eval(repr(money_object) == money_object (at least in some environments, and most of the typical ones).
    See Python docs on __repr__ <https://docs.python.org/3/reference/datamodel.html?highlight=__repr__#object.__repr__>_
    for rationale. Thanks @davidtvs <https://github.com/davidtvs>_. This could
    be backwards incompatible if you were relying on the old output of repr().

  • Added list_all_currencies() utility function.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant