Skip to content

Commit c864ff2

Browse files
authored
bump speedate to 0.15 (#1526)
1 parent a1fa596 commit c864ff2

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ strum_macros = "0.26.4"
3636
serde_json = {version = "1.0.132", features = ["arbitrary_precision", "preserve_order"]}
3737
enum_dispatch = "0.3.13"
3838
serde = { version = "1.0.214", features = ["derive"] }
39-
speedate = "0.14.4"
39+
speedate = "0.15.0"
4040
smallvec = "1.13.2"
4141
ahash = "0.8.10"
4242
url = "2.5.0"

tests/validators/test_date.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
pytest.param(1654646400.00, date(2022, 6, 8), id='float'),
2525
pytest.param('1654646400.00', date(2022, 6, 8), id='float-as-str'),
2626
pytest.param(Decimal('1654646400'), date(2022, 6, 8), id='decimal'),
27-
# (253_402_300_800_000, Err('format YYYY-MM-DD, dates after 9999 are not supported as unix timestamps')),
2827
pytest.param(253_402_300_800_000, Err('Input should be a valid date'), id='int-too-high'),
29-
# (-20_000_000_000, Err('format YYYY-MM-DD, dates before 1600 are not supported as unix timestamps')),
30-
pytest.param(-20_000_000_000, Err('Input should be a valid date'), id='int-too-low'),
28+
pytest.param(-80_000_000_000_000, Err('Input should be a valid date'), id='int-too-low'),
3129
pytest.param(datetime(2022, 6, 8), date(2022, 6, 8), id='datetime-exact'),
3230
pytest.param(
3331
datetime(2022, 6, 8, 12),
@@ -59,7 +57,7 @@
5957
pytest.param(
6058
float('-inf'),
6159
Err(
62-
'Input should be a valid date or datetime, dates before 1600 are not supported as unix timestamps '
60+
'Input should be a valid date or datetime, dates before 0000 are not supported as unix timestamps '
6361
'[type=date_from_datetime_parsing,'
6462
),
6563
id='-inf',

tests/validators/test_datetime.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@
3838
(Decimal('1654646400.1234568'), datetime(2022, 6, 8, 0, 0, 0, 123457, tzinfo=timezone.utc)),
3939
('1654646400.1234568', datetime(2022, 6, 8, 0, 0, 0, 123457, tzinfo=timezone.utc)),
4040
(253_402_300_800_000, Err('should be a valid datetime, dates after 9999 are not supported as unix timestamps')),
41-
(-20_000_000_000, Err('should be a valid datetime, dates before 1600 are not supported as unix timestamps')),
41+
(
42+
-80_000_000_000_000,
43+
Err('should be a valid datetime, dates before 0000 are not supported as unix timestamps'),
44+
),
4245
(float('nan'), Err('Input should be a valid datetime, NaN values not permitted [type=datetime_parsing,')),
4346
(float('inf'), Err('Input should be a valid datetime, dates after 9999')),
44-
(float('-inf'), Err('Input should be a valid datetime, dates before 1600')),
47+
(float('-inf'), Err('Input should be a valid datetime, dates before 0000')),
4548
('-', Err('Input should be a valid datetime or date, input is too short [type=datetime_from_date_parsing,')),
4649
('+', Err('Input should be a valid datetime or date, input is too short [type=datetime_from_date_parsing,')),
4750
(

0 commit comments

Comments
 (0)