Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3136996
migrate setup.cfg to setup.py
deronnax Jul 27, 2023
401de87
restore a setup.py stub
deronnax Jul 27, 2023
6019f1d
migrate setup.cfg to pyproject.toml
deronnax Jul 27, 2023
121caba
tox: isolated build
deronnax Jul 28, 2023
c2062da
remove python 3.6
deronnax Jul 29, 2023
a71ed6a
get package version from rest_framework.__version__
deronnax Oct 6, 2023
0bcd152
more concise readme inclusion
deronnax Oct 6, 2023
34840fd
remove flake8 config from pyproject.toml
deronnax Oct 7, 2023
9b6e714
remove 'zip-safe' and 'exclude' arguments
deronnax Oct 7, 2023
cf25dcd
move back non-packing related config into setup.cfg
deronnax Oct 7, 2023
040ded0
remove unneeded include-package-data field
deronnax Feb 27, 2024
9ce6b62
remove 'license-files' field
deronnax Feb 27, 2024
c4bcfc4
Revert "remove python 3.6"
deronnax Feb 28, 2024
2770f5e
Merge branch 'master' into migrate_setuppy_to_pryoject.toml
deronnax Mar 20, 2024
6f8da97
Merge branch 'master' into migrate_setuppy_to_pryoject.toml
deronnax Oct 13, 2024
2ef6126
pre-commit: tomli optional additional dependency
deronnax Oct 16, 2024
c8030fc
remove final wording note from pyproject.toml
deronnax Oct 16, 2024
0101d89
remove flake8 section in pyproject
deronnax Oct 16, 2024
c1c39d4
delete setup.py
deronnax Oct 16, 2024
561bd4c
ci: remove tox 'isolated_build'
deronnax Oct 17, 2024
29205f0
restore minimalist setup.py
deronnax Oct 18, 2024
1278968
also update build/upload instruction
deronnax Nov 15, 2024
06bebc2
remove parameters for which the value is already the default
deronnax Dec 1, 2024
ea10c54
use 'rest_framework' package namespace
deronnax Dec 1, 2024
5729b02
Revert "use 'rest_framework' package namespace"
deronnax Dec 1, 2024
7770fe4
include "rest_framework*" in pyproject.toml
deronnax Dec 2, 2024
63d340b
Merge branch 'master' into migrate_setuppy_to_pryoject.toml
browniebroke Apr 16, 2025
3542e40
Backport changes from setup.py in upstream
browniebroke Apr 16, 2025
3b6e49c
Merge branch 'master' into migrate_setuppy_to_pryoject.toml
browniebroke Aug 7, 2025
c086598
Update license-related package metadata according to PEP-639
browniebroke Aug 7, 2025
1018978
Fix SPDX Identifier
browniebroke Aug 7, 2025
2c8d10d
Add pyproject-fmt to pre-commit hooks
browniebroke Aug 8, 2025
3150ff1
Run pyproject-fmt
browniebroke Aug 8, 2025
f8e5cba
Merge branch 'main' into migrate_setuppy_to_pryoject.toml
browniebroke Aug 15, 2025
4bbd84f
Remove setup.py shim
browniebroke Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,17 @@ repos:
hooks:
- id: codespell
exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js
additional_dependencies:
# python doesn't come with a toml parser prior to 3.11
- "tomli; python_version < '3.11'"

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: ["--py39-plus", "--keep-percent-format"]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.6.0
hooks:
- id: pyproject-fmt
8 changes: 5 additions & 3 deletions docs/community/project-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ The following template should be used for the description of the issue, and serv

