27 Commits

Author SHA256 Message Date
ad6dda1ab8 Accepting request 1312825 from devel:languages:python
- Update to 1.6.5
  * python 3.14 wheels, 3.8/3.9 support dropped.
  * roundtrip not correct when dates are all python datetime
    instances and calendar not proleptic_gregorian (issue #354).
  * fix cftime.datetime.strftime so it works with two digit year
    formatting (%y, issue #362).
  * speed up comparisions (using __richcmp___) and update docs. Issue #365. (forwarded request 1312728 from glaubitz)

OBS-URL: https://build.opensuse.org/request/show/1312825
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=13
2025-10-22 10:15:42 +00:00
52c33bda64 - Update to 1.6.5
* python 3.14 wheels, 3.8/3.9 support dropped.
  * roundtrip not correct when dates are all python datetime
    instances and calendar not proleptic_gregorian (issue #354).
  * fix cftime.datetime.strftime so it works with two digit year
    formatting (%y, issue #362).
  * speed up comparisions (using __richcmp___) and update docs. Issue #365.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=28
2025-10-21 11:51:23 +00:00
b6bd55cceb Accepting request 1228543 from devel:languages:python
- update to 1.6.4.post1:
  * metadata fixes

OBS-URL: https://build.opensuse.org/request/show/1228543
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=12
2024-12-06 13:25:29 +00:00
cd79b9c427 - update to 1.6.4.post1:
* metadata fixes

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=26
2024-12-05 14:44:09 +00:00
f85b4300d0 Accepting request 1179939 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1179939
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=11
2024-06-11 16:30:58 +00:00
8bffac1872 Accepting request 1179563 from home:bnavigator:numpy
- Update to 1.6.4
 * return empty array if one provided to date2num (issue #315).
 * numpy 2.0 compatibility (issue #325).
 * handle nan/inf in num2date (issue #328).
- Build PEP517

OBS-URL: https://build.opensuse.org/request/show/1179563
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=24
2024-06-11 08:02:30 +00:00
032a60e038 Accepting request 1130212 from devel:languages:python
- update to 1.6.3:
  * add support for formats without separators in strptime (e.g.
    '20200229', issue #301).
  * set the c_api_binop_methods compiler directive to True to
    retain Cython 0.x behavior for arithmetic operators for
    Cython >= 3.0.0
  * support for python 3.12.
- drop cython3.patch (upstream)

- Update to version 1.6.2
  * silently change calendar='gregorian' to 'standard' internally,
  * added support for "common_year" and "common_years" units for "noleap"
    Default is False for 'real-world' calendars ('julian', 'gregorian'/'standard',
  * add "change_calendar" cftime.datetime method to switch to another
  * remove legacy `utime` class, and legacy `JulianDayFromDate` and
   `cftime.datetime.__add__`, and `cftime.datetime.__sub__`.  The use of them
 * Rewrite of julian day/calendar functions (_IntJulianDayToCalendar and
   changed to MIT (to be consistent with netcdf4-python).
   digits can be handled.
  * include pyproject.toml in MANIFEST.in so it gets
  * fix for date2num error when converting a DatetimeProlepticGregorian

OBS-URL: https://build.opensuse.org/request/show/1130212
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=10
2023-12-01 20:26:38 +00:00
668ea5e9b1 - update to 1.6.3:
* add support for formats without separators in strptime (e.g.
    '20200229', issue #301).
  * set the c_api_binop_methods compiler directive to True to
    retain Cython 0.x behavior for arithmetic operators for
    Cython >= 3.0.0
  * support for python 3.12.
- drop cython3.patch (upstream)
- Update to version 1.6.2
  * silently change calendar='gregorian' to 'standard' internally,
  * added support for "common_year" and "common_years" units for "noleap"
    Default is False for 'real-world' calendars ('julian', 'gregorian'/'standard',
  * add "change_calendar" cftime.datetime method to switch to another
  * remove legacy `utime` class, and legacy `JulianDayFromDate` and
   `cftime.datetime.__add__`, and `cftime.datetime.__sub__`.  The use of them
 * Rewrite of julian day/calendar functions (_IntJulianDayToCalendar and
   changed to MIT (to be consistent with netcdf4-python).
   digits can be handled.
  * include pyproject.toml in MANIFEST.in so it gets
  * fix for date2num error when converting a DatetimeProlepticGregorian

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=22
2023-12-01 11:35:29 +00:00
b7c6f7a3d0 Accepting request 1108098 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1108098
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=9
2023-08-31 11:45:51 +00:00
2f8307467c Accepting request 1108092 from home:mcalabkova:branches:devel:languages:python
- add upstream cython3.patch

OBS-URL: https://build.opensuse.org/request/show/1108092
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=20
2023-08-30 11:44:19 +00:00
202dd30978 Accepting request 1032181 from devel:languages:python
Forwarded request #1031655 from yarunachalam

- Update to version 1.6.2 
    * 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.

OBS-URL: https://build.opensuse.org/request/show/1032181
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=8
2022-10-29 18:17:34 +00:00
e4d236d900 Accepting request 1031655 from home:yarunachalam:branches:devel:languages:python
- Update to version 1.6.2 
  * 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.

OBS-URL: https://build.opensuse.org/request/show/1031655
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=18
2022-10-29 11:47:38 +00:00
0e6fae3a24 Accepting request 1006300 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1006300
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=7
2022-09-27 18:14:00 +00:00
d22676367a Accepting request 1006204 from home:yarunachalam:branches:devel:languages:python
- Update to version 1.6.1
 * fix failing tests on windows with numpy 1.23.0 (issue #278)
 * expose to_tuple module function in public API.

OBS-URL: https://build.opensuse.org/request/show/1006204
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=16
2022-09-27 05:27:41 +00:00
0e6f4b4fe8 Accepting request 965204 from devel:languages:python
- update to 1.6.0:
  * fix for masked array inputs
  * improved performance of the num2date algorithm, in some cases providing
    an over 100x speedup
  * fix for date2index for select != 'exact' when select='exact' works
  * silently change calendar='gregorian' to 'standard' internally, 
    since 'gregorian' deprecated in CF v1.9
  * add "is_leap_year" function
  * wheels that work on Apple M1 (arm64) available on pypi.
  * added support for "common_year" and "common_years" units for "noleap" 
    and "365_day" calendars
  * 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
  * 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
  * clean-up deprecated calendar specific subclasses
  * added string formatting support to `cftime.datetime` objects
    (via `cftime.datetime.__format__`)
  * add support for astronomical year numbering (including year zero) for
    real-world calendars using 'has_year_zero' cftime.datetime kwarg
    Default is False for 'real-world' calendars ('julian', 'gregorian'/'standard', 
    'proleptic_gregorian'). Ignored for idealized calendars like '360_day

OBS-URL: https://build.opensuse.org/request/show/965204
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=6
2022-03-28 15:00:52 +00:00
74f8641998 - update to 1.6.0:
* fix for masked array inputs
  * improved performance of the num2date algorithm, in some cases providing
    an over 100x speedup
  * fix for date2index for select != 'exact' when select='exact' works
  * silently change calendar='gregorian' to 'standard' internally, 
    since 'gregorian' deprecated in CF v1.9
  * add "is_leap_year" function
  * wheels that work on Apple M1 (arm64) available on pypi.
  * added support for "common_year" and "common_years" units for "noleap" 
    and "365_day" calendars
  * 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
  * 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
  * clean-up deprecated calendar specific subclasses
  * added string formatting support to `cftime.datetime` objects
    (via `cftime.datetime.__format__`)
  * add support for astronomical year numbering (including year zero) for
    real-world calendars using 'has_year_zero' cftime.datetime kwarg
    Default is False for 'real-world' calendars ('julian', 'gregorian'/'standard', 
    'proleptic_gregorian'). Ignored for idealized calendars like '360_day

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=14
2022-03-27 14:58:44 +00:00
Richard Brown
baf91ccf87 Accepting request 876106 from devel:languages:python
- 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/request/show/876106
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=5
2021-03-02 11:36:11 +00:00
5fb9987ddd - 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
2021-03-02 05:54:51 +00:00
b87ae0471e Accepting request 819626 from devel:languages:python
- Update to 1.2.0:
  * 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).
  * 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).
  * change dayofwk and dayofyr attributes into properties (issue #158)
  * fix for issue #165 (python datetime should be returned when
    only_use_cftime_datimes=False).
  * include pyproject.toml in MANIFEST.in so it gets 
    included in source tarball (issue #154).
  * fix microsecond formatting issue, ensure identical results
    computed for arrays and scales (issue #143, PR #146).
  * 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.
  * Fix for fractional seconds in reference date in units string
- Add numpy-devel to BuildRequires.

OBS-URL: https://build.opensuse.org/request/show/819626
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=4
2020-07-09 11:20:16 +00:00
7a1fcf6928 - Update to 1.2.0:
* 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).
  * 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).
  * change dayofwk and dayofyr attributes into properties (issue #158)
  * fix for issue #165 (python datetime should be returned when
    only_use_cftime_datimes=False).
  * include pyproject.toml in MANIFEST.in so it gets 
    included in source tarball (issue #154).
  * fix microsecond formatting issue, ensure identical results
    computed for arrays and scales (issue #143, PR #146).
  * 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.
  * Fix for fractional seconds in reference date in units string
- Add numpy-devel to BuildRequires.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=10
2020-07-09 04:37:52 +00:00
96d62145b7 Accepting request 766930 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/766930
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=3
2020-01-25 12:24:39 +00:00
Tomáš Chvátal
7661e7be25 Accepting request 766929 from home:mcalabkova:branches:devel:languages:python
- update to 1.0.4.2
  * fix for date2num error when converting a DatetimeProlepticGregorian 
    object

OBS-URL: https://build.opensuse.org/request/show/766929
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=8
2020-01-24 15:17:22 +00:00
9aa03930db Accepting request 682390 from devel:languages:python
- Update to 1.0.3.4:
  * fixes for python2.7
  * Various flake fixes
  * More tests
  * python 3.8 support

OBS-URL: https://build.opensuse.org/request/show/682390
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=2
2019-03-19 08:58:15 +00:00
Tomáš Chvátal
83b9fd2c1e - Update to 1.0.3.4:
* fixes for python2.7
  * Various flake fixes
  * More tests
  * python 3.8 support

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=6
2019-03-07 10:20:43 +00:00
7f7893ba75 Accepting request 610040 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/610040
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cftime?expand=0&rev=1
2018-05-29 08:29:29 +00:00
Tomáš Chvátal
adb4bf1822 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=2 2018-05-17 10:19:30 +00:00
Tomáš Chvátal
4b06f8bd97 - Initial commit, needed by python-netCDF4
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=1
2018-05-17 10:14:13 +00:00