Your message dated Sun, 23 Aug 2026 20:37:21 +0000
with message-id <[email protected]>
and subject line Bug#1145192: fixed in pydantic 2.13.4-4
has caused the Debian Bug report #1145192,
regarding pydantic: FTBFS against python 3.15rc1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1145192: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1145192
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:pydantic
Version: 2.13.4-3
User: [email protected]
Usertags: python3.15
Tags: patch

Hi!

While rebuilding the python related packages against the Python 3.15rc1
version we found that pydantic fails to build from source [1].
We found that the necessary fixes have recently been applied in the
upstream repository [2].

I applied the upstream fix in the sandbox [3] to be able to build the
packages that depend on pydantic, please consider applying the patch to
support the upcoming 3.15 version.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4439432/
[2]: https://github.com/pydantic/pydantic/pull/13587
[3]: https://debusine.debian.net/debian/r-python-python3.15/

--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
commit b348cf0dce91e1cf1a3e918402e4bb8e4e6203b2
Author: Victorien <[email protected]>
Date:   Thu Aug 6 13:34:53 2026 +0200

    Add initial support for Python 3.15 (#13587)

Index: pydantic/pydantic/_internal/_model_construction.py
===================================================================
--- pydantic.orig/pydantic/_internal/_model_construction.py
+++ pydantic/pydantic/_internal/_model_construction.py
@@ -8,6 +8,7 @@ import typing
 import warnings
 import weakref
 from abc import ABCMeta
+from collections.abc import MutableMapping
 from functools import cache, partial, wraps
 from types import FunctionType
 from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, NoReturn, TypeVar, cast
@@ -812,7 +813,7 @@ class _PydanticWeakRef:
         return _PydanticWeakRef, (self(),)
 
 
-def build_lenient_weakvaluedict(d: dict[str, Any] | None) -> dict[str, Any] | None:
+def build_lenient_weakvaluedict(d: MutableMapping[str, Any] | None) -> dict[str, Any] | None:
     """Takes an input dictionary, and produces a new value that (invertibly) replaces the values with weakrefs.
 
     We can't just use a WeakValueDictionary because many types (including int, str, etc.) can't be stored as values
Index: pydantic/pydantic/_internal/_typing_extra.py
===================================================================
--- pydantic.orig/pydantic/_internal/_typing_extra.py
+++ pydantic/pydantic/_internal/_typing_extra.py
@@ -7,6 +7,7 @@ import re
 import sys
 import types
 import typing
+from collections.abc import MutableMapping
 from functools import partial
 from inspect import Signature, signature
 from typing import TYPE_CHECKING, Any, Callable, cast
@@ -212,7 +213,7 @@ typing_base: Any = typing._Final  # pyri
 ### Annotation evaluations functions:
 
 
-def parent_frame_namespace(*, parent_depth: int = 2, force: bool = False) -> dict[str, Any] | None:
+def parent_frame_namespace(*, parent_depth: int = 2, force: bool = False) -> MutableMapping[str, Any] | None:
     """Fetch the local namespace of the parent frame where this function is called.
 
     Using this function is mostly useful to resolve forward annotations pointing to members defined in a local namespace,
Index: pydantic/pydantic/types.py
===================================================================
--- pydantic.orig/pydantic/types.py
+++ pydantic/pydantic/types.py
@@ -5,6 +5,7 @@ from __future__ import annotations as _a
 import base64
 import dataclasses as _dataclasses
 import re
+import sys
 from collections.abc import Hashable, Iterator
 from datetime import date, datetime
 from decimal import Decimal
@@ -2434,6 +2435,9 @@ class Base64Encoder(EncoderProtocol):
         return 'base64'
 
 
+_urlsafe_translation = bytes.maketrans(b'+/', b'-_')
+
+
 class Base64UrlEncoder(EncoderProtocol):
     """URL-safe Base64 encoder."""
 
@@ -2448,7 +2452,15 @@ class Base64UrlEncoder(EncoderProtocol):
             The decoded data.
         """
         try:
-            return base64.urlsafe_b64decode(data)
+            if sys.version_info >= (3, 15):
+                # In Python >= 3.15, `urlsafe_b64decode()` doesn't require padded input anymore.
+                # It also raises a `FutureWarning` if '+' or '/' is found in input (and translates it
+                # to '-' and '_'). We can't have this warning raised while validating, so we do the translation
+                # ourselves.
+                data = data.translate(_urlsafe_translation)
+                return base64.urlsafe_b64decode(data, padded=True)
+            else:
+                return base64.urlsafe_b64decode(data)
         except ValueError as e:
             raise PydanticCustomError('base64_decode', "Base64 decoding error: '{error}'", {'error': str(e)})
 
@@ -2799,11 +2811,8 @@ Base64UrlBytes = Annotated[bytes, Encode
 """A bytes type that is encoded and decoded using the URL-safe base64 encoder.
 
 Note:
-    Under the hood, `Base64UrlBytes` use standard library `base64.urlsafe_b64encode` and `base64.urlsafe_b64decode`
-    functions.
-
-    As a result, the `Base64UrlBytes` type can be used to faithfully decode "vanilla" base64 data
-    (using `'+'` and `'/'`).
+    Under the hood, `Base64UrlBytes` uses the standard library [`base64.urlsafe_b64encode()`][base64.urlsafe_b64encode]
+    and [`base64.urlsafe_b64decode()`][base64.urlsafe_b64decode] functions.
 
 ```python
 from pydantic import Base64UrlBytes, BaseModel
@@ -2821,10 +2830,8 @@ Base64UrlStr = Annotated[str, EncodedStr
 """A str type that is encoded and decoded using the URL-safe base64 encoder.
 
 Note:
-    Under the hood, `Base64UrlStr` use standard library `base64.urlsafe_b64encode` and `base64.urlsafe_b64decode`
-    functions.
-
-    As a result, the `Base64UrlStr` type can be used to faithfully decode "vanilla" base64 data (using `'+'` and `'/'`).
+    Under the hood, `Base64UrlStr` uses the standard library [`base64.urlsafe_b64encode()`][base64.urlsafe_b64encode]
+    and [`base64.urlsafe_b64decode()`][base64.urlsafe_b64decode] functions.
 
 ```python
 from pydantic import Base64UrlStr, BaseModel
Index: pydantic/pyproject.toml
===================================================================
--- pydantic.orig/pyproject.toml
+++ pydantic/pyproject.toml
@@ -34,6 +34,7 @@ classifiers = [
     'Programming Language :: Python :: 3.12',
     'Programming Language :: Python :: 3.13',
     'Programming Language :: Python :: 3.14',
+    'Programming Language :: Python :: 3.15',
     'Intended Audience :: Developers',
     'Intended Audience :: Information Technology',
     'Operating System :: OS Independent',
@@ -117,7 +118,8 @@ testing-extra = [
     'devtools',
     # used in docs tests
     'sqlalchemy',
-    'pytest-memray; platform_python_implementation == "CPython" and platform_system != "Windows"',
+    'pytest-memray; platform_python_implementation == "CPython" and platform_system != "Windows" and python_version < "3.15"',
+    'memray; platform_python_implementation == "CPython" and platform_system != "Windows" and python_version < "3.15"',
 ]
 typechecking = [
     'mypy',
Index: pydantic/tests/test_generics.py
===================================================================
--- pydantic.orig/tests/test_generics.py
+++ pydantic/tests/test_generics.py
@@ -2295,6 +2295,7 @@ def test_parse_generic_json():
     }
 
 
[email protected](sys.version_info >= (3, 15), reason="memray doesn't yet support Python 3.15")
 def memray_limit_memory(limit):
     if '--memray' in sys.argv:
         return pytest.mark.limit_memory(limit)

--- End Message ---
--- Begin Message ---
Source: pydantic
Source-Version: 2.13.4-4
Done: Colin Watson <[email protected]>

We believe that the bug you reported is fixed in the latest version of
pydantic, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <[email protected]> (supplier of updated pydantic package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 23 Aug 2026 20:37:25 +0100
Source: pydantic
Architecture: source
Version: 2.13.4-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <[email protected]>
Changed-By: Colin Watson <[email protected]>
Closes: 1145192
Changes:
 pydantic (2.13.4-4) unstable; urgency=medium
 .
   * Add initial support for Python 3.15 (closes: #1145192).
   * Drop "Priority: optional", default as of dpkg-dev 1.22.13.
   * Standards-Version: 4.7.4.
Checksums-Sha1:
 6180e672d4746c95e1fcf8ad6f1e4e552d0edcf6 3079 pydantic_2.13.4-4.dsc
 051503e54378ebd334e5980c0c3b3282eeab0e8d 8804 pydantic_2.13.4-4.debian.tar.xz
 5dc5a9129903dc78af4b547c0d96ec2ba60eb779 4387792 pydantic_2.13.4-4.git.tar.xz
 86f3212bbd0edb77c605cbd8c371a81f9fd4d708 17668 
pydantic_2.13.4-4_source.buildinfo
Checksums-Sha256:
 eece607cac2f27f831bc09d4a44f0b7f840b612ed2f43d8748d388e73c3323d1 3079 
pydantic_2.13.4-4.dsc
 498dc0ac88667cf359259265a005924ca2b721607f82e5d75c61fd64d523cfd0 8804 
pydantic_2.13.4-4.debian.tar.xz
 33a021fe41a75536f6bff3fb54db62478fa866007dd7493bdb27bcb04401bbf4 4387792 
pydantic_2.13.4-4.git.tar.xz
 faa19d2a00027b76114b141c6052847ab608fa3ce7cbadc821e8d3bfc69a4d9e 17668 
pydantic_2.13.4-4_source.buildinfo
Files:
 ac6c5824832660dce51c0bb6bd1b81ca 3079 python optional pydantic_2.13.4-4.dsc
 ed23f03e3ab01104c043f338da8f5e72 8804 python optional 
pydantic_2.13.4-4.debian.tar.xz
 f450ed360faa1e18ad0efe19c7af95de 4387792 python None 
pydantic_2.13.4-4.git.tar.xz
 5c75694bbab9bf5b7ec560733814af35 17668 python optional 
pydantic_2.13.4-4_source.buildinfo
Git-Tag-Info: tag=1124cf232fba36921883fb9c2aeb5ecc008c9537 
fp=ac0a4ff12611b6fccf01c111393587d97d86500b
Git-Tag-Tagger: Colin Watson <[email protected]>

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmqLTR8ACgkQYG0ITkaD
wHnTBg/9FbDvb1pDOEE5VVsdmsGgnH/EJt4G+UqARAUymSjXYl6wPsXCofEdTzBx
QBqYQOWGib2ovY+3BlAvvKIkPFr8c2E9ZrQMuLH2FokSOlhHrWJhmkfAjnFPW6eb
pWJs49lsroUsgoC97oHZDcy3DCzfIKzb4Vd8TepzCpLyDTKKk5ywTiVU/fCQSql1
FD4cwR8Km093sZPYI98EEUSaKEwnLKQnGTDqdRg2RiCmHqWxLadEHh80tH/4bqFD
ofmshS2bJWBZNRs5focF1gAKIdYbhByWcrsF2hGwPHTxAwRCtP4cbm4TBlgjsgP2
Dnd5H9bGUsM0ietSgD59nkhLot5wKJGtR2XMBIw/XIz50frcyfz5CtWy5PyTP7Zy
l+GljeonmhbhU37Q1vYCEGXnbdokBa8/MMSeH2HTxG5C9zmic4FhMMQBxIdVdxFS
azr5oPWluC4L8gxDm1RXOfXidJTLMQSa7DVAYM9evvMxjtKYEtxPNfMNM4MIfCh5
EQDFauRf2gKpVFeB8HofYrz/CIia6MWNwUBwhoxgxu1jjmhTuIh7Za8lB24M6ZCO
F9fsMfx7KJjkkI9jwmSpbFs6OL84xOg74TSaRohm35cC3DKGzo7LHirxGkQ7hIyA
0XZwyzWqc7+s5+yDMYsC9bZO35hVgfUYsCwPS6+IxkMZudwENYE=
=Vv0p
-----END PGP SIGNATURE-----

Attachment: pgpmBaC_BXKYb.pgp
Description: PGP signature


--- End Message ---

Reply via email to