We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
packaged python is built with IPv6 disabled
Is there any reason for IPv6 being disabled?
https://github.com/kivy/python-for-android/blob/f16a66590c92bb57c69b214b2b69dfaa6dc1e0ed/pythonforandroid/recipes/python3/__init__.py#L37

--- 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/python3/__init__.py`
Content:
```
1 import sh
2 from pythonforandroid.python import GuestPythonRecipe
3 from pythonforandroid.recipe import Recipe
4 
5 
6 class Python3Recipe(GuestPythonRecipe):
7     '''
8     The python3's recipe.
9 
10     .. note:: This recipe can be built only against API 21+. Also, in order to
11         build certain python modules, we need to add some extra recipes to our
12         build requirements:
13 
14             - ctypes: you must add the recipe for ``libffi``.
15 
16     .. versionchanged:: 0.6.0
17         Refactored into class
18         :class:`~pythonforandroid.python.GuestPythonRecipe`
19     '''
20 
21     version = '3.7.1'
22     url = 'https://www.python.org/ftp/python/{version}/Python-{version}.tgz'
23     name = 'python3'
24 
25     patches = ["patches/fix-ctypes-util-find-library.patch"]
26 
27     if sh.which('lld') is not None:
28         patches = patches + ["patches/remove-fix-cortex-a8.patch"]
29 
30     depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi']
31     conflicts = ['python3crystax', 'python2', 'python2legacy']
32 
33     configure_args = (
34         '--host={android_host}',
35         '--build={android_build}',
36         '--enable-shared',
37         '--disable-ipv6',
38         'ac_cv_file__dev_ptmx=yes',
39         'ac_cv_file__dev_ptc=no',
40         '--without-ensurepip',
41         'ac_cv_little_endian_double=yes',
42         '--prefix={prefix}',
43         '--exec-prefix={exec_prefix}')
44 
45     def set_libs_flags(self, env, arch):
46         env = super(Python3Recipe, self).set_libs_flags(env, arch)
47         if 'openssl' in self.ctx.recipe_build_order:
48             recipe = Recipe.get_recipe('openssl', self.ctx)
49             self.configure_args += \
50                 ('--with-openssl=' + recipe.get_build_dir(arch.arch),)
51         return env
52 
53 
54 recipe = Python3Recipe()
55
```
--- 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/python3/__init__.py b/pythonforandroid/recipes/python3/__init__.py
--- a/pythonforandroid/recipes/python3/__init__.py
+++ b/pythonforandroid/recipes/python3/__init__.py
@@ -34,7 +34,7 @@
         '--host={android_host}',
         '--build={android_build}',
         '--enable-shared',
-        '--disable-ipv6',
+        '--enable-ipv6',
         'ac_cv_file__dev_ptmx=yes',
         'ac_cv_file__dev_ptc=no',
         '--without-ensurepip',

{"golden_diff": "diff --git a/pythonforandroid/recipes/python3/__init__.py b/pythonforandroid/recipes/python3/__init__.py\n--- a/pythonforandroid/recipes/python3/__init__.py\n+++ b/pythonforandroid/recipes/python3/__init__.py\n@@ -34,7 +34,7 @@\n         '--host={android_host}',\n         '--build={android_build}',\n         '--enable-shared',\n-        '--disable-ipv6',\n+        '--enable-ipv6',\n         'ac_cv_file__dev_ptmx=yes',\n         'ac_cv_file__dev_ptc=no',\n         '--without-ensurepip',\n", "issue": "packaged python is built with IPv6 disabled\nIs there any reason for IPv6 being disabled?\r\nhttps://github.com/kivy/python-for-android/blob/f16a66590c92bb57c69b214b2b69dfaa6dc1e0ed/pythonforandroid/recipes/python3/__init__.py#L37\n", "before_files": [{"content": "import sh\nfrom pythonforandroid.python import GuestPythonRecipe\nfrom pythonforandroid.recipe import Recipe\n\n\nclass Python3Recipe(GuestPythonRecipe):\n    '''\n    The python3's recipe.\n\n    .. note:: This recipe can be built only against API 21+. Also, in order to\n        build certain python modules, we need to add some extra recipes to our\n        build requirements:\n\n            - ctypes: you must add the recipe for ``libffi``.\n\n    .. versionchanged:: 0.6.0\n        Refactored into class\n        :class:`~pythonforandroid.python.GuestPythonRecipe`\n    '''\n\n    version = '3.7.1'\n    url = 'https://www.python.org/ftp/python/{version}/Python-{version}.tgz'\n    name = 'python3'\n\n    patches = [\"patches/fix-ctypes-util-find-library.patch\"]\n\n    if sh.which('lld') is not None:\n        patches = patches + [\"patches/remove-fix-cortex-a8.patch\"]\n\n    depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi']\n    conflicts = ['python3crystax', 'python2', 'python2legacy']\n\n    configure_args = (\n        '--host={android_host}',\n        '--build={android_build}',\n        '--enable-shared',\n        '--disable-ipv6',\n        'ac_cv_file__dev_ptmx=yes',\n        'ac_cv_file__dev_ptc=no',\n        '--without-ensurepip',\n        'ac_cv_little_endian_double=yes',\n        '--prefix={prefix}',\n        '--exec-prefix={exec_prefix}')\n\n    def set_libs_flags(self, env, arch):\n        env = super(Python3Recipe, self).set_libs_flags(env, arch)\n        if 'openssl' in self.ctx.recipe_build_order:\n            recipe = Recipe.get_recipe('openssl', self.ctx)\n            self.configure_args += \\\n                ('--with-openssl=' + recipe.get_build_dir(arch.arch),)\n        return env\n\n\nrecipe = Python3Recipe()\n", "path": "pythonforandroid/recipes/python3/__init__.py"}], "after_files": [{"content": "import sh\nfrom pythonforandroid.python import GuestPythonRecipe\nfrom pythonforandroid.recipe import Recipe\n\n\nclass Python3Recipe(GuestPythonRecipe):\n    '''\n    The python3's recipe.\n\n    .. note:: This recipe can be built only against API 21+. Also, in order to\n        build certain python modules, we need to add some extra recipes to our\n        build requirements:\n\n            - ctypes: you must add the recipe for ``libffi``.\n\n    .. versionchanged:: 0.6.0\n        Refactored into class\n        :class:`~pythonforandroid.python.GuestPythonRecipe`\n    '''\n\n    version = '3.7.1'\n    url = 'https://www.python.org/ftp/python/{version}/Python-{version}.tgz'\n    name = 'python3'\n\n    patches = [\"patches/fix-ctypes-util-find-library.patch\"]\n\n    if sh.which('lld') is not None:\n        patches = patches + [\"patches/remove-fix-cortex-a8.patch\"]\n\n    depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi']\n    conflicts = ['python3crystax', 'python2', 'python2legacy']\n\n    configure_args = (\n        '--host={android_host}',\n        '--build={android_build}',\n        '--enable-shared',\n        '--enable-ipv6',\n        'ac_cv_file__dev_ptmx=yes',\n        'ac_cv_file__dev_ptc=no',\n        '--without-ensurepip',\n        'ac_cv_little_endian_double=yes',\n        '--prefix={prefix}',\n        '--exec-prefix={exec_prefix}')\n\n    def set_libs_flags(self, env, arch):\n        env = super(Python3Recipe, self).set_libs_flags(env, arch)\n        if 'openssl' in self.ctx.recipe_build_order:\n            recipe = Recipe.get_recipe('openssl', self.ctx)\n            self.configure_args += \\\n                ('--with-openssl=' + recipe.get_build_dir(arch.arch),)\n        return env\n\n\nrecipe = Python3Recipe()\n", "path": "pythonforandroid/recipes/python3/__init__.py"}]}