prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Explain "PRAW is not thread safe" in the documentation.
  It would be great to provide an example of why it is not thread safe.
  
  Relevant comment:
  
  https://www.reddit.com/r/redditdev/comments/63ugl5/praw_mulitprocessing_handler_prawhandler_is_not_a/dfx9oet/?context=3
  
  </issue>
  <code>
  [start of setup.py]
  1 """praw setup.py"""
  2 
  3 import re
  4 from codecs import open
  5 from os import path
  6 from setuptools import find_packages, setup
  7 
  8 
  9 PACKAGE_NAME = 'praw'
  10 HERE = path.abspath(path.dirname(__file__))
  11 with open(path.join(HERE, 'README.rst'), encoding='utf-8') as fp:
  12     README = fp.read()
  13 with open(path.join(HERE, PACKAGE_NAME, 'const.py'),
  14           encoding='utf-8') as fp:
  15     VERSION = re.search("__version__ = '([^']+)'", fp.read()).group(1)
  16 
  17 
  18 setup(name=PACKAGE_NAME,
  19       author='Bryce Boe',
  20       author_email='bbzbryce@gmail.com',
  21       classifiers=[
  22           'Development Status :: 5 - Production/Stable',
  23           'Environment :: Console',
  24           'Intended Audience :: Developers',
  25           'License :: OSI Approved :: BSD License',
  26           'Natural Language :: English',
  27           'Operating System :: OS Independent',
  28           'Programming Language :: Python',
  29           'Programming Language :: Python :: 2.7',
  30           'Programming Language :: Python :: 3',
  31           'Programming Language :: Python :: 3.3',
  32           'Programming Language :: Python :: 3.4',
  33           'Programming Language :: Python :: 3.5',
  34           'Programming Language :: Python :: 3.6',
  35           'Programming Language :: Python :: Implementation :: CPython',
  36           'Topic :: Utilities'],
  37       description=('PRAW, an acronym for `Python Reddit API Wrapper`, is a '
  38                    'python package that allows for simple access to '
  39                    'reddit\'s API.'),
  40       install_requires=['prawcore >=0.9.0, <0.10',
  41                         'update_checker >=0.16'],
  42       keywords='reddit api wrapper',
  43       license='Simplified BSD License',
  44       long_description=README,
  45       package_data={'': ['LICENSE.txt'], PACKAGE_NAME: ['*.ini']},
  46       packages=find_packages(exclude=['tests', 'tests.*']),
  47       setup_requires=['pytest-runner >=2.1'],
  48       tests_require=['betamax >=0.8, <0.9',
  49                      'betamax-matchers >=0.3.0, <0.4',
  50                      'betamax-serializers >=0.2, <0.3',
  51                      'mock >=0.8',
  52                      'pytest >=2.7.3',
  53                      'six >=1.10'],
  54       test_suite='tests',
  55       url='https://praw.readthedocs.org/',
  56       version=VERSION)
  57
  [end of setup.py]
  [start of docs/conf.py]
  1 import os
  2 import sys
  3 sys.path.insert(0, '..')
  4 
  5 from praw import __version__
  6 
  7 copyright = '2016, Bryce Boe'
  8 exclude_patterns = ['_build']
  9 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
  10 html_static_path = ['_static']
  11 html_theme = 'sphinx_rtd_theme'
  12 html_theme_options = {
  13     'collapse_navigation': True
  14 }
  15 html_use_smartypants = True
  16 htmlhelp_basename = 'PRAW'
  17 intersphinx_mapping = {'python': ('https://docs.python.org/3.6', None)}
  18 master_doc = 'index'
  19 nitpicky = True
  20 project = 'PRAW'
  21 pygments_style = 'sphinx'
  22 release = __version__
  23 source_suffix = '.rst'
  24 suppress_warnings = ['image.nonlocal_uri']
  25 version = '.'.join(__version__.split('.', 2)[:2])
  26 
  27 
  28 # Use RTD theme locally
  29 if not os.environ.get('READTHEDOCS'):
  30     import sphinx_rtd_theme
  31     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  32 
  33 
  34 def skip(app, what, name, obj, skip, options):
  35     if name in {'__call__', '__contains__', '__getitem__', '__init__',
  36                 '__iter__', '__len__'}:
  37         return False
  38     return skip
  39 
  40 
  41 def setup(app):
  42     app.connect('autodoc-skip-member', skip)
  43
  [end of docs/conf.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/docs/conf.py b/docs/conf.py
  --- a/docs/conf.py
  +++ b/docs/conf.py
  @@ -4,7 +4,7 @@
   
   from praw import __version__
   
  -copyright = '2016, Bryce Boe'
  +copyright = '2017, Bryce Boe'
   exclude_patterns = ['_build']
   extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
   html_static_path = ['_static']
  diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -37,7 +37,7 @@
         description=('PRAW, an acronym for `Python Reddit API Wrapper`, is a '
                      'python package that allows for simple access to '
                      'reddit\'s API.'),
  -      install_requires=['prawcore >=0.9.0, <0.10',
  +      install_requires=['prawcore >=0.10.1, <0.11',
                           'update_checker >=0.16'],
         keywords='reddit api wrapper',
         license='Simplified BSD License',
  
verification_info: {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -4,7 +4,7 @@\n \n from praw import __version__\n \n-copyright = '2016, Bryce Boe'\n+copyright = '2017, Bryce Boe'\n exclude_patterns = ['_build']\n extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']\n html_static_path = ['_static']\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,7 +37,7 @@\n       description=('PRAW, an acronym for `Python Reddit API Wrapper`, is a '\n                    'python package that allows for simple access to '\n                    'reddit\\'s API.'),\n-      install_requires=['prawcore >=0.9.0, <0.10',\n+      install_requires=['prawcore >=0.10.1, <0.11',\n                         'update_checker >=0.16'],\n       keywords='reddit api wrapper',\n       license='Simplified BSD License',\n", "issue": "Explain \"PRAW is not thread safe\" in the documentation.\nIt would be great to provide an example of why it is not thread safe.\r\n\r\nRelevant comment:\r\n\r\nhttps://www.reddit.com/r/redditdev/comments/63ugl5/praw_mulitprocessing_handler_prawhandler_is_not_a/dfx9oet/?context=3\n", "before_files": [{"content": "\"\"\"praw setup.py\"\"\"\n\nimport re\nfrom codecs import open\nfrom os import path\nfrom setuptools import find_packages, setup\n\n\nPACKAGE_NAME = 'praw'\nHERE = path.abspath(path.dirname(__file__))\nwith open(path.join(HERE, 'README.rst'), encoding='utf-8') as fp:\n    README = fp.read()\nwith open(path.join(HERE, PACKAGE_NAME, 'const.py'),\n          encoding='utf-8') as fp:\n    VERSION = re.search(\"__version__ = '([^']+)'\", fp.read()).group(1)\n\n\nsetup(name=PACKAGE_NAME,\n      author='Bryce Boe',\n      author_email='bbzbryce@gmail.com',\n      classifiers=[\n          'Development Status :: 5 - Production/Stable',\n          'Environment :: Console',\n          'Intended Audience :: Developers',\n          'License :: OSI Approved :: BSD License',\n          'Natural Language :: English',\n          'Operating System :: OS Independent',\n          'Programming Language :: Python',\n          'Programming Language :: Python :: 2.7',\n          'Programming Language :: Python :: 3',\n          'Programming Language :: Python :: 3.3',\n          'Programming Language :: Python :: 3.4',\n          'Programming Language :: Python :: 3.5',\n          'Programming Language :: Python :: 3.6',\n          'Programming Language :: Python :: Implementation :: CPython',\n          'Topic :: Utilities'],\n      description=('PRAW, an acronym for `Python Reddit API Wrapper`, is a '\n                   'python package that allows for simple access to '\n                   'reddit\\'s API.'),\n      install_requires=['prawcore >=0.9.0, <0.10',\n                        'update_checker >=0.16'],\n      keywords='reddit api wrapper',\n      license='Simplified BSD License',\n      long_description=README,\n      package_data={'': ['LICENSE.txt'], PACKAGE_NAME: ['*.ini']},\n      packages=find_packages(exclude=['tests', 'tests.*']),\n      setup_requires=['pytest-runner >=2.1'],\n      tests_require=['betamax >=0.8, <0.9',\n                     'betamax-matchers >=0.3.0, <0.4',\n                     'betamax-serializers >=0.2, <0.3',\n                     'mock >=0.8',\n                     'pytest >=2.7.3',\n                     'six >=1.10'],\n      test_suite='tests',\n      url='https://praw.readthedocs.org/',\n      version=VERSION)\n", "path": "setup.py"}, {"content": "import os\nimport sys\nsys.path.insert(0, '..')\n\nfrom praw import __version__\n\ncopyright = '2016, Bryce Boe'\nexclude_patterns = ['_build']\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']\nhtml_static_path = ['_static']\nhtml_theme = 'sphinx_rtd_theme'\nhtml_theme_options = {\n    'collapse_navigation': True\n}\nhtml_use_smartypants = True\nhtmlhelp_basename = 'PRAW'\nintersphinx_mapping = {'python': ('https://docs.python.org/3.6', None)}\nmaster_doc = 'index'\nnitpicky = True\nproject = 'PRAW'\npygments_style = 'sphinx'\nrelease = __version__\nsource_suffix = '.rst'\nsuppress_warnings = ['image.nonlocal_uri']\nversion = '.'.join(__version__.split('.', 2)[:2])\n\n\n# Use RTD theme locally\nif not os.environ.get('READTHEDOCS'):\n    import sphinx_rtd_theme\n    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n\ndef skip(app, what, name, obj, skip, options):\n    if name in {'__call__', '__contains__', '__getitem__', '__init__',\n                '__iter__', '__len__'}:\n        return False\n    return skip\n\n\ndef setup(app):\n    app.connect('autodoc-skip-member', skip)\n", "path": "docs/conf.py"}]}