diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6276dddcd..c48b3cf0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,7 @@ jobs: - '3.10' - '3.11' - '3.12' + - '3.13-dev' steps: - uses: actions/checkout@v4 @@ -36,7 +37,7 @@ jobs: run: python -m pip install --upgrade codecov tox - name: Run tox targets for ${{ matrix.python-version }} - run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) + run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d . | cut -f 1 -d '-') - name: Run extra tox targets if: ${{ matrix.python-version == '3.9' }} diff --git a/docs/index.md b/docs/index.md index 0f809ec07..24ae81672 100644 --- a/docs/index.md +++ b/docs/index.md @@ -88,7 +88,7 @@ continued development by **[signing up for a paid plan][funding]**. REST framework requires the following: * Django (4.2, 5.0, 5.1) -* Python (3.8, 3.9, 3.10, 3.11, 3.12) +* Python (3.8, 3.9, 3.10, 3.11, 3.12, 3.13) We **highly recommend** and only officially support the latest patch release of each Python and Django series. diff --git a/rest_framework/schemas/inspectors.py b/rest_framework/schemas/inspectors.py index cb880e79d..e027b46a7 100644 --- a/rest_framework/schemas/inspectors.py +++ b/rest_framework/schemas/inspectors.py @@ -79,8 +79,9 @@ class ViewInspector: view = self.view method_name = getattr(view, 'action', method.lower()) - method_docstring = getattr(view, method_name, None).__doc__ - if method_docstring: + method_func = getattr(view, method_name, None) + method_docstring = method_func.__doc__ + if method_func and method_docstring: # An explicit docstring on the method or action. return self._get_description_section(view, method.lower(), formatting.dedent(smart_str(method_docstring))) else: diff --git a/setup.py b/setup.py index 08ef6df88..67904ec61 100755 --- a/setup.py +++ b/setup.py @@ -102,6 +102,7 @@ setup( 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: 3 :: Only', 'Topic :: Internet :: WWW/HTTP', ], diff --git a/tox.ini b/tox.ini index eee1de490..f565a1281 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = {py310}-{django42,django50,django51,djangomain} {py311}-{django42,django50,django51,djangomain} {py312}-{django42,django50,django51,djangomain} + {py313}-{django51,djangomain} base dist docs