prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add support for urllib3 2.2.1
  ### Describe the bug
  
  Underlying `botocore` requires outdated `urllib3` version:
  
  - 1.x in case of Python pre-3.10
  - < 2.1 in case of Python 3.10(+)
  
  background from: https://github.com/boto/botocore/issues/2926
  
  I do totally understand the motivation for these outdated `urllib3` version dependencies. IMHO I think it should be up to whoever uses boto3 to specify whether or not to use an outdated version of `urllib3`.
  
  Incidentally I am using this for an application that may run on Amazon Linux, which may need the older `urllib3` dependency, would have preferred to make this choice myself.
  
  I am taking liberty to file this issue for `boto3`, no objections if maintainers want to transfer this to `botocore`.
  
  I am also taking liberty to leave out some info that I think should not matter - please post a loud holler if any further info is needed. Thanks in advance!
  
  ### Expected Behavior
  
  I think it should be possible to install boto3 and another package such as requests with recently updated version of urllib3 such as `urllib3 == 2.2.1`.
  
  ### Current Behavior
  
  Combinaiton of `boto3 == 1.34.46` & `urllib3 == 2.2.1` leads to pip installation error.
  
  ### Reproduction Steps
  
  see above - please post a loud holler if any further info is needed
  
  ### Possible Solution
  
  _No response_
  
  ### Additional Information/Context
  
  _No response_
  
  ### SDK version used
  
  Python 3.9 / 3.11; boto3 v1.34.46
  
  ### Environment details (OS name and version, etc.)
  
  Ubuntu 22.04.3 LTS 64-bit (with some customized updates) on Intel core i7
  
  --- 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 import codecs
  3 import os.path
  4 import re
  5 
  6 from setuptools import find_packages, setup
  7 
  8 here = os.path.abspath(os.path.dirname(__file__))
  9 
  10 
  11 def read(*parts):
  12     return codecs.open(os.path.join(here, *parts), 'r').read()
  13 
  14 
  15 def find_version(*file_paths):
  16     version_file = read(*file_paths)
  17     version_match = re.search(
  18         r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M
  19     )
  20     if version_match:
  21         return version_match.group(1)
  22     raise RuntimeError("Unable to find version string.")
  23 
  24 
  25 requires = [
  26     'jmespath>=0.7.1,<2.0.0',
  27     'python-dateutil>=2.1,<3.0.0',
  28     'urllib3>=1.25.4,<1.27 ; python_version < "3.10"',
  29     'urllib3>=1.25.4,<2.1 ; python_version >= "3.10"',
  30 ]
  31 
  32 extras_require = {
  33     'crt': ['awscrt==0.19.19'],
  34 }
  35 
  36 setup(
  37     name='botocore',
  38     version=find_version("botocore", "__init__.py"),
  39     description='Low-level, data-driven core of boto 3.',
  40     long_description=open('README.rst').read(),
  41     author='Amazon Web Services',
  42     url='https://github.com/boto/botocore',
  43     scripts=[],
  44     packages=find_packages(exclude=['tests*']),
  45     package_data={
  46         'botocore': ['cacert.pem', 'data/*.json', 'data/*/*.json'],
  47         'botocore.vendored.requests': ['*.pem'],
  48     },
  49     include_package_data=True,
  50     install_requires=requires,
  51     extras_require=extras_require,
  52     license="Apache License 2.0",
  53     python_requires=">= 3.8",
  54     classifiers=[
  55         'Development Status :: 5 - Production/Stable',
  56         'Intended Audience :: Developers',
  57         'Intended Audience :: System Administrators',
  58         'Natural Language :: English',
  59         'License :: OSI Approved :: Apache Software License',
  60         'Programming Language :: Python',
  61         'Programming Language :: Python :: 3 :: Only',
  62         'Programming Language :: Python :: 3',
  63         'Programming Language :: Python :: 3.8',
  64         'Programming Language :: Python :: 3.9',
  65         'Programming Language :: Python :: 3.10',
  66         'Programming Language :: Python :: 3.11',
  67         'Programming Language :: Python :: 3.12',
  68     ],
  69 )
  70
  ```
  --- 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/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -25,8 +25,11 @@
   requires = [
       'jmespath>=0.7.1,<2.0.0',
       'python-dateutil>=2.1,<3.0.0',
  +    # Prior to Python 3.10, Python doesn't require openssl 1.1.1
  +    # but urllib3 2.0+ does. This means all botocore users will be
  +    # broken by default on Amazon Linux 2 and AWS Lambda without this pin.
       'urllib3>=1.25.4,<1.27 ; python_version < "3.10"',
  -    'urllib3>=1.25.4,<2.1 ; python_version >= "3.10"',
  +    'urllib3>=1.25.4,!=2.2.0,<3 ; python_version >= "3.10"',
   ]
   
   extras_require = {
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -25,8 +25,11 @@\n requires = [\n     'jmespath>=0.7.1,<2.0.0',\n     'python-dateutil>=2.1,<3.0.0',\n+    # Prior to Python 3.10, Python doesn't require openssl 1.1.1\n+    # but urllib3 2.0+ does. This means all botocore users will be\n+    # broken by default on Amazon Linux 2 and AWS Lambda without this pin.\n     'urllib3>=1.25.4,<1.27 ; python_version < \"3.10\"',\n-    'urllib3>=1.25.4,<2.1 ; python_version >= \"3.10\"',\n+    'urllib3>=1.25.4,!=2.2.0,<3 ; python_version >= \"3.10\"',\n ]\n \n extras_require = {\n", "issue": "Add support for urllib3 2.2.1\n### Describe the bug\n\nUnderlying `botocore` requires outdated `urllib3` version:\r\n\r\n- 1.x in case of Python pre-3.10\r\n- < 2.1 in case of Python 3.10(+)\r\n\r\nbackground from: https://github.com/boto/botocore/issues/2926\r\n\r\nI do totally understand the motivation for these outdated `urllib3` version dependencies. IMHO I think it should be up to whoever uses boto3 to specify whether or not to use an outdated version of `urllib3`.\r\n\r\nIncidentally I am using this for an application that may run on Amazon Linux, which may need the older `urllib3` dependency, would have preferred to make this choice myself.\r\n\r\nI am taking liberty to file this issue for `boto3`, no objections if maintainers want to transfer this to `botocore`.\r\n\r\nI am also taking liberty to leave out some info that I think should not matter - please post a loud holler if any further info is needed. Thanks in advance!\n\n### Expected Behavior\n\nI think it should be possible to install boto3 and another package such as requests with recently updated version of urllib3 such as `urllib3 == 2.2.1`.\n\n### Current Behavior\n\nCombinaiton of `boto3 == 1.34.46` & `urllib3 == 2.2.1` leads to pip installation error.\n\n### Reproduction Steps\n\nsee above - please post a loud holler if any further info is needed\n\n### Possible Solution\n\n_No response_\n\n### Additional Information/Context\n\n_No response_\n\n### SDK version used\n\nPython 3.9 / 3.11; boto3 v1.34.46\n\n### Environment details (OS name and version, etc.)\n\nUbuntu 22.04.3 LTS 64-bit (with some customized updates) on Intel core i7\n", "before_files": [{"content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\n\nfrom setuptools import find_packages, setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n    return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths):\n    version_file = read(*file_paths)\n    version_match = re.search(\n        r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\", version_file, re.M\n    )\n    if version_match:\n        return version_match.group(1)\n    raise RuntimeError(\"Unable to find version string.\")\n\n\nrequires = [\n    'jmespath>=0.7.1,<2.0.0',\n    'python-dateutil>=2.1,<3.0.0',\n    'urllib3>=1.25.4,<1.27 ; python_version < \"3.10\"',\n    'urllib3>=1.25.4,<2.1 ; python_version >= \"3.10\"',\n]\n\nextras_require = {\n    'crt': ['awscrt==0.19.19'],\n}\n\nsetup(\n    name='botocore',\n    version=find_version(\"botocore\", \"__init__.py\"),\n    description='Low-level, data-driven core of boto 3.',\n    long_description=open('README.rst').read(),\n    author='Amazon Web Services',\n    url='https://github.com/boto/botocore',\n    scripts=[],\n    packages=find_packages(exclude=['tests*']),\n    package_data={\n        'botocore': ['cacert.pem', 'data/*.json', 'data/*/*.json'],\n        'botocore.vendored.requests': ['*.pem'],\n    },\n    include_package_data=True,\n    install_requires=requires,\n    extras_require=extras_require,\n    license=\"Apache License 2.0\",\n    python_requires=\">= 3.8\",\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'Natural Language :: English',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3 :: Only',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3.9',\n        'Programming Language :: Python :: 3.10',\n        'Programming Language :: Python :: 3.11',\n        'Programming Language :: Python :: 3.12',\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\n\nfrom setuptools import find_packages, setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n    return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths):\n    version_file = read(*file_paths)\n    version_match = re.search(\n        r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\", version_file, re.M\n    )\n    if version_match:\n        return version_match.group(1)\n    raise RuntimeError(\"Unable to find version string.\")\n\n\nrequires = [\n    'jmespath>=0.7.1,<2.0.0',\n    'python-dateutil>=2.1,<3.0.0',\n    # Prior to Python 3.10, Python doesn't require openssl 1.1.1\n    # but urllib3 2.0+ does. This means all botocore users will be\n    # broken by default on Amazon Linux 2 and AWS Lambda without this pin.\n    'urllib3>=1.25.4,<1.27 ; python_version < \"3.10\"',\n    'urllib3>=1.25.4,!=2.2.0,<3 ; python_version >= \"3.10\"',\n]\n\nextras_require = {\n    'crt': ['awscrt==0.19.19'],\n}\n\nsetup(\n    name='botocore',\n    version=find_version(\"botocore\", \"__init__.py\"),\n    description='Low-level, data-driven core of boto 3.',\n    long_description=open('README.rst').read(),\n    author='Amazon Web Services',\n    url='https://github.com/boto/botocore',\n    scripts=[],\n    packages=find_packages(exclude=['tests*']),\n    package_data={\n        'botocore': ['cacert.pem', 'data/*.json', 'data/*/*.json'],\n        'botocore.vendored.requests': ['*.pem'],\n    },\n    include_package_data=True,\n    install_requires=requires,\n    extras_require=extras_require,\n    license=\"Apache License 2.0\",\n    python_requires=\">= 3.8\",\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'Natural Language :: English',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3 :: Only',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3.9',\n        'Programming Language :: Python :: 3.10',\n        'Programming Language :: Python :: 3.11',\n        'Programming Language :: Python :: 3.12',\n    ],\n)\n", "path": "setup.py"}]}