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 support for Python 3.13#9527

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 3 commits intoencode:masterfrombrowniebroke:python-3.13
Sep 11, 2024
Merged

Conversation

browniebroke
Copy link
Member

@browniebrokebrowniebroke commentedSep 10, 2024
edited
Loading

Description

  • Add Python 3.13-dev to the CI
  • Declare support in the docs and in package metadata
  • Fix issue(s)

Issues found

1. Fix view description inspection

Python 3.13 introduced docstrings for theNone singletong:python/cpython#117813

In Python 3.12, this is an empty string:

 ➜ python3.12Python 3.12.6 (main, Sep 10 2024, 19:06:17) [Clang 15.0.0 (clang-1500.3.9.4)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> d = None>>> d.__doc__>>>

In Python 3.13, it's no longer empty:

 ➜ python3.13Python 3.13.0rc2+ (heads/3.13:660baa1, Sep 10 2024, 18:57:50) [Clang 15.0.0 (clang-1500.3.9.4)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> d = None>>> d.__doc__'The type of the None singleton.'>>>

The fix: added a check in the inspector that get the view description out the view function docstring to catch this edge case.

Python 3.13 introduced docstrings for None:python/cpython#117813In Python 3.12, this is an empty string:``` ➜ python3.12Python 3.12.6 (main, Sep 10 2024, 19:06:17) [Clang 15.0.0 (clang-1500.3.9.4)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> d = None>>> d.__doc__>>>```In Python 3.13, it's no longer empty:``` ➜ python3.13Python 3.13.0rc2+ (heads/3.13:660baa1, Sep 10 2024, 18:57:50) [Clang 15.0.0 (clang-1500.3.9.4)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> d = None>>> d.__doc__'The type of the None singleton.'>>>```Adding a check in the inspector that get the view description out the view function docstring to catch this edge case.
@browniebrokebrowniebroke marked this pull request as ready for reviewSeptember 10, 2024 20:36
@@ -4,6 +4,7 @@ envlist =
{py310}-{django42,django50,django51,djangomain}
{py311}-{django42,django50,django51,djangomain}
{py312}-{django42,django50,django51,djangomain}
{py313}-{django51,djangomain}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Python 3.13 will be supported only by Django 5.1 and above:https://forum.djangoproject.com/t/backport-python-3-13-support-in-django-5-0/34671/2

@auvipyauvipy merged commitb25028a intoencode:masterSep 11, 2024
8 checks passed
@browniebrokebrowniebroke deleted the python-3.13 branchSeptember 11, 2024 11:25
@obatabba
Copy link

The home page athttps://www.django-rest-framework.org/ doesn't include Python 3.13 in the "Requirements". Is this intended or needs to be updated ?

Screenshot 2025-01-12 184813

@browniebroke
Copy link
MemberAuthor

browniebroke commentedJan 12, 2025
edited
Loading

It's intended: this page lists the versions supported by the latest release of DRF, and while this pull request is merged, the change is still unreleased. If you look at therelease process here, you'll see that there is a step to deploy the documentation.

obatabba reacted with thumbs up emoji

@browniebrokebrowniebroke added this to the3.16 milestoneJan 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@auvipyauvipyauvipy approved these changes

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

Successfully merging this pull request may close these issues.

3 participants
@browniebroke@obatabba@auvipy

[8]ページ先頭

©2009-2025 Movatter.jp