diff -Nru objgraph-3.5.0/debian/changelog objgraph-3.5.0/debian/changelog --- objgraph-3.5.0/debian/changelog 2020-10-15 02:45:57.000000000 +0000 +++ objgraph-3.5.0/debian/changelog 2021-10-22 17:52:42.000000000 +0000 @@ -1,3 +1,29 @@ +objgraph (3.5.0-4) unstable; urgency=medium + + * Patch: Avoid a py2-style exec in sphinx docs/conf.py, instead parse the + version from the objgraph.py. Fixes FTBFS with python3-sphinx 4. + + -- Stefano Rivera Fri, 22 Oct 2021 10:52:42 -0700 + +objgraph (3.5.0-3) unstable; urgency=medium + + [ Debian Janitor ] + * Bump debhelper from old 12 to 13. + + [ Stefano Rivera ] + * Source-only upload. + * Bump Standards-Version to 4.6.0, no changes needed. + * Bump copyright years. + * Bump watch file version to 4. + + -- Stefano Rivera Fri, 17 Sep 2021 21:07:55 -0700 + +objgraph (3.5.0-2) unstable; urgency=medium + + * Set upstream metadata fields: Repository. + + -- Debian Janitor Sat, 21 Aug 2021 13:53:02 +0100 + objgraph (3.5.0-1) unstable; urgency=medium [ Stefano Rivera ] diff -Nru objgraph-3.5.0/debian/control objgraph-3.5.0/debian/control --- objgraph-3.5.0/debian/control 2020-10-15 02:45:57.000000000 +0000 +++ objgraph-3.5.0/debian/control 2021-10-22 17:52:42.000000000 +0000 @@ -4,14 +4,14 @@ Maintainer: Debian Python Team Uploaders: Stefano Rivera Build-Depends: - debhelper-compat (= 12), + debhelper-compat (= 13), dh-python, graphviz, python3-all (>= 3.3), python3-graphviz, python3-setuptools, python3-sphinx (>= 1.0.7+dfsg) -Standards-Version: 4.5.0 +Standards-Version: 4.6.0 Homepage: https://mg.pov.lt/objgraph/ Vcs-Git: https://salsa.debian.org/python-team/packages/objgraph.git Vcs-Browser: https://salsa.debian.org/python-team/packages/objgraph diff -Nru objgraph-3.5.0/debian/copyright objgraph-3.5.0/debian/copyright --- objgraph-3.5.0/debian/copyright 2020-10-15 02:45:57.000000000 +0000 +++ objgraph-3.5.0/debian/copyright 2021-10-22 17:52:42.000000000 +0000 @@ -25,7 +25,7 @@ SOFTWARE. Files: debian/* -Copyright: 2010-2020, Stefano Rivera +Copyright: 2010-2021, Stefano Rivera License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru objgraph-3.5.0/debian/patches/py3-sphinx objgraph-3.5.0/debian/patches/py3-sphinx --- objgraph-3.5.0/debian/patches/py3-sphinx 1970-01-01 00:00:00.000000000 +0000 +++ objgraph-3.5.0/debian/patches/py3-sphinx 2021-10-22 17:52:42.000000000 +0000 @@ -0,0 +1,58 @@ +From: Marius Gedminas +Date: Fri, 22 Oct 2021 10:33:44 -0700 +Subject: Extract version from objgraph.py without py2 exec + +Origin: upstream, https://github.com/mgedmin/objgraph/commit/e96d904f09278ef1a32eb666fb1db7d0d3c778db +--- + docs/conf.py | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/docs/conf.py b/docs/conf.py +index bd7c083..85c5a5d 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -11,25 +11,40 @@ + # All configuration values have a default; values that are commented out + # serve to show the default. + +-import sys, os ++import io ++import os ++import re ++import sys + + # If extensions (or modules to document with autodoc) are in another directory, + # add these directories to sys.path here. If the directory is relative to the + # documentation root, use os.path.abspath to make it absolute, like shown here. + sys.path.append(os.path.abspath('..')) + ++ + def relative(filename): + here = os.path.dirname('__file__') + return os.path.join(here, filename) + ++ ++def read(filename): ++ with io.open(relative(filename), encoding='UTF-8') as f: ++ return f.read() ++ ++ + def get_version(): +- d = {} +- exec open(relative('../objgraph.py')).read() in d +- return d['__version__'] ++ r = re.compile('''^__version__ = ["'](.+)["']$''') ++ for line in read('../objgraph.py').splitlines(): ++ m = r.match(line) ++ if m: ++ return m.group(1) ++ raise AssertionError('Could not determine version number from objgraph.py') ++ + + def get_short_version(): + return '.'.join(get_version().split('.')[:2]) + ++ + # -- General configuration ----------------------------------------------------- + + # Add any Sphinx extension module names here, as strings. They can be extensions diff -Nru objgraph-3.5.0/debian/patches/series objgraph-3.5.0/debian/patches/series --- objgraph-3.5.0/debian/patches/series 2020-10-15 02:45:57.000000000 +0000 +++ objgraph-3.5.0/debian/patches/series 2021-10-22 17:52:42.000000000 +0000 @@ -1,2 +1,3 @@ remove-external-images no-graphviz +py3-sphinx diff -Nru objgraph-3.5.0/debian/upstream/metadata objgraph-3.5.0/debian/upstream/metadata --- objgraph-3.5.0/debian/upstream/metadata 2020-10-15 02:45:57.000000000 +0000 +++ objgraph-3.5.0/debian/upstream/metadata 2021-10-22 17:52:42.000000000 +0000 @@ -7,4 +7,4 @@ - Name: PyPI Entry: objgraph Repository-Browse: https://github.com/mgedmin/objgraph -Repository: https://github.com/mgedmin/objgraph +Repository: https://github.com/mgedmin/objgraph.git diff -Nru objgraph-3.5.0/debian/watch objgraph-3.5.0/debian/watch --- objgraph-3.5.0/debian/watch 2020-10-15 02:45:57.000000000 +0000 +++ objgraph-3.5.0/debian/watch 2021-10-22 17:52:42.000000000 +0000 @@ -1,3 +1,3 @@ -version=3 +version=4 opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ https://pypi.debian.net/objgraph/objgraph-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))