[med-svn] [Git][python-team/packages/sphinxcontrib-autoprogram][upstream] New upstream version 0.1.9
Colin Watson (@cjwatson)
gitlab at salsa.debian.org
Mon Jun 3 09:32:26 BST 2024
Colin Watson pushed to branch upstream 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
- - - - -
7 changed files:
- .github/workflows/build.yml
- .pylintrc
- 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
=====================================
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/-/commit/e99fe61fd73f5e7a4f08aab5ef4417c4893c65c5
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/python-team/packages/sphinxcontrib-autoprogram/-/commit/e99fe61fd73f5e7a4f08aab5ef4417c4893c65c5
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/b2e6d225/attachment-0001.htm>
More information about the debian-med-commit
mailing list