issues: 759270347
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
759270347 | MDU6SXNzdWU3NTkyNzAzNDc= | 4660 | RecursionError when defining __slots__ on subclass using Containment | 47473455 | closed | 0 | 4 | 2020-12-08T09:17:12Z | 2021-01-20T08:27:01Z | 2021-01-12T00:31:01Z | NONE | What happened:
Inheritance of xarray.Dataset request the addition of What you expected to happen: It should be possible to use Containment & Delegation on xarray classes. Minimal Complete Verifiable Example: ```python import xarray class MyDSet(xarray.Dataset): slots = ['dataset',] def init(self, ds): self.dataset = ds
Anything else we need to know?: I would recommend to add the following test or similar to ensure it is working: ```python class X(xarray.Dataset): slots = ['dataset'] def init(self, ds): self.dataset = ds ds = xarray.Dataset() x = X(ds) ``` Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.6.12 |Anaconda, Inc.| (default, Sep 8 2020, 23:10:56) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 5.4.0-56-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.5 libnetcdf: 4.6.3 xarray: 0.16.2 pandas: 1.1.4 numpy: 1.19.4 scipy: 1.5.4 netCDF4: 1.5.4 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.3.0 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.30.0 distributed: None matplotlib: None cartopy: None seaborn: None numbagg: None pint: None setuptools: 51.0.0.post20201207 pip: 20.3.1 conda: None pytest: 6.1.2 IPython: None sphinx: 3.2.1 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4660/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |