Fatal1ty / mashumaro

Fast and well tested serialization library
Apache License 2.0
751 stars 44 forks source link

More issues on Python 3.12.4 #231

Closed mweinelt closed 2 months ago

mweinelt commented 2 months ago

Description

After upgrading to 3.12.4 the signature errors about recursive_guard are gone, but we're seeing a number of TypeErrors and one AssertionError while running the tests.

Note that your CI still seems to be testing against 3.12.3 as of https://github.com/Fatal1ty/mashumaro/commit/e945ee4319db49da9f7b8ede614e988cc8c8956b.

FAILED tests/test_data_types.py::test_with_generic_mapping[key_info3-value_info45] - TypeError: Type parameter ~TMyDataClass without a default follows type para...
FAILED tests/test_data_types.py::test_with_generic_dict[key_info3-value_info0] - TypeError: Type parameter ~T without a default follows type parameter with ...
FAILED tests/test_data_types.py::test_with_generic_dict[key_info3-value_info1] - TypeError: Type parameter ~TInt without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_dict[key_info3-value_info2] - TypeError: Type parameter ~TIntStr without a default follows type parameter...
FAILED tests/test_data_types.py::test_with_generic_dict[key_info3-value_info5] - TypeError: Type parameter ~TAny without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_mapping[key_info3-value_info0] - TypeError: Type parameter ~T without a default follows type parameter with ...
FAILED tests/test_data_types.py::test_with_generic_mapping[key_info3-value_info1] - TypeError: Type parameter ~TInt without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_mapping[key_info3-value_info2] - TypeError: Type parameter ~TIntStr without a default follows type parameter...
FAILED tests/test_data_types.py::test_with_generic_mapping[key_info3-value_info5] - TypeError: Type parameter ~TAny without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_dict[key_info3-value_info45] - TypeError: Type parameter ~TMyDataClass without a default follows type para...
FAILED tests/test_data_types.py::test_with_generic_ordered_dict[key_info3-value_info0] - TypeError: Type parameter ~T without a default follows type parameter with ...
FAILED tests/test_data_types.py::test_with_generic_ordered_dict[key_info3-value_info1] - TypeError: Type parameter ~TInt without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_ordered_dict[key_info3-value_info2] - TypeError: Type parameter ~TIntStr without a default follows type parameter...
FAILED tests/test_data_types.py::test_with_generic_ordered_dict[key_info3-value_info5] - TypeError: Type parameter ~TAny without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_ordered_dict[key_info3-value_info45] - TypeError: Type parameter ~TMyDataClass without a default follows type para...
FAILED tests/test_data_types.py::test_with_generic_mutable_mapping[key_info3-value_info0] - TypeError: Type parameter ~T without a default follows type parameter with ...
FAILED tests/test_data_types.py::test_with_generic_mutable_mapping[key_info3-value_info1] - TypeError: Type parameter ~TInt without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_mutable_mapping[key_info3-value_info2] - TypeError: Type parameter ~TIntStr without a default follows type parameter...
FAILED tests/test_data_types.py::test_with_generic_mutable_mapping[key_info3-value_info5] - TypeError: Type parameter ~TAny without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_mutable_mapping[key_info3-value_info45] - TypeError: Type parameter ~TMyDataClass without a default follows type para...
FAILED tests/test_data_types.py::test_with_generic_chain_map[key_info3-value_info0] - TypeError: Type parameter ~T without a default follows type parameter with ...
FAILED tests/test_data_types.py::test_with_generic_chain_map[key_info3-value_info1] - TypeError: Type parameter ~TInt without a default follows type parameter wi...
FAILED tests/test_data_types.py::test_with_generic_chain_map[key_info3-value_info45] - TypeError: Type parameter ~TMyDataClass without a default follows type para...
FAILED tests/test_data_types.py::test_with_generic_chain_map[key_info3-value_info2] - TypeError: Type parameter ~TIntStr without a default follows type parameter...
FAILED tests/test_data_types.py::test_with_generic_chain_map[key_info3-value_info5] - TypeError: Type parameter ~TAny without a default follows type parameter wi...
FAILED tests/test_meta.py::test_get_type_var_default - AssertionError: assert <class 'NoneType'> is None

Full log: https://gist.github.com/mweinelt/b762076c1424595191b8c9859cfd0686

Fatal1ty commented 2 months ago

Oh, we missed this because 3.12.4 still hasn't been added to github actions:

I'll debug it on my laptop as soon as I have free time.

vcunat commented 2 months ago

Fixed? https://github.com/Fatal1ty/mashumaro/commit/01b1d795e71ecb86c6c36a3b537473a9246df194

mweinelt commented 2 months ago

This fixes the issues on 3.13.0, but 3.13.1 came with other issues.

Fatal1ty commented 2 months ago

Interesting. Just installed 3.12.4 using pyenv and couldn't reproduce errors while running tests.

Python 3.12.4 (main, Jun 22 2024, 12:38:27) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

I believe this was fixed in CPython itself:

mweinelt commented 2 months ago

Yeah, same here. Not sure where they went for us, since we were on 3.12.4 at the time already.