Repository: bokeh/bokeh

Issue:
Remove botched DataTable.row_headers deprecation code in 0.12.15
I've just updated from 0.12.14 to 0.12.15

I'm getting the following failure from my server-side code:

    E           AttributeError: unexpected attribute 'row_headers' to DataTable, similar attributes are index_header

OK I think, possibly this attribute went away.  Lets see how bad things look if I just don't specify it at all.

But when I remove it from my figure I get the following error on the client

    connection.js:189 [bokeh] Failed to repull session Error: property DataTable.row_headers wasn't declared


Discussion:
Was completely mis-named, it had nothing to do with row headers. The correct property name is described in the migration notes:

https://bokeh.pydata.org/en/latest/docs/releases/0.12.15.html#datatable


For how far back in Bokeh version history is this term valid?  I'm trying
to learn if I need to add special logic to adjust for different bokeh
versions.

On Thu, Mar 29, 2018 at 4:13 PM, Bryan Van de Ven <notifications@github.com>
wrote:

> Closed #7719 <https://github.com/bokeh/bokeh/issues/7719>.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/bokeh/bokeh/issues/7719#event-1548707155>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AASszE5fmU3glvaQo0SdKb45XPi2UMk_ks5tjUBUgaJpZM4TA5lr>
> .
>

`index_position` is completely new this release. 

`row_header` is *supposed* to be throwing a deprecation warning, not failing outright:

https://github.com/bokeh/bokeh/blob/master/bokeh/models/widgets/tables.py#L504-L519

@mattpap can you comment?

Unfortunately if the deprecation failed work I don't see any point in reversing it and enduring the change twice. 

OK, thanks.  I'll add a version check in Dask code.

On Thu, Mar 29, 2018 at 4:18 PM, Bryan Van de Ven <notifications@github.com>
wrote:

> index_header is completely new this release.
>
> row_header is *supposed* to be throwing a deprecation warning, not
> failing outright:
>
> https://github.com/bokeh/bokeh/blob/master/bokeh/
> models/widgets/tables.py#L504-L519
>
> @mattpap <https://github.com/mattpap> can you comment?
>
> Unfortunately if the deprecation failed work I don't see any point in
> reversing it and enduring the change twice.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/bokeh/bokeh/issues/7719#issuecomment-377359390>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AASszIL3_foo8Uv4r9U1Uv-hyhQXSH-Vks5tjUF6gaJpZM4TA5lr>
> .
>

Oh, wow, I see my screw up, I added a deprecation path for `row_header`, not `row_headerS`
Welp, that sucks, I don't see a point to fix it, it would be going away in the next release or two anyway in any case (before 1.0)
I'll leave this open as a task to remove the useless deprecation properties. 

Sorry for the issue, there's only so much I can do on my own. Happy to accept downstream tests for a `downstream` Bokeh CI job, or help integrate bokeh dev builds into downstream tests. 
Not a big problem.  I appreciate the quick triage.

On Thu, Mar 29, 2018 at 4:24 PM, Bryan Van de Ven <notifications@github.com>
wrote:

> I'll leave this open as a task to remove the useless deprecation
> properties.
>
> Sorry for the issue, there's only so much I can do. Happy to accept
> downstream tests for a downstream Bokeh CI job, or help integrate bokeh
> dev builds into downstream tests.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/bokeh/bokeh/issues/7719#issuecomment-377361131>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AASszAQ4mH5CU_VgPSSLeUmurxI2B-vBks5tjUL6gaJpZM4TA5lr>
> .
>

If you did want a test suite you might consider the following

```python
pip install distributed
py.test distributed/bokeh
```

It's just one project, but we do touch a non-trivial amount of Bokeh's API at this point.

Resolving patch:
diff --git a/bokeh/models/widgets/tables.py b/bokeh/models/widgets/tables.py
--- a/bokeh/models/widgets/tables.py
+++ b/bokeh/models/widgets/tables.py
@@ -7,7 +7,6 @@
 from ...core.has_props import abstract
 from ...core.properties import Bool, Color, Either, Enum, Float, Instance, Int, List, Override, String
 from ...model import Model
-from ...util.deprecation import deprecated
 
 from ..sources import DataSource, CDSView
 
@@ -501,23 +500,6 @@ class DataTable(TableWidget):
 
     '''
 
-    @property
-    def row_header(self):
-        deprecated("DataTable.row_header property is deprecated, use DataTable.index_position instead"\
-                   "In the future, accessing DataTable.row_header will result in an AttributeError.")
-        return self.index_position is not None
-
-    @row_header.setter
-    def row_header(self, val):
-        deprecated("DataTable.row_header property is deprecated, use DataTable.index_position instead."\
-                   "In the future, accessing DataTable.row_header will result in an AttributeError.")
-        if val is True:
-            self.index_position = 0
-        elif val is False:
-            self.index_position = None
-        else:
-            raise ValueError("Expected True or False for DataTable.row_header, got %s" % val)
-
     columns = List(Instance(TableColumn), help="""
     The list of child column widgets.
     """)


Test patch: