prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Remove all warnings from pytest
  When running `tox` we see these warnings in the summary.
  
  We should use `request` fixture and access to `request.config` instead.
  
  Docs: https://docs.pytest.org/en/latest/fixture.html#request-context
  Change log: https://docs.pytest.org/en/latest/deprecations.html#pytest-config-global
  
  
  ```
  ====================================================================================== warnings summary ======================================================================================
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs_index
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs_index_no_directory_urls
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs_no_directory_urls
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_and_page
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_and_page_htmldir
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_and_page_signlehtml
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_htmldir
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_singlehtml
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_only
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_only_htmldir
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_only_singlehtml
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_restructured_text
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_restructured_text_invalid
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_and_page
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_and_page_htmldir
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_and_page_singlehtml
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_htmldir
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_singlehtml
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_only
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_only_htmldir
  readthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_only_singlehtml
    /home/humitos/rtfd/code/readthedocs-corporate/.tox/py36/readthedocs.org/readthedocs/rtd_tests/tests/test_core_tags.py:19: PytestDeprecationWarning: the `pytest.config` global is deprecated.  Please use `request.config` or `pytest_configure` (if you're a pytest plugin) instead.
      scheme=pytest.config.option.url_scheme,
  
  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `conftest.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 import pytest
  3 from django.conf import settings
  4 from rest_framework.test import APIClient
  5 
  6 try:
  7     # TODO: this file is read/executed even when called from ``readthedocsinc``,
  8     # so it's overriding the options that we are defining in the ``conftest.py``
  9     # from the corporate site. We need to find a better way to avoid this.
  10     import readthedocsinc
  11     PYTEST_OPTIONS = ()
  12 except ImportError:
  13     PYTEST_OPTIONS = (
  14         # Options to set test environment
  15         ('community', True),
  16         ('corporate', False),
  17         ('environment', 'readthedocs'),
  18 
  19         ('url_scheme', 'http'),
  20     )
  21 
  22 
  23 def pytest_addoption(parser):
  24     parser.addoption(
  25         '--including-search',
  26         action='store_true',
  27         dest='searchtests',
  28         default=False, help='enable search tests',
  29     )
  30 
  31 
  32 def pytest_configure(config):
  33     if not config.option.searchtests:
  34         # Include ``not search``` to parameters so search tests do not perform
  35         markexpr = getattr(config.option, 'markexpr')
  36         if markexpr:
  37             markexpr += ' and not search'
  38         else:
  39             markexpr = 'not search'
  40         setattr(config.option, 'markexpr', markexpr.strip())
  41 
  42     for option, value in PYTEST_OPTIONS:
  43         setattr(config.option, option, value)
  44 
  45 
  46 @pytest.fixture(autouse=True)
  47 def settings_modification(settings):
  48     settings.CELERY_ALWAYS_EAGER = True
  49 
  50 @pytest.fixture
  51 def api_client():
  52     return APIClient()
  53
  ```
  --- 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/conftest.py b/conftest.py
  --- a/conftest.py
  +++ b/conftest.py
  @@ -47,6 +47,12 @@
   def settings_modification(settings):
       settings.CELERY_ALWAYS_EAGER = True
   
  +
   @pytest.fixture
   def api_client():
       return APIClient()
  +
  +
  +@pytest.fixture(scope="class")
  +def url_scheme(request):
  +    request.cls.url_scheme = request.config.option.url_scheme
  
verification_info: {"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -47,6 +47,12 @@\n def settings_modification(settings):\n     settings.CELERY_ALWAYS_EAGER = True\n \n+\n @pytest.fixture\n def api_client():\n     return APIClient()\n+\n+\n+@pytest.fixture(scope=\"class\")\n+def url_scheme(request):\n+    request.cls.url_scheme = request.config.option.url_scheme\n", "issue": "Remove all warnings from pytest\nWhen running `tox` we see these warnings in the summary.\r\n\r\nWe should use `request` fixture and access to `request.config` instead.\r\n\r\nDocs: https://docs.pytest.org/en/latest/fixture.html#request-context\r\nChange log: https://docs.pytest.org/en/latest/deprecations.html#pytest-config-global\r\n\r\n\r\n```\r\n====================================================================================== warnings summary ======================================================================================\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs_index\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs_index_no_directory_urls\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_mkdocs_no_directory_urls\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_and_page\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_and_page_htmldir\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_and_page_signlehtml\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_htmldir\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_and_version_singlehtml\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_only\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_only_htmldir\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_project_only_singlehtml\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_restructured_text\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_restructured_text_invalid\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_and_page\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_and_page_htmldir\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_and_page_singlehtml\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_htmldir\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_and_version_singlehtml\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_only\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_only_htmldir\r\nreadthedocs/rtd_tests/tests/test_core_tags.py::CoreTagsTests::test_translation_project_only_singlehtml\r\n  /home/humitos/rtfd/code/readthedocs-corporate/.tox/py36/readthedocs.org/readthedocs/rtd_tests/tests/test_core_tags.py:19: PytestDeprecationWarning: the `pytest.config` global is deprecated.  Please use `request.config` or `pytest_configure` (if you're a pytest plugin) instead.\r\n    scheme=pytest.config.option.url_scheme,\r\n\r\n-- Docs: https://docs.pytest.org/en/latest/warnings.html\r\n```\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport pytest\nfrom django.conf import settings\nfrom rest_framework.test import APIClient\n\ntry:\n    # TODO: this file is read/executed even when called from ``readthedocsinc``,\n    # so it's overriding the options that we are defining in the ``conftest.py``\n    # from the corporate site. We need to find a better way to avoid this.\n    import readthedocsinc\n    PYTEST_OPTIONS = ()\nexcept ImportError:\n    PYTEST_OPTIONS = (\n        # Options to set test environment\n        ('community', True),\n        ('corporate', False),\n        ('environment', 'readthedocs'),\n\n        ('url_scheme', 'http'),\n    )\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        '--including-search',\n        action='store_true',\n        dest='searchtests',\n        default=False, help='enable search tests',\n    )\n\n\ndef pytest_configure(config):\n    if not config.option.searchtests:\n        # Include ``not search``` to parameters so search tests do not perform\n        markexpr = getattr(config.option, 'markexpr')\n        if markexpr:\n            markexpr += ' and not search'\n        else:\n            markexpr = 'not search'\n        setattr(config.option, 'markexpr', markexpr.strip())\n\n    for option, value in PYTEST_OPTIONS:\n        setattr(config.option, option, value)\n\n\n@pytest.fixture(autouse=True)\ndef settings_modification(settings):\n    settings.CELERY_ALWAYS_EAGER = True\n\n@pytest.fixture\ndef api_client():\n    return APIClient()\n", "path": "conftest.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport pytest\nfrom django.conf import settings\nfrom rest_framework.test import APIClient\n\ntry:\n    # TODO: this file is read/executed even when called from ``readthedocsinc``,\n    # so it's overriding the options that we are defining in the ``conftest.py``\n    # from the corporate site. We need to find a better way to avoid this.\n    import readthedocsinc\n    PYTEST_OPTIONS = ()\nexcept ImportError:\n    PYTEST_OPTIONS = (\n        # Options to set test environment\n        ('community', True),\n        ('corporate', False),\n        ('environment', 'readthedocs'),\n\n        ('url_scheme', 'http'),\n    )\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        '--including-search',\n        action='store_true',\n        dest='searchtests',\n        default=False, help='enable search tests',\n    )\n\n\ndef pytest_configure(config):\n    if not config.option.searchtests:\n        # Include ``not search``` to parameters so search tests do not perform\n        markexpr = getattr(config.option, 'markexpr')\n        if markexpr:\n            markexpr += ' and not search'\n        else:\n            markexpr = 'not search'\n        setattr(config.option, 'markexpr', markexpr.strip())\n\n    for option, value in PYTEST_OPTIONS:\n        setattr(config.option, option, value)\n\n\n@pytest.fixture(autouse=True)\ndef settings_modification(settings):\n    settings.CELERY_ALWAYS_EAGER = True\n\n\n@pytest.fixture\ndef api_client():\n    return APIClient()\n\n\n@pytest.fixture(scope=\"class\")\ndef url_scheme(request):\n    request.cls.url_scheme = request.config.option.url_scheme\n", "path": "conftest.py"}]}