django-rest-framework/rest_framework
Bruno Alla b25028ac8f
Add support for Python 3.13 (#9527)
* Add support for Python 3.13

* Fix extracting tox env with -dev Python versions

* Fix view description inspection in Python 3.13

Python 3.13 introduced docstrings for None: https://github.com/python/cpython/pull/117813

In Python 3.12, this is an empty string:

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

In Python 3.13, it's no longer empty:

```
 ➜ python3.13
Python 3.13.0rc2+ (heads/3.13:660baa1, Sep 10 2024, 18:57:50) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "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.
2024-09-11 15:39:52 +06:00
..
authtoken Remove unused code 2024-04-30 18:28:22 +02:00
locale Spelling mistakes in Farsi language were corrected (#9521) 2024-09-07 17:30:13 +06:00
management Add --api-version CLI option to generateschema (#8663) 2022-09-22 10:36:01 +01:00
schemas Add support for Python 3.13 (#9527) 2024-09-11 15:39:52 +06:00
static/rest_framework Improve integration with Django Debug Toolbar (#9213) 2024-03-07 10:58:59 +01:00
templates/rest_framework Use POST method instead of GET to perform logout in browsable API (#9208) 2024-02-19 23:28:04 +01:00
templatetags Fix potential XSS vulnerability in break_long_headers template filter (#9435) 2024-06-14 10:52:02 +01:00
utils Remove unused code 2024-04-30 18:28:22 +02:00
__init__.py Version 3.15.2 (#9439) 2024-06-14 16:34:21 +01:00
apps.py Make DEFAULT_PAGINATION_CLASS None by default. (#5170) 2017-09-25 15:36:30 +02:00
authentication.py replace partition with split in BasicAuthentication (#8790) 2022-12-08 09:52:35 +06:00
checks.py Fix punctuation in system check (#7281) 2020-04-20 16:40:05 -07:00
compat.py Remove unused code 2024-04-30 18:28:22 +02:00
decorators.py pre-commit autoupdate (#9232) 2024-01-24 22:47:46 +01:00
documentation.py Updated url()'s with path() and re_path() (#7492) 2020-08-25 13:50:02 +02:00
exceptions.py Revert "feat: Add some changes to ValidationError to support django style vad…" (#9326) 2024-03-21 17:09:43 +01:00
fields.py Accept integers as min/max values of DecimalField (#9515) 2024-09-07 17:07:28 +06:00
filters.py Remove unused code 2024-04-30 18:28:22 +02:00
generics.py Allow generic requests, responses, fields, views (#8825) 2023-02-22 21:39:01 +06:00
metadata.py Revert #9030 (#9333) 2024-03-22 09:40:34 +01:00
mixins.py Revert "Re-prefetch related objects after updating (#8043)" (#9327) 2024-03-21 22:23:30 +00:00
negotiation.py Replaced parse_header with parse_header_parameters. (#8556) 2022-07-14 14:20:36 +02:00
pagination.py Revert "Ensure CursorPagination respects nulls in the ordering field (#8912)" (#9381) 2024-04-27 17:07:05 +06:00
parsers.py Remove unused code 2024-04-30 18:28:22 +02:00
permissions.py Add __hash__ method for permissions.OperandHolder class (#9417) 2024-06-10 12:19:06 +06:00
relations.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
renderers.py Fix get_template_context to handle also lists (#9467) 2024-07-15 22:03:40 +06:00
request.py Fixed AttributeError raised by data property being silently ignored (#9455) 2024-07-17 22:51:39 +06:00
response.py Allow generic requests, responses, fields, views (#8825) 2023-02-22 21:39:01 +06:00
reverse.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
routers.py Use str as default path converter (#9066) 2023-08-16 20:11:50 +06:00
serializers.py Revert "Fix validation for ListSerializer (#8979)" (#9283) 2024-03-13 15:15:43 +00:00
settings.py Fix typo (#9231) 2024-01-24 23:17:01 +01:00
status.py Added http 102, 103, 421, and 425 status codes (#8350) 2022-02-03 11:57:47 +00:00
test.py Remove unused code 2024-04-30 18:28:22 +02:00
throttling.py Fix error in throttling when request.user is None (#8370) 2022-06-24 13:02:11 +01:00
urlpatterns.py Fix "Converter is already registered" deprecation warning. (#9512) 2024-08-26 17:32:50 +02:00
urls.py Replace all url() calls with path() or re_path() (#7512) 2020-09-08 15:32:27 +01:00
validators.py Fix unique_together validation with source (#9482) 2024-08-05 16:36:50 +06:00
versioning.py Revert "Fix NamespaceVersioning ignoring DEFAULT_VERSION on non-None namespac…" (#9335) 2024-03-22 09:39:30 +00:00
views.py Add official support for Django 5.1 (#9514) 2024-09-07 17:21:18 +06:00
viewsets.py Add official support for Django 5.1 (#9514) 2024-09-07 17:21:18 +06:00