Cftime

Latest version: v1.6.3

Safety actively analyzes 629765 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.5.1

======================================
* 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).

1.5.0

======================================
* 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).

1.4.1

======================================
* 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').

1.4.0

======================================
* `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.

1.3.1

=====================================
* 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).

1.3.0

=====================================
* 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).

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.