From 5fb9987ddd0cf41043a589c0a9f232f9404c96dd687ee0e60bdbc8fdfa05bd34 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 2 Mar 2021 05:54:51 +0000 Subject: [PATCH] - Update to 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'). * `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. * 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). * zero pad years in strtime (issue #194) * have cftime.datetime constuctor 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). * 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). - No longer build for Python 3.6, due to no NumPy. - Correct license file name. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=12 --- cftime-1.2.0.tar.gz | 3 --- cftime-1.4.1.tar.gz | 3 +++ python-cftime.changes | 51 +++++++++++++++++++++++++++++++++++++++++++ python-cftime.spec | 8 ++++--- 4 files changed, 59 insertions(+), 6 deletions(-) delete mode 100644 cftime-1.2.0.tar.gz create mode 100644 cftime-1.4.1.tar.gz diff --git a/cftime-1.2.0.tar.gz b/cftime-1.2.0.tar.gz deleted file mode 100644 index 87e9b35..0000000 --- a/cftime-1.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ff0a175edda260357ff7d24a32bbe0a8c72eafd5f6a404ce487127f9d01836db -size 52792 diff --git a/cftime-1.4.1.tar.gz b/cftime-1.4.1.tar.gz new file mode 100644 index 0000000..5e61422 --- /dev/null +++ b/cftime-1.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c55540bc164746c3c4f86a07c9c7b9ed4dfb0b0d988348ec63cec065c58766d +size 46721 diff --git a/python-cftime.changes b/python-cftime.changes index baab04e..bce104a 100644 --- a/python-cftime.changes +++ b/python-cftime.changes @@ -1,3 +1,54 @@ +------------------------------------------------------------------- +Tue Mar 2 05:51:33 UTC 2021 - Steve Kowalik + +- Update to 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'). + * `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. + * 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). + * zero pad years in strtime (issue #194) + * have cftime.datetime constuctor 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). + * 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). +- No longer build for Python 3.6, due to no NumPy. +- Correct license file name. + ------------------------------------------------------------------- Thu Jul 9 04:32:49 UTC 2020 - Steve Kowalik diff --git a/python-cftime.spec b/python-cftime.spec index f603912..382ce1c 100644 --- a/python-cftime.spec +++ b/python-cftime.spec @@ -1,7 +1,7 @@ # # spec file for package python-cftime # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,10 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +# no numpy for Python 3.6 +%define skip_python36 1 Name: python-cftime -Version: 1.2.0 +Version: 1.4.1 Release: 0 Summary: Time-handling functionality from netcdf4-python License: MIT @@ -55,7 +57,7 @@ rm setup.cfg %python_expand PYTHONPATH="%{buildroot}%{$python_sitearch}" py.test-%{$python_bin_suffix} -v %files %{python_files} -%license COPYING +%license LICENSE %doc README.md %{python_sitearch}/*