Repository: pydantic/pydantic

Issue:
On Python 3.11 pydantic's use of dataclass_transform is incorrect
### Initial Checks

- [X] I have searched GitHub for a duplicate issue and I'm sure this is something new
- [X] I have searched Google & StackOverflow for a solution and couldn't find anything
- [X] I have read and followed [the docs](https://pydantic-docs.helpmanual.io) and still think this is a bug
- [X] I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like [FastAPI](https://fastapi.tiangolo.com) or [mypy](https://mypy.readthedocs.io/en/stable))


### Description

Pydantic uses PEP 681's `dataclass_transform` for compatibility with static type checkers. One of the features described in PEP 681 is the ability to describe a set of custom "field specifier" classes. In an early version of PEP 681, these were specified using a parameter named `field_descriptors`, but based on feedback the parameter name was changed to `field_specifiers` for the final version of the PEP. Pydantic is still using the (now obsolete) parameter name.

See https://github.com/microsoft/pyright/issues/3912 for details.

### Example Code

_No response_

### Python, Pydantic & OS Version

```Text
Python 3.11
Pydantic 1.10.2
```


### Affected Components

- [ ] [Compatibility between releases](https://pydantic-docs.helpmanual.io/changelog/)
- [ ] [Data validation/parsing](https://pydantic-docs.helpmanual.io/usage/models/#basic-model-usage)
- [ ] [Data serialization](https://pydantic-docs.helpmanual.io/usage/exporting_models/) - `.dict()` and `.json()`
- [ ] [JSON Schema](https://pydantic-docs.helpmanual.io/usage/schema/)
- [ ] [Dataclasses](https://pydantic-docs.helpmanual.io/usage/dataclasses/)
- [ ] [Model Config](https://pydantic-docs.helpmanual.io/usage/model_config/)
- [X] [Field Types](https://pydantic-docs.helpmanual.io/usage/types/) - adding or changing a particular data type
- [ ] [Function validation decorator](https://pydantic-docs.helpmanual.io/usage/validation_decorator/)
- [ ] [Generic Models](https://pydantic-docs.helpmanual.io/usage/models/#generic-models)
- [X] [Other Model behaviour](https://pydantic-docs.helpmanual.io/usage/models/) - `construct()`, pickling, private attributes, ORM mode
- [ ] [Settings Management](https://pydantic-docs.helpmanual.io/usage/settings/)
- [ ] [Plugins](https://pydantic-docs.helpmanual.io/) and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.


Discussion:
Thanks so much, will fix.

Resolving patch:
diff --git a/pydantic/dataclasses.py b/pydantic/dataclasses.py
--- a/pydantic/dataclasses.py
+++ b/pydantic/dataclasses.py
@@ -105,7 +105,7 @@ def __validate__(cls: Type['DataclassT'], v: Any) -> 'DataclassT':
 
 if sys.version_info >= (3, 10):
 
-    @dataclass_transform(kw_only_default=True, field_descriptors=(Field, FieldInfo))
+    @dataclass_transform(kw_only_default=True, field_specifiers=(Field, FieldInfo))
     @overload
     def dataclass(
         *,
@@ -121,7 +121,7 @@ def dataclass(
     ) -> Callable[[Type[_T]], 'DataclassClassOrWrapper']:
         ...
 
-    @dataclass_transform(kw_only_default=True, field_descriptors=(Field, FieldInfo))
+    @dataclass_transform(kw_only_default=True, field_specifiers=(Field, FieldInfo))
     @overload
     def dataclass(
         _cls: Type[_T],
@@ -140,7 +140,7 @@ def dataclass(
 
 else:
 
-    @dataclass_transform(kw_only_default=True, field_descriptors=(Field, FieldInfo))
+    @dataclass_transform(kw_only_default=True, field_specifiers=(Field, FieldInfo))
     @overload
     def dataclass(
         *,
@@ -155,7 +155,7 @@ def dataclass(
     ) -> Callable[[Type[_T]], 'DataclassClassOrWrapper']:
         ...
 
-    @dataclass_transform(kw_only_default=True, field_descriptors=(Field, FieldInfo))
+    @dataclass_transform(kw_only_default=True, field_specifiers=(Field, FieldInfo))
     @overload
     def dataclass(
         _cls: Type[_T],
@@ -172,7 +172,7 @@ def dataclass(
         ...
 
 
-@dataclass_transform(kw_only_default=True, field_descriptors=(Field, FieldInfo))
+@dataclass_transform(kw_only_default=True, field_specifiers=(Field, FieldInfo))
 def dataclass(
     _cls: Optional[Type[_T]] = None,
     *,
diff --git a/pydantic/main.py b/pydantic/main.py
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -118,7 +118,7 @@ def hash_function(self_: Any) -> int:
 _is_base_model_class_defined = False
 
 
-@dataclass_transform(kw_only_default=True, field_descriptors=(Field, FieldInfo))
+@dataclass_transform(kw_only_default=True, field_specifiers=(Field, FieldInfo))
 class ModelMetaclass(ABCMeta):
     @no_type_check  # noqa C901
     def __new__(mcs, name, bases, namespace, **kwargs):  # noqa C901


Test patch: