## Change Summary

To pull in the fixes from core. :)

## Related issue number

N/A

## Checklist

* [ ] The pull request title is a good summary of the changes - it will be used in the changelog
* [ ] Unit tests for the changes exist
* [ ] Tests pass on CI
* [ ] Documentation reflects the changes where applicable
* [ ] My PR is ready to review, **please add a comment including the phrase "please review" to assign reviewers**

Update `pydantic-core` to 2.11.0. ## Change Summary

To pull in the fixes from core. :)

## Related issue number

N/A

## Checklist

* [ ] The pull request title is a good summary of the changes - it will be used in the changelog
* [ ] Unit tests for the changes exist
* [ ] Tests pass on CI
* [ ] Documentation reflects the changes where applicable
* [ ] My PR is ready to review, **please add a comment including the phrase "please review" to assign reviewers**

[build-system]
requires = ['hatchling', 'hatch-fancy-pypi-readme>=22.5.0']
build-backend = 'hatchling.build'

[tool.hatch.version]
path = 'pydantic/version.py'

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.sdist]
# limit which files are included in the sdist (.tar.gz) asset,
# see https://github.com/pydantic/pydantic/pull/4542
include = [
    '/README.md',
    '/HISTORY.md',
    '/Makefile',
    '/pydantic',
    '/tests',
    '/requirements',
]

[project]
name = 'pydantic'
description = 'Data validation using Python type hints'
authors = [
    {name = 'Samuel Colvin', email = 's@muelcolvin.com'},
    {name = 'Eric Jolibois', email = 'em.jolibois@gmail.com'},
    {name = 'Hasan Ramezani', email = 'hasan.r67@gmail.com'},
    {name = 'Adrian Garcia Badaracco', email = '1755071+adriangb@users.noreply.github.com'},
    {name = 'Terrence Dorsey', email = 'terry@pydantic.dev'},
    {name = 'David Montague', email = 'david@pydantic.dev'},
]
license = 'MIT'
classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Programming Language :: Python',
    'Programming Language :: Python :: Implementation :: CPython',
    'Programming Language :: Python :: Implementation :: PyPy',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3 :: Only',
    'Programming Language :: Python :: 3.7',
    'Programming Language :: Python :: 3.8',
    'Programming Language :: Python :: 3.9',
    'Programming Language :: Python :: 3.10',
    'Programming Language :: Python :: 3.11',
    'Programming Language :: Python :: 3.12',
    'Intended Audience :: Developers',
    'Intended Audience :: Information Technology',
    'Intended Audience :: System Administrators',
    'License :: OSI Approved :: MIT License',
    'Operating System :: Unix',
    'Operating System :: POSIX :: Linux',
    'Environment :: Console',
    'Environment :: MacOS X',
    'Framework :: Hypothesis',
    'Framework :: Pydantic',
    'Topic :: Software Development :: Libraries :: Python Modules',
    'Topic :: Internet',
]
requires-python = '>=3.7'
dependencies = [
    'typing-extensions>=4.6.1',
    'annotated-types>=0.4.0',
    "pydantic-core==2.10.1",
]
dynamic = ['version', 'readme']

[project.optional-dependencies]
email = ['email-validator>=2.0.0']

[tool.pdm.dev-dependencies]
docs = [
    "autoflake",
    "mkdocs",
    "mkdocs-embed-external-markdown",
    "mkdocs-exclude",
    "mkdocs-material",
    "mkdocs-redirects",
    "mkdocs-simple-hooks",
    "mkdocstrings-python",
    "tomli",
    "pyupgrade",
    "mike @ git+https://github.com/jimporter/mike.git",
    "mkdocs-embed-external-markdown>=2.3.0",
    "black>=23.3.0",
    "pytest-examples>=0.0.10",
    "pydantic-settings>=2.0b1",
    "pydantic-extra-types @ git+https://github.com/pydantic/pydantic-extra-types.git@main"
]
linting = [
    "black",
    "ruff",
    "mypy~=1.1.1",
]
testing = [
    "coverage[toml]",
    "dirty-equals",
    "pytest",
    "pytest-mock",
    "pytest-pretty",
    "pytest-examples",
    "faker>=18.13.0",
    "pytest-benchmark>=4.0.0",
]
testing-extra = [
    # used when generate devtools docs example
    "ansi2html",
    "devtools",
    # used in docs tests
    "sqlalchemy>=2.0,<3.0",
    "greenlet>=3.0.0rc3",
]
mypy = [
    "mypy",
    "pydantic-settings>=2.0.0",
]
memray = [
    "pytest-memray; platform_system != 'Windows'",
]

[tool.pdm.resolution.overrides]
# requires Python > 3.8, we only test with 3.8 in CI but because of it won't lock properly
pytest-memray = "1.5.0"

[project.urls]
Homepage = 'https://github.com/pydantic/pydantic'
Documentation = 'https://docs.pydantic.dev'
Funding = 'https://github.com/sponsors/samuelcolvin'
Source = 'https://github.com/pydantic/pydantic'
Changelog = 'https://docs.pydantic.dev/latest/changelog/'

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = 'text/markdown'
# construct the PyPI readme from README.md and HISTORY.md
fragments = [
    {path = "README.md"},
    {text = "\n## Changelog\n\n"},
    {path = "HISTORY.md", pattern = "(.+?)<!-- package description limit -->"},
    {text = "\n... see [here](https://docs.pydantic.dev/changelog/#v0322-2019-08-17) for earlier changes.\n"},
]
# convert GitHuB issue/PR numbers and handles to links
substitutions = [
    {pattern = '(\s+)#(\d+)', replacement = '\1[#\2](https://github.com/pydantic/pydantic/issues/\2)'},
    {pattern = '(\s+)@([\w\-]+)', replacement = '\1[@\2](https://github.com/\2)'},
    {pattern = '@@', replacement = '@'},
]

[tool.pytest.ini_options]
testpaths = 'tests'
xfail_strict = true
filterwarnings = [
    'error',
    'ignore:path is deprecated.*:DeprecationWarning:',
    # Work around https://github.com/pytest-dev/pytest/issues/10977 for Python 3.12
    'ignore:(ast\.Str|ast\.NameConstant|ast\.Num|Attribute s) is deprecated and will be removed.*:DeprecationWarning:',
    # pytest-examples needs to remove `co_lnotab` in favor of `co_lines`.
    'ignore:co_lnotab is deprecated, use co_lines instead.:DeprecationWarning:',
]
addopts = [
    '--benchmark-columns', 'min,mean,stddev,outliers,rounds,iterations',
    '--benchmark-group-by', 'group',
    '--benchmark-warmup', 'on',
    '--benchmark-disable',  # this is enable by `make benchmark` when you actually want to run benchmarks
]

# configuring https://github.com/pydantic/hooky
[tool.hooky]
assignees = []
reviewers = ['samuelcolvin', 'adriangb', 'dmontagu', 'hramezani', 'lig', 'Kludex', 'davidhewitt', 'sydney-runkle']
require_change_file = false
unconfirmed_label = 'pending'

[tool.ruff]
line-length = 120
extend-select = ['Q', 'RUF100', 'C90', 'UP', 'I', 'D', 'T']
# E501 is handled by black
extend-ignore = ['D105', 'D107', 'D205', 'D415', 'E501']
flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'}
mccabe = { max-complexity = 14 }
isort = { known-first-party = ['pydantic', 'tests'] }
target-version = "py37"
extend-exclude = ['pydantic/v1', 'tests/mypy/outputs']

[tool.ruff.extend-per-file-ignores]
"docs/**/*.py" = ['T']
"tests/**/*.py" = ['T', 'E721', 'F811']
"tests/benchmarks/test_fastapi_startup_generics.py" = ['UP006', 'UP007']
"tests/benchmarks/test_fastapi_startup_simple.py" = ['UP006', 'UP007']

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
'docs/*' = ['D']
'pydantic/__init__.py' = ['F405', 'F403', 'D']
'tests/test_forward_ref.py' = ['F821']
'tests/*' = ['D']
'pydantic/deprecated/*' = ['D']
'pydantic/json_schema.py' = ['D']

[tool.coverage.run]
source = ['pydantic']
omit = ['pydantic/deprecated/*', 'pydantic/v1/*']
branch = true
context = '${CONTEXT}'

[tool.coverage.report]
precision = 2
exclude_lines = [
    'pragma: no cover',
    'raise NotImplementedError',
    'if TYPE_CHECKING:',
    'if typing.TYPE_CHECKING:',
    '@overload',
    '@typing.overload',
    '\(Protocol\):$',
    'typing.assert_never',
    'assert_never',
]

[tool.coverage.paths]
source = [
    'pydantic/',
    '/Users/runner/work/pydantic/pydantic/pydantic/',
    'D:\a\pydantic\pydantic\pydantic',
]

[tool.black]
color = true
line-length = 120
target-version = ['py310']
skip-string-normalization = true
exclude = '''
(
  /(
    pydantic/v1
    | tests/mypy/outputs
  )/
)
'''

