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

Loosen callback future type #6120

Merged
merged 2 commits into from
Dec 22, 2023
Merged

Loosen callback future type #6120

merged 2 commits into from
Dec 22, 2023

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 22, 2023

Fixes #6118.

I print the type of future and it results in <class 'asyncio.futures.Future'>

I also do:

            print(isinstance(future, asyncio.Future), isinstance(future, asyncio.futures.Future))

which returns True, True

but I still get:

ValueError: ClassSelector parameter 'ChatInterface._callback_future' value must be an instance of Future, not <Future pending cb=[_chain_future.<locals>._call_check_cancel() at /Users/ahuang/miniconda3/envs/panel/lib/python3.10/asyncio/futures.py:385]>.

So I just set to param.Parameter and it works.

image

Also, I needed to specify the height manually in the app, or else no messages show up:
image

Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7f25eb1) 84.67% compared to head (33cf9bf) 84.63%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6120      +/-   ##
==========================================
- Coverage   84.67%   84.63%   -0.04%     
==========================================
  Files         296      296              
  Lines       44100    44096       -4     
==========================================
- Hits        37341    37321      -20     
- Misses       6759     6775      +16     
Flag Coverage Δ
ui-tests 40.68% <0.00%> (-0.01%) ⬇️
unitexamples-tests 72.63% <100.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahuang11 ahuang11 requested a review from philippjfr December 22, 2023 18:13
@philippjfr philippjfr merged commit b45b07a into main Dec 22, 2023
12 checks passed
@philippjfr philippjfr deleted the loosen_callback_future branch December 22, 2023 20:08
philippjfr pushed a commit that referenced this pull request Jan 17, 2024
* Loosen callback future type

* Set as attr
This was referenced Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChatInterface Regression: value must be an instance of Future, not Future pending
2 participants