prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Determine if papermill v1.0 API change is a problem
  # Description
  
  The [papermill `v1.0` release will introduce API breaking changes](https://github.com/nteract/papermill/blob/d554193bc458797b63af1f94964883d5dcca2418/README.md). It would be good to determine if these changes will matter for pyhf testing and require the addition of [scrapbook](https://nteract-scrapbook.readthedocs.io/en/latest/) or if the API change doesn't affect pyhf.
  
  </issue>
  <code>
  [start of setup.py]
  1 #!/usr/bin/env python
  2 
  3 from setuptools import setup, find_packages
  4 from os import path
  5 import sys
  6 
  7 this_directory = path.abspath(path.dirname(__file__))
  8 if sys.version_info.major < 3:
  9     from io import open
  10 with open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:
  11     long_description = readme_md.read()
  12 
  13 extras_require = {
  14     'tensorflow': [
  15         'tensorflow~=1.13',
  16         'tensorflow-probability~=0.5',
  17         'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass
  18         'setuptools<=39.1.0',
  19     ],
  20     'torch': ['torch~=1.0'],
  21     'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],
  22     # 'dask': [
  23     #     'dask[array]'
  24     # ],
  25     'xmlio': ['uproot'],
  26     'minuit': ['iminuit'],
  27     'develop': [
  28         'pyflakes',
  29         'pytest~=3.5',
  30         'pytest-cov>=2.5.1',
  31         'pytest-mock',
  32         'pytest-benchmark[histogram]',
  33         'pytest-console-scripts',
  34         'python-coveralls',
  35         'coverage>=4.0',  # coveralls
  36         'matplotlib',
  37         'jupyter',
  38         'nbdime',
  39         'uproot~=3.3',
  40         'papermill~=0.16',
  41         'graphviz',
  42         'bumpversion',
  43         'sphinx',
  44         'sphinxcontrib-bibtex',
  45         'sphinxcontrib-napoleon',
  46         'sphinx_rtd_theme',
  47         'nbsphinx',
  48         'sphinx-issues',
  49         'm2r',
  50         'jsonpatch',
  51         'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now
  52         'pre-commit',
  53         'black;python_version>="3.6"',  # Black is Python3 only
  54         'twine',
  55     ],
  56 }
  57 extras_require['complete'] = sorted(set(sum(extras_require.values(), [])))
  58 
  59 
  60 def _is_test_pypi():
  61     """
  62     Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and
  63     set to true (c.f. .travis.yml)
  64 
  65     The use_scm_version kwarg accepts a callable for the local_scheme
  66     configuration parameter with argument "version". This can be replaced
  67     with a lambda as the desired version structure is {next_version}.dev{distance}
  68     c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy
  69 
  70     As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version
  71     controlled through bumpversion is used.
  72     """
  73     from os import getenv
  74 
  75     return (
  76         {'local_scheme': lambda version: ''}
  77         if getenv('TESTPYPI_UPLOAD') == 'true'
  78         else False
  79     )
  80 
  81 
  82 setup(
  83     name='pyhf',
  84     version='0.1.0',
  85     description='(partial) pure python histfactory implementation',
  86     long_description=long_description,
  87     long_description_content_type='text/markdown',
  88     url='https://github.com/diana-hep/pyhf',
  89     author='Lukas Heinrich',
  90     author_email='lukas.heinrich@cern.ch',
  91     license='Apache',
  92     keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',
  93     classifiers=[
  94         "Programming Language :: Python :: 2",
  95         "Programming Language :: Python :: 2.7",
  96         "Programming Language :: Python :: 3",
  97         "Programming Language :: Python :: 3.6",
  98         "Programming Language :: Python :: 3.7",
  99     ],
  100     packages=find_packages(),
  101     include_package_data=True,
  102     python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
  103     install_requires=[
  104         'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet
  105         'click>=6.0',  # for console scripts,
  106         'tqdm',  # for readxml
  107         'six',  # for modifiers
  108         'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6
  109         'jsonpatch',
  110     ],
  111     extras_require=extras_require,
  112     entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},
  113     dependency_links=[],
  114     use_scm_version=_is_test_pypi(),
  115 )
  116
  [end of setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -37,7 +37,8 @@
           'jupyter',
           'nbdime',
           'uproot~=3.3',
  -        'papermill~=0.16',
  +        'papermill~=1.0',
  +        'nteract-scrapbook~=0.2',
           'graphviz',
           'bumpversion',
           'sphinx',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,7 +37,8 @@\n         'jupyter',\n         'nbdime',\n         'uproot~=3.3',\n-        'papermill~=0.16',\n+        'papermill~=1.0',\n+        'nteract-scrapbook~=0.2',\n         'graphviz',\n         'bumpversion',\n         'sphinx',\n", "issue": "Determine if papermill v1.0 API change is a problem\n# Description\r\n\r\nThe [papermill `v1.0` release will introduce API breaking changes](https://github.com/nteract/papermill/blob/d554193bc458797b63af1f94964883d5dcca2418/README.md). It would be good to determine if these changes will matter for pyhf testing and require the addition of [scrapbook](https://nteract-scrapbook.readthedocs.io/en/latest/) or if the API change doesn't affect pyhf.\n", "before_files": [{"content": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom os import path\nimport sys\n\nthis_directory = path.abspath(path.dirname(__file__))\nif sys.version_info.major < 3:\n    from io import open\nwith open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:\n    long_description = readme_md.read()\n\nextras_require = {\n    'tensorflow': [\n        'tensorflow~=1.13',\n        'tensorflow-probability~=0.5',\n        'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass\n        'setuptools<=39.1.0',\n    ],\n    'torch': ['torch~=1.0'],\n    'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],\n    # 'dask': [\n    #     'dask[array]'\n    # ],\n    'xmlio': ['uproot'],\n    'minuit': ['iminuit'],\n    'develop': [\n        'pyflakes',\n        'pytest~=3.5',\n        'pytest-cov>=2.5.1',\n        'pytest-mock',\n        'pytest-benchmark[histogram]',\n        'pytest-console-scripts',\n        'python-coveralls',\n        'coverage>=4.0',  # coveralls\n        'matplotlib',\n        'jupyter',\n        'nbdime',\n        'uproot~=3.3',\n        'papermill~=0.16',\n        'graphviz',\n        'bumpversion',\n        'sphinx',\n        'sphinxcontrib-bibtex',\n        'sphinxcontrib-napoleon',\n        'sphinx_rtd_theme',\n        'nbsphinx',\n        'sphinx-issues',\n        'm2r',\n        'jsonpatch',\n        'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now\n        'pre-commit',\n        'black;python_version>=\"3.6\"',  # Black is Python3 only\n        'twine',\n    ],\n}\nextras_require['complete'] = sorted(set(sum(extras_require.values(), [])))\n\n\ndef _is_test_pypi():\n    \"\"\"\n    Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and\n    set to true (c.f. .travis.yml)\n\n    The use_scm_version kwarg accepts a callable for the local_scheme\n    configuration parameter with argument \"version\". This can be replaced\n    with a lambda as the desired version structure is {next_version}.dev{distance}\n    c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy\n\n    As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version\n    controlled through bumpversion is used.\n    \"\"\"\n    from os import getenv\n\n    return (\n        {'local_scheme': lambda version: ''}\n        if getenv('TESTPYPI_UPLOAD') == 'true'\n        else False\n    )\n\n\nsetup(\n    name='pyhf',\n    version='0.1.0',\n    description='(partial) pure python histfactory implementation',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/diana-hep/pyhf',\n    author='Lukas Heinrich',\n    author_email='lukas.heinrich@cern.ch',\n    license='Apache',\n    keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',\n    classifiers=[\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    packages=find_packages(),\n    include_package_data=True,\n    python_requires=\">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*\",\n    install_requires=[\n        'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet\n        'click>=6.0',  # for console scripts,\n        'tqdm',  # for readxml\n        'six',  # for modifiers\n        'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6\n        'jsonpatch',\n    ],\n    extras_require=extras_require,\n    entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},\n    dependency_links=[],\n    use_scm_version=_is_test_pypi(),\n)\n", "path": "setup.py"}]}