We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Testing with tar bundle complains about unknown pytest markers
The source bundle ``cryptography-3.3.1.tar.gz`` does not include tox.ini. The ini file is also used to define pytest markers and pytest configuration:

```
[pytest]
addopts = -r s
markers =
    requires_backend_interface: this test requires a specific backend interface
    skip_fips: this test is not executed in FIPS mode
    supported: parametrized test requiring only_if and skip_message
    wycheproof_tests: this test runs a wycheproof fixture

```

pytest complains about unknown markers. Downstream tests with the source bundle is flooding the log file with warnings like:

```
tests/test_fernet.py:43
  /builddir/build/BUILD/cryptography-3.3.1/tests/test_fernet.py:43: PytestUnknownMarkWarning: Unknown pytest.mark.requires_backend_interface - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
    @pytest.mark.requires_backend_interface(interface=CipherBackend)
```

Suggested solutions:

* ship ``tox.ini`` in source distribution
* Move marker definitions to ``pytest.ini`` and ship that file
* Move marker definitions to ``pyproject.toml``
* Define markers on conftest.py

```
def pytest_configure(config):
    config.addinivalue_line("markers", "requires_backend_interface: this test requires a specific backend interface")
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 #!/usr/bin/env python
2 
3 # This file is dual licensed under the terms of the Apache License, Version
4 # 2.0, and the BSD License. See the LICENSE file in the root of this repository
5 # for complete details.
6 
7 import os
8 import sys
9 
10 from setuptools import find_packages, setup
11 
12 
13 base_dir = os.path.dirname(__file__)
14 src_dir = os.path.join(base_dir, "src")
15 
16 # When executing the setup.py, we need to be able to import ourselves, this
17 # means that we need to add the src/ directory to the sys.path.
18 sys.path.insert(0, src_dir)
19 
20 about = {}
21 with open(os.path.join(src_dir, "cryptography", "__about__.py")) as f:
22     exec(f.read(), about)
23 
24 
25 # `setup_requirements` must be kept in sync with `pyproject.toml`
26 setup_requirements = ["cffi>=1.12"]
27 
28 with open(os.path.join(base_dir, "README.rst")) as f:
29     long_description = f.read()
30 
31 
32 try:
33     setup(
34         name=about["__title__"],
35         version=about["__version__"],
36         description=about["__summary__"],
37         long_description=long_description,
38         long_description_content_type="text/x-rst",
39         license=about["__license__"],
40         url=about["__uri__"],
41         author=about["__author__"],
42         author_email=about["__email__"],
43         classifiers=[
44             "Development Status :: 5 - Production/Stable",
45             "Intended Audience :: Developers",
46             "License :: OSI Approved :: Apache Software License",
47             "License :: OSI Approved :: BSD License",
48             "Natural Language :: English",
49             "Operating System :: MacOS :: MacOS X",
50             "Operating System :: POSIX",
51             "Operating System :: POSIX :: BSD",
52             "Operating System :: POSIX :: Linux",
53             "Operating System :: Microsoft :: Windows",
54             "Programming Language :: Python",
55             "Programming Language :: Python :: 3",
56             "Programming Language :: Python :: 3 :: Only",
57             "Programming Language :: Python :: 3.6",
58             "Programming Language :: Python :: 3.7",
59             "Programming Language :: Python :: 3.8",
60             "Programming Language :: Python :: 3.9",
61             "Programming Language :: Python :: Implementation :: CPython",
62             "Programming Language :: Python :: Implementation :: PyPy",
63             "Topic :: Security :: Cryptography",
64         ],
65         package_dir={"": "src"},
66         packages=find_packages(
67             where="src", exclude=["_cffi_src", "_cffi_src.*"]
68         ),
69         include_package_data=True,
70         python_requires=">=3.6",
71         install_requires=setup_requirements,
72         setup_requires=setup_requirements,
73         extras_require={
74             "test": [
75                 "pytest>=4.4.0",
76                 "pytest-cov",
77                 "pytest-subtests",
78                 "pytest-xdist",
79                 "pretend",
80                 "iso8601",
81                 "pytz",
82                 "hypothesis>=1.11.4,!=3.79.2",
83             ],
84             "docs": [
85                 "sphinx >= 1.6.5,!=1.8.0,!=3.1.0,!=3.1.1",
86                 "sphinx_rtd_theme",
87             ],
88             "docstest": [
89                 "doc8",
90                 "pyenchant >= 1.6.11",
91                 "twine >= 1.12.0",
92                 "sphinxcontrib-spelling >= 4.0.1",
93             ],
94             "pep8test": [
95                 "black",
96                 "flake8",
97                 "flake8-import-order",
98                 "pep8-naming",
99             ],
100             # This extra is for OpenSSH private keys that use bcrypt KDF
101             # Versions: v3.1.3 - ignore_few_rounds, v3.1.5 - abi3
102             "ssh": ["bcrypt >= 3.1.5"],
103         },
104         # for cffi
105         zip_safe=False,
106         ext_package="cryptography.hazmat.bindings",
107         cffi_modules=[
108             "src/_cffi_src/build_openssl.py:ffi",
109             "src/_cffi_src/build_padding.py:ffi",
110         ],
111     )
112 except:  # noqa: E722
113     # Note: This is a bare exception that re-raises so that we don't interfere
114     # with anything the installation machinery might want to do. Because we
115     # print this for any exception this msg can appear (e.g. in verbose logs)
116     # even if there's no failure. For example, SetupRequirementsError is raised
117     # during PEP517 building and prints this text. setuptools raises SystemExit
118     # when compilation fails right now, but it's possible this isn't stable
119     # or a public API commitment so we'll remain ultra conservative.
120     print(
121         """
122     =============================DEBUG ASSISTANCE=============================
123     If you are seeing a compilation error please try the following steps to
124     successfully install cryptography:
125     1) Upgrade to the latest pip and try again. This will fix errors for most
126        users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
127     2) Read https://cryptography.io/en/latest/installation.html for specific
128        instructions for your platform.
129     3) Check our frequently asked questions for more information:
130        https://cryptography.io/en/latest/faq.html
131     =============================DEBUG ASSISTANCE=============================
132     """
133     )
134     raise
135
```
--- 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()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -72,7 +72,7 @@
         setup_requires=setup_requirements,
         extras_require={
             "test": [
-                "pytest>=4.4.0",
+                "pytest>=6.0",
                 "pytest-cov",
                 "pytest-subtests",
                 "pytest-xdist",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -72,7 +72,7 @@\n         setup_requires=setup_requirements,\n         extras_require={\n             \"test\": [\n-                \"pytest>=4.4.0\",\n+                \"pytest>=6.0\",\n                 \"pytest-cov\",\n                 \"pytest-subtests\",\n                 \"pytest-xdist\",\n", "issue": "Testing with tar bundle complains about unknown pytest markers\nThe source bundle ``cryptography-3.3.1.tar.gz`` does not include tox.ini. The ini file is also used to define pytest markers and pytest configuration:\r\n\r\n```\r\n[pytest]\r\naddopts = -r s\r\nmarkers =\r\n    requires_backend_interface: this test requires a specific backend interface\r\n    skip_fips: this test is not executed in FIPS mode\r\n    supported: parametrized test requiring only_if and skip_message\r\n    wycheproof_tests: this test runs a wycheproof fixture\r\n\r\n```\r\n\r\npytest complains about unknown markers. Downstream tests with the source bundle is flooding the log file with warnings like:\r\n\r\n```\r\ntests/test_fernet.py:43\r\n  /builddir/build/BUILD/cryptography-3.3.1/tests/test_fernet.py:43: PytestUnknownMarkWarning: Unknown pytest.mark.requires_backend_interface - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html\r\n    @pytest.mark.requires_backend_interface(interface=CipherBackend)\r\n```\r\n\r\nSuggested solutions:\r\n\r\n* ship ``tox.ini`` in source distribution\r\n* Move marker definitions to ``pytest.ini`` and ship that file\r\n* Move marker definitions to ``pyproject.toml``\r\n* Define markers on conftest.py\r\n\r\n```\r\ndef pytest_configure(config):\r\n    config.addinivalue_line(\"markers\", \"requires_backend_interface: this test requires a specific backend interface\")\r\n```\n", "before_files": [{"content": "#!/usr/bin/env python\n\n# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nimport os\nimport sys\n\nfrom setuptools import find_packages, setup\n\n\nbase_dir = os.path.dirname(__file__)\nsrc_dir = os.path.join(base_dir, \"src\")\n\n# When executing the setup.py, we need to be able to import ourselves, this\n# means that we need to add the src/ directory to the sys.path.\nsys.path.insert(0, src_dir)\n\nabout = {}\nwith open(os.path.join(src_dir, \"cryptography\", \"__about__.py\")) as f:\n    exec(f.read(), about)\n\n\n# `setup_requirements` must be kept in sync with `pyproject.toml`\nsetup_requirements = [\"cffi>=1.12\"]\n\nwith open(os.path.join(base_dir, \"README.rst\")) as f:\n    long_description = f.read()\n\n\ntry:\n    setup(\n        name=about[\"__title__\"],\n        version=about[\"__version__\"],\n        description=about[\"__summary__\"],\n        long_description=long_description,\n        long_description_content_type=\"text/x-rst\",\n        license=about[\"__license__\"],\n        url=about[\"__uri__\"],\n        author=about[\"__author__\"],\n        author_email=about[\"__email__\"],\n        classifiers=[\n            \"Development Status :: 5 - Production/Stable\",\n            \"Intended Audience :: Developers\",\n            \"License :: OSI Approved :: Apache Software License\",\n            \"License :: OSI Approved :: BSD License\",\n            \"Natural Language :: English\",\n            \"Operating System :: MacOS :: MacOS X\",\n            \"Operating System :: POSIX\",\n            \"Operating System :: POSIX :: BSD\",\n            \"Operating System :: POSIX :: Linux\",\n            \"Operating System :: Microsoft :: Windows\",\n            \"Programming Language :: Python\",\n            \"Programming Language :: Python :: 3\",\n            \"Programming Language :: Python :: 3 :: Only\",\n            \"Programming Language :: Python :: 3.6\",\n            \"Programming Language :: Python :: 3.7\",\n            \"Programming Language :: Python :: 3.8\",\n            \"Programming Language :: Python :: 3.9\",\n            \"Programming Language :: Python :: Implementation :: CPython\",\n            \"Programming Language :: Python :: Implementation :: PyPy\",\n            \"Topic :: Security :: Cryptography\",\n        ],\n        package_dir={\"\": \"src\"},\n        packages=find_packages(\n            where=\"src\", exclude=[\"_cffi_src\", \"_cffi_src.*\"]\n        ),\n        include_package_data=True,\n        python_requires=\">=3.6\",\n        install_requires=setup_requirements,\n        setup_requires=setup_requirements,\n        extras_require={\n            \"test\": [\n                \"pytest>=4.4.0\",\n                \"pytest-cov\",\n                \"pytest-subtests\",\n                \"pytest-xdist\",\n                \"pretend\",\n                \"iso8601\",\n                \"pytz\",\n                \"hypothesis>=1.11.4,!=3.79.2\",\n            ],\n            \"docs\": [\n                \"sphinx >= 1.6.5,!=1.8.0,!=3.1.0,!=3.1.1\",\n                \"sphinx_rtd_theme\",\n            ],\n            \"docstest\": [\n                \"doc8\",\n                \"pyenchant >= 1.6.11\",\n                \"twine >= 1.12.0\",\n                \"sphinxcontrib-spelling >= 4.0.1\",\n            ],\n            \"pep8test\": [\n                \"black\",\n                \"flake8\",\n                \"flake8-import-order\",\n                \"pep8-naming\",\n            ],\n            # This extra is for OpenSSH private keys that use bcrypt KDF\n            # Versions: v3.1.3 - ignore_few_rounds, v3.1.5 - abi3\n            \"ssh\": [\"bcrypt >= 3.1.5\"],\n        },\n        # for cffi\n        zip_safe=False,\n        ext_package=\"cryptography.hazmat.bindings\",\n        cffi_modules=[\n            \"src/_cffi_src/build_openssl.py:ffi\",\n            \"src/_cffi_src/build_padding.py:ffi\",\n        ],\n    )\nexcept:  # noqa: E722\n    # Note: This is a bare exception that re-raises so that we don't interfere\n    # with anything the installation machinery might want to do. Because we\n    # print this for any exception this msg can appear (e.g. in verbose logs)\n    # even if there's no failure. For example, SetupRequirementsError is raised\n    # during PEP517 building and prints this text. setuptools raises SystemExit\n    # when compilation fails right now, but it's possible this isn't stable\n    # or a public API commitment so we'll remain ultra conservative.\n    print(\n        \"\"\"\n    =============================DEBUG ASSISTANCE=============================\n    If you are seeing a compilation error please try the following steps to\n    successfully install cryptography:\n    1) Upgrade to the latest pip and try again. This will fix errors for most\n       users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip\n    2) Read https://cryptography.io/en/latest/installation.html for specific\n       instructions for your platform.\n    3) Check our frequently asked questions for more information:\n       https://cryptography.io/en/latest/faq.html\n    =============================DEBUG ASSISTANCE=============================\n    \"\"\"\n    )\n    raise\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n\n# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nimport os\nimport sys\n\nfrom setuptools import find_packages, setup\n\n\nbase_dir = os.path.dirname(__file__)\nsrc_dir = os.path.join(base_dir, \"src\")\n\n# When executing the setup.py, we need to be able to import ourselves, this\n# means that we need to add the src/ directory to the sys.path.\nsys.path.insert(0, src_dir)\n\nabout = {}\nwith open(os.path.join(src_dir, \"cryptography\", \"__about__.py\")) as f:\n    exec(f.read(), about)\n\n\n# `setup_requirements` must be kept in sync with `pyproject.toml`\nsetup_requirements = [\"cffi>=1.12\"]\n\nwith open(os.path.join(base_dir, \"README.rst\")) as f:\n    long_description = f.read()\n\n\ntry:\n    setup(\n        name=about[\"__title__\"],\n        version=about[\"__version__\"],\n        description=about[\"__summary__\"],\n        long_description=long_description,\n        long_description_content_type=\"text/x-rst\",\n        license=about[\"__license__\"],\n        url=about[\"__uri__\"],\n        author=about[\"__author__\"],\n        author_email=about[\"__email__\"],\n        classifiers=[\n            \"Development Status :: 5 - Production/Stable\",\n            \"Intended Audience :: Developers\",\n            \"License :: OSI Approved :: Apache Software License\",\n            \"License :: OSI Approved :: BSD License\",\n            \"Natural Language :: English\",\n            \"Operating System :: MacOS :: MacOS X\",\n            \"Operating System :: POSIX\",\n            \"Operating System :: POSIX :: BSD\",\n            \"Operating System :: POSIX :: Linux\",\n            \"Operating System :: Microsoft :: Windows\",\n            \"Programming Language :: Python\",\n            \"Programming Language :: Python :: 3\",\n            \"Programming Language :: Python :: 3 :: Only\",\n            \"Programming Language :: Python :: 3.6\",\n            \"Programming Language :: Python :: 3.7\",\n            \"Programming Language :: Python :: 3.8\",\n            \"Programming Language :: Python :: 3.9\",\n            \"Programming Language :: Python :: Implementation :: CPython\",\n            \"Programming Language :: Python :: Implementation :: PyPy\",\n            \"Topic :: Security :: Cryptography\",\n        ],\n        package_dir={\"\": \"src\"},\n        packages=find_packages(\n            where=\"src\", exclude=[\"_cffi_src\", \"_cffi_src.*\"]\n        ),\n        include_package_data=True,\n        python_requires=\">=3.6\",\n        install_requires=setup_requirements,\n        setup_requires=setup_requirements,\n        extras_require={\n            \"test\": [\n                \"pytest>=6.0\",\n                \"pytest-cov\",\n                \"pytest-subtests\",\n                \"pytest-xdist\",\n                \"pretend\",\n                \"iso8601\",\n                \"pytz\",\n                \"hypothesis>=1.11.4,!=3.79.2\",\n            ],\n            \"docs\": [\n                \"sphinx >= 1.6.5,!=1.8.0,!=3.1.0,!=3.1.1\",\n                \"sphinx_rtd_theme\",\n            ],\n            \"docstest\": [\n                \"doc8\",\n                \"pyenchant >= 1.6.11\",\n                \"twine >= 1.12.0\",\n                \"sphinxcontrib-spelling >= 4.0.1\",\n            ],\n            \"pep8test\": [\n                \"black\",\n                \"flake8\",\n                \"flake8-import-order\",\n                \"pep8-naming\",\n            ],\n            # This extra is for OpenSSH private keys that use bcrypt KDF\n            # Versions: v3.1.3 - ignore_few_rounds, v3.1.5 - abi3\n            \"ssh\": [\"bcrypt >= 3.1.5\"],\n        },\n        # for cffi\n        zip_safe=False,\n        ext_package=\"cryptography.hazmat.bindings\",\n        cffi_modules=[\n            \"src/_cffi_src/build_openssl.py:ffi\",\n            \"src/_cffi_src/build_padding.py:ffi\",\n        ],\n    )\nexcept:  # noqa: E722\n    # Note: This is a bare exception that re-raises so that we don't interfere\n    # with anything the installation machinery might want to do. Because we\n    # print this for any exception this msg can appear (e.g. in verbose logs)\n    # even if there's no failure. For example, SetupRequirementsError is raised\n    # during PEP517 building and prints this text. setuptools raises SystemExit\n    # when compilation fails right now, but it's possible this isn't stable\n    # or a public API commitment so we'll remain ultra conservative.\n    print(\n        \"\"\"\n    =============================DEBUG ASSISTANCE=============================\n    If you are seeing a compilation error please try the following steps to\n    successfully install cryptography:\n    1) Upgrade to the latest pip and try again. This will fix errors for most\n       users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip\n    2) Read https://cryptography.io/en/latest/installation.html for specific\n       instructions for your platform.\n    3) Check our frequently asked questions for more information:\n       https://cryptography.io/en/latest/faq.html\n    =============================DEBUG ASSISTANCE=============================\n    \"\"\"\n    )\n    raise\n", "path": "setup.py"}]}