@@ -335,28 +335,34 @@ class SettingsClassExt(SettingsClass):
335335 }
336336
337337
338- def test_issubclass_type_error_with_pydantic_models ():
339- # There is a problem
340- #
341- # TypeError: issubclass() arg 1 must be a class
342- #
343- # SEE https://github.com/pydantic/pydantic/issues/545
344- #
345- # >> issubclass(dict, BaseSettings)
346- # False
347- # >> issubclass(dict[str, str], BaseSettings)
348- # Traceback (most recent call last):
349- # File "<string>", line 1, in <module>
350- # File "/home/crespo/.pyenv/versions/3.10.13/lib/python3.10/abc.py", line 123, in __subclasscheck__
351- # return _abc_subclasscheck(cls, subclass)
352- # TypeError: issubclass() arg 1 must be a class
353- #
338+ def test_fixed_issubclass_type_error_with_pydantic_models ():
354339
355340 assert not issubclass (dict , BaseSettings )
356-
357- # NOTE: this should be fixed by pydantic at some point. When this happens, this test will fail
358- with pytest .raises (TypeError ):
359- issubclass (dict [str , str ], BaseSettings )
341+ assert not issubclass (
342+ # FIXED with
343+ #
344+ # pydantic 2.11.7
345+ # pydantic_core 2.33.2
346+ # pydantic-extra-types 2.10.5
347+ # pydantic-settings 2.7.0
348+ #
349+ #
350+ # TypeError: issubclass() arg 1 must be a class
351+ #
352+ # SEE https://github.com/pydantic/pydantic/issues/545
353+ #
354+ # >> issubclass(dict, BaseSettings)
355+ # False
356+ # >> issubclass(dict[str, str], BaseSettings)
357+ # Traceback (most recent call last):
358+ # File "<string>", line 1, in <module>
359+ # File "/home/crespo/.pyenv/versions/3.10.13/lib/python3.10/abc.py", line 123, in __subclasscheck__
360+ # return _abc_subclasscheck(cls, subclass)
361+ # TypeError: issubclass() arg 1 must be a class
362+ #
363+ dict [str , str ],
364+ BaseSettings ,
365+ )
360366
361367 # here reproduces the problem with our settings that ANE and PC had
362368 class SettingsClassThatFailed (BaseCustomSettings ):
0 commit comments