[tool.pyright]
include = ['pydantic']
exclude = ['pydantic/_hypothesis_plugin.py', 'pydantic/mypy.py', 'pydantic/v1']
# reportUnnecessaryTypeIgnoreComment can't be set since we run pyright with multiple python versions
#reportUnnecessaryTypeIgnoreComment = true

[tool.codespell]
skip = '.git,env*,pydantic/v1/*'
# `ser` - abbreviation for "ser"ialisation
# `crate` - a rust crate
ignore-words-list = 'gir,ser,crate'

[build-system]
requires = ['hatchling', 'hatch-fancy-pypi-readme>=22.5.0']
build-backend = 'hatchling.build'

[tool.hatch.version]
path = 'pydantic/version.py'

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.sdist]
# limit which files are included in the sdist (.tar.gz) asset,
# see https://github.com/pydantic/pydantic/pull/4542
include = [
    '/README.md',
    '/HISTORY.md',
    '/Makefile',
    '/pydantic',
    '/tests',
    '/requirements',
]

[project]
name = 'pydantic'
description = 'Data validation using Python type hints'
authors = [
    {name = 'Samuel Colvin', email = 's@muelcolvin.com'},
    {name = 'Eric Jolibois', email = 'em.jolibois@gmail.com'},
    {name = 'Hasan Ramezani', email = 'hasan.r67@gmail.com'},
    {name = 'Adrian Garcia Badaracco', email = '1755071+adriangb@users.noreply.github.com'},
    {name = 'Terrence Dorsey', email = 'terry@pydantic.dev'},
    {name = 'David Montague', email = 'david@pydantic.dev'},
]
license = 'MIT'
classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Programming Language :: Python',
    'Programming Language :: Python :: Implementation :: CPython',
    'Programming Language :: Python :: Implementation :: PyPy',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3 :: Only',
    'Programming Language :: Python :: 3.7',
    'Programming Language :: Python :: 3.8',
    'Programming Language :: Python :: 3.9',
    'Programming Language :: Python :: 3.10',
    'Programming Language :: Python :: 3.11',
    'Programming Language :: Python :: 3.12',
    'Intended Audience :: Developers',
    'Intended Audience :: Information Technology',
    'Intended Audience :: System Administrators',
    'License :: OSI Approved :: MIT License',
    'Operating System :: Unix',
    'Operating System :: POSIX :: Linux',
    'Environment :: Console',
    'Environment :: MacOS X',
    'Framework :: Hypothesis',
    'Framework :: Pydantic',
    'Topic :: Software Development :: Libraries :: Python Modules',
    'Topic :: Internet',
]
requires-python = '>=3.7'
dependencies = [
    'typing-extensions>=4.6.1',
    'annotated-types>=0.4.0',
    "pydantic-core==2.11.0",
]
dynamic = ['version', 'readme']

[project.optional-dependencies]
email = ['email-validator>=2.0.0']

[tool.pdm.dev-dependencies]
docs = [
    "autoflake",
    "mkdocs",
    "mkdocs-embed-external-markdown",
    "mkdocs-exclude",
    "mkdocs-material",
    "mkdocs-redirects",
    "mkdocs-simple-hooks",
    "mkdocstrings-python",
    "tomli",
    "pyupgrade",
    "mike @ git+https://github.com/jimporter/mike.git",
    "mkdocs-embed-external-markdown>=2.3.0",
    "black>=23.3.0",
    "pytest-examples>=0.0.10",
    "pydantic-settings>=2.0b1",
    "pydantic-extra-types @ git+https://github.com/pydantic/pydantic-extra-types.git@main"
]
linting = [
    "black",
    "ruff",
    "mypy~=1.1.1",
]
testing = [
    "coverage[toml]",
    "dirty-equals",
    "pytest",
    "pytest-mock",
    "pytest-pretty",
    "pytest-examples",
    "faker>=18.13.0",
    "pytest-benchmark>=4.0.0",
]
testing-extra = [
    # used when generate devtools docs example
    "ansi2html",
    "devtools",
    # used in docs tests
    "sqlalchemy>=2.0,<3.0",
    "greenlet>=3.0.0rc3",
]
mypy = [
    "mypy",
    "pydantic-settings>=2.0.0",
]
memray = [
    "pytest-memray; platform_system != 'Windows'",
]

[tool.pdm.resolution.overrides]
# requires Python > 3.8, we only test with 3.8 in CI but because of it won't lock properly
pytest-memray = "1.5.0"

