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
206206
207207
208208
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`)
210211- Bug in ``pd.read_clipboard`` and ``pd.to_clipboard`` functions not supporting Unicode; upgrade included ``pyperclip`` to v1.5.15 (:issue:`9263`)
211212
212213
Original file line number Diff line number Diff line change @@ -2356,8 +2356,7 @@ def __getattr__(self, name):
23562356 else :
23572357 if name in self ._info_axis :
23582358 return self [name ]
2359- raise AttributeError ("'%s' object has no attribute '%s'" %
2360- (type (self ).__name__ , name ))
2359+ return object .__getattribute__ (self , name )
23612360
23622361 def __setattr__ (self , name , value ):
23632362 """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):
1587815878 dtype='int64')
1587915879 tm.assert_panel_equal(result, expected)
1588015880
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+
1588115892def skip_if_no_ne(engine='numexpr'):
1588215893 if engine == 'numexpr':
1588315894 try:
You can’t perform that action at this time.
0 commit comments