Skip to content

Update Kernel Gateway test base class to be compatible with Tornado 5.0 #285

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

Closed
wants to merge 2 commits into from

Conversation

akchinSTC
Copy link
Contributor

No description provided.

Copy link
Member

@lresende lresende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Giving a little bit of time for others to comment before merging.

@parente
Copy link
Contributor

parente commented May 11, 2018

Thanks @akchinSTC . In general, I'm OK with saying the next release of KG is only compatible with tornado 5.0 and up to avoid having multiple code paths to maintain and keeping the requirement as tornado>=5.0,<6.

@kevin-bates
Copy link
Member

kevin-bates commented May 11, 2018

@parente - I'm a little hesitant to move the floor to Tornado 5.0 at this time. Of course, on fresh systems this really makes no difference since the latest versions of everything are installed. But for upgrade situations - where the jupyter framework is already in place albeit JKG may or may not - this could introduce some issues. I believe I found a conflict between Tornado (5) and pyzmq versions where 5.0 required an updated pyzmg. Also, I think it best to leave some fallback wiggle room in case new issues arise related to Tornado 5.0.

The reason I bring up the concern of upgrade situations is that Enterprise Gateway is literally hours away from publishing its 0.9 release and have not moved Tornado's floor. I was also hoping we could publish a 2.0.3 JKG release shortly and was going to ask for that following the merge of this PR. Enterprise Gateway is not planning on moving the floor for its JKG dependency at this time (will likely do so for its 1.0 release), but would recommend that customers upgrade its JKG to 2.0.3 in order to take advantage of some of the changes (e.g., the ability for custom error messages to return to the client #284; #280 looks useful as well). As a result, JKG's Tornado floor would essentially force the issue for JEG upgrades. I hope this makes sense.

@rolweber
Copy link
Contributor

Would it suffice to run the unit tests with Python 5.0, without raising the runtime prerequisite?
We probably should drop support for Python 3.3 though, because there is no Tornado 5 for it.

@@ -381,13 +382,21 @@ def test_concurrent_request_should_not_be_blocked(self):
method='GET',
raise_error=False
)
self.assertTrue(response_long_running.running(), 'Long HTTP Request is not running')
if tornado.version.startswith("4"):
Copy link
Contributor

@rolweber rolweber May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid the version check and instead duck-type the object? Something like:

  if callable(getattr(response_long_running, 'done', Null)):
    # Tornado 5 or higher
  else:
    # Tornado 4

Found the idea on Stack Overflow.
By the way, the check as it is now will yield a wrong result for Tornado 40 to 49 ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rolweber ! Made the changes you suggested.

Copy link
Contributor

@rolweber rolweber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@parente
Copy link
Contributor

parente commented May 17, 2018

Go ahead and merge it if you're OK with it. Please don't wait on me.

@lresende lresende closed this in 3f63ac9 May 17, 2018
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.

5 participants