Releases: arrow-py/arrow
Releases · arrow-py/arrow
Version 1.4.0
ADDED
- Added
week_startparameter tofloor()andceil()methods. PR #1222 - Added
FORMAT_RFC3339_STRICTwith a T separator. PR #1201 - Added Macedonian in Latin locale support. PR #1200
- Added Persian/Farsi locale support. PR #1190
- Added week and weeks to Thai locale timeframes. PR #1218
- Added weeks to Catalan locale. PR #1189
- Added Persian names of months, month-abbreviations and day-abbreviations in Gregorian calendar. PR #1172
CHANGED
- Migrated Arrow to use ZoneInfo for timezones instead of pytz. PR #1217
FIXED
- Fixed humanize month limits. PR #1224
- Fixed type hint of
Arrow.__getattr__. PR #1171 - Fixed spelling and removed poorly used expressions in Korean locale. PR #1181
- Updated
shift()method for issue #1145. PR #1194 - Improved Greek locale translations (seconds, days, "ago", and month typo). PR #1184, PR #1186
- Addressed
datetime.utcnowdeprecation warning. PR #1182
INTERNAL
- Added codecov test results. PR #1223
- Updated CI dependencies (actions/setup-python, actions/checkout, codecov/codecov-action, actions/cache).
- Added docstrings to parser.py. PR #1010
- Updated Python versions support and bumped CI dependencies. PR #1177
- Added dependabot for GitHub actions. PR #1193
- Moved dateutil types to test requirements. PR #1183
- Added documentation link for
arrow.format. PR #1180
Version 1.3.0
- [ADDED] Added official support for Python 3.11 and 3.12.
- [ADDED] Added dependency on
types-python-dateutilto 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.yamlconfiguration 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
xelatexfor pdf generation in documentation. - [INTERNAL] Split requirements file into
requirements.txt,requirements-docs.txtandrequirements-tests.txt. - [INTERNAL] Added
flake8-annotationspackage 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
humanizenow 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
Decimalas input toarrow.get(). - [FIX] The Estonian, Finnish, Nepali and Zulu locales now support
dehumanize. - [FIX] Improved validation checks when using parser tokens
Aandhh. - [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 thetzinfoargument 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.txttorequirements-dev.txtto prevent confusion with the dependencies insetup.py. - [CHANGED] Updated Turkish locale and added tests.
Version 1.1.0
- [NEW] Implemented the
dehumanizemethod forArrowobjects. 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
humanizemonth tests are fixed.
Version 1.0.2
- [FIXED] Fixed an
OverflowErrorthat could occur when running Arrow on a 32-bit OS.