|
110 | 110 | "_query_compiler", |
111 | 111 | "get_backend", |
112 | 112 | "_getattribute__from_extension_impl", |
113 | | - "_getattr__from_extension_impl", |
114 | 113 | "_get_query_compiler", |
115 | 114 | "set_backend", |
116 | 115 | "_pinned", |
@@ -4376,29 +4375,6 @@ def default_handler(*args, **kwargs): |
4376 | 4375 | return default_handler |
4377 | 4376 | return attr |
4378 | 4377 |
|
4379 | | - @disable_logging |
4380 | | - def __getattr__(self, item) -> Any: |
4381 | | - """ |
4382 | | - Return attribute from this `BasePandasDataset`. |
4383 | | -
|
4384 | | - Parameters |
4385 | | - ---------- |
4386 | | - item : str |
4387 | | - Item to get. |
4388 | | -
|
4389 | | - Returns |
4390 | | - ------- |
4391 | | - Any |
4392 | | - The attribute from this `BasePandasDataset`. |
4393 | | - """ |
4394 | | - # NOTE that to get an attribute, python calls __getattribute__() first and |
4395 | | - # then falls back to __getattr__() if the former raises an AttributeError. |
4396 | | - if item not in _EXTENSION_NO_LOOKUP: |
4397 | | - extension = self._getattr__from_extension_impl(item, __class__._extensions) |
4398 | | - if extension is not sentinel: |
4399 | | - return extension |
4400 | | - return object.__getattribute__(self, item) |
4401 | | - |
4402 | 4378 | def __array_ufunc__( |
4403 | 4379 | self, ufunc: np.ufunc, method: str, *inputs: Any, **kwargs: Any |
4404 | 4380 | ) -> DataFrame | Series | Any: |
@@ -4664,36 +4640,6 @@ def _getattribute__from_extension_impl( |
4664 | 4640 | ) |
4665 | 4641 | return sentinel |
4666 | 4642 |
|
4667 | | - @disable_logging |
4668 | | - def _getattr__from_extension_impl(self, item, extensions: EXTENSION_DICT_TYPE): |
4669 | | - """ |
4670 | | - __getattr__() an extension with the given name from the given set of extensions. |
4671 | | -
|
4672 | | - Implement __getattr__() for extensions. python falls back to |
4673 | | - __getattr__() if __getattribute__() raises an AttributeError. |
4674 | | -
|
4675 | | - Parameters |
4676 | | - ---------- |
4677 | | - item : str |
4678 | | - The name of the attribute to get. |
4679 | | - extensions : EXTENSION_DICT_TYPE |
4680 | | - The set of extensions. |
4681 | | -
|
4682 | | - Returns |
4683 | | - ------- |
4684 | | - Any |
4685 | | - The attribute from the extension, or `sentinel` if the attribute is |
4686 | | - not found. |
4687 | | - """ |
4688 | | - extension = self._get_extension(item, extensions) |
4689 | | - if extension is not sentinel: |
4690 | | - # We need to implement callable extensions before we fall back |
4691 | | - # to __getattr__(), because they need to dispatch to the |
4692 | | - # appropriate backend. |
4693 | | - assert not callable(extension) |
4694 | | - return extension |
4695 | | - return sentinel |
4696 | | - |
4697 | 4643 | @disable_logging |
4698 | 4644 | @_inherit_docstrings(QueryCompilerCaster._get_query_compiler) |
4699 | 4645 | def _get_query_compiler(self): |
|
0 commit comments