Repository: spotify/luigi
File: setup.py (Python)

Code before:
import os
import sys

from setuptools import setup


def get_static_files(path):
    return [os.path.join(dirpath.replace("luigi/", ""), ext)
            for (dirpath, dirnames, filenames) in os.walk(path)
            for ext in ["*.html", "*.js", "*.css", "*.png",
                        "*.eot", "*.svg", "*.ttf", "*.woff", "*.woff2"]]


luigi_package_data = sum(map(get_static_files, ["luigi/static", "luigi/templates"]), [])

readme_note = """
.. note::

   For the latest source, discussion, etc, please visit the
   `GitHub repository <https://github.com/spotify/luigi>`_
"""

with open('README.rst') as fobj:
    long_description = "\n\n" + readme_note + "\n\n" + fobj.read()

install_requires = ['python-dateutil>=2.7.5,<3', 'tenacity>=6.3.0']

# Can't use python-daemon>=2.2.0 if on windows
#     See https://pagure.io/python-daemon/issue/18
if sys.platform == 'nt':
    install_requires.append('python-daemon<2.2.0')
else:
    install_requires.append('python-daemon')

# Start from tornado 6, the minimum supported Python version is 3.5.2.
if sys.version_info[:3] >= (3, 5, 2):
    install_requires.append('tornado>=5.0,<7')
else:
    install_requires.append('tornado>=5.0,<6')

# Note: To support older versions of setuptools, we're explicitly not
#   using conditional syntax (i.e. 'enum34>1.1.0;python_version<"3.4"').
#   This syntax is a problem for setuptools as recent as `20.1.1`,
#   published Feb 16, 2016.
if sys.version_info[:2] < (3, 4):
    install_requires.append('enum34>1.1.0')

if os.environ.get('READTHEDOCS', None) == 'True':
    # So that we can build documentation for luigi.db_task_history and luigi.contrib.sqla
    install_requires.append('sqlalchemy')
    # readthedocs don't like python-daemon, see #1342

Review comment (suggestion):
I think tacking on `,<7` would be a wise precaution in case of future incompatible changes in tenacity.

Code after:
import os
import sys

from setuptools import setup


def get_static_files(path):
    return [os.path.join(dirpath.replace("luigi/", ""), ext)
            for (dirpath, dirnames, filenames) in os.walk(path)
            for ext in ["*.html", "*.js", "*.css", "*.png",
                        "*.eot", "*.svg", "*.ttf", "*.woff", "*.woff2"]]


luigi_package_data = sum(map(get_static_files, ["luigi/static", "luigi/templates"]), [])

readme_note = """
.. note::

   For the latest source, discussion, etc, please visit the
   `GitHub repository <https://github.com/spotify/luigi>`_
"""

with open('README.rst') as fobj:
    long_description = "\n\n" + readme_note + "\n\n" + fobj.read()

install_requires = ['python-dateutil>=2.7.5,<3', 'tenacity>=6.3.0,<7']

# Can't use python-daemon>=2.2.0 if on windows
#     See https://pagure.io/python-daemon/issue/18
if sys.platform == 'nt':
    install_requires.append('python-daemon<2.2.0')
else:
    install_requires.append('python-daemon')

# Start from tornado 6, the minimum supported Python version is 3.5.2.
if sys.version_info[:3] >= (3, 5, 2):
    install_requires.append('tornado>=5.0,<7')
else:
    install_requires.append('tornado>=5.0,<6')

# Note: To support older versions of setuptools, we're explicitly not
#   using conditional syntax (i.e. 'enum34>1.1.0;python_version<"3.4"').
#   This syntax is a problem for setuptools as recent as `20.1.1`,
#   published Feb 16, 2016.
if sys.version_info[:2] < (3, 4):
    install_requires.append('enum34>1.1.0')

if os.environ.get('READTHEDOCS', None) == 'True':
    # So that we can build documentation for luigi.db_task_history and luigi.contrib.sqla
    install_requires.append('sqlalchemy')
    # readthedocs don't like python-daemon, see #1342