Skip to content

Commit

Permalink
Require arrow>=0.15.6 (#380)
Browse files Browse the repository at this point in the history
Since its last release[0], the heavily used arrow library supports ISO
week dates[1]. The CLI tests assumed that arrow does not support this.
However, the new version nullified this assumption.

As a provisional measure, the version of arrow was limited upwards in
PR #372[2]. An obsolete version was thereby requested.

A current version, or at least support for one, is important for
third-party package managers. Especially GNU/Linux distributions prefer
to use their own package manager to install software over pip.

Thus, this commit removes both the restriction to an outdated arrow
version in the requirements.txt and validates previously invalid marked
week dates.

[0]:https://github.com/crsmithdev/arrow/releases/tag/0.15.6
[1]:https://en.wikipedia.org/wiki/ISO_week_date
[2]:#372
  • Loading branch information
geistesk committed Jun 10, 2020
1 parent d23c507 commit 2e973c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Require latest Arrow version 0.15.6 to support ISO week dates (#380)

## [1.9.0] - 2020-05-27

### Added
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
@@ -1,5 +1,5 @@
arrow!=0.11,!=0.12.0,<0.15.6
arrow>=0.15.6
click>=7.0
click-didyoumean
colorama; sys_platform == "win32"
requests
requests
8 changes: 4 additions & 4 deletions tests/test_cli.py
Expand Up @@ -44,6 +44,10 @@
.replace(hour=14, minute=5, second=0)
.format('YYYY-MM-DD HH:mm:ss')
),
('2018-W08', '2018-02-19 00:00:00'), # week dates
('2018W08', '2018-02-19 00:00:00'),
('2018-W08-2', '2018-02-20 00:00:00'),
('2018W082', '2018-02-20 00:00:00'),
]

INVALID_DATES_DATA = [
Expand All @@ -52,10 +56,6 @@
('201804'),
('18-04-10'),
('180410'), # truncated representation not allowed
('2018-W08'), # despite week dates being part of ISO-8601
('2018W08'),
('2018-W08-2'),
('2018W082'),
('hello 2018'),
('yesterday'),
('tomorrow'),
Expand Down

0 comments on commit 2e973c2

Please sign in to comment.