[med-svn] [Git][python-team/packages/sphinxcontrib-autoprogram][master] 3 commits: New upstream version 0.1.9
Colin Watson (@cjwatson)
gitlab at salsa.debian.org
Mon Jun 3 09:32:20 BST 2024
Colin Watson pushed to branch master at Debian Python Team / packages / sphinxcontrib-autoprogram
Commits:
e99fe61f by Colin Watson at 2024-06-03T09:24:26+01:00
New upstream version 0.1.9
- - - - -
4cdce2eb by Colin Watson at 2024-06-03T09:25:04+01:00
Update upstream source from tag 'upstream/0.1.9'
Update to upstream version '0.1.9'
with Debian dir 5be22186ca940556aae404c2611bbf95b0ba48ff
- - - - -
072a627f by Colin Watson at 2024-06-03T09:31:33+01:00
Standards-Version: 4.7.0 (no changes required)
- - - - -
12 changed files:
- .github/workflows/build.yml
- .pylintrc
- debian/changelog
- debian/control
- − debian/patches/python312.patch
- − debian/patches/remove-six.patch
- − debian/patches/series
- doc/changelog.rst
- doc/conf.py
- setup.py
- sphinxcontrib/autoprogram.py
- tox.ini
Changes:
=====================================
.github/workflows/build.yml
=====================================
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout at v2
@@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- python -m pip install tox
+ python -m pip install setuptools tox
# NOTE(lb): By creating a sdist and then testing/working with that, we ensure
# its completeness.
@@ -60,7 +60,7 @@ jobs:
run: |
pip install -r doc/rtd-requires.txt
cd doc
- make
+ make html
working-directory: ${{ github.workspace }}/tmp/sdist
- name: Install wheel
@@ -69,7 +69,7 @@ jobs:
working-directory: ${{ github.workspace }}/tmp/sdist
- name: Publish package
- if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') && matrix.python-version == 3.11
+ if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') && matrix.python-version == 3.12
uses: pypa/gh-action-pypi-publish at v1.4.2
with:
user: __token__
=====================================
.pylintrc
=====================================
@@ -52,4 +52,4 @@ variable-naming-style=snake_case
[VARIABLES]
-redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
\ No newline at end of file
+redefining-builtins-modules=builtins,io
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+sphinxcontrib-autoprogram (0.1.9-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+ * Standards-Version: 4.7.0 (no changes required).
+
+ -- Colin Watson <cjwatson at debian.org> Mon, 03 Jun 2024 09:24:55 +0100
+
sphinxcontrib-autoprogram (0.1.8-2) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends: debhelper-compat (= 13),
python3,
python3-setuptools,
python3-sphinx,
-Standards-Version: 4.6.2
+Standards-Version: 4.7.0
Vcs-Browser: https://salsa.debian.org/python-team/packages/sphinxcontrib-autoprogram
Vcs-Git: https://salsa.debian.org/python-team/packages/sphinxcontrib-autoprogram.git
Homepage: https://pythonhosted.org/sphinxcontrib-autoprogram/
=====================================
debian/patches/python312.patch deleted
=====================================
@@ -1,57 +0,0 @@
-From bd3ba456535d928381a7d111afa92878148ddc0f Mon Sep 17 00:00:00 2001
-From: Rogdham <contact at rogdham.net>
-Date: Sat, 9 Mar 2024 10:27:35 +0100
-Subject: [PATCH] Remove imp dependency
-
-See https://docs.python.org/3/whatsnew/3.12.html#imp
----
- sphinxcontrib/autoprogram.py | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/sphinxcontrib/autoprogram.py b/sphinxcontrib/autoprogram.py
-index ef479e7..663cb16 100644
---- a/sphinxcontrib/autoprogram.py
-+++ b/sphinxcontrib/autoprogram.py
-@@ -18,6 +18,7 @@
- import os
- import re
- import sys
-+import tempfile
- from functools import reduce
- from typing import Any, Dict, Iterable, List, Optional, Tuple
- import unittest
-@@ -144,16 +145,16 @@ def import_object(import_name: str):
- # the script, if there is a script named module_name. Otherwise, raise
- # an ImportError as it did before.
- import glob
-- import sys
- import os
-- import imp
-+ import sys
-+ import types
-
- for p in sys.path:
- f = glob.glob(os.path.join(p, module_name))
- if len(f) > 0:
- with open(f[0]) as fobj:
- codestring = fobj.read()
-- foo = imp.new_module("foo")
-+ foo = types.ModuleType("foo")
- exec(codestring, foo.__dict__)
-
- sys.modules["foo"] = foo
-@@ -590,6 +591,14 @@ def test_import_object(self) -> None:
- )
- self.assertIsInstance(instance, UtilTestCase)
-
-+ def test_import_object_filename(self) -> None:
-+ with tempfile.TemporaryDirectory() as tmpdirname:
-+ filename = os.path.join(tmpdirname, 'somefile')
-+ with open(filename, 'w') as fp:
-+ fp.write("bar = 42\n")
-+ value = import_object("{}:bar".format(filename))
-+ self.assertTrue(value == 42)
-+
- if not hasattr(unittest.TestCase, "assertIsInstance"):
-
- def assertIsInstance(self, instance, cls) -> None: # type: ignore[override]
=====================================
debian/patches/remove-six.patch deleted
=====================================
@@ -1,51 +0,0 @@
-From a9a7c0a408facb347deb9ae3382dbf9af560719b Mon Sep 17 00:00:00 2001
-From: Alexandre Detiste <alexandre.detiste at gmail.com>
-Date: Sun, 7 Jan 2024 23:06:51 +0100
-Subject: [PATCH] remove dependency on 'six' transitional library
-Forwarded: https://github.com/sphinx-contrib/autoprogram
-
---- a/setup.py
-+++ b/setup.py
-@@ -9,7 +9,7 @@
- # Do not change the variable name. It's parsed by doc/conf.py script.
- version = '0.1.8'
-
--requires = ['Sphinx >= 1.2', 'six']
-+requires = ['Sphinx >= 1.2']
-
-
- def readme():
---- a/sphinxcontrib/autoprogram.py
-+++ b/sphinxcontrib/autoprogram.py
-@@ -12,11 +12,13 @@
-
- # pylint: disable=protected-access,missing-docstring
- import argparse
-+import builtins
- import collections
- import inspect
- import os
- import re
- import sys
-+from functools import reduce
- from typing import Any, Dict, Iterable, List, Optional, Tuple
- import unittest
- from unittest import mock
-@@ -25,8 +27,6 @@
- from docutils.parsers.rst import Directive
- from docutils.parsers.rst.directives import unchanged
- from docutils.statemachine import StringList, ViewList
--from six import exec_
--from six.moves import builtins, reduce
- from sphinx.domains import std
- from sphinx.util.nodes import nested_parse_with_titles
-
-@@ -154,7 +154,7 @@
- with open(f[0]) as fobj:
- codestring = fobj.read()
- foo = imp.new_module("foo")
-- exec_(codestring, foo.__dict__)
-+ exec(codestring, foo.__dict__)
-
- sys.modules["foo"] = foo
- mod = __import__("foo")
=====================================
debian/patches/series deleted
=====================================
@@ -1,2 +0,0 @@
-remove-six.patch
-python312.patch
=====================================
doc/changelog.rst
=====================================
@@ -1,6 +1,14 @@
Changelog
=========
+Version 0.1.9
+-------------
+
+Released on March 13, 2024.
+
+- Test against Python 3.12.
+- Drop support for Python 3.7.
+
Version 0.1.8
-------------
=====================================
doc/conf.py
=====================================
@@ -282,18 +282,18 @@ intersphinx_mapping = {
extlinks = {
'pull': (
'https://github.com/sphinx-contrib/autoprogram/pull/%s',
- '#'
+ '#%s'
),
'issue': (
'https://github.com/sphinx-contrib/autoprogram/issues/%s',
- '#'
+ '#%s'
),
'bbpull': (
'https://bitbucket.org/birkenfeld/sphinx-contrib/pull-request/%s/',
- 'Bitbucket PR #',
+ 'Bitbucket PR #%s',
),
'bbissue': (
'https://bitbucket.org/birkenfeld/sphinx-contrib/issue/%s/',
- 'Bitbucket issue #',
+ 'Bitbucket issue #%s',
),
}
=====================================
setup.py
=====================================
@@ -7,9 +7,9 @@ from setuptools import setup, find_packages
# Do not change the variable name. It's parsed by doc/conf.py script.
-version = '0.1.8'
+version = '0.1.9'
-requires = ['Sphinx >= 1.2', 'six']
+requires = ['Sphinx >= 1.2']
def readme():
@@ -31,22 +31,23 @@ setup(
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: Web Environment',
+ 'Framework :: Sphinx :: Extension',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
- 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
+ 'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: Stackless',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
'Topic :: Utilities'
],
- python_requires='>=3.7',
+ python_requires='>=3.8',
platforms='any',
packages=find_packages(),
namespace_packages=['sphinxcontrib'],
=====================================
sphinxcontrib/autoprogram.py
=====================================
@@ -12,11 +12,14 @@ from __future__ import annotations
# pylint: disable=protected-access,missing-docstring
import argparse
+import builtins
import collections
import inspect
import os
import re
import sys
+import tempfile
+from functools import reduce
from typing import Any, Dict, Iterable, List, Optional, Tuple
import unittest
from unittest import mock
@@ -25,8 +28,6 @@ from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.parsers.rst.directives import unchanged
from docutils.statemachine import StringList, ViewList
-from six import exec_
-from six.moves import builtins, reduce
from sphinx.domains import std
from sphinx.util.nodes import nested_parse_with_titles
@@ -144,17 +145,17 @@ def import_object(import_name: str):
# the script, if there is a script named module_name. Otherwise, raise
# an ImportError as it did before.
import glob
- import sys
import os
- import imp
+ import sys
+ import types
for p in sys.path:
f = glob.glob(os.path.join(p, module_name))
if len(f) > 0:
with open(f[0]) as fobj:
codestring = fobj.read()
- foo = imp.new_module("foo")
- exec_(codestring, foo.__dict__)
+ foo = types.ModuleType("foo")
+ exec(codestring, foo.__dict__)
sys.modules["foo"] = foo
mod = __import__("foo")
@@ -590,6 +591,14 @@ class UtilTestCase(unittest.TestCase):
)
self.assertIsInstance(instance, UtilTestCase)
+ def test_import_object_filename(self) -> None:
+ with tempfile.TemporaryDirectory() as tmpdirname:
+ filename = os.path.join(tmpdirname, 'somefile')
+ with open(filename, 'w') as fp:
+ fp.write("bar = 42\n")
+ value = import_object("{}:bar".format(filename))
+ self.assertTrue(value == 42)
+
if not hasattr(unittest.TestCase, "assertIsInstance"):
def assertIsInstance(self, instance, cls) -> None: # type: ignore[override]
=====================================
tox.ini
=====================================
@@ -7,7 +7,7 @@
# them.
[tox]
-envlist = {py37,py38,py39,py310,py311}-{sphinx34,sphinx33,sphinx32,sphinx24,sphinx18}
+envlist = {py38,py39,py310,py311,py312}-{sphinx34,sphinx33,sphinx32,sphinx24,sphinx18}
minversion = 2.7.0
[testenv]
View it on GitLab: https://salsa.debian.org/python-team/packages/sphinxcontrib-autoprogram/-/compare/a65a78c5245572cfaf1a41c614e6c749f3ed7b20...072a627fa0099f8fefa7a779ad4f5e33de3804da
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/python-team/packages/sphinxcontrib-autoprogram/-/compare/a65a78c5245572cfaf1a41c614e6c749f3ed7b20...072a627fa0099f8fefa7a779ad4f5e33de3804da
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240603/76315c85/attachment-0001.htm>
More information about the debian-med-commit
mailing list