We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TestGetSystemPythonExecutable.test_virtualenv test fail
The `TestGetSystemPythonExecutable.test_virtualenv` and `TestGetSystemPythonExecutable.test_venv` tests started failing all of a sudden.
Error was:
```
ModuleNotFoundError: No module named \'pytoml\'\n'
```
This ca be reproduced in local via:
```sh
pytest tests/test_pythonpackage_basic.py::TestGetSystemPythonExecutable::test_virtualenv
```



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pythonforandroid/recipes/openssl/__init__.py`
Content:
```
1 from os.path import join
2 
3 from pythonforandroid.recipe import Recipe
4 from pythonforandroid.util import current_directory
5 from pythonforandroid.logger import shprint
6 import sh
7 
8 
9 class OpenSSLRecipe(Recipe):
10     '''
11     The OpenSSL libraries for python-for-android. This recipe will generate the
12     following libraries as shared libraries (*.so):
13 
14         - crypto
15         - ssl
16 
17     The generated openssl libraries are versioned, where the version is the
18     recipe attribute :attr:`version` e.g.: ``libcrypto1.1.so``,
19     ``libssl1.1.so``...so...to link your recipe with the openssl libs,
20     remember to add the version at the end, e.g.:
21     ``-lcrypto1.1 -lssl1.1``. Or better, you could do it dynamically
22     using the methods: :meth:`include_flags`, :meth:`link_dirs_flags` and
23     :meth:`link_libs_flags`.
24 
25     .. warning:: This recipe is very sensitive because is used for our core
26         recipes, the python recipes. The used API should match with the one
27         used in our python build, otherwise we will be unable to build the
28         _ssl.so python module.
29 
30     .. versionchanged:: 0.6.0
31 
32         - The gcc compiler has been deprecated in favour of clang and libraries
33           updated to version 1.1.1 (LTS - supported until 11th September 2023)
34         - Added two new methods to make easier to link with openssl:
35           :meth:`include_flags` and :meth:`link_flags`
36         - subclassed versioned_url
37         - Adapted method :meth:`select_build_arch` to API 21+
38         - Add ability to build a legacy version of the openssl libs when using
39           python2legacy or python3crystax.
40 
41     .. versionchanged:: 2019.06.06.1.dev0
42 
43         - Removed legacy version of openssl libraries
44 
45     '''
46 
47     version = '1.1'
48     '''the major minor version used to link our recipes'''
49 
50     url_version = '1.1.1'
51     '''the version used to download our libraries'''
52 
53     url = 'https://www.openssl.org/source/openssl-{url_version}.tar.gz'
54 
55     built_libraries = {
56         'libcrypto{version}.so'.format(version=version): '.',
57         'libssl{version}.so'.format(version=version): '.',
58     }
59 
60     @property
61     def versioned_url(self):
62         if self.url is None:
63             return None
64         return self.url.format(url_version=self.url_version)
65 
66     def get_build_dir(self, arch):
67         return join(
68             self.get_build_container_dir(arch), self.name + self.version
69         )
70 
71     def include_flags(self, arch):
72         '''Returns a string with the include folders'''
73         openssl_includes = join(self.get_build_dir(arch.arch), 'include')
74         return (' -I' + openssl_includes +
75                 ' -I' + join(openssl_includes, 'internal') +
76                 ' -I' + join(openssl_includes, 'openssl'))
77 
78     def link_dirs_flags(self, arch):
79         '''Returns a string with the appropriate `-L<lib directory>` to link
80         with the openssl libs. This string is usually added to the environment
81         variable `LDFLAGS`'''
82         return ' -L' + self.get_build_dir(arch.arch)
83 
84     def link_libs_flags(self):
85         '''Returns a string with the appropriate `-l<lib>` flags to link with
86         the openssl libs. This string is usually added to the environment
87         variable `LIBS`'''
88         return ' -lcrypto{version} -lssl{version}'.format(version=self.version)
89 
90     def link_flags(self, arch):
91         '''Returns a string with the flags to link with the openssl libraries
92         in the format: `-L<lib directory> -l<lib>`'''
93         return self.link_dirs_flags(arch) + self.link_libs_flags()
94 
95     def get_recipe_env(self, arch=None):
96         env = super().get_recipe_env(arch)
97         env['OPENSSL_VERSION'] = self.version
98         env['MAKE'] = 'make'  # This removes the '-j5', which isn't safe
99         env['ANDROID_NDK'] = self.ctx.ndk_dir
100         return env
101 
102     def select_build_arch(self, arch):
103         aname = arch.arch
104         if 'arm64' in aname:
105             return 'android-arm64'
106         if 'v7a' in aname:
107             return 'android-arm'
108         if 'arm' in aname:
109             return 'android'
110         if 'x86_64' in aname:
111             return 'android-x86_64'
112         if 'x86' in aname:
113             return 'android-x86'
114         return 'linux-armv4'
115 
116     def build_arch(self, arch):
117         env = self.get_recipe_env(arch)
118         with current_directory(self.get_build_dir(arch.arch)):
119             # sh fails with code 255 trying to execute ./Configure
120             # so instead we manually run perl passing in Configure
121             perl = sh.Command('perl')
122             buildarch = self.select_build_arch(arch)
123             config_args = [
124                 'shared',
125                 'no-dso',
126                 'no-asm',
127                 buildarch,
128                 '-D__ANDROID_API__={}'.format(self.ctx.ndk_api),
129             ]
130             shprint(perl, 'Configure', *config_args, _env=env)
131             self.apply_patch('disable-sover.patch', arch.arch)
132 
133             shprint(sh.make, 'build_libs', _env=env)
134 
135 
136 recipe = OpenSSLRecipe()
137
```
--- 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/pythonforandroid/recipes/openssl/__init__.py b/pythonforandroid/recipes/openssl/__init__.py
--- a/pythonforandroid/recipes/openssl/__init__.py
+++ b/pythonforandroid/recipes/openssl/__init__.py
@@ -47,7 +47,7 @@
     version = '1.1'
     '''the major minor version used to link our recipes'''
 
-    url_version = '1.1.1'
+    url_version = '1.1.1f'
     '''the version used to download our libraries'''
 
     url = 'https://www.openssl.org/source/openssl-{url_version}.tar.gz'

{"golden_diff": "diff --git a/pythonforandroid/recipes/openssl/__init__.py b/pythonforandroid/recipes/openssl/__init__.py\n--- a/pythonforandroid/recipes/openssl/__init__.py\n+++ b/pythonforandroid/recipes/openssl/__init__.py\n@@ -47,7 +47,7 @@\n     version = '1.1'\n     '''the major minor version used to link our recipes'''\n \n-    url_version = '1.1.1'\n+    url_version = '1.1.1f'\n     '''the version used to download our libraries'''\n \n     url = 'https://www.openssl.org/source/openssl-{url_version}.tar.gz'\n", "issue": "TestGetSystemPythonExecutable.test_virtualenv test fail\nThe `TestGetSystemPythonExecutable.test_virtualenv` and `TestGetSystemPythonExecutable.test_venv` tests started failing all of a sudden.\r\nError was:\r\n```\r\nModuleNotFoundError: No module named \\'pytoml\\'\\n'\r\n```\r\nThis ca be reproduced in local via:\r\n```sh\r\npytest tests/test_pythonpackage_basic.py::TestGetSystemPythonExecutable::test_virtualenv\r\n```\r\n\r\n\n", "before_files": [{"content": "from os.path import join\n\nfrom pythonforandroid.recipe import Recipe\nfrom pythonforandroid.util import current_directory\nfrom pythonforandroid.logger import shprint\nimport sh\n\n\nclass OpenSSLRecipe(Recipe):\n    '''\n    The OpenSSL libraries for python-for-android. This recipe will generate the\n    following libraries as shared libraries (*.so):\n\n        - crypto\n        - ssl\n\n    The generated openssl libraries are versioned, where the version is the\n    recipe attribute :attr:`version` e.g.: ``libcrypto1.1.so``,\n    ``libssl1.1.so``...so...to link your recipe with the openssl libs,\n    remember to add the version at the end, e.g.:\n    ``-lcrypto1.1 -lssl1.1``. Or better, you could do it dynamically\n    using the methods: :meth:`include_flags`, :meth:`link_dirs_flags` and\n    :meth:`link_libs_flags`.\n\n    .. warning:: This recipe is very sensitive because is used for our core\n        recipes, the python recipes. The used API should match with the one\n        used in our python build, otherwise we will be unable to build the\n        _ssl.so python module.\n\n    .. versionchanged:: 0.6.0\n\n        - The gcc compiler has been deprecated in favour of clang and libraries\n          updated to version 1.1.1 (LTS - supported until 11th September 2023)\n        - Added two new methods to make easier to link with openssl:\n          :meth:`include_flags` and :meth:`link_flags`\n        - subclassed versioned_url\n        - Adapted method :meth:`select_build_arch` to API 21+\n        - Add ability to build a legacy version of the openssl libs when using\n          python2legacy or python3crystax.\n\n    .. versionchanged:: 2019.06.06.1.dev0\n\n        - Removed legacy version of openssl libraries\n\n    '''\n\n    version = '1.1'\n    '''the major minor version used to link our recipes'''\n\n    url_version = '1.1.1'\n    '''the version used to download our libraries'''\n\n    url = 'https://www.openssl.org/source/openssl-{url_version}.tar.gz'\n\n    built_libraries = {\n        'libcrypto{version}.so'.format(version=version): '.',\n        'libssl{version}.so'.format(version=version): '.',\n    }\n\n    @property\n    def versioned_url(self):\n        if self.url is None:\n            return None\n        return self.url.format(url_version=self.url_version)\n\n    def get_build_dir(self, arch):\n        return join(\n            self.get_build_container_dir(arch), self.name + self.version\n        )\n\n    def include_flags(self, arch):\n        '''Returns a string with the include folders'''\n        openssl_includes = join(self.get_build_dir(arch.arch), 'include')\n        return (' -I' + openssl_includes +\n                ' -I' + join(openssl_includes, 'internal') +\n                ' -I' + join(openssl_includes, 'openssl'))\n\n    def link_dirs_flags(self, arch):\n        '''Returns a string with the appropriate `-L<lib directory>` to link\n        with the openssl libs. This string is usually added to the environment\n        variable `LDFLAGS`'''\n        return ' -L' + self.get_build_dir(arch.arch)\n\n    def link_libs_flags(self):\n        '''Returns a string with the appropriate `-l<lib>` flags to link with\n        the openssl libs. This string is usually added to the environment\n        variable `LIBS`'''\n        return ' -lcrypto{version} -lssl{version}'.format(version=self.version)\n\n    def link_flags(self, arch):\n        '''Returns a string with the flags to link with the openssl libraries\n        in the format: `-L<lib directory> -l<lib>`'''\n        return self.link_dirs_flags(arch) + self.link_libs_flags()\n\n    def get_recipe_env(self, arch=None):\n        env = super().get_recipe_env(arch)\n        env['OPENSSL_VERSION'] = self.version\n        env['MAKE'] = 'make'  # This removes the '-j5', which isn't safe\n        env['ANDROID_NDK'] = self.ctx.ndk_dir\n        return env\n\n    def select_build_arch(self, arch):\n        aname = arch.arch\n        if 'arm64' in aname:\n            return 'android-arm64'\n        if 'v7a' in aname:\n            return 'android-arm'\n        if 'arm' in aname:\n            return 'android'\n        if 'x86_64' in aname:\n            return 'android-x86_64'\n        if 'x86' in aname:\n            return 'android-x86'\n        return 'linux-armv4'\n\n    def build_arch(self, arch):\n        env = self.get_recipe_env(arch)\n        with current_directory(self.get_build_dir(arch.arch)):\n            # sh fails with code 255 trying to execute ./Configure\n            # so instead we manually run perl passing in Configure\n            perl = sh.Command('perl')\n            buildarch = self.select_build_arch(arch)\n            config_args = [\n                'shared',\n                'no-dso',\n                'no-asm',\n                buildarch,\n                '-D__ANDROID_API__={}'.format(self.ctx.ndk_api),\n            ]\n            shprint(perl, 'Configure', *config_args, _env=env)\n            self.apply_patch('disable-sover.patch', arch.arch)\n\n            shprint(sh.make, 'build_libs', _env=env)\n\n\nrecipe = OpenSSLRecipe()\n", "path": "pythonforandroid/recipes/openssl/__init__.py"}], "after_files": [{"content": "from os.path import join\n\nfrom pythonforandroid.recipe import Recipe\nfrom pythonforandroid.util import current_directory\nfrom pythonforandroid.logger import shprint\nimport sh\n\n\nclass OpenSSLRecipe(Recipe):\n    '''\n    The OpenSSL libraries for python-for-android. This recipe will generate the\n    following libraries as shared libraries (*.so):\n\n        - crypto\n        - ssl\n\n    The generated openssl libraries are versioned, where the version is the\n    recipe attribute :attr:`version` e.g.: ``libcrypto1.1.so``,\n    ``libssl1.1.so``...so...to link your recipe with the openssl libs,\n    remember to add the version at the end, e.g.:\n    ``-lcrypto1.1 -lssl1.1``. Or better, you could do it dynamically\n    using the methods: :meth:`include_flags`, :meth:`link_dirs_flags` and\n    :meth:`link_libs_flags`.\n\n    .. warning:: This recipe is very sensitive because is used for our core\n        recipes, the python recipes. The used API should match with the one\n        used in our python build, otherwise we will be unable to build the\n        _ssl.so python module.\n\n    .. versionchanged:: 0.6.0\n\n        - The gcc compiler has been deprecated in favour of clang and libraries\n          updated to version 1.1.1 (LTS - supported until 11th September 2023)\n        - Added two new methods to make easier to link with openssl:\n          :meth:`include_flags` and :meth:`link_flags`\n        - subclassed versioned_url\n        - Adapted method :meth:`select_build_arch` to API 21+\n        - Add ability to build a legacy version of the openssl libs when using\n          python2legacy or python3crystax.\n\n    .. versionchanged:: 2019.06.06.1.dev0\n\n        - Removed legacy version of openssl libraries\n\n    '''\n\n    version = '1.1'\n    '''the major minor version used to link our recipes'''\n\n    url_version = '1.1.1f'\n    '''the version used to download our libraries'''\n\n    url = 'https://www.openssl.org/source/openssl-{url_version}.tar.gz'\n\n    built_libraries = {\n        'libcrypto{version}.so'.format(version=version): '.',\n        'libssl{version}.so'.format(version=version): '.',\n    }\n\n    @property\n    def versioned_url(self):\n        if self.url is None:\n            return None\n        return self.url.format(url_version=self.url_version)\n\n    def get_build_dir(self, arch):\n        return join(\n            self.get_build_container_dir(arch), self.name + self.version\n        )\n\n    def include_flags(self, arch):\n        '''Returns a string with the include folders'''\n        openssl_includes = join(self.get_build_dir(arch.arch), 'include')\n        return (' -I' + openssl_includes +\n                ' -I' + join(openssl_includes, 'internal') +\n                ' -I' + join(openssl_includes, 'openssl'))\n\n    def link_dirs_flags(self, arch):\n        '''Returns a string with the appropriate `-L<lib directory>` to link\n        with the openssl libs. This string is usually added to the environment\n        variable `LDFLAGS`'''\n        return ' -L' + self.get_build_dir(arch.arch)\n\n    def link_libs_flags(self):\n        '''Returns a string with the appropriate `-l<lib>` flags to link with\n        the openssl libs. This string is usually added to the environment\n        variable `LIBS`'''\n        return ' -lcrypto{version} -lssl{version}'.format(version=self.version)\n\n    def link_flags(self, arch):\n        '''Returns a string with the flags to link with the openssl libraries\n        in the format: `-L<lib directory> -l<lib>`'''\n        return self.link_dirs_flags(arch) + self.link_libs_flags()\n\n    def get_recipe_env(self, arch=None):\n        env = super().get_recipe_env(arch)\n        env['OPENSSL_VERSION'] = self.version\n        env['MAKE'] = 'make'  # This removes the '-j5', which isn't safe\n        env['ANDROID_NDK'] = self.ctx.ndk_dir\n        return env\n\n    def select_build_arch(self, arch):\n        aname = arch.arch\n        if 'arm64' in aname:\n            return 'android-arm64'\n        if 'v7a' in aname:\n            return 'android-arm'\n        if 'arm' in aname:\n            return 'android'\n        if 'x86_64' in aname:\n            return 'android-x86_64'\n        if 'x86' in aname:\n            return 'android-x86'\n        return 'linux-armv4'\n\n    def build_arch(self, arch):\n        env = self.get_recipe_env(arch)\n        with current_directory(self.get_build_dir(arch.arch)):\n            # sh fails with code 255 trying to execute ./Configure\n            # so instead we manually run perl passing in Configure\n            perl = sh.Command('perl')\n            buildarch = self.select_build_arch(arch)\n            config_args = [\n                'shared',\n                'no-dso',\n                'no-asm',\n                buildarch,\n                '-D__ANDROID_API__={}'.format(self.ctx.ndk_api),\n            ]\n            shprint(perl, 'Configure', *config_args, _env=env)\n            self.apply_patch('disable-sover.patch', arch.arch)\n\n            shprint(sh.make, 'build_libs', _env=env)\n\n\nrecipe = OpenSSLRecipe()\n", "path": "pythonforandroid/recipes/openssl/__init__.py"}]}