Skip to content

Releases: arrow-py/arrow

Version 1.3.0

30 Sep 22:11
87a1a77
Compare
Choose a tag to compare
  • [ADDED] Added official support for Python 3.11 and 3.12.
  • [ADDED] Added dependency on types-python-dateutil to improve Arrow mypy compatibility. PR #1102
  • [FIX] Updates to Italian, Romansh, Hungarian, Finish and Arabic locales.
  • [FIX] Handling parsing of UTC prefix in timezone strings.
  • [CHANGED] Update documentation to improve readability.
  • [CHANGED] Dropped support for Python 3.6 and 3.7, which are end-of-life.
  • [INTERNAL] Migrate from setup.py/Twine to pyproject.toml/Flit for packaging and distribution.
  • [INTERNAL] Adopt .readthedocs.yaml configuration file for continued ReadTheDocs support.

Version 1.2.3

30 Sep 20:38
8842f8c
Compare
Choose a tag to compare
  • [NEW] Added Amharic, Armenian, Georgian, Laotian and Uzbek locales.
  • [FIX] Updated Danish locale and associated tests.
  • [INTERNAL] Small fixes to CI.

Version 1.2.2

27 Jan 15:57
f8a6521
Compare
Choose a tag to compare
  • [NEW] Added Kazakh locale.
  • [FIX] The Belarusian, Bulgarian, Czech, Macedonian, Polish, Russian, Slovak and Ukrainian locales now support dehumanize.
  • [FIX] Minor bug fixes and improvements to ChineseCN, Indonesian, Norwegian, and Russian locales.
  • [FIX] Expanded testing for multiple locales.
  • [INTERNAL] Started using xelatex for pdf generation in documentation.
  • [INTERNAL] Split requirements file into requirements.txt, requirements-docs.txt and requirements-tests.txt.
  • [INTERNAL] Added flake8-annotations package for type linting in pre-commit.

Version 1.2.1

24 Oct 22:20
3e50ae4
Compare
Choose a tag to compare
  • [NEW] Added quarter granularity to humanize, for example:
    >>> import arrow
    >>> now = arrow.now()
    >>> four_month_shift = now.shift(months=4)
    >>> now.humanize(four_month_shift, granularity="quarter")
    'a quarter ago'
    >>> four_month_shift.humanize(now, granularity="quarter")
    'in a quarter'
    >>> thirteen_month_shift = now.shift(months=13)
    >>> thirteen_month_shift.humanize(now, granularity="quarter")
    'in 4 quarters'
    >>> now.humanize(thirteen_month_shift, granularity="quarter")
    '4 quarters ago'
  • [NEW] Added Sinhala and Urdu locales.
  • [NEW] Added official support for Python 3.10.
  • [CHANGED] Updated Azerbaijani, Hebrew, and Serbian locales and added tests.
  • [CHANGED] Passing an empty granularity list to humanize now raises a ValueError.

Commits since last release

New Contributors

Full Diff: 1.2.0...1.2.1

Version 1.2.0

22 Oct 23:51
a4f1797
Compare
Choose a tag to compare
  • [NEW] Added Albanian, Tamil and Zulu locales.
  • [NEW] Added support for Decimal as input to arrow.get().
  • [FIX] The Estonian, Finnish, Nepali and Zulu locales now support dehumanize.
  • [FIX] Improved validation checks when using parser tokens A and hh.
  • [FIX] Minor bug fixes to Catalan, Cantonese, Greek and Nepali locales.

Version 1.1.1

24 Jun 15:05
57332ed
Compare
Choose a tag to compare
  • [NEW] Added Odia, Maltese, Serbian, Sami, and Luxembourgish locales.
  • [FIXED] All calls to arrow.get() should now properly pass the tzinfo argument to the Arrow constructor. See PR #968 for more info.
  • [FIXED] Humanize output is now properly truncated when a locale class overrides _format_timeframe().
  • [CHANGED] Renamed requirements.txt to requirements-dev.txt to prevent confusion with the dependencies in setup.py.
  • [CHANGED] Updated Turkish locale and added tests.

Version 1.1.0

27 Apr 22:46
fbec661
Compare
Choose a tag to compare
  • [NEW] Implemented the dehumanize method for Arrow objects. This takes human readable input and uses it to perform relative time shifts, for example:
    >>> arw
    <Arrow [2021-04-26T21:06:14.256803+00:00]>
    >>> arw.dehumanize("8 hours ago")
    <Arrow [2021-04-26T13:06:14.256803+00:00]>
    >>> arw.dehumanize("in 4 days")
    <Arrow [2021-04-30T21:06:14.256803+00:00]>
    >>> arw.dehumanize("in an hour 34 minutes 10 seconds")
    <Arrow [2021-04-26T22:40:24.256803+00:00]>
    >>> arw.dehumanize("hace 2 años", locale="es")
    <Arrow [2019-04-26T21:06:14.256803+00:00]>
  • [NEW] Made the start of the week adjustable when using span("week"), for example:
    >>> arw
    <Arrow [2021-04-26T21:06:14.256803+00:00]>
    >>> arw.isoweekday()
    1 # Monday
    >>> arw.span("week")
    (<Arrow [2021-04-26T00:00:00+00:00]>, <Arrow [2021-05-02T23:59:59.999999+00:00]>)
    >>> arw.span("week", week_start=4)
    (<Arrow [2021-04-22T00:00:00+00:00]>, <Arrow [2021-04-28T23:59:59.999999+00:00]>)
  • [NEW] Added Croatian, Latin, Latvian, Lithuanian and Malay locales.
  • [FIX] Internally standardize locales and improve locale validation. Locales should now use the ISO notation of a dash ("en-gb") rather than an underscore ("en_gb") however this change is backward compatible.
  • [FIX] Correct type checking for internal locale mapping by using _init_subclass. This now allows subclassing of locales, for example:
    >>> from arrow.locales import EnglishLocale
    >>> class Klingon(EnglishLocale):
    ...     names = ["tlh"]
    ...
    >>> from arrow import locales
    >>> locales.get_locale("tlh")
    <__main__.Klingon object at 0x7f7cd1effd30>
  • [FIX] Correct type checking for arrow.get(2021, 3, 9) construction.
  • [FIX] Audited all docstrings for style, typos and outdated info.

Version 1.0.3

07 Mar 16:40
ce69c31
Compare
Choose a tag to compare
  • [FIX] Updated internals to avoid issues when running mypy --strict.
  • [FIX] Corrections to Swedish locale.
  • [INTERNAL] Lowered required coverage limit until humanize month tests are fixed.

Version 1.0.2

28 Feb 22:50
fc2cbaa
Compare
Choose a tag to compare
  • [FIXED] Fixed an OverflowError that could occur when running Arrow on a 32-bit OS.

Version 1.0.1

27 Feb 18:11
23800a8
Compare
Choose a tag to compare
  • [FIXED] A py.typed file is now bundled with the Arrow package to conform to PEP 561.