Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientSessions aren't supported via `on_event` interface #6092

Closed
canavandl opened this issue Apr 3, 2017 · 2 comments
Closed

ClientSessions aren't supported via `on_event` interface #6092

canavandl opened this issue Apr 3, 2017 · 2 comments

Comments

@canavandl
Copy link
Contributor

@canavandl canavandl commented Apr 3, 2017

Bokeh 0.12.5

to reproduce:

  1. run bokeh serve in a terminal
  2. in another terminal, run python demo_script.py
  3. Pan inside of the plot and not that the event_callback message isn't printed

contents of demo_script.py

from bokeh.plotting import figure, curdoc
from bokeh.client import push_session

plot = figure(height=800, width=1000, tools="pan")
plot.rect(x=[1, 2], y=[1, 1], width=1, height=1)

def event_callback(event):
    print("EventCallback:Pan")

plot.on_event("pan", event_callback)

def property_callback(attr, old, new):
    print("PropertyCallback:RangeChange")

plot.x_range.on_change("start", property_callback)

doc = curdoc()
doc.add_root(plot)

session = push_session(doc)
session.show()
session.loop_until_closed()
@canavandl
Copy link
Contributor Author

@canavandl canavandl commented Apr 3, 2017

It appears that they Bokeh Server process only listens for UI Events, but doesn't have to machinery to pass a UI Event to the client session.

@bryevdv bryevdv added this to the 0.12.6 milestone Apr 4, 2017
@bryevdv bryevdv modified the milestones: 0.12.6, 0.12.7 Jun 5, 2017
@bryevdv bryevdv modified the milestones: 0.12.7, 0.12.8 Aug 21, 2017
@bryevdv bryevdv modified the milestones: 0.12.x, 0.12.11 Oct 16, 2017
@bryevdv bryevdv modified the milestones: 0.12.11, 0.12.12 Nov 15, 2017
@bryevdv bryevdv modified the milestones: 0.12.12, 0.12.13, 0.12.14 Dec 5, 2017
@bryevdv bryevdv modified the milestones: 0.12.14, 0.12.x Feb 1, 2018
@bryevdv bryevdv modified the milestones: 0.13.x, short-term Sep 11, 2018
@bryevdv
Copy link
Member

@bryevdv bryevdv commented Sep 21, 2018

I am very much of the mind that the only appropriate use of bokeh.client is to pull sessions in order to make user/session specific modifications to them before embedding with server_session. Running callbacks in external processes outside the Bokeh server was never a good idea, and is even less defensible now that the bokeh server can be used programmatically as a library. This is simply out of scope.

@bryevdv bryevdv closed this Sep 21, 2018
@bryevdv bryevdv removed this from the short-term milestone Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.