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

Update tornado requirement for new enough python versions #2761

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

daritter
Copy link
Contributor

Description

Increase the tornado version requirement to allow tornado 5 but only on systems with python 3.4+ or 2.7.9+

This is a replacement for #2735

Motivation and Context

This has been tried before for all supported python version in #2490 but had to be reverted in #2503 due to incompatibilities in the ssl module for old python versions.

However the latest version of jupyter notebook (starting with 6.0) now requires tornado >=5 so it is no longer possible to have one consistent stack with both jupyter and luigi.

Have you tested this? If so, how?

same changes as tested in #2490 but no additional tests by me

Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

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

Please fix failing flake8 tests

@honnix Are you ok with this split requirement based on Python version?

setup.py Outdated
# versions of python (3.4+ and 2.7.9+).
if sys.version_info[:2] >= (3, 4) or (sys.version_info[:2] == (2, 7)
and sys.version_info[2]>=9):
install_requires.append('tornado>=4.0,<6')
Copy link
Collaborator

Choose a reason for hiding this comment

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

wouldn't you want this one to be between 5 and 6?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assumed that keeping it at 4.0 as minimum requirement is the correct thing to do as luigi does work with tornado 4.0 and I didn't want to introduce any possible problems that the minimum version is different depending on the python version.

Increasing the minimum version only would make sense if luigi would start using features from tornado 5 which will be complicated due to the split requirement.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's fair. I'm ok with that.

Copy link
Member

Choose a reason for hiding this comment

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

@dlstadther Sorry for replying late. I was on a long vacation. Yes I'm OK with this approach.

@tomzx
Copy link

tomzx commented Aug 12, 2019

Would it be possible to also support tornado 6?

@dlstadther
Copy link
Collaborator

@tomzx Tornado 6 notes lack of support for Python 2.7 and 3.4

So the addition of Tornado 6 support would require another conditional check for Python version >= Python 3.5.2

Additionally, you'd need to verify no functional support has been removed for how Luigi calls Tornado.

@Timost
Copy link

Timost commented Aug 24, 2019

Hi everyone,
I think the latest best practice for specifying dependencies is to follow PEP508 and use environment markers. I've opened #2734 regarding the enum34 dependency where using the sys.version_info conditional breaks the install when using poetry.

That being said I'm not entirely sure how this specific conditional would translate into environment markers '^^. Maybe something like:

'tornado>=4.0,<6; python_version >= "3.4" or (python_version == "2.7" and python_full_version >= "2.7.9")'
'tornado>=4.0,<5; (python_version > "2.7" and python_version < "3.4") or (python_full_version < "2.7.9")'

@honnix
Copy link
Member

honnix commented Aug 26, 2019

@Timost Thanks for firing the issue. Shall we merge this PR as it is and follow up in #2734, which might take a bit more time to conclude? What do you think?

@Timost
Copy link

Timost commented Aug 26, 2019

@honnix sounds like a reasonable compromise to me yes.

@honnix
Copy link
Member

honnix commented Aug 26, 2019

@Timost Thanks for understanding. @dlstadther Do you agree to merge?

@dlstadther
Copy link
Collaborator

I agree

@honnix honnix merged commit 6300797 into spotify:master Aug 26, 2019
@daritter daritter deleted the bump_tornado branch September 9, 2019 09:04
bishax added a commit to nestauk/ds-cookiecutter that referenced this pull request Jul 7, 2020
- Added jupyterlab (#44)
- Added gcc (linux) + clang (OSX) which are required by conda to compile packages w/ C extensions
- Constrained tornado requirement to stop luigi breaking jupyter (see spotify/luigi#2761)
bishax added a commit to nestauk/ds-cookiecutter that referenced this pull request Jul 7, 2020
- Added jupyterlab (Closes #44)
- Added gcc (linux) + clang (OSX) which are required by conda to compile packages w/ C extensions
- Constrained tornado requirement to stop luigi breaking jupyter (see spotify/luigi#2761)
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