prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Update solr Docker tag to v8.11.2
  [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
  
  This PR contains the following updates:
  
  | Package | Update | Change |
  |---|---|---|
  | [solr](https://togithub.com/apache/solr) | minor | `8.10.1` -> `8.11.2` |
  
  ---
  
  ### Configuration
  
  📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
  
  🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
  
  ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
  
  🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
  
  ---
  
   - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
  
  ---
  
  This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/internetarchive/openlibrary).
  <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTQuMiIsInVwZGF0ZWRJblZlciI6IjM2LjQwLjMiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `openlibrary/solr/types_generator.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 import os
  3 
  4 root = os.path.dirname(__file__)
  5 OVERRIDES = {'type': "Literal['work', 'author', 'subject']"}
  6 
  7 
  8 def generate():
  9     """This function generates the types.py file."""
  10     import xml.etree.ElementTree as ET
  11 
  12     # read the managed-schema xml file
  13     solr_schema = ET.parse(os.path.join(root, '../../conf/solr/conf/managed-schema'))
  14     python_fields: list[str] = []
  15     seen_names: set[str] = set()
  16     for field in solr_schema.getroot().findall('field'):
  17         name = field.get('name')
  18         if name.startswith('_'):
  19             continue
  20 
  21         required = field.get('required') == 'true'
  22         typ = field.get('type')
  23         multivalued = field.get('multiValued') == 'true'
  24         type_map = {
  25             'pint': 'int',
  26             'string': 'str',
  27             'text_en_splitting': 'str',
  28             'text_general': 'str',
  29             'text_international': 'str',
  30             'text_title_sort': 'str',
  31             'boolean': 'bool',
  32             'pfloat': 'float',
  33         }
  34 
  35         if name in OVERRIDES:
  36             python_type = OVERRIDES[name]
  37         elif typ in type_map:
  38             python_type = type_map[typ]
  39         elif (
  40             field_type := solr_schema.find(f".//fieldType[@name='{typ}']")
  41         ) is not None:
  42             field_class = field_type.get('class')
  43             if field_class == 'solr.EnumFieldType':
  44                 enumsConfigFile = field_type.get('enumsConfig')
  45                 enumsConfig = ET.parse(
  46                     os.path.join(root, '../../conf/solr/conf/', enumsConfigFile)
  47                 )
  48                 enum_values = [
  49                     el.text
  50                     for el in enumsConfig.findall(
  51                         f".//enum[@name='{field_type.get('enumName')}']/value"
  52                     )
  53                 ]
  54                 python_type = f"Literal[{', '.join(map(repr, enum_values))}]"
  55             else:
  56                 raise Exception(f"Unknown field type class {field_class}")
  57         else:
  58             raise Exception(f"Unknown field type {typ}")
  59 
  60         if name not in OVERRIDES:
  61             if multivalued:
  62                 python_type = f"list[{python_type}]"
  63             if not required:
  64                 python_type = f"Optional[{python_type}]"
  65 
  66         seen_names.add(name)
  67         python_fields.append(f"    {name}: {python_type}")
  68 
  69     for key in set(OVERRIDES) - seen_names:
  70         python_fields.append(f"    {key}: {OVERRIDES[key]}")
  71 
  72     body = '\n'.join(python_fields)
  73     python = f"""# This file is auto-generated by types_generator.py
  74 # fmt: off
  75 from typing import Literal, TypedDict, Optional
  76 
  77 
  78 class SolrDocument(TypedDict):
  79 {body}
  80 
  81 # fmt: on"""
  82 
  83     return python
  84 
  85 
  86 if __name__ == '__main__':
  87     print(generate())
  88
  ```
  --- 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/openlibrary/solr/types_generator.py b/openlibrary/solr/types_generator.py
  --- a/openlibrary/solr/types_generator.py
  +++ b/openlibrary/solr/types_generator.py
  @@ -10,7 +10,9 @@
       import xml.etree.ElementTree as ET
   
       # read the managed-schema xml file
  -    solr_schema = ET.parse(os.path.join(root, '../../conf/solr/conf/managed-schema'))
  +    solr_schema = ET.parse(
  +        os.path.join(root, '../../conf/solr/conf/managed-schema.xml')
  +    )
       python_fields: list[str] = []
       seen_names: set[str] = set()
       for field in solr_schema.getroot().findall('field'):
  
verification_info: {"golden_diff": "diff --git a/openlibrary/solr/types_generator.py b/openlibrary/solr/types_generator.py\n--- a/openlibrary/solr/types_generator.py\n+++ b/openlibrary/solr/types_generator.py\n@@ -10,7 +10,9 @@\n     import xml.etree.ElementTree as ET\n \n     # read the managed-schema xml file\n-    solr_schema = ET.parse(os.path.join(root, '../../conf/solr/conf/managed-schema'))\n+    solr_schema = ET.parse(\n+        os.path.join(root, '../../conf/solr/conf/managed-schema.xml')\n+    )\n     python_fields: list[str] = []\n     seen_names: set[str] = set()\n     for field in solr_schema.getroot().findall('field'):\n", "issue": "Update solr Docker tag to v8.11.2\n[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)\n\nThis PR contains the following updates:\n\n| Package | Update | Change |\n|---|---|---|\n| [solr](https://togithub.com/apache/solr) | minor | `8.10.1` -> `8.11.2` |\n\n---\n\n### Configuration\n\n\ud83d\udcc5 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).\n\n\ud83d\udea6 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.\n\n\u267b **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.\n\n\ud83d\udd15 **Ignore**: Close this PR and you won't be reminded about this update again.\n\n---\n\n - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box\n\n---\n\nThis PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/internetarchive/openlibrary).\n<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTQuMiIsInVwZGF0ZWRJblZlciI6IjM2LjQwLjMiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->\n\n", "before_files": [{"content": "#!/usr/bin/env python\nimport os\n\nroot = os.path.dirname(__file__)\nOVERRIDES = {'type': \"Literal['work', 'author', 'subject']\"}\n\n\ndef generate():\n    \"\"\"This function generates the types.py file.\"\"\"\n    import xml.etree.ElementTree as ET\n\n    # read the managed-schema xml file\n    solr_schema = ET.parse(os.path.join(root, '../../conf/solr/conf/managed-schema'))\n    python_fields: list[str] = []\n    seen_names: set[str] = set()\n    for field in solr_schema.getroot().findall('field'):\n        name = field.get('name')\n        if name.startswith('_'):\n            continue\n\n        required = field.get('required') == 'true'\n        typ = field.get('type')\n        multivalued = field.get('multiValued') == 'true'\n        type_map = {\n            'pint': 'int',\n            'string': 'str',\n            'text_en_splitting': 'str',\n            'text_general': 'str',\n            'text_international': 'str',\n            'text_title_sort': 'str',\n            'boolean': 'bool',\n            'pfloat': 'float',\n        }\n\n        if name in OVERRIDES:\n            python_type = OVERRIDES[name]\n        elif typ in type_map:\n            python_type = type_map[typ]\n        elif (\n            field_type := solr_schema.find(f\".//fieldType[@name='{typ}']\")\n        ) is not None:\n            field_class = field_type.get('class')\n            if field_class == 'solr.EnumFieldType':\n                enumsConfigFile = field_type.get('enumsConfig')\n                enumsConfig = ET.parse(\n                    os.path.join(root, '../../conf/solr/conf/', enumsConfigFile)\n                )\n                enum_values = [\n                    el.text\n                    for el in enumsConfig.findall(\n                        f\".//enum[@name='{field_type.get('enumName')}']/value\"\n                    )\n                ]\n                python_type = f\"Literal[{', '.join(map(repr, enum_values))}]\"\n            else:\n                raise Exception(f\"Unknown field type class {field_class}\")\n        else:\n            raise Exception(f\"Unknown field type {typ}\")\n\n        if name not in OVERRIDES:\n            if multivalued:\n                python_type = f\"list[{python_type}]\"\n            if not required:\n                python_type = f\"Optional[{python_type}]\"\n\n        seen_names.add(name)\n        python_fields.append(f\"    {name}: {python_type}\")\n\n    for key in set(OVERRIDES) - seen_names:\n        python_fields.append(f\"    {key}: {OVERRIDES[key]}\")\n\n    body = '\\n'.join(python_fields)\n    python = f\"\"\"# This file is auto-generated by types_generator.py\n# fmt: off\nfrom typing import Literal, TypedDict, Optional\n\n\nclass SolrDocument(TypedDict):\n{body}\n\n# fmt: on\"\"\"\n\n    return python\n\n\nif __name__ == '__main__':\n    print(generate())\n", "path": "openlibrary/solr/types_generator.py"}], "after_files": [{"content": "#!/usr/bin/env python\nimport os\n\nroot = os.path.dirname(__file__)\nOVERRIDES = {'type': \"Literal['work', 'author', 'subject']\"}\n\n\ndef generate():\n    \"\"\"This function generates the types.py file.\"\"\"\n    import xml.etree.ElementTree as ET\n\n    # read the managed-schema xml file\n    solr_schema = ET.parse(\n        os.path.join(root, '../../conf/solr/conf/managed-schema.xml')\n    )\n    python_fields: list[str] = []\n    seen_names: set[str] = set()\n    for field in solr_schema.getroot().findall('field'):\n        name = field.get('name')\n        if name.startswith('_'):\n            continue\n\n        required = field.get('required') == 'true'\n        typ = field.get('type')\n        multivalued = field.get('multiValued') == 'true'\n        type_map = {\n            'pint': 'int',\n            'string': 'str',\n            'text_en_splitting': 'str',\n            'text_general': 'str',\n            'text_international': 'str',\n            'text_title_sort': 'str',\n            'boolean': 'bool',\n            'pfloat': 'float',\n        }\n\n        if name in OVERRIDES:\n            python_type = OVERRIDES[name]\n        elif typ in type_map:\n            python_type = type_map[typ]\n        elif (\n            field_type := solr_schema.find(f\".//fieldType[@name='{typ}']\")\n        ) is not None:\n            field_class = field_type.get('class')\n            if field_class == 'solr.EnumFieldType':\n                enumsConfigFile = field_type.get('enumsConfig')\n                enumsConfig = ET.parse(\n                    os.path.join(root, '../../conf/solr/conf/', enumsConfigFile)\n                )\n                enum_values = [\n                    el.text\n                    for el in enumsConfig.findall(\n                        f\".//enum[@name='{field_type.get('enumName')}']/value\"\n                    )\n                ]\n                python_type = f\"Literal[{', '.join(map(repr, enum_values))}]\"\n            else:\n                raise Exception(f\"Unknown field type class {field_class}\")\n        else:\n            raise Exception(f\"Unknown field type {typ}\")\n\n        if name not in OVERRIDES:\n            if multivalued:\n                python_type = f\"list[{python_type}]\"\n            if not required:\n                python_type = f\"Optional[{python_type}]\"\n\n        seen_names.add(name)\n        python_fields.append(f\"    {name}: {python_type}\")\n\n    for key in set(OVERRIDES) - seen_names:\n        python_fields.append(f\"    {key}: {OVERRIDES[key]}\")\n\n    body = '\\n'.join(python_fields)\n    python = f\"\"\"# This file is auto-generated by types_generator.py\n# fmt: off\nfrom typing import Literal, TypedDict, Optional\n\n\nclass SolrDocument(TypedDict):\n{body}\n\n# fmt: on\"\"\"\n\n    return python\n\n\nif __name__ == '__main__':\n    print(generate())\n", "path": "openlibrary/solr/types_generator.py"}]}