html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/4597#issuecomment-733575449,https://api.github.com/repos/pydata/xarray/issues/4597,733575449,MDEyOklzc3VlQ29tbWVudDczMzU3NTQ0OQ==,12237157,2020-11-25T09:16:49Z,2020-11-25T09:16:49Z,CONTRIBUTOR,Thanks for the smooth review process @spencerkclark @keewis ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,748094631
https://github.com/pydata/xarray/pull/4597#issuecomment-731725142,https://api.github.com/repos/pydata/xarray/issues/4597,731725142,MDEyOklzc3VlQ29tbWVudDczMTcyNTE0Mg==,12237157,2020-11-22T10:11:53Z,2020-11-22T10:11:53Z,CONTRIBUTOR,"Ah I need to account for the docstring examples with only one or two  items, maybe dropping freq then","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,748094631
https://github.com/pydata/xarray/pull/4597#issuecomment-731643425,https://api.github.com/repos/pydata/xarray/issues/4597,731643425,MDEyOklzc3VlQ29tbWVudDczMTY0MzQyNQ==,12237157,2020-11-21T22:04:11Z,2020-11-21T22:04:11Z,CONTRIBUTOR,also should it be frequency or freq?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,748094631
https://github.com/pydata/xarray/pull/4597#issuecomment-731637045,https://api.github.com/repos/pydata/xarray/issues/4597,731637045,MDEyOklzc3VlQ29tbWVudDczMTYzNzA0NQ==,12237157,2020-11-21T21:10:44Z,2020-11-21T21:10:44Z,CONTRIBUTOR,"I also get this error locally. somehow in some envs `xarray` (but not in others) tries to use `daysinmonth`. I also know about `days_in_month`, but just changing that in `frequencies.py` https://github.com/pydata/xarray/blob/d9ebcafaddf0bb80052d30f43ca5ea18a5c7229f/xarray/coding/frequencies.py#L261 didnt help it.

```
____________________________________________________________________________ test_cftimeindex_freq_in_repr[MS-noleap] _____________________________________________________________________________

freq = 'MS', calendar = 'noleap'

    @requires_cftime
    @pytest.mark.parametrize(""calendar"", [""noleap"", ""360_day""])
    @pytest.mark.parametrize(""freq"", [""1D"", ""MS""])
    def test_cftimeindex_freq_in_repr(freq,calendar):
        index = xr.cftime_range(start=""2000"", periods=3, freq=freq, calendar=calendar)
>       assert f', freq={freq}' in index.__repr__()

/Users/aaron.spring/Coding/xarray/xarray/tests/test_cftimeindex.py:952:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/aaron.spring/Coding/xarray/xarray/coding/cftimeindex.py:342: in __repr__
    attrs_str = format_attrs(self)
/Users/aaron.spring/Coding/xarray/xarray/coding/cftimeindex.py:263: in format_attrs
    ""freq"": f""'{index.freq}'""
/Users/aaron.spring/Coding/xarray/xarray/coding/cftimeindex.py:691: in freq
    return infer_freq(self)
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:97: in infer_freq
    return inferer.get_freq()
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:132: in get_freq
    return self._infer_daily_rule()
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:165: in _infer_daily_rule
    monthly_rule = self._get_monthly_rule()
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:199: in _get_monthly_rule
    return {""cs"": ""MS"", ""ce"": ""M""}.get(month_anchor_check(self.index))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

dates = <[AttributeError(""'cftime._cftime.DatetimeNoLeap' object has no attribute 'daysinmonth'"",) raised in repr()] CFTimeIndex object at 0x7fca9312b160>

    def month_anchor_check(dates):
        """"""Return the monthly offset string.

        Return ""cs"" if all dates are the first days of the month,
        ""ce"" if all dates are the last day of the month,
        None otherwise.

        Replicated pandas._libs.tslibs.resolution.month_position_check
        but without business offset handling.
        """"""
        calendar_end = True
        calendar_start = True

        for date in dates:
            if calendar_start:
                calendar_start &= date.day == 1

            if calendar_end:
>               cal = date.day == date.daysinmonth
E               AttributeError: 'cftime._cftime.DatetimeNoLeap' object has no attribute 'daysinmonth'

/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:261: AttributeError
____________________________________________________________________________ test_cftimeindex_freq_in_repr[MS-360_day] ____________________________________________________________________________

freq = 'MS', calendar = '360_day'

    @requires_cftime
    @pytest.mark.parametrize(""calendar"", [""noleap"", ""360_day""])
    @pytest.mark.parametrize(""freq"", [""1D"", ""MS""])
    def test_cftimeindex_freq_in_repr(freq,calendar):
        index = xr.cftime_range(start=""2000"", periods=3, freq=freq, calendar=calendar)
>       assert f', freq={freq}' in index.__repr__()

/Users/aaron.spring/Coding/xarray/xarray/tests/test_cftimeindex.py:952:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/aaron.spring/Coding/xarray/xarray/coding/cftimeindex.py:342: in __repr__
    attrs_str = format_attrs(self)
/Users/aaron.spring/Coding/xarray/xarray/coding/cftimeindex.py:263: in format_attrs
    ""freq"": f""'{index.freq}'""
/Users/aaron.spring/Coding/xarray/xarray/coding/cftimeindex.py:691: in freq
    return infer_freq(self)
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:97: in infer_freq
    return inferer.get_freq()
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:132: in get_freq
    return self._infer_daily_rule()
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:165: in _infer_daily_rule
    monthly_rule = self._get_monthly_rule()
/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:199: in _get_monthly_rule
    return {""cs"": ""MS"", ""ce"": ""M""}.get(month_anchor_check(self.index))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

dates = <[AttributeError(""'cftime._cftime.Datetime360Day' object has no attribute 'daysinmonth'"",) raised in repr()] CFTimeIndex object at 0x7fca930cfe10>

    def month_anchor_check(dates):
        """"""Return the monthly offset string.

        Return ""cs"" if all dates are the first days of the month,
        ""ce"" if all dates are the last day of the month,
        None otherwise.

        Replicated pandas._libs.tslibs.resolution.month_position_check
        but without business offset handling.
        """"""
        calendar_end = True
        calendar_start = True

        for date in dates:
            if calendar_start:
                calendar_start &= date.day == 1

            if calendar_end:
>               cal = date.day == date.daysinmonth
E               AttributeError: 'cftime._cftime.Datetime360Day' object has no attribute 'daysinmonth'

/Users/aaron.spring/Coding/xarray/xarray/coding/frequencies.py:261: AttributeError
===================================================================================== short test summary info =====================================================================================
FAILED xarray/tests/test_cftimeindex.py::test_cftimeindex_freq_in_repr[1D-noleap] - AttributeError: 'cftime._cftime.DatetimeNoLeap' object has no attribute 'daysinmonth'
FAILED xarray/tests/test_cftimeindex.py::test_cftimeindex_freq_in_repr[1D-360_day] - AttributeError: 'cftime._cftime.Datetime360Day' object has no attribute 'daysinmonth'
FAILED xarray/tests/test_cftimeindex.py::test_cftimeindex_freq_in_repr[MS-noleap] - AttributeError: 'cftime._cftime.DatetimeNoLeap' object has no attribute 'daysinmonth'
FAILED xarray/tests/test_cftimeindex.py::test_cftimeindex_freq_in_repr[MS-360_day] - AttributeError: 'cftime._cftime.Datetime360Day' object has no attribute 'daysinmonth'
======================================================================================== 4 failed in 2.58s ===========================================================================
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,748094631