From 9a78e58d78cffe32b9df2c3b243401f939a305c5 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Thu, 10 Oct 2024 11:34:28 +0300 Subject: [PATCH 1/3] Update release.mk --- release.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.mk b/release.mk index a79d32e..436d29f 100644 --- a/release.mk +++ b/release.mk @@ -1,4 +1,4 @@ -# release.mk version 2.2.2 (2024-10-09) +# release.mk version 2.2.3 (2024-10-10) # # Helpful Makefile rules for releasing Python packages. # https://github.com/mgedmin/python-project-skel @@ -79,7 +79,7 @@ endif .PHONY: distcheck-sdist distcheck-sdist: dist - pkg_and_version=`$(PYTHON) setup.py --name|tr .- _`-`$(PYTHON) setup.py --version` && \ + pkg_and_version=`$(PYTHON) setup.py --name|tr A-Z.- a-z__`-`$(PYTHON) setup.py --version` && \ rm -rf tmp && \ mkdir tmp && \ $(VCS_EXPORT) && \ From 496a4687cf351faa2423cf25472e2d4d1dcfd634 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Thu, 10 Oct 2024 14:07:38 +0300 Subject: [PATCH 2/3] f_locals labeling doesn't work since Python 3.7 And on Python 3.13 it appears to be completely impossible to force f_locals edges even if you use sys._getframe() and similar hacks. --- objgraph.py | 2 +- tests.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/objgraph.py b/objgraph.py index efafb02..028e646 100755 --- a/objgraph.py +++ b/objgraph.py @@ -1185,7 +1185,7 @@ def _edge_label(source, target, shortnames=True): and target is getattr(source, '__dict__', None)): return ' [label="__dict__",weight=10]' if _isinstance(source, types.FrameType): - if target is source.f_locals: + if target is source.f_locals: # pragma: nocover return ' [label="f_locals",weight=10]' if target is source.f_globals: return ' [label="f_globals",weight=10]' diff --git a/tests.py b/tests.py index a1d7fb9..0c7aa1f 100755 --- a/tests.py +++ b/tests.py @@ -465,11 +465,6 @@ def test_gradient_empty(self): objgraph._gradient((0.1, 0.2, 0.3), (0.2, 0.3, 0.4), 0, 0)) - def test_edge_label_frame_locals(self): - frame = sys._getframe() - self.assertEqual(' [label="f_locals",weight=10]', - objgraph._edge_label(frame, frame.f_locals)) - def test_edge_label_frame_globals(self): frame = sys._getframe() self.assertEqual(' [label="f_globals",weight=10]', From 4b74017a1460fd5d60807d30b2e2bf5758e1aeea Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Thu, 10 Oct 2024 14:09:33 +0300 Subject: [PATCH 3/3] Add Python 3.13 support --- .github/workflows/build.yml | 1 + CHANGES.rst | 2 +- appveyor.yml | 1 + setup.py | 1 + tox.ini | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8dc29d0..6217a37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,7 @@ jobs: - "3.10" - "3.11" - "3.12" + - "3.13" steps: - name: Install OS dependencies diff --git a/CHANGES.rst b/CHANGES.rst index 885d719..4d35566 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,7 @@ Changes 3.6.2 (unreleased) ------------------ -- Nothing changed yet. +- Add support for Python 3.13. 3.6.1 (2024-02-26) diff --git a/appveyor.yml b/appveyor.yml index 7c13c18..e81b90b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,7 @@ environment: - PYTHON: "C:\\Python310" - PYTHON: "C:\\Python311" - PYTHON: "C:\\Python312" + - PYTHON: "C:\\Python313" init: - "echo %PYTHON%" diff --git a/setup.py b/setup.py index e236ab5..06d0d88 100755 --- a/setup.py +++ b/setup.py @@ -82,6 +82,7 @@ def build_images(doctests=()): 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], keywords='object graph visualization graphviz garbage collection', py_modules=['objgraph'], diff --git a/tox.ini b/tox.ini index 6a6addf..af5a877 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37, py38, py39, py310, py311, py312 +envlist = py37, py38, py39, py310, py311, py312, py313 [testenv] deps =