Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Django 5.0 support#9233

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
auvipy merged 4 commits intoencode:masterfrommath-a3k:dj5
Feb 28, 2024
Merged

Add Django 5.0 support#9233

auvipy merged 4 commits intoencode:masterfrommath-a3k:dj5
Feb 28, 2024

Conversation

math-a3k
Copy link
Contributor

@math-a3kmath-a3k commentedJan 23, 2024
edited
Loading

This PR (based on#9230) fixes the test suite for supporting Django 5.0, enables it on the CI, and updates the documentation.

It also fixes the tests for djangomain (up todjango/django@e412d85)

@math-a3kmath-a3k marked this pull request as ready for reviewJanuary 23, 2024 15:52
@math-a3kmath-a3k mentioned this pull requestJan 23, 2024
@loicgasser
Copy link

I think you might to update the setup.py file as file
https://github.com/encode/django-rest-framework/blob/master/setup.py

math-a3k reacted with thumbs up emoji

@auvipyauvipy added this to the3.15 milestoneFeb 20, 2024
@auvipy
Copy link
Member

sorry for taking soo long to respond! had other pro n personal priorities

Copy link
Member

@auvipyauvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

good job so far. have some comments and suggestions to move forward

url_field = URLField(max_length=100)
custom_field = ModelField(model_field=<tests.test_model_serializer.CustomField: custom_field>)
file_path_field = FilePathField(path=%r)
expected = dedent(r"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

usage of regex instead of old string format seems interesting to me. can you share more insight about it? pros and cons regarding this PR?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The need arises from the integer validator generated from Django 5 integer fields. That validator breaks the assertion against the repr. In other tests, there is a conditional on Django version, an "if" to add the extra string to match. I find regex to be more flexible against changes that are not the object of the test - i.e. the correct functionality asserted from the repr in which the integer validator does not play a role. This would also prevent cluttering if, in future versions of Django, similar changes arrive (preventing the discussion for each version).

The cons I find would be the escaping cluttering in the strings because otherwise, it is pretty straight with the current testing suite ("the dedent of strings for testing the repr" way) and not harder to read.

@auvipyauvipy merged commitd4016d8 intoencode:masterFeb 28, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@cclausscclausscclauss left review comments

@auvipyauvipyauvipy approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
3.15
Development

Successfully merging this pull request may close these issues.

4 participants
@math-a3k@loicgasser@auvipy@cclauss

[8]ページ先頭

©2009-2025 Movatter.jp