internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: bokeh/bokeh

Issue:
cb_obj for range callback is plot not range
See: https://github.com/bokeh/bokeh/blob/2819b349ae47232c72a275d4e7714adf329c7235/bokehjs/src/coffee/common/plot.coffee#L207

The callback is called with `@model` instead of with `rng` which, for example, does not have the property `start` so you can't do `cb_obj.get('start')`. 



Discussion:

Resolving patch:
diff --git a/sphinx/source/docs/user_guide/source_examples/interaction_callbacks_for_range_update.py b/sphinx/source/docs/user_guide/source_examples/interaction_callbacks_for_range_update.py
--- a/sphinx/source/docs/user_guide/source_examples/interaction_callbacks_for_range_update.py
+++ b/sphinx/source/docs/user_guide/source_examples/interaction_callbacks_for_range_update.py
@@ -18,8 +18,8 @@
 
 jscode="""
         var data = source.get('data');
-        var start = range.get('start');
-        var end = range.get('end');
+        var start = cb_obj.get('start');
+        var end = cb_obj.get('end');
         data['%s'] = [start + (end - start) / 2];
         data['%s'] = [end - start];
         source.trigger('change');
@@ -30,9 +30,9 @@
 p1.scatter(x, y, radius=radii, fill_color=colors, fill_alpha=0.6, line_color=None)
 
 p1.x_range.callback = CustomJS(
-        args=dict(source=source, range=p1.x_range), code=jscode % ('x', 'width'))
+        args=dict(source=source), code=jscode % ('x', 'width'))
 p1.y_range.callback = CustomJS(
-        args=dict(source=source, range=p1.y_range), code=jscode % ('y', 'height'))
+        args=dict(source=source), code=jscode % ('y', 'height'))
 
 p2 = figure(title='See Zoom Window Here', x_range=(0, 100), y_range=(0, 100),
             tools='', plot_width=400, plot_height=400)


Test patch:
Repository: bokeh/bokeh

Issue:
WebGL AA is broken on Firefox on Windows
The borders in the webgl rendering of both lines and circles look terrible. It looks like something is wrong with the anti-aliasing. The problem is visible on Firefox on Windows. It looks fine on Edge and Chrome. 

~~This looked good the last time I checked.~~ I _think_ this looked good the last time I checked. Maybe I broke it with the introduction of a fix for IE.

![bokehaa02](https://cloud.githubusercontent.com/assets/3015475/12224214/21405906-b7eb-11e5-9adb-a33f4c7ab069.png)
![bokehaa01](https://cloud.githubusercontent.com/assets/3015475/12224215/230ef378-b7eb-11e5-9b23-f0ff8fff875e.png)



Discussion:
The problem is not in the shader or the webgl, but in the blitting of the hidden webgl canvas into the 2D canvas. (I verified by displaying the webgl canvas too, all looks fine there). Could this just be a bug in Firefox' `drawImage()`?


Resolving patch:
diff --git a/examples/plotting/file/scatter10k.py b/examples/plotting/file/scatter10k.py
--- a/examples/plotting/file/scatter10k.py
+++ b/examples/plotting/file/scatter10k.py
@@ -10,7 +10,7 @@
 
 TOOLS = "pan,wheel_zoom,box_zoom,reset,save,box_select"
 
-p = figure(tools=TOOLS  , webgl=True)
+p = figure(tools=TOOLS, webgl=True)
 
 p.circle(x, y, alpha=0.1, nonselection_alpha=0.001)
 


Test patch:
Repository: bokeh/bokeh

Issue:
Notebook comms only update last plot
Using handles does not have the intended effect and leaves a browser console error. 



Discussion:

Resolving patch:
diff --git a/bokeh/io.py b/bokeh/io.py
--- a/bokeh/io.py
+++ b/bokeh/io.py
@@ -57,10 +57,29 @@
 #-----------------------------------------------------------------------------
 
 class _CommsHandle(object):
+
+    _json = {}
+
     def __init__(self, comms, doc, json):
+        self._cellno = None
+        try:
+            from IPython import get_ipython
+            ip = get_ipython()
+            hm = ip.history_manager
+            p_prompt = list(hm.get_tail(1, include_latest=True))[0][1]
+            self._cellno = p_prompt
+        except Exception as e:
+            logger.debug("Could not get Notebook cell number, reason: %s", e)
+
         self._comms = comms
         self._doc = doc
-        self._json = json
+        self._json[doc] = json
+
+    def _repr_html_(self):
+        if self._cellno is not None:
+            return "<p><code>&lt;Bokeh Notebook handle for <strong>In[%s]</strong>&gt;</code></p>" % str(self._cellno)
+        else:
+            return "<p><code>&lt;Bokeh Notebook handle&gt;</code></p>"
 
     @property
     def comms(self):
@@ -72,7 +91,11 @@ def doc(self):
 
     @property
     def json(self):
-        return self._json
+        return self._json[self._doc]
+
+    def update(self, doc, json):
+        self._doc = doc
+        self._json[doc] = json
 
 def output_file(filename, title="Bokeh Plot", autosave=False, mode="cdn", root_dir=None):
     '''Configure the default output state to generate output saved
@@ -515,8 +538,7 @@ def push_notebook(document=None, state=None, handle=None):
     else:
         msg = Document._compute_patch_between_json(handle.json, to_json)
     handle.comms.send(json.dumps(msg))
-    handle._doc = document
-    handle._json = to_json
+    handle.update(document, to_json)
 
 def reset_output(state=None):
     ''' Clear the default state of all output modes.


Test patch:
Repository: bokeh/bokeh

Issue:
movies app razzies file path
needs to join `dirname(__path__)` to CSV filename when opening. 



Discussion:

Resolving patch:
diff --git a/examples/app/movies/main.py b/examples/app/movies/main.py
--- a/examples/app/movies/main.py
+++ b/examples/app/movies/main.py
@@ -19,7 +19,7 @@
 movies.fillna(0, inplace=True)  # just replace missing values with zero
 movies["revenue"] = movies.BoxOffice.apply(lambda x: '{:,d}'.format(int(x)))
 
-with open("razzies-clean.csv") as f:
+with open(join(dirname(__file__), "razzies-clean.csv")) as f:
     razzies = f.read().splitlines()
 movies.loc[movies.imdbID.isin(razzies), "color"] = "purple"
 movies.loc[movies.imdbID.isin(razzies), "alpha"] = 0.9


Test patch:
Repository: bokeh/bokeh

Issue:
Auto-update the "releases" link in conf.py
From sphinx/README.txt:

> In `conf.py` the links that appear in the docs nav appear. On a new release, the 
> releases link should be changed to the latest release notes (we should find a way to automate this)

From @bryevdv: There's a script that updates the versions to the new version for release, I'd suggest it could also note the previous version and insert it in conf.py where appropriate.



Discussion:

Resolving patch:
diff --git a/sphinx/source/conf.py b/sphinx/source/conf.py
--- a/sphinx/source/conf.py
+++ b/sphinx/source/conf.py
@@ -162,7 +162,7 @@
         ('User Guide', 'user_guide'),
         ('Gallery', 'gallery'),
         ('Reference', 'reference'),
-        ('Releases', 'releases/0.11.0'),
+        ('Releases', 'releases/%s' % version),
         ('Developer Guide', 'dev_guide'),
     ),
     'ALL_VERSIONS': ['0.10.0', '0.9.3', '0.8.2'],


Test patch:
Repository: bokeh/bokeh

Issue:
inline CSS from embed_multiple.py jinja template overrides Bokeh plot icon CSS
<img width="969" alt="screen shot 2016-01-21 at 11 26 41 pm" src="https://cloud.githubusercontent.com/assets/2198981/12503100/74848476-c096-11e5-85a6-f58a5fc2c193.png">

Need to remove inline CSS of jinja template in embed_multiple.py



Discussion:

Resolving patch:
diff --git a/examples/embed/embed_multiple.py b/examples/embed/embed_multiple.py
--- a/examples/embed/embed_multiple.py
+++ b/examples/embed/embed_multiple.py
@@ -46,15 +46,14 @@
     <head>
         <meta charset="utf-8">
         <title>Bokeh Scatter Plots</title>
-        <style> div{float: left;} </style>
         {{ js_resources }}
         {{ css_resources }}
         {{ script }}
     </head>
     <body>
-    {% for key in div.keys() %}
-        {{ div[key] }}
-    {% endfor %}
+        {% for key in div.keys() %}
+            {{ div[key] }}
+        {% endfor %}
     </body>
 </html>
 ''')


Test patch:
Repository: bokeh/bokeh

Issue:
HoverTool.always_active is not implemented



Discussion:

Resolving patch:
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -184,8 +184,15 @@ class TapTool(Tool):
     a dialog box, etc. See :class:`~bokeh.models.actions.Action` for details.
     """)
 
+@abstract
+class InspectTool(Tool):
+
+    active = Bool(True, help="""
+    Whether the tool is intially active or not. If set to ``False``, the user
+    will have to click tool's button to active it.
+    """)
 
-class CrosshairTool(Tool):
+class CrosshairTool(InspectTool):
     """ *toolbar icon*: |inspector_icon|
 
     The crosshair tool is a passive inspector tool. It is generally on
@@ -421,7 +428,7 @@ class PolySelectTool(Tool):
     A shaded annotation drawn to indicate the selection region.
     """)
 
-class HoverTool(Tool):
+class HoverTool(InspectTool):
     """ *toolbar icon*: |inspector_icon|
 
     The hover tool is a passive inspector tool. It is generally on at
@@ -532,10 +539,6 @@ class HoverTool(Tool):
 
     """).accepts(Dict(String, String), lambda d: list(d.items()))
 
-    always_active = Bool(True, help="""
-    Whether the hover tool must be explicitly activated.
-    """)
-
     mode = Enum("mouse", "hline", "vline", help="""
     Whether to consider hover pointer as a point (x/y values), or a
     span on h or v directions.
diff --git a/bokeh/plotting/helpers.py b/bokeh/plotting/helpers.py
--- a/bokeh/plotting/helpers.py
+++ b/bokeh/plotting/helpers.py
@@ -216,7 +216,7 @@ def _get_num_minor_ticks(axis_class, num_minor_ticks):
     "box_zoom": lambda: BoxZoomTool(dimensions=['width', 'height']),
     "xbox_zoom": lambda: BoxZoomTool(dimensions=['width']),
     "ybox_zoom": lambda: BoxZoomTool(dimensions=['height']),
-    "hover": lambda: HoverTool(always_active=True, tooltips=[
+    "hover": lambda: HoverTool(tooltips=[
         ("index", "$index"),
         ("data (x, y)", "($x, $y)"),
         ("canvas (x, y)", "($sx, $sy)"),


Test patch:
Repository: bokeh/bokeh

Issue:
Move defaults.coffee (for models and widgets) into test/ directory
Per conversation in #3735 

It seems useful to move the generated location of common/defaults.coffee and models/widgets/defaults.coffee to the test directory, as they are only used in testing.



Discussion:

Resolving patch:
diff --git a/bokehjs/gulp/tasks/generate_defaults.py b/bokehjs/gulp/tasks/generate_defaults.py
--- a/bokehjs/gulp/tasks/generate_defaults.py
+++ b/bokehjs/gulp/tasks/generate_defaults.py
@@ -102,7 +102,7 @@ def output_defaults_module(filename, defaults):
     print("Wrote %s with %d model classes" % (filename, len(defaults)))
 
 
-output_defaults_module(filename = os.path.join(dest_dir, 'common/defaults.coffee'),
+output_defaults_module(filename = os.path.join(dest_dir, 'test_common/defaults/models_defaults.coffee'),
                        defaults = all_json)
-output_defaults_module(filename = os.path.join(dest_dir, 'models/widgets/defaults.coffee'),
+output_defaults_module(filename = os.path.join(dest_dir, 'test_common/defaults/widgets_defaults.coffee'),
                        defaults = widgets_json)


Test patch:
diff --git a/bokehjs/test/test_common/test_defaults.coffee b/bokehjs/test/test_common/test_defaults.coffee
--- a/bokehjs/test/test_common/test_defaults.coffee
+++ b/bokehjs/test/test_common/test_defaults.coffee
@@ -2,8 +2,8 @@ _ = require "underscore"
 {expect} = require "chai"
 utils = require "../utils"
 
-core_defaults = utils.require "common/defaults"
-widget_defaults = utils.require "models/widgets/defaults"
+core_defaults = require "./defaults/models_defaults"
+widget_defaults = require "./defaults/widgets_defaults"
 
 {Collections} = utils.require "common/base"
 HasProperties = utils.require "common/has_properties"
Repository: bokeh/bokeh

Issue:
Confusing deprecation message in bokeh/models/plots.py
```
    @property
    def background_fill(self):
        warnings.warn(
            """
            Glyph property 'background_fill' will be deprecated in Bokeh
            0.12.0. Use 'background_fill_color' instead.
            """)
        return self.background_fill_color
```

It's already deprecated, i.e. in 0.11.0, so perhaps someone meant to write "removed". Further more, we have `bokeh.deprecate` module to handle deprecation, yet this uses bare `warnings.warn()`.



Discussion:
@mattpap agreed the message should be changed. AFAIK `bokeh.deprecated` will not work for our properties? But perhaps it can. 

>  AFAIK bokeh.deprecated will not work for our properties? But perhaps it can.

It looks like it doesn't, as visible in #3261, but I will check this out.


Resolving patch:
diff --git a/bokeh/models/plots.py b/bokeh/models/plots.py
--- a/bokeh/models/plots.py
+++ b/bokeh/models/plots.py
@@ -451,8 +451,8 @@ def _check_colon_in_category_label(self):
     def background_fill(self):
         warnings.warn(
             """
-            Glyph property 'background_fill' will be deprecated in Bokeh
-            0.12.0. Use 'background_fill_color' instead.
+            Plot property 'background_fill' was deprecated in Bokeh
+            0.11.0 and will be removed. Use 'background_fill_color' instead.
             """)
         return self.background_fill_color
 
@@ -460,8 +460,8 @@ def background_fill(self):
     def background_fill(self, color):
         warnings.warn(
             """
-            Glyph property 'background_fill' will be deprecated in Bokeh
-            0.12.0. Use 'background_fill_color' instead.
+            Plot property 'background_fill' was deprecated in Bokeh
+            0.11.0 and will be removed. Use 'background_fill_color' instead.
             """)
         self.background_fill_color = color
 
@@ -469,8 +469,8 @@ def background_fill(self, color):
     def border_fill(self):
         warnings.warn(
             """
-            Glyph property 'border_fill' will be deprecated in Bokeh 0.12.0.
-            Use 'border_fill_color' instead.
+            Plot property 'border_fill' was deprecated in Bokeh 0.11.0 and
+            will be removed. Use 'border_fill_color' instead.
             """)
         return self.border_fill_color
 
@@ -478,8 +478,8 @@ def border_fill(self):
     def border_fill(self, color):
         warnings.warn(
             """
-            Glyph property 'border_fill' will be deprecated in Bokeh 0.12.0.
-            Use 'border_fill_color' instead.
+            Plot property 'border_fill' was deprecated in Bokeh 0.11.0 and
+            will be removed. Use 'border_fill_color' instead.
             """)
         self.border_fill_color = color
 


Test patch:
Repository: bokeh/bokeh

Issue:
Add a simple app showing usage with HDF5



Discussion:

Resolving patch:
diff --git a/examples/app/simple_hdf5/create_hdf5.py b/examples/app/simple_hdf5/create_hdf5.py
new file mode 100644
--- /dev/null
+++ b/examples/app/simple_hdf5/create_hdf5.py
@@ -0,0 +1,15 @@
+import h5py
+import numpy as np
+
+
+def f(x):
+    return np.exp(-x ** 2 / 2) / np.sqrt(2 * np.pi)
+
+
+a = np.random.rand(100, 1)
+b = [f(x) for x in np.linspace(-1, 1, num=100)]
+
+
+with h5py.File('demo_data.hdf5', 'w') as f:
+    hip_data = f.create_dataset("hip_strength", data=a)
+    knee_data = f.create_dataset("knee_strength", data=b)
diff --git a/examples/app/simple_hdf5/main.py b/examples/app/simple_hdf5/main.py
new file mode 100644
--- /dev/null
+++ b/examples/app/simple_hdf5/main.py
@@ -0,0 +1,47 @@
+import numpy as np
+import h5py
+
+from bokeh.plotting import Figure
+from bokeh.models import ColumnDataSource, HBox, VBoxForm
+from bokeh.models.widgets import Select
+from bokeh.io import curdoc
+
+data_select = Select(title="Output:", value="hip_strength", options=["hip_strength", "knee_strength"])
+
+source = ColumnDataSource(data=dict(x=[], y=[]))
+
+p = Figure(plot_height=600, plot_width=800, title="", toolbar_location=None)
+p.line(x="x", y="y", source=source)
+
+
+# Fast direct read from hdf5
+def get_data(f, name):
+    shape = f[name].shape
+    # Empty array
+    data = np.empty(shape, dtype=np.float64)
+    # read_direct to empty arrays
+    f[name].read_direct(data)
+    return data
+
+
+def select_data():
+    data_val = data_select.value
+    with h5py.File('demo_data.hdf5', 'r') as f:
+        return get_data(f, data_val)
+
+
+def update_data(attrname, old, new):
+    # hardcoded length of 100
+    x = list(range(1, 101))
+    y = select_data()
+
+    source.data = dict(x=x, y=y)
+
+
+data_select.on_change('value', update_data)
+
+inputs = VBoxForm(data_select, width=300)
+
+update_data(None, None, None)
+
+curdoc().add_root(HBox(inputs, p, width=1100))


Test patch:
Repository: bokeh/bokeh

Issue:
Bokeh 0.11: Enables webgl causes inconsistent update of scatter points
This problem might be related to this issue: https://github.com/bokeh/bokeh/issues/3795

Lets consider this minimal example:

``` python
from bokeh.plotting import figure, show, ColumnDataSource
from bokeh.models import Select
from bokeh.models.widgets import RadioGroup
from bokeh.io import vform
import numpy as np

N = 100
x1 = np.random.normal(0.0, 1.0,N)
x2 = x1 * (1.0 + np.random.normal(0.0, 0.1,N))
y1 = 5.0*x1 + np.random.normal(0, 0.1, N)
y2 = 50.0*x2 + np.random.normal(0, 1, N)

source = ColumnDataSource({'x' : x1, 'y' : y1})

TOOLS = "box_select,box_zoom,lasso_select,help,reset,pan"
p = figure(tools=TOOLS, plot_width=400, plot_height=400, webgl=True)
p.circle(x='x', y='y', source=source)

x_radio_group = RadioGroup(labels=["x1", "x2"], active=0)
y_radio_group = RadioGroup(labels=["y1", "y2"], active=0)
controls = vform(x_radio_group, y_radio_group)

def update(attr, old, new):
    source.data["y"] = y1 if y_radio_group.active==0 else y2
    source.data["x"] = x1 if x_radio_group.active==0 else x2

    # Updating the source in one step does not change this behavior
    #data = dict(x=x1 if x_radio_group.active==0 else x2, y=y1 if y_radio_group.active==0 else y2)
    #source.data = data

source.on_change('selected', update)

def select_x(value):
    update('x-change', None, None)

def select_y(value):
    update('y-change', None, None)

x_radio_group.on_click(select_x)
y_radio_group.on_click(select_y)
```

You can reproduce this problem in the following way (using the bokeh server):
- Fire up the bokeh server (e.g. bokeh server file --show)
- Select a subset of the data points (using box select or lasso)
- Switch between y1 and y2 radio buttons
- Notice that even though the y-axis scaled as expected, the scatter points did not!

Now if you repeat this exercise with webgl=False, you should see that both the y-axis and the scatter points are updated as expected.

maps_cities.py data disappears after pan/zoom
ping @almarklein 

Other WebGL examples work fine. 

Could consider a _very_ short self-contained fix for `0.11`

```
examples/glyphs/maps_cities.py:
 data disappears after pan/zoom
```



Discussion:
Same issue using lines.
![webgl](https://cloud.githubusercontent.com/assets/5183040/12761015/8f4dbcaa-c9a6-11e5-85f9-2a57d5b418fe.JPG)



Resolving patch:
diff --git a/examples/plotting/file/line_compare.py b/examples/plotting/file/line_compare.py
--- a/examples/plotting/file/line_compare.py
+++ b/examples/plotting/file/line_compare.py
@@ -13,6 +13,7 @@
 
 ys = 10  # yscale, to increase anisotropy
 
+lines = []
 for p in (p1, p2):
 
     t = np.linspace(0, 2 * np.pi, 50)
@@ -39,9 +40,10 @@
     l4 = p.line(y, x * ys, color="#aa2222",
                 line_width=6, line_cap='butt',
                 line_join='round', line_dash=(10, 10))
+    
+    lines.extend([l1, l2, l3, l4])
 
 def add_callback(widget, prop):
-    lines = [l1, l2, l3, l4]
     widget.callback = CustomJS(args=dict(widget=widget), code="""
         for ( var i = 0; i < %s; i++ ) {
             var g = eval( 'line' + i ).get( 'glyph' );


Test patch:
Repository: bokeh/bokeh

Issue:
Histogram bin size auto select
Dear authors,

In the special case where there is only one unique value in the histogram input data, the automatic bin size function of 'Histogram' create a  **`bins` should be a positive integer error**.

Here a case to reproduce the error:

```
from bokeh.models import Range1d
from bokeh.charts import Histogram, output_file, show, vplot, hplot, Bar, defaults

arr = [5,5,5,5,5]

output_file("Hist.html")
p1 = Histogram(arr, title="Histogram", xlabel="Distances", ylabel="Counts")
p1.x_range = Range1d(-10, 10) 

p = vplot(hplot(p1))
show(p)
```

Whereas when you change the array to following array it works perfectly:

```
arr = [5,5,5,5,5,6]
```

Please fix the autoselection process for this special case.

Thank you.



Discussion:

Resolving patch:
diff --git a/bokeh/charts/builders/histogram_builder.py b/bokeh/charts/builders/histogram_builder.py
--- a/bokeh/charts/builders/histogram_builder.py
+++ b/bokeh/charts/builders/histogram_builder.py
@@ -152,7 +152,7 @@ def set_ranges(self):
         y_max = max([comp_glyph.y_max for comp_glyph in self.comp_glyphs])
         y_min = min([comp_glyph.y_min for comp_glyph in self.comp_glyphs])
 
-        x_buffer = ((x_max + x_min)/2.0)*0.1
+        x_buffer = ((x_max + x_min)/2.0)*0.05
 
         self.x_range = Range1d(start=x_min - x_buffer, end=x_max + x_buffer)
 
diff --git a/bokeh/charts/stats.py b/bokeh/charts/stats.py
--- a/bokeh/charts/stats.py
+++ b/bokeh/charts/stats.py
@@ -253,7 +253,7 @@ def calc_num_bins(self, values):
 
         self.bin_count = int(np.ceil((values.max() - values.min()) / self.bin_width))
 
-        if self.bin_count == 1:
+        if self.bin_count <= 1:
             self.bin_count = 3
 
     def calculate(self):


Test patch:
diff --git a/bokeh/charts/tests/test_stats.py b/bokeh/charts/tests/test_stats.py
--- a/bokeh/charts/tests/test_stats.py
+++ b/bokeh/charts/tests/test_stats.py
@@ -20,7 +20,13 @@ def test_auto_bin_count(ds):
     b = Bins(source=ds, column='mpg')
     assert len(b.bins) == 12
 
+    # this should test it still matches
+    # http://stats.stackexchange.com/questions/114490/optimal-bin-width-for-two-dimensional-histogram
+    # with iterables with the same value
+    b = Bins(values=[5,5,5,5,5], bin_count=None)
+    assert len(b.bins) == 3
+
 
 def test_bin_labeling(ds):
     Bins(source=ds, column='cyl', bin_count=2)
-    assert len(pd.Series(ds.data['cyl_bin']).drop_duplicates()) == 2
\ No newline at end of file
+    assert len(pd.Series(ds.data['cyl_bin']).drop_duplicates()) == 2
Repository: bokeh/bokeh

Issue:
having a __conda_version__.py under bokeh causes version to be wrong
I had a **conda_version**.py file lurking under bokeh package and this was causing bokeh to get the wrong dev version for me from, for example, CDN.

A warning would have been very helpful. I didn't know to look for this.



Discussion:
Copying what I put on the flow just for reference:

"to be sure to avoid this kind of problems next time you can "clean" your git space with

`git clean -xfdi`

that should remove any files and directories putting you in a clean start again...

in that way you should conserve your local branches ... no need to reclone...."

I run into this issue myself recently. Being forced to periodically clean the repository isn't a solution here.

> I run into this issue myself recently. Being forced to periodically clean the repository isn't a solution here.

Not suggesting that... we should address this somehow, just giving a quick workaround to keep working...

Sure. btw. This is the ultimate git clean alias I use:

```
deep-clean = !sh -c 'git clean -dfx && git submodule foreach git clean -dfx'
```


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -472,6 +472,9 @@ def parse_jsargs():
 
 print()
 if 'develop' in sys.argv:
+    if exists('bokeh/__conda_version__.py'):
+        print(bright(red("ERROR:")) + " Detected a __conda_version__.py file, exiting")
+        sys.exit(1)
     check_remove_bokeh_install(site_packages)
     with open(path_file, "w+") as f:
         f.write(path)


Test patch: