Skip to content

intial test of django 5.0 support #9112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

intial test of django 5.0 support #9112

wants to merge 3 commits into from

Conversation

auvipy
Copy link
Member

@auvipy auvipy commented Sep 19, 2023

this PR aims to check hoe django REST framework stands on django 5.0a1

@auvipy auvipy added this to the 3.15 milestone Sep 19, 2023
@auvipy
Copy link
Member Author

auvipy commented Sep 19, 2023

=========================== short test summary info ============================
SKIPPED [1] tests/test_model_serializer.py:466: has models.JSONField
SKIPPED [1] tests/test_fields.py:667: As Django 4.0 has deprecated pytz, this test should eventually be able to get removed.
SKIPPED [1] tests/test_fields.py:675: As Django 4.0 has deprecated pytz, this test should eventually be able to get removed.
SKIPPED [1] tests/test_fields.py:685: As Django 4.0 has deprecated pytz, this test should eventually be able to get removed.
FAILED tests/test_model_serializer.py::TestRegularFieldMappings::test_field_options
FAILED tests/test_model_serializer.py::TestRegularFieldMappings::test_regular_fields
FAILED tests/test_model_serializer.py::TestFieldSource::test_named_field_source
FAILED tests/test_validators.py::TestUniquenessValidation::test_doesnt_pollute_model
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_allow_explict_override
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_default_validator_with_fields_with_source
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_ignore_read_only_fields
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_repr
FAILED tests/test_validators.py::TestUniqueConstraintValidation::test_repr - ...
FAILED tests/test_validators.py::TestUniqueConstraintValidation::test_single_field_uniq_validators
FAILED tests/test_fields.py::TestNaiveDateTimeField::test_valid_inputs - Asse...
FAILED tests/test_fields.py::TestNaiveDateTimeField::test_outputs - Assertion...
=========== 12 failed, 1539 passed, 4 skipped, 4 warnings in 24.81s ============

@auvipy
Copy link
Member Author

auvipy commented Sep 20, 2023

was thinking about an idea lately. that is testing django 2.2-4.2 support in a single release v3.15. that would ease migration of very old unsupported django LTS to a more latest LTS quite easily. as we still supporting python 3.6 & 3.7, I believe you can try this. but of course the code need to work!

@auvipy auvipy removed this from the 3.15 milestone Oct 2, 2023
@AmiZya
Copy link

AmiZya commented Nov 9, 2023

I tested the framework against 5.0b1 and it gives the following failed tests.

FAILED tests/test_model_serializer.py::TestRegularFieldMappings::test_regular_fields - AssertionError: "Test[94 chars]ield(max_value=9223372036854775807, min_value=[1390 ch...
FAILED tests/test_model_serializer.py::TestFieldSource::test_named_field_source - AssertionError: "Test[42 chars]ield(max_value=9223372036854775807, min_value=[41 char...
FAILED tests/test_validators.py::TestUniquenessValidation::test_doesnt_pollute_model - assert [<django.core... 0x10fb830e0>] == []
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_allow_explict_override - AssertionError: assert 'NoValidators...036854775808)' == 'NoValidators...ntegerField()'
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_default_validator_with_fields_with_source - assert "TestSerializ...position'))>]" == "TestSerializ...position'))>]"
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_ignore_read_only_fields - AssertionError: assert 'ReadOnlyFiel...equired=True)' == 'ReadOnlyFiel...equired=True)'
FAILED tests/test_validators.py::TestUniquenessTogetherValidation::test_repr - assert "UniquenessTo...position'))>]" == "UniquenessTo...position'))>]"
FAILED tests/test_validators.py::TestUniqueConstraintValidation::test_repr - assert "UniqueConstr...position'))>]" == "UniqueConstr...position'))>]"
FAILED tests/test_validators.py::TestUniqueConstraintValidation::test_single_field_uniq_validators - assert 3 == 1
FAILED tests/test_fields.py::TestNaiveDateTimeField::test_valid_inputs - AssertionError: input value: datetime.datetime(2001, 1, 1, 13, 0, tzinfo=datetime.tim...
FAILED tests/test_fields.py::TestNaiveDateTimeField::test_outputs - AssertionError: output value: datetime.datetime(2001, 1, 1, 13, 0)
=============== 12 failed, 1396 passed, 148 skipped, 3 warnings in 14.58s ================

@auvipy Any idea how to proceed from here?

@auvipy auvipy marked this pull request as ready for review January 19, 2024 10:36
@auvipy auvipy changed the title intial test of django 5.0a1 support intial test of django 5.0 support Jan 19, 2024
@tomchristie
Copy link
Member

Superseeded by #9233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants