Skip to content
Snippets Groups Projects
Commit e99fe61f authored by Colin Watson's avatar Colin Watson
Browse files

New upstream version 0.1.9

parent d85dc740
No related branches found
No related tags found
No related merge requests found
......@@ -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@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@v1.4.2
with:
user: __token__
......
......@@ -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
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
-------------
......
......@@ -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',
),
}
......@@ -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'],
......
......@@ -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]
......
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment