-
Notifications
You must be signed in to change notification settings - Fork 39
/
Changelog
207 lines (186 loc) · 10.2 KB
/
Changelog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
version 1.6.4 (release tag v1.6.4rel)
=====================================
* build aarch64 linux wheels (issue #333).
* build musllinux wheels (issue #307).
* return empty array if one provided to date2num (issue #315).
* numpy 2.0 compatibility (issue #325).
* handle nan/inf in num2date (issue #328).
version 1.6.3 (release tag v1.6.3rel)
=====================================
* add support for formats without separators in strptime (e.g. '20200229', issue #301).
This required removing support for > 4 digit years.
* set the c_api_binop_methods compiler directive to True to retain Cython 0.x
behavior for arithmetic operators for Cython >= 3.0.0 (issue #271).
* support for python 3.12.
version 1.6.2 (release tag v1.6.2rel)
=====================================
* num2date should not fail on an empty integer array (issue #287).
* longdouble keyword in date2num so that a roundtrip from a time to a date
and back again does not lose microsecond precision when the units require
the times be encoded as floating point values (PR #284)
* added strptime method (issue #277).
* cibuildwheel wheel-building workflow added to github actions by @ocefpaf (triggers binary
wheel builds and uploads to pypi automatically when GH release created). PR #290.
version 1.6.1 (release tag v1.6.1rel)
=====================================
* fix failing tests on windows with numpy 1.23.0 (issue #278)
* expose to_tuple module function in public API.
version 1.6.0 (release tag v1.6.0rel)
=====================================
* fix for masked array inputs (issue #267).
* improved performance of the num2date algorithm, in some cases providing
an over 100x speedup (issue #269, PR#270).
* fix for date2index for select != 'exact' when select='exact' works (issue
#272, PR#273)
version 1.5.2 (release tag v1.5.2rel)
=====================================
* silently change calendar='gregorian' to 'standard' internally,
since 'gregorian' deprecated in CF v1.9 (issue #256).
* add "is_leap_year" function (issue #259).
* wheels that work on Apple M1 (arm64) available on pypi.
version 1.5.1.1
===============
* no code changes, just new binary wheels for python 3.10.
version 1.5.1 (release tag v1.5.1.rel)
======================================
* added support for "common_year" and "common_years" units for "noleap"
and "365_day" calendars (issue #5, PR #246)
* check consistency of year arg and has_year_zero kwarg in cftime.datetime
(issue #248). Also assume if has_year_zero not specified it should be True
if year=0. Allow replace method to change has_year_zero. Issue UserWarning
if year set to zero and calendar default is changed from False to True
(so that user is aware the resulting instance will not be CF compliant).
* '360_day' was missing from list of 'idealized' calendars.
* fixed a bug that led to subclasses losing their type identity upon
pickling (issue #251, PR #252).
* Change default behavior of proleptic_gregorian to has_year_zero=T
(to be consistent with ISO-8601 since CF does not specify the year zero convention
for this calendar). Issue warning when trying to
to create a cftime.datetime instance that is not allowed in CF (PR #238).
version 1.5.0 (release tag v1.5.0.rel)
======================================
* clean-up deprecated calendar specific subclasses (PR #231).
* added string formatting support to `cftime.datetime` objects
(via `cftime.datetime.__format__`) PR #232.
* add support for astronomical year numbering (including year zero) for
real-world calendars using 'has_year_zero' cftime.datetime kwarg (PR #234).
Default is False for 'real-world' calendars ('julian', 'gregorian'/'standard',
'proleptic_gregorian'). Ignored for idealized calendars like '360_day
(they always have year zero).
* add "change_calendar" cftime.datetime method to switch to another
'real-world' calendar. Enable comparison of cftime.datetime instances
with different 'real-world' calendars (using the new change_calendar method)
* remove legacy `utime` class, and legacy `JulianDayFromDate` and
`DateFromJulianDay` functions (replaced by `cftime.datetime.toordinal`
and `cftime.datetime.fromordinal`). PR #235.
* Change ValueError to TypeError in __sub__ (issue #236, PR #236).
version 1.4.1 (release tag v1.4.1.rel)
======================================
* Restore use of calendar-specific sub-classes in `cftime.num2date`,
`cftime.datetime.__add__`, and `cftime.datetime.__sub__`. The use of them
will be removed in a later release.
* add 'fromordinal' static method to create a cftime.datetime instance
from a julian day ordinal and calendar (inverse of 'toordinal').
version 1.4.0 (release tag v1.4.0.rel)
======================================
* `cftime.date2num` will now always return an array of integers, if the units
and times allow. Previously this would only be true if the units were
'microseconds' (PR #225). In other circumstances, as before, `cftime.date2num`
will return an array of floats.
* Rewrite of julian day/calendar functions (_IntJulianDayToCalendar and
_IntJulianDayFromCalendar) to remove GPL'ed code. cftime license
changed to MIT (to be consistent with netcdf4-python).
* Added datetime.toordinal() (returns julian day, kwarg 'fractional'
can be used to include fractional day).
* cftime.datetime no longer uses calendar-specific sub-classes.
version 1.3.1 (release tag v1.3.1rel)
=====================================
* fix for issue #211 (PR #212) bug in masked array handling in date2num)
* switch from travis/appveyor to github actions for CI/CD (PR #215).
* switch to cython language_level=3 (no more support for python 2) (PR #217).
* add __init__.py to test dir so pytest coverage works again. Add Coveralls
step to github actions workflow to upload coverage data to coveralls.io (PR
#217).
* move package under 'src' directory so cftime can be imported
from install dir (PR #218 - see
https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure).
version 1.3.0 (release tag v1.3.0rel)
=====================================
* zero pad years in strtime (issue #194)
* have cftime.datetime constructor create 'calendar-aware' instances (default is
'standard' calendar, if calendar='' or None the instance is not calendar aware and some
methods, like dayofwk, dayofyr, __add__ and __sub__, will not work). Fixes issue #198.
The calendar specific sub-classes are now deprecated, but remain for now
as stubs that just instantiate the base class and override __repr__.
* update regex in _cpdef _parse_date so reference years with more than four
digits can be handled.
* Change default calendar in cftime.date2num from 'standard' to None
(calendar associated with first input datetime object is used).
* add `cftime.datetime.tzinfo=None` for compatibility with python datetime
(issue #208).
version 1.2.1 (release tag v1.2.1rel)
=====================================
* num2date uses 'proleptic_gregorian' scheme when basedate is post-Gregorian but date is pre-Gregorian
(issue #182).
* fix 1.2.0 regression (date2num no longer works with numpy scalar array inputs, issue #185).
* Fix for issue #187 (have date2num round to the nearest second when within 1
microsecond).
* Fix for issue #189 (leap years calculated incorrectly for negative years in
proleptic_gregorian calendar).
version 1.2.0 (release tag v1.2.0rel)
=====================================
* Return the default values of dayofwk and dayofyr when calendar
is '' (issue #173).
* fix treatment of masked arrays in num2date and date2num (issue #175).
Also make sure masked arrays are output from num2date/date2num if
masked arrays are input.
* Where possible, use timedelta arithmetic to decode times exactly within
num2date (issue #171).
* Make taking the difference between two cftime datetimes to produce a
timedelta exact to the microsecond; depending on the units encoding,
this enables date2num to be exact as well (issue #109).
* utime.date2num/utime.num2date now just call module level functions.
JulianDayFromDate/DateFromJulianDay no longer used internally (PR #180).
version 1.1.3 (release tag v1.1.3rel)
=====================================
* add isoformat method for compatibility with python datetime (issue #152).
* make 'standard' default calendar for cftime.datetime
so that dayofwk,dayofyr methods don't fail (issue #169).
version 1.1.2 (release tag v1.1.2rel)
=====================================
* change dayofwk and dayofyr attributes into properties (issue #158)
* fix for issue #165 (python datetime should be returned when
only_use_cftime_datetimes=False).
version 1.1.1.2 (release tag v1.1.1.2rel)
=========================================
* include pyproject.toml in MANIFEST.in so it gets
included in source tarball (issue #154).
version 1.1.1.1 (release tag v1.1.1.1rel)
=========================================
* Fix error installing with pip on python 3.8 by following
PEP 517 (issue #148, PR #149)
version 1.1.1 (release tag v1.1.1rel)
=====================================
* fix microsecond formatting issue, ensure identical results
computed for arrays and scales (issue #143, PR #146).
version 1.1.0 (release tag v1.1.0rel)
=====================================
* improved exceptions for time differences (issue #128, PR #131).
* fix intersphinx entries (issue #133, PR #133)
* make only_use_cftime_datetimes=True by default, so cftime datetime
instances are returned by default by num2date (instead of returning python
datetime instances where possible). Issue #136, PR #135.
* Add daysinmonth attribute (issue #137, PR #138).
* If only_use_python_datetimes=True and only_use_cftime_datetimes=False,
num2date only returns python datetime instances and raises an exception
if this is not possible. num2pydate convenience function added which just calls
num2date with only_use_python_datetimes=True and
only_use_cftime_datetimes=False.
Remove positive times check, raise ValueError if python datetime
tries to compute a date before MINYEAR (issue #134, PR #139)
* Fix for fractional seconds in reference date in units string (issue #140,
PR # 141).
version 1.0.4.2 release
=======================
* fix for issue #126 (date2num error when converting a DatetimeProlepticGregorian
object). PR #127.