prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Change "Edit" to "Manage" in "Your Projects"
  Change the button/link text "Edit" to "Manage" in "Your Projects".
  
  From IRC conversation with @alanbato, @ewdurbin and @nlhkabu .
  
  ~~~
  <EWDurbin> I think perhaps “Manage” might be a better name for the button that currently says “Edit"
  <EWDurbin> Just right off the bat. Since well you can’t really Edit anything, just delete files/releases/projects
  <di_codes> ^ agreed
  <alanbato> Makes sense to me, Edit misguides people into thinking they can change project attributes imho
  <nlh> yep 100% agree
  <sumanah> nlh: and I agree with them but I want to hear your thoughts -- you're the one who's done user testing, so do you think people would understand "manage"?
  <nlh> i'll open a PR :)
  <nlh> yes
  <sumanah> thanks nlh!
  <nlh> it's also more consistent with the URL structure
  ~~~
  
  But I do not see a pull request from Nicole yet, so I declare this a:
  
  **Good First Issue**: This issue is good for first time contributors. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our [Getting Started Guide](https://warehouse.pypa.io/development/getting-started/). If you are working on this issue and have questions, please feel free to ask them here, in [`#pypa-dev` on Freenode](https://webchat.freenode.net/?channels=%23pypa-dev), or on the [pypa-dev mailing list](https://groups.google.com/forum/#!forum/pypa-dev).
  Fix for #3118
  Fixes #3118.
  
  Updated the projects.html and the relating sass snippet to show **manage** in stead of **edit** when in **Your projects**.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `warehouse/packaging/views.py`
  Content:
  ```
  1 # Licensed under the Apache License, Version 2.0 (the "License");
  2 # you may not use this file except in compliance with the License.
  3 # You may obtain a copy of the License at
  4 #
  5 # http://www.apache.org/licenses/LICENSE-2.0
  6 #
  7 # Unless required by applicable law or agreed to in writing, software
  8 # distributed under the License is distributed on an "AS IS" BASIS,
  9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10 # See the License for the specific language governing permissions and
  11 # limitations under the License.
  12 
  13 from first import first
  14 from pyramid.httpexceptions import HTTPMovedPermanently, HTTPNotFound
  15 from pyramid.view import view_config
  16 from sqlalchemy.orm.exc import NoResultFound
  17 
  18 from warehouse.accounts.models import User
  19 from warehouse.cache.origin import origin_cache
  20 from warehouse.packaging.models import Release, Role
  21 
  22 
  23 @view_config(
  24     route_name="packaging.project",
  25     renderer="packaging/detail.html",
  26     decorator=[
  27         origin_cache(
  28             1 * 24 * 60 * 60,                         # 1 day
  29             stale_while_revalidate=1 * 24 * 60 * 60,  # 1 day
  30             stale_if_error=5 * 24 * 60 * 60,          # 5 days
  31         ),
  32     ],
  33 )
  34 def project_detail(project, request):
  35     if project.name != request.matchdict.get("name", project.name):
  36         return HTTPMovedPermanently(
  37             request.current_route_path(name=project.name),
  38         )
  39 
  40     try:
  41         release = (
  42             request.db.query(Release)
  43                       .filter(Release.project == project)
  44                       .order_by(
  45                           Release.is_prerelease.nullslast(),
  46                           Release._pypi_ordering.desc())
  47                       .limit(1)
  48                       .one()
  49         )
  50     except NoResultFound:
  51         return HTTPNotFound()
  52 
  53     return release_detail(release, request)
  54 
  55 
  56 @view_config(
  57     route_name="packaging.release",
  58     renderer="packaging/detail.html",
  59     decorator=[
  60         origin_cache(
  61             1 * 24 * 60 * 60,                         # 1 day
  62             stale_while_revalidate=1 * 24 * 60 * 60,  # 1 day
  63             stale_if_error=5 * 24 * 60 * 60,          # 5 days
  64         ),
  65     ],
  66 )
  67 def release_detail(release, request):
  68     project = release.project
  69 
  70     if not {project.name, release.version} <= set(request.matchdict.values()):
  71         return HTTPMovedPermanently(
  72             request.current_route_path(
  73                 name=project.name, version=release.version,
  74             ),
  75         )
  76 
  77     # Get all of the registered versions for this Project, in order of newest
  78     # to oldest.
  79     all_releases = (
  80         request.db.query(Release)
  81                   .filter(Release.project == project)
  82                   .with_entities(
  83                       Release.version,
  84                       Release.is_prerelease,
  85                       Release.created)
  86                   .order_by(Release._pypi_ordering.desc())
  87                   .all()
  88     )
  89 
  90     # Get the latest non-prerelease of this Project, or the latest release if
  91     # all releases are prereleases.
  92     latest_release = first(
  93         all_releases,
  94         key=lambda r: not r.is_prerelease,
  95         default=all_releases[0],
  96     )
  97 
  98     # Get all of the maintainers for this project.
  99     maintainers = [
  100         r.user
  101         for r in (
  102             request.db.query(Role)
  103             .join(User)
  104             .filter(Role.project == project)
  105             .distinct(User.username)
  106             .order_by(User.username)
  107             .all()
  108         )
  109     ]
  110 
  111     # Get the license from the classifiers or metadata, preferring classifiers.
  112     license = None
  113     if release.license:
  114         # Make a best effort when the entire license text is given
  115         # by using the first line only.
  116         license = release.license.split('\n')[0]
  117     license_classifiers = [c.split(" :: ")[-1] for c in release.classifiers
  118                            if c.startswith("License")]
  119     if license_classifiers:
  120         license = ', '.join(license_classifiers)
  121 
  122     return {
  123         "project": project,
  124         "release": release,
  125         "files": release.files.all(),
  126         "latest_release": latest_release,
  127         "all_releases": all_releases,
  128         "maintainers": maintainers,
  129         "license": license,
  130     }
  131 
  132 
  133 @view_config(
  134     route_name="includes.edit-project-button",
  135     renderer="includes/edit-project-button.html",
  136     uses_session=True,
  137     permission="manage",
  138 )
  139 def edit_project_button(project, request):
  140     return {'project': project}
  141
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/warehouse/packaging/views.py b/warehouse/packaging/views.py
  --- a/warehouse/packaging/views.py
  +++ b/warehouse/packaging/views.py
  @@ -132,7 +132,7 @@
   
   @view_config(
       route_name="includes.edit-project-button",
  -    renderer="includes/edit-project-button.html",
  +    renderer="includes/manage-project-button.html",
       uses_session=True,
       permission="manage",
   )
  
verification_info: {"golden_diff": "diff --git a/warehouse/packaging/views.py b/warehouse/packaging/views.py\n--- a/warehouse/packaging/views.py\n+++ b/warehouse/packaging/views.py\n@@ -132,7 +132,7 @@\n \n @view_config(\n     route_name=\"includes.edit-project-button\",\n-    renderer=\"includes/edit-project-button.html\",\n+    renderer=\"includes/manage-project-button.html\",\n     uses_session=True,\n     permission=\"manage\",\n )\n", "issue": "Change \"Edit\" to \"Manage\" in \"Your Projects\"\nChange the button/link text \"Edit\" to \"Manage\" in \"Your Projects\".\r\n\r\nFrom IRC conversation with @alanbato, @ewdurbin and @nlhkabu .\r\n\r\n~~~\r\n<EWDurbin> I think perhaps \u201cManage\u201d might be a better name for the button that currently says \u201cEdit\"\r\n<EWDurbin> Just right off the bat. Since well you can\u2019t really Edit anything, just delete files/releases/projects\r\n<di_codes> ^ agreed\r\n<alanbato> Makes sense to me, Edit misguides people into thinking they can change project attributes imho\r\n<nlh> yep 100% agree\r\n<sumanah> nlh: and I agree with them but I want to hear your thoughts -- you're the one who's done user testing, so do you think people would understand \"manage\"?\r\n<nlh> i'll open a PR :)\r\n<nlh> yes\r\n<sumanah> thanks nlh!\r\n<nlh> it's also more consistent with the URL structure\r\n~~~\r\n\r\nBut I do not see a pull request from Nicole yet, so I declare this a:\r\n\r\n**Good First Issue**: This issue is good for first time contributors. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our [Getting Started Guide](https://warehouse.pypa.io/development/getting-started/). If you are working on this issue and have questions, please feel free to ask them here, in [`#pypa-dev` on Freenode](https://webchat.freenode.net/?channels=%23pypa-dev), or on the [pypa-dev mailing list](https://groups.google.com/forum/#!forum/pypa-dev).\nFix for #3118\nFixes #3118.\r\n\r\nUpdated the projects.html and the relating sass snippet to show **manage** in stead of **edit** when in **Your projects**.\n", "before_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom first import first\nfrom pyramid.httpexceptions import HTTPMovedPermanently, HTTPNotFound\nfrom pyramid.view import view_config\nfrom sqlalchemy.orm.exc import NoResultFound\n\nfrom warehouse.accounts.models import User\nfrom warehouse.cache.origin import origin_cache\nfrom warehouse.packaging.models import Release, Role\n\n\n@view_config(\n    route_name=\"packaging.project\",\n    renderer=\"packaging/detail.html\",\n    decorator=[\n        origin_cache(\n            1 * 24 * 60 * 60,                         # 1 day\n            stale_while_revalidate=1 * 24 * 60 * 60,  # 1 day\n            stale_if_error=5 * 24 * 60 * 60,          # 5 days\n        ),\n    ],\n)\ndef project_detail(project, request):\n    if project.name != request.matchdict.get(\"name\", project.name):\n        return HTTPMovedPermanently(\n            request.current_route_path(name=project.name),\n        )\n\n    try:\n        release = (\n            request.db.query(Release)\n                      .filter(Release.project == project)\n                      .order_by(\n                          Release.is_prerelease.nullslast(),\n                          Release._pypi_ordering.desc())\n                      .limit(1)\n                      .one()\n        )\n    except NoResultFound:\n        return HTTPNotFound()\n\n    return release_detail(release, request)\n\n\n@view_config(\n    route_name=\"packaging.release\",\n    renderer=\"packaging/detail.html\",\n    decorator=[\n        origin_cache(\n            1 * 24 * 60 * 60,                         # 1 day\n            stale_while_revalidate=1 * 24 * 60 * 60,  # 1 day\n            stale_if_error=5 * 24 * 60 * 60,          # 5 days\n        ),\n    ],\n)\ndef release_detail(release, request):\n    project = release.project\n\n    if not {project.name, release.version} <= set(request.matchdict.values()):\n        return HTTPMovedPermanently(\n            request.current_route_path(\n                name=project.name, version=release.version,\n            ),\n        )\n\n    # Get all of the registered versions for this Project, in order of newest\n    # to oldest.\n    all_releases = (\n        request.db.query(Release)\n                  .filter(Release.project == project)\n                  .with_entities(\n                      Release.version,\n                      Release.is_prerelease,\n                      Release.created)\n                  .order_by(Release._pypi_ordering.desc())\n                  .all()\n    )\n\n    # Get the latest non-prerelease of this Project, or the latest release if\n    # all releases are prereleases.\n    latest_release = first(\n        all_releases,\n        key=lambda r: not r.is_prerelease,\n        default=all_releases[0],\n    )\n\n    # Get all of the maintainers for this project.\n    maintainers = [\n        r.user\n        for r in (\n            request.db.query(Role)\n            .join(User)\n            .filter(Role.project == project)\n            .distinct(User.username)\n            .order_by(User.username)\n            .all()\n        )\n    ]\n\n    # Get the license from the classifiers or metadata, preferring classifiers.\n    license = None\n    if release.license:\n        # Make a best effort when the entire license text is given\n        # by using the first line only.\n        license = release.license.split('\\n')[0]\n    license_classifiers = [c.split(\" :: \")[-1] for c in release.classifiers\n                           if c.startswith(\"License\")]\n    if license_classifiers:\n        license = ', '.join(license_classifiers)\n\n    return {\n        \"project\": project,\n        \"release\": release,\n        \"files\": release.files.all(),\n        \"latest_release\": latest_release,\n        \"all_releases\": all_releases,\n        \"maintainers\": maintainers,\n        \"license\": license,\n    }\n\n\n@view_config(\n    route_name=\"includes.edit-project-button\",\n    renderer=\"includes/edit-project-button.html\",\n    uses_session=True,\n    permission=\"manage\",\n)\ndef edit_project_button(project, request):\n    return {'project': project}\n", "path": "warehouse/packaging/views.py"}], "after_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom first import first\nfrom pyramid.httpexceptions import HTTPMovedPermanently, HTTPNotFound\nfrom pyramid.view import view_config\nfrom sqlalchemy.orm.exc import NoResultFound\n\nfrom warehouse.accounts.models import User\nfrom warehouse.cache.origin import origin_cache\nfrom warehouse.packaging.models import Release, Role\n\n\n@view_config(\n    route_name=\"packaging.project\",\n    renderer=\"packaging/detail.html\",\n    decorator=[\n        origin_cache(\n            1 * 24 * 60 * 60,                         # 1 day\n            stale_while_revalidate=1 * 24 * 60 * 60,  # 1 day\n            stale_if_error=5 * 24 * 60 * 60,          # 5 days\n        ),\n    ],\n)\ndef project_detail(project, request):\n    if project.name != request.matchdict.get(\"name\", project.name):\n        return HTTPMovedPermanently(\n            request.current_route_path(name=project.name),\n        )\n\n    try:\n        release = (\n            request.db.query(Release)\n                      .filter(Release.project == project)\n                      .order_by(\n                          Release.is_prerelease.nullslast(),\n                          Release._pypi_ordering.desc())\n                      .limit(1)\n                      .one()\n        )\n    except NoResultFound:\n        return HTTPNotFound()\n\n    return release_detail(release, request)\n\n\n@view_config(\n    route_name=\"packaging.release\",\n    renderer=\"packaging/detail.html\",\n    decorator=[\n        origin_cache(\n            1 * 24 * 60 * 60,                         # 1 day\n            stale_while_revalidate=1 * 24 * 60 * 60,  # 1 day\n            stale_if_error=5 * 24 * 60 * 60,          # 5 days\n        ),\n    ],\n)\ndef release_detail(release, request):\n    project = release.project\n\n    if not {project.name, release.version} <= set(request.matchdict.values()):\n        return HTTPMovedPermanently(\n            request.current_route_path(\n                name=project.name, version=release.version,\n            ),\n        )\n\n    # Get all of the registered versions for this Project, in order of newest\n    # to oldest.\n    all_releases = (\n        request.db.query(Release)\n                  .filter(Release.project == project)\n                  .with_entities(\n                      Release.version,\n                      Release.is_prerelease,\n                      Release.created)\n                  .order_by(Release._pypi_ordering.desc())\n                  .all()\n    )\n\n    # Get the latest non-prerelease of this Project, or the latest release if\n    # all releases are prereleases.\n    latest_release = first(\n        all_releases,\n        key=lambda r: not r.is_prerelease,\n        default=all_releases[0],\n    )\n\n    # Get all of the maintainers for this project.\n    maintainers = [\n        r.user\n        for r in (\n            request.db.query(Role)\n            .join(User)\n            .filter(Role.project == project)\n            .distinct(User.username)\n            .order_by(User.username)\n            .all()\n        )\n    ]\n\n    # Get the license from the classifiers or metadata, preferring classifiers.\n    license = None\n    if release.license:\n        # Make a best effort when the entire license text is given\n        # by using the first line only.\n        license = release.license.split('\\n')[0]\n    license_classifiers = [c.split(\" :: \")[-1] for c in release.classifiers\n                           if c.startswith(\"License\")]\n    if license_classifiers:\n        license = ', '.join(license_classifiers)\n\n    return {\n        \"project\": project,\n        \"release\": release,\n        \"files\": release.files.all(),\n        \"latest_release\": latest_release,\n        \"all_releases\": all_releases,\n        \"maintainers\": maintainers,\n        \"license\": license,\n    }\n\n\n@view_config(\n    route_name=\"includes.edit-project-button\",\n    renderer=\"includes/manage-project-button.html\",\n    uses_session=True,\n    permission=\"manage\",\n)\ndef edit_project_button(project, request):\n    return {'project': project}\n", "path": "warehouse/packaging/views.py"}]}