Releases: arrow-py/arrow
Releases · arrow-py/arrow
Version 1.3.0
- [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 topyproject.toml
/Flit for packaging and distribution. - [INTERNAL] Adopt
.readthedocs.yaml
configuration file for continued ReadTheDocs support.
Version 1.2.3
- [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
- [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
andrequirements-tests.txt
. - [INTERNAL] Added
flake8-annotations
package for type linting in pre-commit.
Version 1.2.1
- [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 aValueError
.
Commits since last release
- Fixing plural of years and days in Hebrew by @guyernest in #1042
- add Sinhala locale by @ChingYi-AX in #1044
- Fix pypy CI issues and begin testing against Python 3.10 by @jadchaar in #1045
- add Urdu locale by @cyriaka90 in #1046
- Add support for Python 3.10 by @jadchaar in #1049
- Update dependencies for Python 3.10 by @jadchaar in #1050
- Corrections in Serbian locale by @smarkovic in #1047
- Fix typos by @kianmeng in #1051
- Declare support for Python 3.10 by @hugovk in #1053
- Issue 985 -- Add Azerbaijani second time frame by @sania-dsouza in #1052
- Add quarter granularity by @Alig1493 in #1048
- Added Error Checking For Empty Granularity List by @anishnya in #1016
- Bump version to 1.2.1 and update CHANGELOG by @jadchaar in #1055
New Contributors
- @guyernest made their first contribution in #1042
- @smarkovic made their first contribution in #1047
- @kianmeng made their first contribution in #1051
- @sania-dsouza made their first contribution in #1052
- @Alig1493 made their first contribution in #1048
Full Diff: 1.2.0...1.2.1
Version 1.2.0
- [NEW] Added Albanian, Tamil and Zulu locales.
- [NEW] Added support for
Decimal
as input toarrow.get()
. - [FIX] The Estonian, Finnish, Nepali and Zulu locales now support
dehumanize
. - [FIX] Improved validation checks when using parser tokens
A
andhh
. - [FIX] Minor bug fixes to Catalan, Cantonese, Greek and Nepali locales.
Version 1.1.1
- [NEW] Added Odia, Maltese, Serbian, Sami, and Luxembourgish locales.
- [FIXED] All calls to
arrow.get()
should now properly pass thetzinfo
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
torequirements-dev.txt
to prevent confusion with the dependencies insetup.py
. - [CHANGED] Updated Turkish locale and added tests.
Version 1.1.0
- [NEW] Implemented the
dehumanize
method forArrow
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
- [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
- [FIXED] Fixed an
OverflowError
that could occur when running Arrow on a 32-bit OS.
Version 1.0.1
- [FIXED] A
py.typed
file is now bundled with the Arrow package to conform to PEP 561.