prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  docs: make links equally browsable on both GitHub and ReadTheDocs
  Once upstream bug https://github.com/readthedocs/recommonmark/issues/179 is fixed, we can replace the `.html` part in links of the form `file_name.html#anchor` with `.md`.
  
  This is a followup to https://github.com/zulip/zulip/pull/13232.
  
  </issue>
  <code>
  [start of version.py]
  1 import os
  2 
  3 ZULIP_VERSION = "5.0-dev+git"
  4 
  5 # Add information on number of commits and commit hash to version, if available
  6 zulip_git_version_file = os.path.join(
  7     os.path.dirname(os.path.abspath(__file__)), "zulip-git-version"
  8 )
  9 lines = [ZULIP_VERSION, ""]
  10 if os.path.exists(zulip_git_version_file):
  11     with open(zulip_git_version_file) as f:
  12         lines = f.readlines() + ["", ""]
  13 ZULIP_VERSION = lines.pop(0).strip()
  14 ZULIP_MERGE_BASE = lines.pop(0).strip()
  15 
  16 LATEST_MAJOR_VERSION = "4.0"
  17 LATEST_RELEASE_VERSION = "4.10"
  18 LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.com/2021/05/13/zulip-4-0-released/"
  19 
  20 # Versions of the desktop app below DESKTOP_MINIMUM_VERSION will be
  21 # prevented from connecting to the Zulip server.  Versions above
  22 # DESKTOP_MINIMUM_VERSION but below DESKTOP_WARNING_VERSION will have
  23 # a banner at the top of the page asking the user to upgrade.
  24 DESKTOP_MINIMUM_VERSION = "5.2.0"
  25 DESKTOP_WARNING_VERSION = "5.4.3"
  26 
  27 # Bump the API_FEATURE_LEVEL whenever an API change is made
  28 # that clients might want to condition on.  If we forget at
  29 # the time we make the change, then bump it later as soon
  30 # as we notice; clients using API_FEATURE_LEVEL will just not
  31 # use the new feature/API until the bump.
  32 #
  33 # Changes should be accompanied by documentation explaining what the
  34 # new level means in templates/zerver/api/changelog.md, as well as
  35 # "**Changes**" entries in the endpoint's documentation in `zulip.yaml`.
  36 API_FEATURE_LEVEL = 117
  37 
  38 # Bump the minor PROVISION_VERSION to indicate that folks should provision
  39 # only when going from an old version of the code to a newer version. Bump
  40 # the major version to indicate that folks should provision in both
  41 # directions.
  42 
  43 # Typically,
  44 # * adding a dependency only requires a minor version bump;
  45 # * removing a dependency requires a major version bump;
  46 # * upgrading a dependency requires a major version bump, unless the
  47 #   upgraded dependency is backwards compatible with all of our
  48 #   historical commits sharing the same major version, in which case a
  49 #   minor version bump suffices.
  50 
  51 PROVISION_VERSION = "179.0"
  52
  [end of version.py]
  [start of docs/conf.py]
  1 # For documentation on Sphinx configuration options, see:
  2 # https://www.sphinx-doc.org/en/master/usage/configuration.html
  3 # https://myst-parser.readthedocs.io/en/latest/sphinx/reference.html
  4 # https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html
  5 
  6 import os
  7 import sys
  8 from typing import Any
  9 
  10 sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
  11 from version import LATEST_RELEASE_VERSION, ZULIP_VERSION
  12 
  13 on_rtd = os.environ.get("READTHEDOCS") == "True"
  14 
  15 # General configuration
  16 
  17 extensions = [
  18     "myst_parser",
  19     "sphinx_rtd_theme",
  20 ]
  21 templates_path = ["_templates"]
  22 project = "Zulip"
  23 copyright = "2012–2015 Dropbox, Inc., 2015–2021 Kandra Labs, Inc., and contributors"
  24 author = "The Zulip Team"
  25 version = ZULIP_VERSION
  26 release = ZULIP_VERSION
  27 exclude_patterns = ["_build", "README.md"]
  28 suppress_warnings = [
  29     "myst.header",
  30 ]
  31 pygments_style = "sphinx"
  32 
  33 # Options for Markdown parser
  34 
  35 myst_enable_extensions = [
  36     "colon_fence",
  37     "substitution",
  38 ]
  39 myst_substitutions = {
  40     "LATEST_RELEASE_VERSION": LATEST_RELEASE_VERSION,
  41 }
  42 
  43 # Options for HTML output
  44 
  45 html_theme = "sphinx_rtd_theme"
  46 html_theme_options = {
  47     "collapse_navigation": not on_rtd,  # makes local builds much faster
  48     "logo_only": True,
  49 }
  50 html_logo = "images/zulip-logo.svg"
  51 html_static_path = ["_static"]
  52 
  53 
  54 def setup(app: Any) -> None:
  55     # overrides for wide tables in RTD theme
  56     app.add_css_file("theme_overrides.css")  # path relative to _static
  57
  [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
  @@ -36,6 +36,7 @@
       "colon_fence",
       "substitution",
   ]
  +myst_heading_anchors = 6
   myst_substitutions = {
       "LATEST_RELEASE_VERSION": LATEST_RELEASE_VERSION,
   }
  diff --git a/version.py b/version.py
  --- a/version.py
  +++ b/version.py
  @@ -48,4 +48,4 @@
   #   historical commits sharing the same major version, in which case a
   #   minor version bump suffices.
   
  -PROVISION_VERSION = "179.0"
  +PROVISION_VERSION = "180.0"
  
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@@ -36,6 +36,7 @@\n     \"colon_fence\",\n     \"substitution\",\n ]\n+myst_heading_anchors = 6\n myst_substitutions = {\n     \"LATEST_RELEASE_VERSION\": LATEST_RELEASE_VERSION,\n }\ndiff --git a/version.py b/version.py\n--- a/version.py\n+++ b/version.py\n@@ -48,4 +48,4 @@\n #   historical commits sharing the same major version, in which case a\n #   minor version bump suffices.\n \n-PROVISION_VERSION = \"179.0\"\n+PROVISION_VERSION = \"180.0\"\n", "issue": "docs: make links equally browsable on both GitHub and ReadTheDocs\nOnce upstream bug https://github.com/readthedocs/recommonmark/issues/179 is fixed, we can replace the `.html` part in links of the form `file_name.html#anchor` with `.md`.\r\n\r\nThis is a followup to https://github.com/zulip/zulip/pull/13232.\n", "before_files": [{"content": "import os\n\nZULIP_VERSION = \"5.0-dev+git\"\n\n# Add information on number of commits and commit hash to version, if available\nzulip_git_version_file = os.path.join(\n    os.path.dirname(os.path.abspath(__file__)), \"zulip-git-version\"\n)\nlines = [ZULIP_VERSION, \"\"]\nif os.path.exists(zulip_git_version_file):\n    with open(zulip_git_version_file) as f:\n        lines = f.readlines() + [\"\", \"\"]\nZULIP_VERSION = lines.pop(0).strip()\nZULIP_MERGE_BASE = lines.pop(0).strip()\n\nLATEST_MAJOR_VERSION = \"4.0\"\nLATEST_RELEASE_VERSION = \"4.10\"\nLATEST_RELEASE_ANNOUNCEMENT = \"https://blog.zulip.com/2021/05/13/zulip-4-0-released/\"\n\n# Versions of the desktop app below DESKTOP_MINIMUM_VERSION will be\n# prevented from connecting to the Zulip server.  Versions above\n# DESKTOP_MINIMUM_VERSION but below DESKTOP_WARNING_VERSION will have\n# a banner at the top of the page asking the user to upgrade.\nDESKTOP_MINIMUM_VERSION = \"5.2.0\"\nDESKTOP_WARNING_VERSION = \"5.4.3\"\n\n# Bump the API_FEATURE_LEVEL whenever an API change is made\n# that clients might want to condition on.  If we forget at\n# the time we make the change, then bump it later as soon\n# as we notice; clients using API_FEATURE_LEVEL will just not\n# use the new feature/API until the bump.\n#\n# Changes should be accompanied by documentation explaining what the\n# new level means in templates/zerver/api/changelog.md, as well as\n# \"**Changes**\" entries in the endpoint's documentation in `zulip.yaml`.\nAPI_FEATURE_LEVEL = 117\n\n# Bump the minor PROVISION_VERSION to indicate that folks should provision\n# only when going from an old version of the code to a newer version. Bump\n# the major version to indicate that folks should provision in both\n# directions.\n\n# Typically,\n# * adding a dependency only requires a minor version bump;\n# * removing a dependency requires a major version bump;\n# * upgrading a dependency requires a major version bump, unless the\n#   upgraded dependency is backwards compatible with all of our\n#   historical commits sharing the same major version, in which case a\n#   minor version bump suffices.\n\nPROVISION_VERSION = \"179.0\"\n", "path": "version.py"}, {"content": "# For documentation on Sphinx configuration options, see:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n# https://myst-parser.readthedocs.io/en/latest/sphinx/reference.html\n# https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html\n\nimport os\nimport sys\nfrom typing import Any\n\nsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), \"..\")))\nfrom version import LATEST_RELEASE_VERSION, ZULIP_VERSION\n\non_rtd = os.environ.get(\"READTHEDOCS\") == \"True\"\n\n# General configuration\n\nextensions = [\n    \"myst_parser\",\n    \"sphinx_rtd_theme\",\n]\ntemplates_path = [\"_templates\"]\nproject = \"Zulip\"\ncopyright = \"2012\u20132015 Dropbox, Inc., 2015\u20132021 Kandra Labs, Inc., and contributors\"\nauthor = \"The Zulip Team\"\nversion = ZULIP_VERSION\nrelease = ZULIP_VERSION\nexclude_patterns = [\"_build\", \"README.md\"]\nsuppress_warnings = [\n    \"myst.header\",\n]\npygments_style = \"sphinx\"\n\n# Options for Markdown parser\n\nmyst_enable_extensions = [\n    \"colon_fence\",\n    \"substitution\",\n]\nmyst_substitutions = {\n    \"LATEST_RELEASE_VERSION\": LATEST_RELEASE_VERSION,\n}\n\n# Options for HTML output\n\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_options = {\n    \"collapse_navigation\": not on_rtd,  # makes local builds much faster\n    \"logo_only\": True,\n}\nhtml_logo = \"images/zulip-logo.svg\"\nhtml_static_path = [\"_static\"]\n\n\ndef setup(app: Any) -> None:\n    # overrides for wide tables in RTD theme\n    app.add_css_file(\"theme_overrides.css\")  # path relative to _static\n", "path": "docs/conf.py"}]}