File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,8 @@ Bug Fixes
206
206
207
207
208
208
209
- - Bug groupby on tz-aware data where selection not returning ``Timestamp`` (:issue:`11616`
209
+ - Bug in subclasses of `DataFrame` where `AttributeError` did not propagate (:issue:`11808`)
210
+ - Bug groupby on tz-aware data where selection not returning ``Timestamp`` (:issue:`11616`)
210
211
- Bug in ``pd.read_clipboard`` and ``pd.to_clipboard`` functions not supporting Unicode; upgrade included ``pyperclip`` to v1.5.15 (:issue:`9263`)
211
212
212
213
Original file line number Diff line number Diff line change @@ -2356,8 +2356,7 @@ def __getattr__(self, name):
2356
2356
else :
2357
2357
if name in self ._info_axis :
2358
2358
return self [name ]
2359
- raise AttributeError ("'%s' object has no attribute '%s'" %
2360
- (type (self ).__name__ , name ))
2359
+ return object .__getattribute__ (self , name )
2361
2360
2362
2361
def __setattr__ (self , name , value ):
2363
2362
"""After regular attribute access, try setting the name
Original file line number Diff line number Diff line change @@ -15878,6 +15878,17 @@ class SubclassedPanel(Panel):
15878
15878
dtype='int64')
15879
15879
tm.assert_panel_equal(result, expected)
15880
15880
15881
+ def test_subclass_attr_err_propagation(self):
15882
+ # GH 11808
15883
+ class A(DataFrame):
15884
+
15885
+ @property
15886
+ def bar(self):
15887
+ return self.i_dont_exist
15888
+ with tm.assertRaisesRegexp(AttributeError, '.*i_dont_exist.*'):
15889
+ A().bar
15890
+
15891
+
15881
15892
def skip_if_no_ne(engine='numexpr'):
15882
15893
if engine == 'numexpr':
15883
15894
try:
You can’t perform that action at this time.
0 commit comments