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/5871#issuecomment-962498057,https://api.github.com/repos/pydata/xarray/issues/5871,962498057,IC_kwDOAMm_X845Xo4J,5635139,2021-11-06T19:21:46Z,2021-11-06T19:21:46Z,MEMBER,"Big win @dcherian ! Thanks a lot. By LoC, xarray just got 4% better in a single PR!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-962118284,https://api.github.com/repos/pydata/xarray/issues/5871,962118284,IC_kwDOAMm_X845WMKM,2448579,2021-11-05T18:22:56Z,2021-11-05T18:22:56Z,MEMBER,Thanks for the reviews!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-962075979,https://api.github.com/repos/pydata/xarray/issues/5871,962075979,IC_kwDOAMm_X845WB1L,2448579,2021-11-05T17:20:31Z,2021-11-05T17:20:31Z,MEMBER,"> This can be merged as is. I just think it looks a little neater with |. :+1: I think we make this change project-wide if we want to do it (looks like pyupgrade supports it). @Illviljan can you open an issue please?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-958177932,https://api.github.com/repos/pydata/xarray/issues/5871,958177932,IC_kwDOAMm_X845HKKM,14371165,2021-11-02T21:23:34Z,2021-11-02T21:23:34Z,MEMBER,"> `from __future__ import annotations` does not actually directly enable the use of `|` for union, it changes the semantics of type annotations to [postpone evaluation](https://www.python.org/dev/peps/pep-0563/). In particular, you can then put just about anything in the type annotation without having any runtime behavior pandas uses `|` and `from __future__ import annotations` quite frequently in order to avoid the Union, for example: https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/_core.py Having typing not doing any runtime calculations sounds great to me. We usually don't need the typing variables during runtime anyway. This can be merged as is. I just think it looks a little neater with |. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-955082380,https://api.github.com/repos/pydata/xarray/issues/5871,955082380,IC_kwDOAMm_X8447WaM,14371165,2021-10-29T22:28:59Z,2021-10-29T22:28:59Z,MEMBER,"This looks great, nice work! This can be saved for a future PR but one thing I notice is that it's possible to make the unions slightly more readable using the new |-operator: ```python dim: Union[None, Hashable, Sequence[Hashable]] = None ``` vs. ```python from __future__ import annotations dim: None | Hashable | Sequence[Hashable] = None ``` I'm unsure about the compatibility but I think it should be fine.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-954959122,https://api.github.com/repos/pydata/xarray/issues/5871,954959122,IC_kwDOAMm_X84464US,2448579,2021-10-29T18:26:19Z,2021-10-29T18:26:19Z,MEMBER,"All green! This should be good to go. Here are a couple of examples: https://xray--5871.org.readthedocs.build/en/5871/generated/xarray.core.groupby.DataArrayGroupBy.sum.html https://xray--5871.org.readthedocs.build/en/5871/generated/xarray.core.resample.DataArrayResample.sum.html","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-951128744,https://api.github.com/repos/pydata/xarray/issues/5871,951128744,IC_kwDOAMm_X844sRKo,1217238,2021-10-25T17:08:17Z,2021-10-25T17:08:17Z,MEMBER,"> Unless @shoyer has any objections — I think we were primarily delayed by Apache Beam, and they have unlocked that dependency, so I would vote to add it as a required dependency. The only realistic way this could be bad is if there's another package that is commonly installed with xarray that a) requires `typing_extensions`, b) forbids a recent version, c) won't remove that pin soon. +1 for adding a requirement on typing_extensions. It seems a little early to be dropping Python 3.7.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-951117633,https://api.github.com/repos/pydata/xarray/issues/5871,951117633,IC_kwDOAMm_X844sOdB,5635139,2021-10-25T16:54:48Z,2021-10-25T16:54:48Z,MEMBER,"Unless @shoyer has any objections — I think we were primarily delayed by Apache Beam, and they have unlocked that dependency, so I would vote to add it as a required dependency. The only realistic way this could be bad is if there's another package that is commonly installed with xarray that a) requires `typing_extensions`, b) forbids a recent version, c) won't remove that pin soon.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950316866,https://api.github.com/repos/pydata/xarray/issues/5871,950316866,IC_kwDOAMm_X844pK9C,2448579,2021-10-24T12:30:40Z,2021-10-24T12:30:40Z,MEMBER,"It's ok to me. My hesitation is because we only need in a very small number of places IIUC. Happy to defer to the opinions of more experienced typers","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950304347,https://api.github.com/repos/pydata/xarray/issues/5871,950304347,IC_kwDOAMm_X844pH5b,5635139,2021-10-24T11:06:56Z,2021-10-24T11:06:56Z,MEMBER,"> I think @keewis mentioned we could drop 3.7 in December which is not that far away. Can we type `self` as `Any` for now and update later? What are your thoughts re adding the typing_extensions dependency?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950295790,https://api.github.com/repos/pydata/xarray/issues/5871,950295790,IC_kwDOAMm_X844pFzu,2448579,2021-10-24T10:04:34Z,2021-10-24T10:04:34Z,MEMBER,I think @keewis mentioned we could drop 3.7 in December which is not that far away. Can we type `self` as `Any` for now and update later?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950268614,https://api.github.com/repos/pydata/xarray/issues/5871,950268614,IC_kwDOAMm_X844o_LG,5635139,2021-10-24T06:26:24Z,2021-10-24T06:26:24Z,MEMBER,"I just checked Apache beam (the library that prevented us upgrading last time), and they now support typing-extensions<4, so I would vote to add that dependency, rather than drop 3.7.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950262008,https://api.github.com/repos/pydata/xarray/issues/5871,950262008,IC_kwDOAMm_X844o9j4,14371165,2021-10-24T05:14:38Z,2021-10-24T05:44:19Z,MEMBER,"We can probably do the workaround way like in #5624: https://github.com/pydata/xarray/blob/b79155862e154db45dff3b526c2f9e8ef303808f/xarray/core/options.py#L7-L72 But I find `typing_extensions` getting rather important, most of the time when you google for the typing issue the _proper_ solutions often uses these new typing additions.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950237563,https://api.github.com/repos/pydata/xarray/issues/5871,950237563,IC_kwDOAMm_X844o3l7,5635139,2021-10-24T00:27:31Z,2021-10-24T00:27:31Z,MEMBER,"Bah, `Protocol` isn't supported in 3.7! We could either revisit mandating `typing_extensions` or drop 3.7 (which is overdue since our change to only allow 24 months for python releases). Is it possible to mandate `typing_extensions` for _only_ 3.7?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950236575,https://api.github.com/repos/pydata/xarray/issues/5871,950236575,IC_kwDOAMm_X844o3Wf,5635139,2021-10-24T00:17:15Z,2021-10-24T00:17:15Z,MEMBER,"I fixed mypy! @Illviljan thanks for the `Protocol` suggestion. I had to make a different one per class, because the return type for `reduce` couldn't be generic (I think, unless there's a way...) Actually much more tedious was fixing `black` given line-breaks etc. Great work @dcherian !","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950229311,https://api.github.com/repos/pydata/xarray/issues/5871,950229311,IC_kwDOAMm_X844o1k_,5635139,2021-10-23T23:01:18Z,2021-10-23T23:01:18Z,MEMBER,"> I'm having trouble with mypy though. Please help! I tried for a while. I'm still trying!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950201382,https://api.github.com/repos/pydata/xarray/issues/5871,950201382,IC_kwDOAMm_X844ouwm,14371165,2021-10-23T19:28:17Z,2021-10-23T19:28:17Z,MEMBER,"For the typing issues you can try out using Protocol: https://stackoverflow.com/questions/51930339/how-do-i-correctly-add-type-hints-to-mixin-classes","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950181408,https://api.github.com/repos/pydata/xarray/issues/5871,950181408,IC_kwDOAMm_X844op4g,2448579,2021-10-23T17:01:02Z,2021-10-23T17:01:02Z,MEMBER,"Updated to generate resample reductions separately. This allows us to have nice examples in the docstring. I'm having trouble with mypy though. Please help! ``` xarray/core/_reductions.py:2662: error: ""DataArrayResampleReductions"" has no attribute ""reduce"" [attr-defined] xarray/core/_reductions.py:2737: error: ""DataArrayResampleReductions"" has no attribute ""reduce"" [attr-defined] xarray/core/_reductions.py:2805: error: ""DataArrayResampleReductions"" has no attribute ""reduce"" [attr-defined] xarray/core/_reductions.py:2872: error: ""DataArrayResampleReductions"" has no attribute ""reduce"" [attr-defined] xarray/core/_reductions.py:2939: error: ""DataArrayResampleReductions"" has no attribute ""reduce"" [attr-defined] ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240