diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 070c61f..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 @@ -35,12 +36,12 @@ jobs: uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ matrix.python-version }}" - name: Pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} @@ -84,13 +85,13 @@ jobs: - name: Git clone uses: actions/checkout@v4 - - name: Set up Python ${{ env.default_python || '3.9' }} - uses: actions/setup-python@v4 + - name: Set up Python ${{ env.default_python || '3.12' }} + uses: actions/setup-python@v5 with: - python-version: "${{ env.default_python || '3.9' }}" + python-version: "${{ env.default_python || '3.12' }}" - name: Pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini') }} diff --git a/CHANGES.rst b/CHANGES.rst index c600037..b4283c9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,12 @@ Changes .. currentmodule:: objgraph +3.6.2 (2024-10-10) +------------------ + +- 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/objgraph.py b/objgraph.py index a55d317..e872300 100755 --- a/objgraph.py +++ b/objgraph.py @@ -42,8 +42,8 @@ __author__ = "Marius Gedminas (marius@gedmin.as)" __copyright__ = "Copyright (c) 2008-2023 Marius Gedminas and contributors" __license__ = "MIT" -__version__ = '3.6.1' -__date__ = '2024-02-26' +__version__ = '3.6.2' +__date__ = '2024-10-10' IS_INTERACTIVE = False @@ -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/release.mk b/release.mk index ff09689..436d29f 100644 --- a/release.mk +++ b/release.mk @@ -1,4 +1,4 @@ -# release.mk version 2.1 (2021-04-19) +# release.mk version 2.2.3 (2024-10-10) # # Helpful Makefile rules for releasing Python packages. # https://github.com/mgedmin/python-project-skel @@ -12,7 +12,7 @@ DISTCHECK_DIFF_OPTS ?= $(DISTCHECK_DIFF_DEFAULT_OPTS) # These should be fine PYTHON ?= python3 -PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && twine check dist/* && twine upload dist/* +PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) -m build && twine check dist/* && twine upload dist/* LATEST_RELEASE_MK_URL = https://raw.githubusercontent.com/mgedmin/python-project-skel/master/release.mk DISTCHECK_DIFF_DEFAULT_OPTS = -x PKG-INFO -x setup.cfg -x '*.egg-info' -x .github -I'^\#' @@ -44,7 +44,7 @@ help: .PHONY: dist dist: - $(PYTHON) setup.py -q sdist bdist_wheel + $(PYTHON) -m build # Provide a default 'make check' to be the same as 'make test', since that's # what 80% of my projects use, but make it possible to override. Now @@ -79,7 +79,7 @@ endif .PHONY: distcheck-sdist distcheck-sdist: dist - pkg_and_version=`$(PYTHON) setup.py --name`-`$(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) && \ diff --git a/setup.cfg b/setup.cfg index d7b392c..2cfca88 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,9 +10,3 @@ ignore = E226,W503 [zest.releaser] python-file-with-version = objgraph.py - -[bdist_wheel] -universal = 1 - -[metadata] -license_files = LICENSE diff --git a/setup.py b/setup.py index 651db63..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'], @@ -92,6 +93,5 @@ def build_images(doctests=()): ], 'test': [], }, - test_suite='tests.test_suite', zip_safe=True, ) 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]', 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 =