home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1977766748

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1977766748 PR_kwDOAMm_X85eneDK 8415 Deprecate certain cftime frequency strings following pandas 6628425 closed 0     3 2023-11-05T12:27:59Z 2023-11-16T15:37:27Z 2023-11-16T15:19:40Z MEMBER   0 pydata/xarray/pulls/8415

Following several upstream PRs in pandas, this PR deprecates cftime frequency strings "A", "AS", "Q", "M", "H", "T", "S", "L", and "U" in favor of "Y", "YS", "QE", "ME", "h", "min", "s", "ms", and "us". Similarly following pandas, it makes a breaking change to have infer_freq return the latter frequencies instead of the former.

There are a few places in the tests and one place in the code where we need some version-specific logic to retain support for older pandas versions. @aulemahal it would be great if you could take a look to make sure that I handled this breaking change properly / fully in the date_range_like case.

I also took the liberty to transition to using "Y", "YS", "h", "min", "s", "ms", "us", and "ns" within our code, tests, and documentation to reduce the amount of warnings emitted. I have held off on switching to "QE", "ME", and anchored offsets involving "Y" or "YS" in pandas-related code since those are not supported in older versions of pandas.

The deprecation warning looks like this: ```

xr.cftime_range("2000", periods=5, freq="M") <stdin>:1: FutureWarning: 'M' is deprecated and will be removed in a future version. Please use 'ME' instead of 'M'. CFTimeIndex([2000-01-31 00:00:00, 2000-02-29 00:00:00, 2000-03-31 00:00:00, 2000-04-30 00:00:00, 2000-05-31 00:00:00], dtype='object', length=5, calendar='standard', freq='ME') ```

  • [x] Closes #8394
  • [x] Addresses the convert_calendar and date_range_like test failures in #8091
  • [x] Tests added
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8415/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 0.855ms · About: xarray-datasette