From 55ccac80fcf37505b71cef09c033a6e7c2c41a6b Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 1 May 2025 16:02:17 -0500 Subject: [PATCH 1/4] :bookmark: bump version 0.6.0 -> 0.6.1 --- pyproject.toml | 2 +- src/django_github_app/__init__.py | 2 +- tests/test_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6bb5fe7..b6d2a33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,7 +102,7 @@ Source = "https://github.com/joshuadavidthomas/django-github-app" [tool.bumpver] commit = true commit_message = ":bookmark: bump version {old_version} -> {new_version}" -current_version = "0.6.0" +current_version = "0.6.1" push = false # set to false for CI tag = false version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]" diff --git a/src/django_github_app/__init__.py b/src/django_github_app/__init__.py index 34157b2..9e3ae3d 100644 --- a/src/django_github_app/__init__.py +++ b/src/django_github_app/__init__.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "0.6.0" +__version__ = "0.6.1" diff --git a/tests/test_version.py b/tests/test_version.py index b468b9d..459bba2 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -4,4 +4,4 @@ def test_version(): - assert __version__ == "0.6.0" + assert __version__ == "0.6.1" From 61493c1017c504555abd0d45b11aa5e4afa0cd97 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 1 May 2025 16:02:17 -0500 Subject: [PATCH 2/4] update CHANGELOG for version 0.6.1 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d26cd8f..8972c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/ ## [Unreleased] +## [0.6.1] + ### Fixed - Fixed excessive memory usage in `AsyncWebhookView` and `SyncWebhookView` caused by creating a new `GitHubRouter` instance on each request. @@ -100,7 +102,7 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/ - Josh Thomas (maintainer) -[unreleased]: https://github.com/joshuadavidthomas/django-github-app/compare/v0.6.0...HEAD +[unreleased]: https://github.com/joshuadavidthomas/django-github-app/compare/v0.6.1...HEAD [0.1.0]: https://github.com/joshuadavidthomas/django-github-app/releases/tag/v0.1.0 [0.2.0]: https://github.com/joshuadavidthomas/django-github-app/releases/tag/v0.2.0 [0.2.1]: https://github.com/joshuadavidthomas/django-github-app/releases/tag/v0.2.1 @@ -108,3 +110,4 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/ [0.4.0]: https://github.com/joshuadavidthomas/django-github-app/releases/tag/v0.4.0 [0.5.0]: https://github.com/joshuadavidthomas/django-github-app/releases/tag/v0.5.0 [0.6.0]: https://github.com/joshuadavidthomas/django-github-app/releases/tag/v0.6.0 +[0.6.1]: https://github.com/joshuadavidthomas/django-github-app/releases/tag/v0.6.1 From ed1bf2884c3263227193bd56625b832ca9d43386 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 1 May 2025 16:04:49 -0500 Subject: [PATCH 3/4] bump memory limit --- tests/test_routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_routing.py b/tests/test_routing.py index de058bb..fd3e5b0 100644 --- a/tests/test_routing.py +++ b/tests/test_routing.py @@ -77,7 +77,7 @@ def test_duplicate_routers_without_module_level_router(self): assert len(router_ids) == 5 - @pytest.mark.limit_memory("2.5MB") + @pytest.mark.limit_memory("3MB") def test_router_memory_stress_test(self): view_count = 50000 views = [] From c81f5872b9962d98ad00973e7549a2fdaef57c87 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 1 May 2025 16:22:52 -0500 Subject: [PATCH 4/4] disable legacy test --- tests/test_routing.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/test_routing.py b/tests/test_routing.py index fd3e5b0..803018e 100644 --- a/tests/test_routing.py +++ b/tests/test_routing.py @@ -77,26 +77,35 @@ def test_duplicate_routers_without_module_level_router(self): assert len(router_ids) == 5 - @pytest.mark.limit_memory("3MB") + @pytest.mark.limit_memory("100KB") + @pytest.mark.xdist_group(group="memory_tests") def test_router_memory_stress_test(self): - view_count = 50000 + view_count = 10000 views = [] for _ in range(view_count): view = View() views.append(view) + view1_router = views[0].router + assert len(views) == view_count - assert all(view.router is views[0].router for view in views) + assert all(view.router is view1_router for view in views) - @pytest.mark.limit_memory("4MB") + @pytest.mark.limit_memory("1.5MB") + @pytest.mark.xdist_group(group="memory_tests") + @pytest.mark.skip( + "does not reliably allocate memory when run with other memory test" + ) def test_router_memory_stress_test_legacy(self): - view_count = 50000 + view_count = 10000 views = [] for _ in range(view_count): view = LegacyView() views.append(view) + view1_router = views[0].router + assert len(views) == view_count - assert not all(view.router is views[0].router for view in views) + assert not all(view.router is view1_router for view in views)