From a691219456ad4b41be7421c27a422046aab12958 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 21 Jan 2025 02:24:53 +0000 Subject: [PATCH 01/10] Release 2025.01.20 --- CHANGELOG.md | 9 +++++++++ pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad8ec678f..4702bcd15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2025.01.20 + + +### Changed + +- Group all API tests under a `tests.api` namespace ([#5615](https://github.com/cookiecutter/cookiecutter-django/pull/5615)) + +- Migrate post-generation hook to pathlib ([#5648](https://github.com/cookiecutter/cookiecutter-django/pull/5648)) + ## 2025.01.16 diff --git a/pyproject.toml b/pyproject.toml index f5df2e072..4e163d9a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2025.01.16" +version = "2025.01.20" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [ From 3e1e6cb41bf3ec5121b28e49d95c842faaac89aa Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 21 Jan 2025 02:08:29 -0800 Subject: [PATCH 02/10] Update pre-commit to 4.1.0 (#5650) * Update pre-commit from 4.0.1 to 4.1.0 * Update pre-commit version in template --------- Co-authored-by: Bruno Alla --- pyproject.toml | 2 +- uv.lock | 10 +++++----- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4e163d9a9..8db7fc916 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ dependencies = [ "djlint==1.36.4", "gitpython==3.1.43", "jinja2==3.1.5", - "pre-commit==3.8", + "pre-commit==4.1.0", "pygithub==2.5", "pytest==8.3.4", "pytest-cookies==0.7", diff --git a/uv.lock b/uv.lock index f2321853d..ed18741e6 100644 --- a/uv.lock +++ b/uv.lock @@ -182,7 +182,7 @@ wheels = [ [[package]] name = "cookiecutter-django" -version = "2025.1.15" +version = "2025.1.16" source = { virtual = "." } dependencies = [ { name = "binaryornot" }, @@ -221,7 +221,7 @@ requires-dist = [ { name = "djlint", specifier = "==1.36.4" }, { name = "gitpython", specifier = "==3.1.43" }, { name = "jinja2", specifier = "==3.1.5" }, - { name = "pre-commit", specifier = "==3.8" }, + { name = "pre-commit", specifier = "==4.1.0" }, { name = "pygithub", specifier = "==2.5" }, { name = "pytest", specifier = "==8.3.4" }, { name = "pytest-cookies", specifier = "==0.7" }, @@ -588,7 +588,7 @@ wheels = [ [[package]] name = "pre-commit" -version = "3.8.0" +version = "4.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cfgv" }, @@ -597,9 +597,9 @@ dependencies = [ { name = "pyyaml" }, { name = "virtualenv" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/64/10/97ee2fa54dff1e9da9badbc5e35d0bbaef0776271ea5907eccf64140f72f/pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af", size = 177815 } +sdist = { url = "https://files.pythonhosted.org/packages/2a/13/b62d075317d8686071eb843f0bb1f195eb332f48869d3c31a4c6f1e063ac/pre_commit-4.1.0.tar.gz", hash = "sha256:ae3f018575a588e30dfddfab9a05448bfbd6b73d78709617b5a2b853549716d4", size = 193330 } wheels = [ - { url = "https://files.pythonhosted.org/packages/07/92/caae8c86e94681b42c246f0bca35c059a2f0529e5b92619f6aba4cf7e7b6/pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f", size = 204643 }, + { url = "https://files.pythonhosted.org/packages/43/b3/df14c580d82b9627d173ceea305ba898dca135feb360b6d84019d0803d3b/pre_commit-4.1.0-py2.py3-none-any.whl", hash = "sha256:d29e7cb346295bcc1cc75fc3e92e343495e3ea0196c9ec6ba53f49f10ab6ae7b", size = 220560 }, ] [[package]] diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 704d9e3a5..cd1fc7b26 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -31,7 +31,7 @@ sphinx-autobuild==2024.10.3 # https://github.com/GaretJax/sphinx-autobuild ruff==0.9.2 # https://github.com/astral-sh/ruff coverage==7.6.10 # https://github.com/nedbat/coveragepy djlint==1.36.4 # https://github.com/Riverside-Healthcare/djLint -pre-commit==4.0.1 # https://github.com/pre-commit/pre-commit +pre-commit==4.1.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 723a388f3d8022862bc485baf08fc8ea73d07a38 Mon Sep 17 00:00:00 2001 From: ghazi-git Date: Tue, 21 Jan 2025 20:50:33 +0100 Subject: [PATCH 03/10] Update the linter error code from TCH to TC (#5651) --- {{cookiecutter.project_slug}}/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 98a883b62..3c7458438 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -106,7 +106,7 @@ select = [ "SLOT", "SIM", "TID", - "TCH", + "TC", "INT", # "ARG", # Unused function argument "PTH", From bb6e4085c7c4dcfa52a7232c992acaf618c17945 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 22 Jan 2025 02:26:55 +0000 Subject: [PATCH 04/10] Release 2025.01.21 --- CHANGELOG.md | 11 +++++++++++ pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4702bcd15..384ae1cab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2025.01.21 + + +### Changed + +- Update linter error code from TCH to TC ([#5651](https://github.com/cookiecutter/cookiecutter-django/pull/5651)) + +### Updated + +- Update pre-commit to 4.1.0 ([#5650](https://github.com/cookiecutter/cookiecutter-django/pull/5650)) + ## 2025.01.20 diff --git a/pyproject.toml b/pyproject.toml index 8db7fc916..12850a3cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2025.01.20" +version = "2025.01.21" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [ From d7c995b8738bb98021c62b822703bbb241309dbf Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 23 Jan 2025 23:50:53 -0800 Subject: [PATCH 05/10] Update ruff to 0.9.3 (#5654) * Update ruff from 0.9.2 to 0.9.3 * Align Ruff versions * Align Ruff versions --------- Co-authored-by: pyup-bot <16239342+pyup-bot@users.noreply.github.com> Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com> --- pyproject.toml | 2 +- uv.lock | 42 +++++++++---------- .../.pre-commit-config.yaml | 2 +- .../requirements/local.txt | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 12850a3cf..57af0c67d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "pytest-xdist==3.6.1", "pyyaml==6.0.2", "requests==2.32.3", - "ruff==0.9.2", + "ruff==0.9.3", "sh==2.1; sys_platform!='win23'", "tox==4.23.2", "tox-uv>=1.17", diff --git a/uv.lock b/uv.lock index ed18741e6..9d359f5f9 100644 --- a/uv.lock +++ b/uv.lock @@ -182,7 +182,7 @@ wheels = [ [[package]] name = "cookiecutter-django" -version = "2025.1.16" +version = "2025.1.21" source = { virtual = "." } dependencies = [ { name = "binaryornot" }, @@ -229,7 +229,7 @@ requires-dist = [ { name = "pytest-xdist", specifier = "==3.6.1" }, { name = "pyyaml", specifier = "==6.0.2" }, { name = "requests", specifier = "==2.32.3" }, - { name = "ruff", specifier = "==0.9.2" }, + { name = "ruff", specifier = "==0.9.3" }, { name = "sh", marker = "sys_platform != 'win23'", specifier = "==2.1" }, { name = "tox", specifier = "==4.23.2" }, { name = "tox-uv", specifier = ">=1.17" }, @@ -830,27 +830,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.9.2" +version = "0.9.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/80/63/77ecca9d21177600f551d1c58ab0e5a0b260940ea7312195bd2a4798f8a8/ruff-0.9.2.tar.gz", hash = "sha256:b5eceb334d55fae5f316f783437392642ae18e16dcf4f1858d55d3c2a0f8f5d0", size = 3553799 } +sdist = { url = "https://files.pythonhosted.org/packages/1e/7f/60fda2eec81f23f8aa7cbbfdf6ec2ca11eb11c273827933fb2541c2ce9d8/ruff-0.9.3.tar.gz", hash = "sha256:8293f89985a090ebc3ed1064df31f3b4b56320cdfcec8b60d3295bddb955c22a", size = 3586740 } wheels = [ - { url = "https://files.pythonhosted.org/packages/af/b9/0e168e4e7fb3af851f739e8f07889b91d1a33a30fca8c29fa3149d6b03ec/ruff-0.9.2-py3-none-linux_armv6l.whl", hash = "sha256:80605a039ba1454d002b32139e4970becf84b5fee3a3c3bf1c2af6f61a784347", size = 11652408 }, - { url = "https://files.pythonhosted.org/packages/2c/22/08ede5db17cf701372a461d1cb8fdde037da1d4fa622b69ac21960e6237e/ruff-0.9.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b9aab82bb20afd5f596527045c01e6ae25a718ff1784cb92947bff1f83068b00", size = 11587553 }, - { url = "https://files.pythonhosted.org/packages/42/05/dedfc70f0bf010230229e33dec6e7b2235b2a1b8cbb2a991c710743e343f/ruff-0.9.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:fbd337bac1cfa96be615f6efcd4bc4d077edbc127ef30e2b8ba2a27e18c054d4", size = 11020755 }, - { url = "https://files.pythonhosted.org/packages/df/9b/65d87ad9b2e3def67342830bd1af98803af731243da1255537ddb8f22209/ruff-0.9.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82b35259b0cbf8daa22a498018e300b9bb0174c2bbb7bcba593935158a78054d", size = 11826502 }, - { url = "https://files.pythonhosted.org/packages/93/02/f2239f56786479e1a89c3da9bc9391120057fc6f4a8266a5b091314e72ce/ruff-0.9.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8b6a9701d1e371bf41dca22015c3f89769da7576884d2add7317ec1ec8cb9c3c", size = 11390562 }, - { url = "https://files.pythonhosted.org/packages/c9/37/d3a854dba9931f8cb1b2a19509bfe59e00875f48ade632e95aefcb7a0aee/ruff-0.9.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9cc53e68b3c5ae41e8faf83a3b89f4a5d7b2cb666dff4b366bb86ed2a85b481f", size = 12548968 }, - { url = "https://files.pythonhosted.org/packages/fa/c3/c7b812bb256c7a1d5553433e95980934ffa85396d332401f6b391d3c4569/ruff-0.9.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:8efd9da7a1ee314b910da155ca7e8953094a7c10d0c0a39bfde3fcfd2a015684", size = 13187155 }, - { url = "https://files.pythonhosted.org/packages/bd/5a/3c7f9696a7875522b66aa9bba9e326e4e5894b4366bd1dc32aa6791cb1ff/ruff-0.9.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3292c5a22ea9a5f9a185e2d131dc7f98f8534a32fb6d2ee7b9944569239c648d", size = 12704674 }, - { url = "https://files.pythonhosted.org/packages/be/d6/d908762257a96ce5912187ae9ae86792e677ca4f3dc973b71e7508ff6282/ruff-0.9.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a605fdcf6e8b2d39f9436d343d1f0ff70c365a1e681546de0104bef81ce88df", size = 14529328 }, - { url = "https://files.pythonhosted.org/packages/2d/c2/049f1e6755d12d9cd8823242fa105968f34ee4c669d04cac8cea51a50407/ruff-0.9.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c547f7f256aa366834829a08375c297fa63386cbe5f1459efaf174086b564247", size = 12385955 }, - { url = "https://files.pythonhosted.org/packages/91/5a/a9bdb50e39810bd9627074e42743b00e6dc4009d42ae9f9351bc3dbc28e7/ruff-0.9.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d18bba3d3353ed916e882521bc3e0af403949dbada344c20c16ea78f47af965e", size = 11810149 }, - { url = "https://files.pythonhosted.org/packages/e5/fd/57df1a0543182f79a1236e82a79c68ce210efb00e97c30657d5bdb12b478/ruff-0.9.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b338edc4610142355ccf6b87bd356729b62bf1bc152a2fad5b0c7dc04af77bfe", size = 11479141 }, - { url = "https://files.pythonhosted.org/packages/dc/16/bc3fd1d38974f6775fc152a0554f8c210ff80f2764b43777163c3c45d61b/ruff-0.9.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:492a5e44ad9b22a0ea98cf72e40305cbdaf27fac0d927f8bc9e1df316dcc96eb", size = 12014073 }, - { url = "https://files.pythonhosted.org/packages/47/6b/e4ca048a8f2047eb652e1e8c755f384d1b7944f69ed69066a37acd4118b0/ruff-0.9.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:af1e9e9fe7b1f767264d26b1075ac4ad831c7db976911fa362d09b2d0356426a", size = 12435758 }, - { url = "https://files.pythonhosted.org/packages/c2/40/4d3d6c979c67ba24cf183d29f706051a53c36d78358036a9cd21421582ab/ruff-0.9.2-py3-none-win32.whl", hash = "sha256:71cbe22e178c5da20e1514e1e01029c73dc09288a8028a5d3446e6bba87a5145", size = 9796916 }, - { url = "https://files.pythonhosted.org/packages/c3/ef/7f548752bdb6867e6939489c87fe4da489ab36191525fadc5cede2a6e8e2/ruff-0.9.2-py3-none-win_amd64.whl", hash = "sha256:c5e1d6abc798419cf46eed03f54f2e0c3adb1ad4b801119dedf23fcaf69b55b5", size = 10773080 }, - { url = "https://files.pythonhosted.org/packages/0e/4e/33df635528292bd2d18404e4daabcd74ca8a9853b2e1df85ed3d32d24362/ruff-0.9.2-py3-none-win_arm64.whl", hash = "sha256:a1b63fa24149918f8b37cef2ee6fff81f24f0d74b6f0bdc37bc3e1f2143e41c6", size = 10001738 }, + { url = "https://files.pythonhosted.org/packages/f9/77/4fb790596d5d52c87fd55b7160c557c400e90f6116a56d82d76e95d9374a/ruff-0.9.3-py3-none-linux_armv6l.whl", hash = "sha256:7f39b879064c7d9670197d91124a75d118d00b0990586549949aae80cdc16624", size = 11656815 }, + { url = "https://files.pythonhosted.org/packages/a2/a8/3338ecb97573eafe74505f28431df3842c1933c5f8eae615427c1de32858/ruff-0.9.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a187171e7c09efa4b4cc30ee5d0d55a8d6c5311b3e1b74ac5cb96cc89bafc43c", size = 11594821 }, + { url = "https://files.pythonhosted.org/packages/8e/89/320223c3421962762531a6b2dd58579b858ca9916fb2674874df5e97d628/ruff-0.9.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c59ab92f8e92d6725b7ded9d4a31be3ef42688a115c6d3da9457a5bda140e2b4", size = 11040475 }, + { url = "https://files.pythonhosted.org/packages/b2/bd/1d775eac5e51409535804a3a888a9623e87a8f4b53e2491580858a083692/ruff-0.9.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dc153c25e715be41bb228bc651c1e9b1a88d5c6e5ed0194fa0dfea02b026439", size = 11856207 }, + { url = "https://files.pythonhosted.org/packages/7f/c6/3e14e09be29587393d188454064a4aa85174910d16644051a80444e4fd88/ruff-0.9.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:646909a1e25e0dc28fbc529eab8eb7bb583079628e8cbe738192853dbbe43af5", size = 11420460 }, + { url = "https://files.pythonhosted.org/packages/ef/42/b7ca38ffd568ae9b128a2fa76353e9a9a3c80ef19746408d4ce99217ecc1/ruff-0.9.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a5a46e09355695fbdbb30ed9889d6cf1c61b77b700a9fafc21b41f097bfbba4", size = 12605472 }, + { url = "https://files.pythonhosted.org/packages/a6/a1/3167023f23e3530fde899497ccfe239e4523854cb874458ac082992d206c/ruff-0.9.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c4bb09d2bbb394e3730d0918c00276e79b2de70ec2a5231cd4ebb51a57df9ba1", size = 13243123 }, + { url = "https://files.pythonhosted.org/packages/d0/b4/3c600758e320f5bf7de16858502e849f4216cb0151f819fa0d1154874802/ruff-0.9.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96a87ec31dc1044d8c2da2ebbed1c456d9b561e7d087734336518181b26b3aa5", size = 12744650 }, + { url = "https://files.pythonhosted.org/packages/be/38/266fbcbb3d0088862c9bafa8b1b99486691d2945a90b9a7316336a0d9a1b/ruff-0.9.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb7554aca6f842645022fe2d301c264e6925baa708b392867b7a62645304df4", size = 14458585 }, + { url = "https://files.pythonhosted.org/packages/63/a6/47fd0e96990ee9b7a4abda62de26d291bd3f7647218d05b7d6d38af47c30/ruff-0.9.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cabc332b7075a914ecea912cd1f3d4370489c8018f2c945a30bcc934e3bc06a6", size = 12419624 }, + { url = "https://files.pythonhosted.org/packages/84/5d/de0b7652e09f7dda49e1a3825a164a65f4998175b6486603c7601279baad/ruff-0.9.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:33866c3cc2a575cbd546f2cd02bdd466fed65118e4365ee538a3deffd6fcb730", size = 11843238 }, + { url = "https://files.pythonhosted.org/packages/9e/be/3f341ceb1c62b565ec1fb6fd2139cc40b60ae6eff4b6fb8f94b1bb37c7a9/ruff-0.9.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:006e5de2621304c8810bcd2ee101587712fa93b4f955ed0985907a36c427e0c2", size = 11484012 }, + { url = "https://files.pythonhosted.org/packages/a3/c8/ff8acbd33addc7e797e702cf00bfde352ab469723720c5607b964491d5cf/ruff-0.9.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ba6eea4459dbd6b1be4e6bfc766079fb9b8dd2e5a35aff6baee4d9b1514ea519", size = 12038494 }, + { url = "https://files.pythonhosted.org/packages/73/b1/8d9a2c0efbbabe848b55f877bc10c5001a37ab10aca13c711431673414e5/ruff-0.9.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:90230a6b8055ad47d3325e9ee8f8a9ae7e273078a66401ac66df68943ced029b", size = 12473639 }, + { url = "https://files.pythonhosted.org/packages/cb/44/a673647105b1ba6da9824a928634fe23186ab19f9d526d7bdf278cd27bc3/ruff-0.9.3-py3-none-win32.whl", hash = "sha256:eabe5eb2c19a42f4808c03b82bd313fc84d4e395133fb3fc1b1516170a31213c", size = 9834353 }, + { url = "https://files.pythonhosted.org/packages/c3/01/65cadb59bf8d4fbe33d1a750103e6883d9ef302f60c28b73b773092fbde5/ruff-0.9.3-py3-none-win_amd64.whl", hash = "sha256:040ceb7f20791dfa0e78b4230ee9dce23da3b64dd5848e40e3bf3ab76468dcf4", size = 10821444 }, + { url = "https://files.pythonhosted.org/packages/69/cb/b3fe58a136a27d981911cba2f18e4b29f15010623b79f0f2510fd0d31fd3/ruff-0.9.3-py3-none-win_arm64.whl", hash = "sha256:800d773f6d4d33b0a3c60e2c6ae8f4c202ea2de056365acfa519aa48acf28e0b", size = 10038168 }, ] [[package]] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 71e092dd8..30bbe8269 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: # Run the Ruff linter. - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.2 + rev: v0.9.3 hooks: # Linter - id: ruff diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index cd1fc7b26..772c497a2 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -28,7 +28,7 @@ sphinx-autobuild==2024.10.3 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ -ruff==0.9.2 # https://github.com/astral-sh/ruff +ruff==0.9.3 # https://github.com/astral-sh/ruff coverage==7.6.10 # https://github.com/nedbat/coveragepy djlint==1.36.4 # https://github.com/Riverside-Healthcare/djLint pre-commit==4.1.0 # https://github.com/pre-commit/pre-commit From 70bd35d398ed0f147b2528b3f6ec49bf38974b5d Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 25 Jan 2025 02:21:10 +0000 Subject: [PATCH 06/10] Release 2025.01.24 --- CHANGELOG.md | 7 +++++++ pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 384ae1cab..08ddf5c04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2025.01.24 + + +### Updated + +- Update ruff to 0.9.3 ([#5654](https://github.com/cookiecutter/cookiecutter-django/pull/5654)) + ## 2025.01.21 diff --git a/pyproject.toml b/pyproject.toml index 57af0c67d..5f4a4508b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2025.01.21" +version = "2025.01.24" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [ From 827d35708b5ec1d64f61f5f7149bac5ccece4217 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Sun, 26 Jan 2025 13:35:04 +0000 Subject: [PATCH 07/10] Migrate generated project from `runtime.txt` to `.python-version` (#5652) Heroku now supports the `.python-version` file as an alternative to the Heroku-specific (and now deprecated) `runtime.txt` file, and recommends apps switch to using the former since it's more widely supported by other tooling. The `.python-version` file is supported by pyenv, uv, the GitHub Actions `setup-python` action and many others. In addition, the `.python-version` file supports the version being specified as just the major version (eg `3.12` vs `3.12.N`) which means will pick up Python patch updates automatically (which is the recommended usage on Heroku). See: https://devcenter.heroku.com/changelog-items/3005 https://github.com/heroku/heroku-buildpack-python/issues/1642 https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-python-version-file-input --- hooks/post_gen_project.py | 2 +- {{cookiecutter.project_slug}}/.github/dependabot.yml | 2 +- {{cookiecutter.project_slug}}/.github/workflows/ci.yml | 6 +++--- {{cookiecutter.project_slug}}/.gitignore | 3 --- {{cookiecutter.project_slug}}/.python-version | 1 + {{cookiecutter.project_slug}}/runtime.txt | 1 - 6 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/.python-version delete mode 100644 {{cookiecutter.project_slug}}/runtime.txt diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index e38d59b41..318c5beb7 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -76,7 +76,7 @@ def remove_utility_files(): def remove_heroku_files(): - file_names = ["Procfile", "runtime.txt", "requirements.txt"] + file_names = ["Procfile", "requirements.txt"] for file_name in file_names: if file_name == "requirements.txt" and "{{ cookiecutter.ci_tool }}".lower() == "travis": # don't remove the file if we are using travisci but not using heroku diff --git a/{{cookiecutter.project_slug}}/.github/dependabot.yml b/{{cookiecutter.project_slug}}/.github/dependabot.yml index 4b8973558..4ea47bd28 100644 --- a/{{cookiecutter.project_slug}}/.github/dependabot.yml +++ b/{{cookiecutter.project_slug}}/.github/dependabot.yml @@ -98,7 +98,7 @@ updates: # Enable version updates for Python/Pip - Production - package-ecosystem: 'pip' # Look for a `requirements.txt` in the `root` directory - # also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt' + # also 'setup.cfg', '.python-version' and 'requirements/*.txt' directory: '/' # Every weekday schedule: diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 6bb555063..83625e481 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version-file: '.python-version' {%- if cookiecutter.open_source_license != 'Not open source' %} # Consider using pre-commit.ci for open source project @@ -88,9 +88,9 @@ jobs: {%- else %} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version-file: '.python-version' cache: pip cache-dependency-path: | requirements/base.txt diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 0bb322186..1bd36b929 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -59,9 +59,6 @@ docs/_build/ # PyBuilder target/ -# pyenv -.python-version - {% if cookiecutter.use_celery == 'y' -%} # celery beat schedule file celerybeat-schedule diff --git a/{{cookiecutter.project_slug}}/.python-version b/{{cookiecutter.project_slug}}/.python-version new file mode 100644 index 000000000..e4fba2183 --- /dev/null +++ b/{{cookiecutter.project_slug}}/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt deleted file mode 100644 index 32905d6e0..000000000 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ /dev/null @@ -1 +0,0 @@ -python-3.12.7 From b5b24db9d2f617e6c0d45c9bcfed2be3fc013838 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 26 Jan 2025 13:35:23 +0000 Subject: [PATCH 08/10] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index 2069a8d03..9bb91b580 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1683,5 +1683,10 @@ "name": "Hana Belay", "github_login": "earthcomfy", "twitter_username": "" + }, + { + "name": "Ed Morley", + "github_login": "edmorley", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 70532a520..de8330c91 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -803,6 +803,13 @@ Listed in alphabetical order. + + Ed Morley + + edmorley + + + Emanuel Calso From f95ef4f8dc9a3a90d2a0020a626fa10a51550654 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Sun, 26 Jan 2025 13:38:08 +0000 Subject: [PATCH 09/10] Update Heroku deployment guide (#5656) * Remove setting of `PYTHONHASHSEED` env var, since it's defaulted to `random` since Python 3.3. See: https://docs.python.org/3.13/whatsnew/3.3.html#builtin-functions-and-types * Remove setting of `WEB_CONCURRENCY` env var to a hardcoded value, since on Heroku the Python buildpack dynamically sets the value at container boot based on the available CPUs, so it's best to not override the default with a value that might not match the size of the dyno. See: https://devcenter.heroku.com/articles/python-concurrency#default-settings-and-behavior --- docs/3-deployment/deployment-on-heroku.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/3-deployment/deployment-on-heroku.rst b/docs/3-deployment/deployment-on-heroku.rst index 292946ba3..687795466 100644 --- a/docs/3-deployment/deployment-on-heroku.rst +++ b/docs/3-deployment/deployment-on-heroku.rst @@ -25,10 +25,6 @@ Run these commands to deploy the project to Heroku: # Assuming you chose Mailgun as mail service (see below for others) heroku addons:create mailgun:starter - heroku config:set PYTHONHASHSEED=random - - heroku config:set WEB_CONCURRENCY=4 - heroku config:set DJANGO_DEBUG=False heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)" From bf2a3c5d8411f19258e20e591eceba133357916c Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 27 Jan 2025 02:26:26 +0000 Subject: [PATCH 10/10] Release 2025.01.26 --- CHANGELOG.md | 11 +++++++++++ pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08ddf5c04..87169ffb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2025.01.26 + + +### Changed + +- Migrate generated project from `runtime.txt` to `.python-version` ([#5652](https://github.com/cookiecutter/cookiecutter-django/pull/5652)) + +### Documentation + +- Update Heroku deployment guide ([#5656](https://github.com/cookiecutter/cookiecutter-django/pull/5656)) + ## 2025.01.24 diff --git a/pyproject.toml b/pyproject.toml index 5f4a4508b..1d0bc34b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2025.01.24" +version = "2025.01.26" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [