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

Support for Tornado 6.x #68

Closed
jeffmaley opened this issue Feb 16, 2021 · 3 comments
Closed

Support for Tornado 6.x #68

jeffmaley opened this issue Feb 16, 2021 · 3 comments
Projects

Comments

@jeffmaley
Copy link

Is your feature request related to a problem? Please describe.
Tornado 4.5.3 is older and it is tough to get it approved in higher-security environments.

Describe the solution you'd like
I would like to see tornado 6.x supported.

Describe alternatives you've considered
We're dealing with the existing requirement, but it presents internal complexities.

Additional context
Add any other context or screenshots about the feature request here.

@austinkline
Copy link
Contributor

Thanks for cutting this. There is a long history of communication on Jupyter and Gremlin about this issue

Gremlin discussions:
https://groups.google.com/g/gremlin-users/c/iT7o7XO0NOg/m/JibKl2ZyAAAJ?pli=1
https://groups.google.com/g/gremlin-users/c/9n36OxwhVhM/m/jOLOWdawBAAJ

Jupyter discussions
jupyter/notebook#3397

The issue preventing us from upgrading as I understand it, is that newer versions of tornado do not allow multiple event loops. Since Jupyter uses tornado, it creates an event loop when a kernel is made, so then when gremlin-python tries to also make one, it no longer can. Tornado throws an exception stating that multiple event loops cannot be made. This change was introduced in Tornado major version 5

This fix is unfortunately non-trivial, but in the meantime, there is a package that can be installed to help mitigate this issue. Please note, we have not tested or verified the stability of this workaround, so use at your own risk.

You can install the package nest-asyncio which can be used to patch tornado to allow nested loops.

# run this from a notebook cell
!pip install nest-asyncio
# run this after you install nest-asyncio
import nest_asyncio
nest_asyncio.apply()
# now you should be able to install whatever version of tornado you like
!pip install tornado==xxx

Hope this helps!

@krlawrence
Copy link
Contributor

Adding a note that as of Apache TinkerPop 3.5.0, the Gremlin Python client no longer uses Tornado. AIO HTTP is used instead. Once graph-notebook moves up to that TinkerPop level the Tornado issues should be resolved as graph-notebook will no longer have any Tornado dependencies.

@krlawrence krlawrence added this to New issues/Needs triage in Planning Aug 2, 2021
@michaelnchin michaelnchin moved this from New issues/Needs triage or review to In progress in Planning Oct 20, 2021
@michaelnchin
Copy link
Member

Hi @jeffmaley, just checking in in case you are still following this.

As of Release 3.0.7, setup requirements have been updated to remove the old pinned Tornado version, and upgrade to notebook>=6.1.5. This will pull in the Tornado 6.x child dependency by default.

Closing as the ask is resolved, please feel free to re-open if you have any further questions or concerns.

@michaelnchin michaelnchin moved this from In progress to Resolved in Planning Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Planning
Resolved
Development

No branches or pull requests

4 participants