- [ ] Create pull request for [release notes](https://github.com/encode/django-rest-framework/blob/mains/docs/topics/release-notes.md) based on the [*.*.* milestone](https://github.com/encode/django-rest-framework/milestones/***).
- [ ] Update supported versions:
- [ ] `setup.py` `python_requires` list
- [ ] `setup.py` Python & Django version trove classifiers
- [ ] `pyproject.toml` `python_requires` list
- [ ] `pyproject.toml` Python & Django version trove classifiers
- [ ] `README` Python & Django versions
- [ ] `docs` Python & Django versions
- [ ] Update the translations from [transifex](https://www.django-rest-framework.org/topics/project-management/#translations).
Expand All @@ -72,7 +72,9 @@ The following template should be used for the description of the issue, and serv
- [ ] Confirm with @tomchristie that release is finalized and ready to go.
- [ ] Ensure that release date is included in pull request.
- [ ] Merge the release pull request.
- [ ] Push the package to PyPI with `./setup.py publish`.
- [ ] Install the release tools: `pip install build twine`
- [ ] Build the package: `python -m build`
- [ ] Push the package to PyPI with `twine upload dist/*`
- [ ] Tag the release, with `git tag -a *.*.* -m 'version *.*.*'; git push --tags`.
- [ ] Deploy the documentation with `mkdocs gh-deploy`.
- [ ] Make a release announcement on the [discussion group](https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework).
Expand Down
76 changes: 76 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [ "setuptools>=77.0.3" ]

[project]
name = "djangorestframework"
description = "Web APIs for Django, made easy."
readme = "README.md"
license = "BSD-3-Clause"
authors = [ { name = "Tom Christie", email = "[email protected]" } ]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
]
dynamic = [ "version" ]

dependencies = [ "django>=4.2" ]
urls.Changelog = "https://www.django-rest-framework.org/community/release-notes/"
urls.Funding = "https://fund.django-rest-framework.org/topics/funding/"
urls.Homepage = "https://www.django-rest-framework.org"
urls.Source = "https://github.com/encode/django-rest-framework"

[tool.setuptools]

[tool.setuptools.dynamic]
version = { attr = "rest_framework.__version__" }

[tool.setuptools.packages.find]
include = [ "rest_framework*" ]

[tool.isort]
skip = [ ".tox" ]
atomic = true
multi_line_output = 5
extra_standard_library = [ "types" ]
known_third_party = [ "pytest", "_pytest", "django", "pytz", "uritemplate" ]
known_first_party = [ "rest_framework", "tests" ]

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = "*/kickstarter-announcement.md,*.js,*.map,*.po"
ignore-words-list = "fo,malcom,ser"

[tool.pytest.ini_options]
addopts = "--tb=short --strict-markers -ra"
testpaths = [ "tests" ]
filterwarnings = [ "ignore:CoreAPI compatibility is deprecated*:rest_framework.RemovedInDRF317Warning" ]

[tool.coverage.run]
# NOTE: source is ignored with pytest-cov (but uses the same).
source = [ "." ]
include = [ "rest_framework/*", "tests/*" ]
branch = true

[tool.coverage.report]
include = [ "rest_framework/*", "tests/*" ]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
]
33 changes: 0 additions & 33 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
[metadata]
license_files = LICENSE.md

[tool:pytest]
addopts=--tb=short --strict-markers -ra
testpaths = tests
filterwarnings = ignore:CoreAPI compatibility is deprecated*:rest_framework.RemovedInDRF317Warning

[flake8]
ignore = E501,W503,W504
banned-modules = json = use from rest_framework.utils import json!

[isort]
skip=.tox
atomic=true
multi_line_output=5
extra_standard_library=types
known_third_party=pytest,_pytest,django,pytz,uritemplate
known_first_party=rest_framework,tests

[coverage:run]
# NOTE: source is ignored with pytest-cov (but uses the same).
source = .
include = rest_framework/*,tests/*
branch = 1

[coverage:report]
include = rest_framework/*,tests/*
exclude_lines =
pragma: no cover
raise NotImplementedError

[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = */kickstarter-announcement.md,*.js,*.map,*.po
ignore-words-list = fo,malcom,ser
119 changes: 0 additions & 119 deletions setup.py

This file was deleted.