[project.urls]
Homepage = 'https://github.com/pydantic/pydantic'
Documentation = 'https://docs.pydantic.dev'
Funding = 'https://github.com/sponsors/samuelcolvin'
Source = 'https://github.com/pydantic/pydantic'
Changelog = 'https://docs.pydantic.dev/latest/changelog/'

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = 'text/markdown'
# construct the PyPI readme from README.md and HISTORY.md
fragments = [
    {path = "README.md"},
    {text = "\n## Changelog\n\n"},
    {path = "HISTORY.md", pattern = "(.+?)<!-- package description limit -->"},
    {text = "\n... see [here](https://docs.pydantic.dev/changelog/#v0322-2019-08-17) for earlier changes.\n"},
]
# convert GitHuB issue/PR numbers and handles to links
substitutions = [
    {pattern = '(\s+)#(\d+)', replacement = '\1[#\2](https://github.com/pydantic/pydantic/issues/\2)'},
    {pattern = '(\s+)@([\w\-]+)', replacement = '\1[@\2](https://github.com/\2)'},
    {pattern = '@@', replacement = '@'},
]

[tool.pytest.ini_options]
testpaths = 'tests'
xfail_strict = true
filterwarnings = [
    'error',
    'ignore:path is deprecated.*:DeprecationWarning:',
    # Work around https://github.com/pytest-dev/pytest/issues/10977 for Python 3.12
    'ignore:(ast\.Str|ast\.NameConstant|ast\.Num|Attribute s) is deprecated and will be removed.*:DeprecationWarning:',
    # pytest-examples needs to remove `co_lnotab` in favor of `co_lines`.
    'ignore:co_lnotab is deprecated, use co_lines instead.:DeprecationWarning:',
]
addopts = [
    '--benchmark-columns', 'min,mean,stddev,outliers,rounds,iterations',
    '--benchmark-group-by', 'group',
    '--benchmark-warmup', 'on',
    '--benchmark-disable',  # this is enable by `make benchmark` when you actually want to run benchmarks
]

# configuring https://github.com/pydantic/hooky
[tool.hooky]
assignees = []
reviewers = ['samuelcolvin', 'adriangb', 'dmontagu', 'hramezani', 'lig', 'Kludex', 'davidhewitt', 'sydney-runkle']
require_change_file = false
unconfirmed_label = 'pending'

[tool.ruff]
line-length = 120
extend-select = ['Q', 'RUF100', 'C90', 'UP', 'I', 'D', 'T']
# E501 is handled by black
extend-ignore = ['D105', 'D107', 'D205', 'D415', 'E501']
flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'}
mccabe = { max-complexity = 14 }
isort = { known-first-party = ['pydantic', 'tests'] }
target-version = "py37"
extend-exclude = ['pydantic/v1', 'tests/mypy/outputs']

[tool.ruff.extend-per-file-ignores]
"docs/**/*.py" = ['T']
"tests/**/*.py" = ['T', 'E721', 'F811']
"tests/benchmarks/test_fastapi_startup_generics.py" = ['UP006', 'UP007']
"tests/benchmarks/test_fastapi_startup_simple.py" = ['UP006', 'UP007']

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
'docs/*' = ['D']
'pydantic/__init__.py' = ['F405', 'F403', 'D']
'tests/test_forward_ref.py' = ['F821']
'tests/*' = ['D']
'pydantic/deprecated/*' = ['D']
'pydantic/json_schema.py' = ['D']

[tool.coverage.run]
source = ['pydantic']
omit = ['pydantic/deprecated/*', 'pydantic/v1/*']
branch = true
context = '${CONTEXT}'

[tool.coverage.report]
precision = 2
exclude_lines = [
    'pragma: no cover',
    'raise NotImplementedError',
    'if TYPE_CHECKING:',
    'if typing.TYPE_CHECKING:',
    '@overload',
    '@typing.overload',
    '\(Protocol\):$',
    'typing.assert_never',
    'assert_never',
]

[tool.coverage.paths]
source = [
    'pydantic/',
    '/Users/runner/work/pydantic/pydantic/pydantic/',
    'D:\a\pydantic\pydantic\pydantic',
]

[tool.black]
color = true
line-length = 120
target-version = ['py310']
skip-string-normalization = true
exclude = '''
(
  /(
    pydantic/v1
    | tests/mypy/outputs
  )/
)
'''

[tool.pyright]
include = ['pydantic']
exclude = ['pydantic/_hypothesis_plugin.py', 'pydantic/mypy.py', 'pydantic/v1']
# reportUnnecessaryTypeIgnoreComment can't be set since we run pyright with multiple python versions
#reportUnnecessaryTypeIgnoreComment = true

[tool.codespell]
skip = '.git,env*,pydantic/v1/*'
# `ser` - abbreviation for "ser"ialisation
# `crate` - a rust crate
ignore-words-list = 'gir,ser,crate'
