prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  ContrainedFloatValue from pydantic needs support
  <!-- Provide a general summary of the bug in the title above. -->
  
  <!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
  <!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
  
  ## Describe the Bug
  
  <!-- A clear and concise description of what the bug is. -->
  
  I am trying to import the below into a strawberry type
  
  ```
  class coordinates(BaseModel):
      latitude: float= Field(...,gt=-90,lt=90)
      longitude: float= Field(...,gt=-180,lt=180)
      accuracy: int | None = Field(None, gt=50, lt=100)
  ```
  
  However, I run into this error:
  
  TypeError: Coordinates fields cannot be resolved. Unexpected type '<class 'schema.ConstrainedFloatValue'>'
  
  If, I change `latitude: float= Field(...,gt=-90,lt=90)` into `latitude: int= Field(...,gt=-90,lt=90)`
  
  Then importing using the below works:
  
  ```
  @strawberry.experimental.pydantic.type(model=coordinates)
  class Coordinates:
      """ 
      Class that takes in coordinates from GeoLocation Provider in front-end
      """ 
      latitude: strawberry.auto
      longitude: strawberry.auto
      accuracy: strawberry.auto
      timestamp: Date
  ```
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `strawberry/experimental/pydantic/fields.py`
  Content:
  ```
  1 import builtins
  2 from decimal import Decimal
  3 from typing import Any, List, Optional, Type
  4 from uuid import UUID
  5 
  6 import pydantic
  7 from pydantic import BaseModel
  8 from pydantic.typing import get_args, get_origin, is_new_type, new_type_supertype
  9 from pydantic.utils import lenient_issubclass
  10 
  11 from strawberry.experimental.pydantic.exceptions import (
  12     UnregisteredTypeException,
  13     UnsupportedTypeError,
  14 )
  15 from strawberry.types.types import TypeDefinition
  16 
  17 try:
  18     from typing import GenericAlias as TypingGenericAlias  # type: ignore
  19 except ImportError:
  20     # python < 3.9 does not have GenericAlias (list[int], tuple[str, ...] and so on)
  21     TypingGenericAlias = ()
  22 
  23 
  24 ATTR_TO_TYPE_MAP = {
  25     "NoneStr": Optional[str],
  26     "NoneBytes": Optional[bytes],
  27     "StrBytes": None,
  28     "NoneStrBytes": None,
  29     "StrictStr": str,
  30     "ConstrainedBytes": bytes,
  31     "conbytes": bytes,
  32     "ConstrainedStr": str,
  33     "constr": str,
  34     "EmailStr": str,
  35     "PyObject": None,
  36     "ConstrainedInt": int,
  37     "conint": int,
  38     "PositiveInt": int,
  39     "NegativeInt": int,
  40     "ConstrainedFloat": float,
  41     "confloat": float,
  42     "PositiveFloat": float,
  43     "NegativeFloat": float,
  44     "ConstrainedDecimal": Decimal,
  45     "condecimal": Decimal,
  46     "UUID1": UUID,
  47     "UUID3": UUID,
  48     "UUID4": UUID,
  49     "UUID5": UUID,
  50     "FilePath": None,
  51     "DirectoryPath": None,
  52     "Json": None,
  53     "JsonWrapper": None,
  54     "SecretStr": str,
  55     "SecretBytes": bytes,
  56     "StrictBool": bool,
  57     "StrictInt": int,
  58     "StrictFloat": float,
  59     "PaymentCardNumber": None,
  60     "ByteSize": None,
  61     "AnyUrl": str,
  62     "AnyHttpUrl": str,
  63     "HttpUrl": str,
  64     "PostgresDsn": str,
  65     "RedisDsn": str,
  66 }
  67 
  68 
  69 FIELDS_MAP = {
  70     getattr(pydantic, field_name): type
  71     for field_name, type in ATTR_TO_TYPE_MAP.items()
  72     if hasattr(pydantic, field_name)
  73 }
  74 
  75 
  76 def get_basic_type(type_) -> Type[Any]:
  77     if lenient_issubclass(type_, pydantic.ConstrainedInt):
  78         return int
  79     if lenient_issubclass(type_, pydantic.ConstrainedStr):
  80         return str
  81     if lenient_issubclass(type_, pydantic.ConstrainedList):
  82         return List[get_basic_type(type_.item_type)]  # type: ignore
  83 
  84     if type_ in FIELDS_MAP:
  85         type_ = FIELDS_MAP.get(type_)
  86 
  87         if type_ is None:
  88             raise UnsupportedTypeError()
  89 
  90     if is_new_type(type_):
  91         return new_type_supertype(type_)
  92 
  93     return type_
  94 
  95 
  96 def replace_pydantic_types(type_: Any, is_input: bool):
  97     if lenient_issubclass(type_, BaseModel):
  98         attr = "_strawberry_input_type" if is_input else "_strawberry_type"
  99         if hasattr(type_, attr):
  100             return getattr(type_, attr)
  101         else:
  102             raise UnregisteredTypeException(type_)
  103     return type_
  104 
  105 
  106 def replace_types_recursively(type_: Any, is_input: bool) -> Any:
  107     """Runs the conversions recursively into the arguments of generic types if any"""
  108     basic_type = get_basic_type(type_)
  109     replaced_type = replace_pydantic_types(basic_type, is_input)
  110 
  111     origin = get_origin(type_)
  112     if not origin or not hasattr(type_, "__args__"):
  113         return replaced_type
  114 
  115     converted = tuple(
  116         replace_types_recursively(t, is_input=is_input) for t in get_args(replaced_type)
  117     )
  118 
  119     if isinstance(replaced_type, TypingGenericAlias):
  120         return TypingGenericAlias(origin, converted)
  121 
  122     replaced_type = replaced_type.copy_with(converted)
  123 
  124     if isinstance(replaced_type, TypeDefinition):
  125         # TODO: Not sure if this is necessary. No coverage in tests
  126         # TODO: Unnecessary with StrawberryObject
  127         replaced_type = builtins.type(
  128             replaced_type.name,
  129             (),
  130             {"_type_definition": replaced_type},
  131         )
  132 
  133     return replaced_type
  134
  ```
  --- 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/strawberry/experimental/pydantic/fields.py b/strawberry/experimental/pydantic/fields.py
  --- a/strawberry/experimental/pydantic/fields.py
  +++ b/strawberry/experimental/pydantic/fields.py
  @@ -76,6 +76,8 @@
   def get_basic_type(type_) -> Type[Any]:
       if lenient_issubclass(type_, pydantic.ConstrainedInt):
           return int
  +    if lenient_issubclass(type_, pydantic.ConstrainedFloat):
  +        return float
       if lenient_issubclass(type_, pydantic.ConstrainedStr):
           return str
       if lenient_issubclass(type_, pydantic.ConstrainedList):
  
verification_info: {"golden_diff": "diff --git a/strawberry/experimental/pydantic/fields.py b/strawberry/experimental/pydantic/fields.py\n--- a/strawberry/experimental/pydantic/fields.py\n+++ b/strawberry/experimental/pydantic/fields.py\n@@ -76,6 +76,8 @@\n def get_basic_type(type_) -> Type[Any]:\n     if lenient_issubclass(type_, pydantic.ConstrainedInt):\n         return int\n+    if lenient_issubclass(type_, pydantic.ConstrainedFloat):\n+        return float\n     if lenient_issubclass(type_, pydantic.ConstrainedStr):\n         return str\n     if lenient_issubclass(type_, pydantic.ConstrainedList):\n", "issue": "ContrainedFloatValue from pydantic needs support\n<!-- Provide a general summary of the bug in the title above. -->\r\n\r\n<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->\r\n<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->\r\n\r\n## Describe the Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nI am trying to import the below into a strawberry type\r\n\r\n```\r\nclass coordinates(BaseModel):\r\n    latitude: float= Field(...,gt=-90,lt=90)\r\n    longitude: float= Field(...,gt=-180,lt=180)\r\n    accuracy: int | None = Field(None, gt=50, lt=100)\r\n```\r\n\r\nHowever, I run into this error:\r\n\r\nTypeError: Coordinates fields cannot be resolved. Unexpected type '<class 'schema.ConstrainedFloatValue'>'\r\n\r\nIf, I change `latitude: float= Field(...,gt=-90,lt=90)` into `latitude: int= Field(...,gt=-90,lt=90)`\r\n\r\nThen importing using the below works:\r\n\r\n```\r\n@strawberry.experimental.pydantic.type(model=coordinates)\r\nclass Coordinates:\r\n    \"\"\" \r\n    Class that takes in coordinates from GeoLocation Provider in front-end\r\n    \"\"\" \r\n    latitude: strawberry.auto\r\n    longitude: strawberry.auto\r\n    accuracy: strawberry.auto\r\n    timestamp: Date\r\n```\r\n\r\n\n", "before_files": [{"content": "import builtins\nfrom decimal import Decimal\nfrom typing import Any, List, Optional, Type\nfrom uuid import UUID\n\nimport pydantic\nfrom pydantic import BaseModel\nfrom pydantic.typing import get_args, get_origin, is_new_type, new_type_supertype\nfrom pydantic.utils import lenient_issubclass\n\nfrom strawberry.experimental.pydantic.exceptions import (\n    UnregisteredTypeException,\n    UnsupportedTypeError,\n)\nfrom strawberry.types.types import TypeDefinition\n\ntry:\n    from typing import GenericAlias as TypingGenericAlias  # type: ignore\nexcept ImportError:\n    # python < 3.9 does not have GenericAlias (list[int], tuple[str, ...] and so on)\n    TypingGenericAlias = ()\n\n\nATTR_TO_TYPE_MAP = {\n    \"NoneStr\": Optional[str],\n    \"NoneBytes\": Optional[bytes],\n    \"StrBytes\": None,\n    \"NoneStrBytes\": None,\n    \"StrictStr\": str,\n    \"ConstrainedBytes\": bytes,\n    \"conbytes\": bytes,\n    \"ConstrainedStr\": str,\n    \"constr\": str,\n    \"EmailStr\": str,\n    \"PyObject\": None,\n    \"ConstrainedInt\": int,\n    \"conint\": int,\n    \"PositiveInt\": int,\n    \"NegativeInt\": int,\n    \"ConstrainedFloat\": float,\n    \"confloat\": float,\n    \"PositiveFloat\": float,\n    \"NegativeFloat\": float,\n    \"ConstrainedDecimal\": Decimal,\n    \"condecimal\": Decimal,\n    \"UUID1\": UUID,\n    \"UUID3\": UUID,\n    \"UUID4\": UUID,\n    \"UUID5\": UUID,\n    \"FilePath\": None,\n    \"DirectoryPath\": None,\n    \"Json\": None,\n    \"JsonWrapper\": None,\n    \"SecretStr\": str,\n    \"SecretBytes\": bytes,\n    \"StrictBool\": bool,\n    \"StrictInt\": int,\n    \"StrictFloat\": float,\n    \"PaymentCardNumber\": None,\n    \"ByteSize\": None,\n    \"AnyUrl\": str,\n    \"AnyHttpUrl\": str,\n    \"HttpUrl\": str,\n    \"PostgresDsn\": str,\n    \"RedisDsn\": str,\n}\n\n\nFIELDS_MAP = {\n    getattr(pydantic, field_name): type\n    for field_name, type in ATTR_TO_TYPE_MAP.items()\n    if hasattr(pydantic, field_name)\n}\n\n\ndef get_basic_type(type_) -> Type[Any]:\n    if lenient_issubclass(type_, pydantic.ConstrainedInt):\n        return int\n    if lenient_issubclass(type_, pydantic.ConstrainedStr):\n        return str\n    if lenient_issubclass(type_, pydantic.ConstrainedList):\n        return List[get_basic_type(type_.item_type)]  # type: ignore\n\n    if type_ in FIELDS_MAP:\n        type_ = FIELDS_MAP.get(type_)\n\n        if type_ is None:\n            raise UnsupportedTypeError()\n\n    if is_new_type(type_):\n        return new_type_supertype(type_)\n\n    return type_\n\n\ndef replace_pydantic_types(type_: Any, is_input: bool):\n    if lenient_issubclass(type_, BaseModel):\n        attr = \"_strawberry_input_type\" if is_input else \"_strawberry_type\"\n        if hasattr(type_, attr):\n            return getattr(type_, attr)\n        else:\n            raise UnregisteredTypeException(type_)\n    return type_\n\n\ndef replace_types_recursively(type_: Any, is_input: bool) -> Any:\n    \"\"\"Runs the conversions recursively into the arguments of generic types if any\"\"\"\n    basic_type = get_basic_type(type_)\n    replaced_type = replace_pydantic_types(basic_type, is_input)\n\n    origin = get_origin(type_)\n    if not origin or not hasattr(type_, \"__args__\"):\n        return replaced_type\n\n    converted = tuple(\n        replace_types_recursively(t, is_input=is_input) for t in get_args(replaced_type)\n    )\n\n    if isinstance(replaced_type, TypingGenericAlias):\n        return TypingGenericAlias(origin, converted)\n\n    replaced_type = replaced_type.copy_with(converted)\n\n    if isinstance(replaced_type, TypeDefinition):\n        # TODO: Not sure if this is necessary. No coverage in tests\n        # TODO: Unnecessary with StrawberryObject\n        replaced_type = builtins.type(\n            replaced_type.name,\n            (),\n            {\"_type_definition\": replaced_type},\n        )\n\n    return replaced_type\n", "path": "strawberry/experimental/pydantic/fields.py"}], "after_files": [{"content": "import builtins\nfrom decimal import Decimal\nfrom typing import Any, List, Optional, Type\nfrom uuid import UUID\n\nimport pydantic\nfrom pydantic import BaseModel\nfrom pydantic.typing import get_args, get_origin, is_new_type, new_type_supertype\nfrom pydantic.utils import lenient_issubclass\n\nfrom strawberry.experimental.pydantic.exceptions import (\n    UnregisteredTypeException,\n    UnsupportedTypeError,\n)\nfrom strawberry.types.types import TypeDefinition\n\ntry:\n    from typing import GenericAlias as TypingGenericAlias  # type: ignore\nexcept ImportError:\n    # python < 3.9 does not have GenericAlias (list[int], tuple[str, ...] and so on)\n    TypingGenericAlias = ()\n\n\nATTR_TO_TYPE_MAP = {\n    \"NoneStr\": Optional[str],\n    \"NoneBytes\": Optional[bytes],\n    \"StrBytes\": None,\n    \"NoneStrBytes\": None,\n    \"StrictStr\": str,\n    \"ConstrainedBytes\": bytes,\n    \"conbytes\": bytes,\n    \"ConstrainedStr\": str,\n    \"constr\": str,\n    \"EmailStr\": str,\n    \"PyObject\": None,\n    \"ConstrainedInt\": int,\n    \"conint\": int,\n    \"PositiveInt\": int,\n    \"NegativeInt\": int,\n    \"ConstrainedFloat\": float,\n    \"confloat\": float,\n    \"PositiveFloat\": float,\n    \"NegativeFloat\": float,\n    \"ConstrainedDecimal\": Decimal,\n    \"condecimal\": Decimal,\n    \"UUID1\": UUID,\n    \"UUID3\": UUID,\n    \"UUID4\": UUID,\n    \"UUID5\": UUID,\n    \"FilePath\": None,\n    \"DirectoryPath\": None,\n    \"Json\": None,\n    \"JsonWrapper\": None,\n    \"SecretStr\": str,\n    \"SecretBytes\": bytes,\n    \"StrictBool\": bool,\n    \"StrictInt\": int,\n    \"StrictFloat\": float,\n    \"PaymentCardNumber\": None,\n    \"ByteSize\": None,\n    \"AnyUrl\": str,\n    \"AnyHttpUrl\": str,\n    \"HttpUrl\": str,\n    \"PostgresDsn\": str,\n    \"RedisDsn\": str,\n}\n\n\nFIELDS_MAP = {\n    getattr(pydantic, field_name): type\n    for field_name, type in ATTR_TO_TYPE_MAP.items()\n    if hasattr(pydantic, field_name)\n}\n\n\ndef get_basic_type(type_) -> Type[Any]:\n    if lenient_issubclass(type_, pydantic.ConstrainedInt):\n        return int\n    if lenient_issubclass(type_, pydantic.ConstrainedFloat):\n        return float\n    if lenient_issubclass(type_, pydantic.ConstrainedStr):\n        return str\n    if lenient_issubclass(type_, pydantic.ConstrainedList):\n        return List[get_basic_type(type_.item_type)]  # type: ignore\n\n    if type_ in FIELDS_MAP:\n        type_ = FIELDS_MAP.get(type_)\n\n        if type_ is None:\n            raise UnsupportedTypeError()\n\n    if is_new_type(type_):\n        return new_type_supertype(type_)\n\n    return type_\n\n\ndef replace_pydantic_types(type_: Any, is_input: bool):\n    if lenient_issubclass(type_, BaseModel):\n        attr = \"_strawberry_input_type\" if is_input else \"_strawberry_type\"\n        if hasattr(type_, attr):\n            return getattr(type_, attr)\n        else:\n            raise UnregisteredTypeException(type_)\n    return type_\n\n\ndef replace_types_recursively(type_: Any, is_input: bool) -> Any:\n    \"\"\"Runs the conversions recursively into the arguments of generic types if any\"\"\"\n    basic_type = get_basic_type(type_)\n    replaced_type = replace_pydantic_types(basic_type, is_input)\n\n    origin = get_origin(type_)\n    if not origin or not hasattr(type_, \"__args__\"):\n        return replaced_type\n\n    converted = tuple(\n        replace_types_recursively(t, is_input=is_input) for t in get_args(replaced_type)\n    )\n\n    if isinstance(replaced_type, TypingGenericAlias):\n        return TypingGenericAlias(origin, converted)\n\n    replaced_type = replaced_type.copy_with(converted)\n\n    if isinstance(replaced_type, TypeDefinition):\n        # TODO: Not sure if this is necessary. No coverage in tests\n        # TODO: Unnecessary with StrawberryObject\n        replaced_type = builtins.type(\n            replaced_type.name,\n            (),\n            {\"_type_definition\": replaced_type},\n        )\n\n    return replaced_type\n", "path": "strawberry/experimental/pydantic/fields.py"}]}