Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-sphinx-autodoc-typehints for
openSUSE:Factory checked in at 2022-10-08 01:26:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sphinx-autodoc-typehints (Old)
and /work/SRC/openSUSE:Factory/.python-sphinx-autodoc-typehints.new.2275
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sphinx-autodoc-typehints"
Sat Oct 8 01:26:16 2022 rev:13 rq:1008878 version:1.19.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-sphinx-autodoc-typehints/python-sphinx-autodoc-typehints.changes
2022-08-08 08:44:49.710388108 +0200
+++
/work/SRC/openSUSE:Factory/.python-sphinx-autodoc-typehints.new.2275/python-sphinx-autodoc-typehints.changes
2022-10-08 01:26:39.334426520 +0200
@@ -1,0 +2,7 @@
+Fri Oct 7 16:20:26 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to version 1.19.2
+ * Fix incorrect domain used for collections.abc.Callable.
+ * Support for CPython 3.11, no longer adds Optional when the argument is
default
+
+-------------------------------------------------------------------
Old:
----
sphinx_autodoc_typehints-1.18.3.tar.gz
New:
----
sphinx_autodoc_typehints-1.19.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sphinx-autodoc-typehints.spec ++++++
--- /var/tmp/diff_new_pack.JttnJh/_old 2022-10-08 01:26:39.758427493 +0200
+++ /var/tmp/diff_new_pack.JttnJh/_new 2022-10-08 01:26:39.762427502 +0200
@@ -28,7 +28,7 @@
%bcond_with test
%endif
Name: python-sphinx-autodoc-typehints%{psuffix}
-Version: 1.18.3
+Version: 1.19.2
Release: 0
Summary: Type hints (PEP 484) support for the Sphinx autodoc extension
License: MIT
++++++ sphinx_autodoc_typehints-1.18.3.tar.gz ->
sphinx_autodoc_typehints-1.19.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/.github/FUNDING.yml
new/sphinx_autodoc_typehints-1.19.2/.github/FUNDING.yml
--- old/sphinx_autodoc_typehints-1.18.3/.github/FUNDING.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/sphinx_autodoc_typehints-1.19.2/.github/FUNDING.yml 2022-08-08
09:10:07.000000000 +0200
@@ -0,0 +1 @@
+tidelift: "pypi/sphinx-autodoc-typehints"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/.github/SECURITY.md
new/sphinx_autodoc_typehints-1.19.2/.github/SECURITY.md
--- old/sphinx_autodoc_typehints-1.18.3/.github/SECURITY.md 1970-01-01
01:00:00.000000000 +0100
+++ new/sphinx_autodoc_typehints-1.19.2/.github/SECURITY.md 2022-08-08
09:10:07.000000000 +0200
@@ -0,0 +1,13 @@
+# Security Policy
+
+## Supported Versions
+
+| Version | Supported |
+| -------- | ------------------ |
+| 1.18 + | :white_check_mark: |
+| < 1.18 | :x: |
+
+## Reporting a Vulnerability
+
+To report a security vulnerability, please use the [Tidelift security
contact](https://tidelift.com/security). Tidelift
+will coordinate the fix and disclosure.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/.github/dependabot.yml
new/sphinx_autodoc_typehints-1.19.2/.github/dependabot.yml
--- old/sphinx_autodoc_typehints-1.18.3/.github/dependabot.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/sphinx_autodoc_typehints-1.19.2/.github/dependabot.yml 2022-08-08
09:10:07.000000000 +0200
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/.github/workflows/check.yml
new/sphinx_autodoc_typehints-1.19.2/.github/workflows/check.yml
--- old/sphinx_autodoc_typehints-1.18.3/.github/workflows/check.yml
2022-06-10 10:41:55.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/.github/workflows/check.yml
2022-08-08 09:10:07.000000000 +0200
@@ -12,27 +12,28 @@
jobs:
test:
name: test with CPython ${{ matrix.py }}
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
py:
+ - "3.11.0-beta.5"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
steps:
- name: Setup python for tox
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
run: python -m pip install tox
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python for test ${{ matrix.py }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Pick environment to run
@@ -59,20 +60,20 @@
f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}")
shell: python
- name: Upload coverage data
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: coverage-data
path: ".tox/.coverage.*"
coverage:
name: Combine coverage
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
needs: test
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- - uses: actions/setup-python@v2
+ - uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
@@ -84,21 +85,21 @@
- name: Build package
run: pyproject-build --wheel .
- name: Download coverage data
- uses: actions/download-artifact@v2
+ uses: actions/download-artifact@v3
with:
name: coverage-data
path: .tox
- name: Combine and report coverage
run: tox -e coverage
- name: Upload HTML report
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: html-report
path: .tox/htmlcov
check:
name: tox env ${{ matrix.tox_env }}
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
@@ -107,11 +108,11 @@
- readme
- type
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python "3.10"
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
@@ -124,21 +125,21 @@
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [check, coverage]
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
steps:
- name: Setup python to build package
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install build
run: python -m pip install build
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build sdist and wheel
run: python -m build -s -w . -o dist
- name: Publish to PyPi
- uses: pypa/gh-action-pypi-publish@master
+ uses: pypa/[email protected]
with:
skip_existing: true
user: __token__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/.pre-commit-config.yaml
new/sphinx_autodoc_typehints-1.19.2/.pre-commit-config.yaml
--- old/sphinx_autodoc_typehints-1.18.3/.pre-commit-config.yaml 2022-06-10
10:41:55.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/.pre-commit-config.yaml 2022-08-08
09:10:07.000000000 +0200
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.2.0
+ rev: v4.3.0
hooks:
- id: check-ast
- id: check-builtin-literals
@@ -12,7 +12,7 @@
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
- rev: v2.32.1
+ rev: v2.37.3
hooks:
- id: pyupgrade
args: [ "--py37-plus" ]
@@ -25,7 +25,7 @@
hooks:
- id: isort
- repo: https://github.com/psf/black
- rev: 22.3.0
+ rev: 22.6.0
hooks:
- id: black
args: [ --safe ]
@@ -33,7 +33,7 @@
rev: v1.12.1
hooks:
- id: blacken-docs
- additional_dependencies: [ black==21.12b0 ]
+ additional_dependencies: [ black==22.6 ]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
@@ -44,19 +44,19 @@
- id: tox-ini-fmt
args: [ "-p", "fix" ]
- repo: https://github.com/asottile/setup-cfg-fmt
- rev: v1.20.1
+ rev: v2.0.0
hooks:
- id: setup-cfg-fmt
args: [ --min-py3-version, "3.7", "--max-py-version", "3.10" ]
- repo: https://github.com/PyCQA/flake8
- rev: 4.0.1
+ rev: 5.0.2
hooks:
- id: flake8
additional_dependencies:
- - flake8-bugbear==22.1.11
- - flake8-comprehensions==3.8
+ - flake8-bugbear==22.7.1
+ - flake8-comprehensions==3.10
- flake8-pytest-style==1.6
- - flake8-spellcheck==0.24
- - flake8-unused-arguments==0.0.9
- - flake8-noqa==1.2.1
- - pep8-naming==0.12.1
+ - flake8-spellcheck==0.28
+ - flake8-unused-arguments==0.0.11
+ - flake8-noqa==1.2.8
+ - pep8-naming==0.13.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/CHANGELOG.md
new/sphinx_autodoc_typehints-1.19.2/CHANGELOG.md
--- old/sphinx_autodoc_typehints-1.18.3/CHANGELOG.md 2022-06-10
10:41:55.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/CHANGELOG.md 2022-08-08
09:10:07.000000000 +0200
@@ -1,5 +1,18 @@
# Changelog
+## 1.19.2
+
+- Fix incorrect domain used for collections.abc.Callable.
+
+## 1.19.1
+
+- Fix bug for recursive type alias.
+
+## 1.19.0
+
+- Support for CPython 3.11, no longer adds `Optional` when the argument is
default per
+ [recommendation from
PEP-484](https://github.com/tox-dev/sphinx-autodoc-typehints/pull/247).
+
## 1.18.3
- Support and require `nptyping>=2.1.2`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/LICENSE
new/sphinx_autodoc_typehints-1.19.2/LICENSE
--- old/sphinx_autodoc_typehints-1.18.3/LICENSE 2022-06-10 10:41:55.000000000
+0200
+++ new/sphinx_autodoc_typehints-1.19.2/LICENSE 2022-08-08 09:10:07.000000000
+0200
@@ -1,19 +1,21 @@
-This is the MIT license: http://www.opensource.org/licenses/mit-license.php
+MIT License
-Copyright (c) Alex Gr??nholm
+Copyright (c) 2015-202x The sphinx-autodoc-typehints developers
-Permission is hereby granted, free of charge, to any person obtaining a copy
of this
-software and associated documentation files (the "Software"), to deal in the
Software
-without restriction, including without limitation the rights to use, copy,
modify, merge,
-publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons
-to whom the Software is furnished to do so, subject to the following
conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all
copies or
-substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE
-FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER
-DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/PKG-INFO
new/sphinx_autodoc_typehints-1.19.2/PKG-INFO
--- old/sphinx_autodoc_typehints-1.18.3/PKG-INFO 2022-06-10
10:42:06.141754400 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/PKG-INFO 2022-08-08
09:10:14.387282800 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: sphinx_autodoc_typehints
-Version: 1.18.3
+Version: 1.19.2
Summary: Type hints (PEP 484) support for the Sphinx autodoc extension
Home-page: https://github.com/tox-dev/sphinx-autodoc-typehints
Download-URL:
https://github.com/tox-dev/sphinx-autodoc-typehints/archive/main.zip
@@ -17,10 +17,6 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
-Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Documentation :: Sphinx
Requires-Python: >=3.7
Description-Content-Type: text/markdown
@@ -94,7 +90,7 @@
directive, if present, otherwise fall back to using `:rtype:`. Use in
conjunction with
[napoleon_use_rtype](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_use_rtype)
to avoid generation of duplicate or redundant return type information.
-- `typehints_defaults` (default: `None`): If `None`, defaults are not added.
Otherwise adds a default annotation:
+- `typehints_defaults` (default: `None`): If `None`, defaults are not added.
Otherwise, adds a default annotation:
- `'comma'` adds it after the type, changing Sphinx??? default look to
???**param** (_int_, default: `1`) -- text???.
- `'braces'` adds `(default: ...)` after the type (useful for numpydoc like
styles).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/README.md
new/sphinx_autodoc_typehints-1.19.2/README.md
--- old/sphinx_autodoc_typehints-1.18.3/README.md 2022-06-10
10:41:55.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/README.md 2022-08-08
09:10:07.000000000 +0200
@@ -64,7 +64,7 @@
directive, if present, otherwise fall back to using `:rtype:`. Use in
conjunction with
[napoleon_use_rtype](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_use_rtype)
to avoid generation of duplicate or redundant return type information.
-- `typehints_defaults` (default: `None`): If `None`, defaults are not added.
Otherwise adds a default annotation:
+- `typehints_defaults` (default: `None`): If `None`, defaults are not added.
Otherwise, adds a default annotation:
- `'comma'` adds it after the type, changing Sphinx??? default look to
???**param** (_int_, default: `1`) -- text???.
- `'braces'` adds `(default: ...)` after the type (useful for numpydoc like
styles).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/pyproject.toml
new/sphinx_autodoc_typehints-1.19.2/pyproject.toml
--- old/sphinx_autodoc_typehints-1.18.3/pyproject.toml 2022-06-10
10:41:55.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/pyproject.toml 2022-08-08
09:10:07.000000000 +0200
@@ -1,5 +1,5 @@
[build-system]
-requires = ["setuptools>=50", "setuptools_scm>=6"]
+requires = ["setuptools>=63.4", "setuptools_scm>=7.0.5"]
build-backend = 'setuptools.build_meta'
[tool.black]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/setup.cfg
new/sphinx_autodoc_typehints-1.19.2/setup.cfg
--- old/sphinx_autodoc_typehints-1.18.3/setup.cfg 2022-06-10
10:42:06.141754400 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/setup.cfg 2022-08-08
09:10:14.387282800 +0200
@@ -16,10 +16,6 @@
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
- Programming Language :: Python :: 3.7
- Programming Language :: Python :: 3.8
- Programming Language :: Python :: 3.9
- Programming Language :: Python :: 3.10
Topic :: Documentation :: Sphinx
download_url =
https://github.com/tox-dev/sphinx-autodoc-typehints/archive/main.zip
project_urls =
@@ -30,7 +26,7 @@
[options]
packages = find:
install_requires =
- Sphinx>=4.5
+ Sphinx>=5.1.1
python_requires = >=3.7
package_dir =
=src
@@ -41,15 +37,15 @@
[options.extras_require]
testing =
covdefaults>=2.2
- coverage>=6.3
- diff-cover>=6.4
- nptyping>=2.1.2
- pytest>=7.1
+ coverage>=6.4.2
+ diff-cover>=6.5.1
+ nptyping>=2.2
+ pytest>=7.1.2
pytest-cov>=3
- sphobjinv>=2
- typing-extensions>=4.1
+ sphobjinv>=2.2.2
+ typing-extensions>=4.3
type_comments =
- typed-ast>=1.5.2;python_version < "3.8"
+ typed-ast>=1.5.4;python_version < "3.8"
[options.package_data]
sphinx_autodoc_typehints = py.typed
@@ -72,7 +68,7 @@
*\sphinx-autodoc-typehints
[coverage:report]
-fail_under = 82
+fail_under = 81
[coverage:html]
show_contexts = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints/__init__.py
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints/__init__.py
---
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints/__init__.py
2022-06-10 10:41:55.000000000 +0200
+++
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints/__init__.py
2022-08-08 09:10:07.000000000 +0200
@@ -5,7 +5,6 @@
import sys
import textwrap
from ast import FunctionDef, Module, stmt
-from typing import _eval_type # type: ignore # no import defined in stubs
from typing import Any, AnyStr, Callable, ForwardRef, NewType, TypeVar,
get_type_hints
from sphinx.application import Sphinx
@@ -90,7 +89,10 @@
return annotation.__values__ # type: ignore # deduced Any
elif class_name == "Generic":
return annotation.__parameters__ # type: ignore # deduced Any
- return getattr(annotation, "__args__", ())
+ result = getattr(annotation, "__args__", ())
+ # 3.10 and earlier Tuple[()] returns ((), ) instead of () the tuple does
+ result = () if len(result) == 1 and result[0] == () else result # type:
ignore
+ return result
def format_internal_tuple(t: tuple[Any, ...], config: Config) -> str:
@@ -117,8 +119,7 @@
# Special cases
if isinstance(annotation, ForwardRef):
- value = _resolve_forward_ref(annotation, config)
- return format_annotation(value, config)
+ return annotation.__forward_arg__
if annotation is None or annotation is type(None): # noqa: E721
return ":py:obj:`None`"
if annotation is Ellipsis:
@@ -141,7 +142,10 @@
full_name = f"{module}.{class_name}" if module != "builtins" else
class_name
fully_qualified: bool = getattr(config, "typehints_fully_qualified", False)
prefix = "" if fully_qualified or full_name == class_name else "~"
- role = "data" if class_name in _PYDATA_ANNOTATIONS else "class"
+ if module == "typing" and class_name in _PYDATA_ANNOTATIONS:
+ role = "data"
+ else:
+ role = "class"
args_format = "\\[{}]"
formatted_args: str | None = ""
@@ -161,7 +165,7 @@
formatted_args = None if args else args_format
elif full_name == "typing.Optional":
args = tuple(x for x in args if x is not type(None)) # noqa: E721
- elif full_name == "typing.Union" and type(None) in args:
+ elif full_name in ("typing.Union", "types.UnionType") and type(None) in
args:
if len(args) == 2:
full_name = "typing.Optional"
args = tuple(x for x in args if x is not type(None)) # noqa: E721
@@ -192,17 +196,6 @@
return result
-def _resolve_forward_ref(annotation: ForwardRef, config: Config) -> Any:
- raw, base_globals = annotation.__forward_arg__, config._annotation_globals
- params = {"is_class": True} if (3, 10) > sys.version_info >= (3, 9, 8) or
sys.version_info >= (3, 10, 1) else {}
- value = ForwardRef(raw, is_argument=False, **params)
- try:
- result = _eval_type(value, base_globals, None)
- except NameError:
- result = raw # fallback to the value itself as string
- return result
-
-
# reference: https://github.com/pytorch/pytorch/pull/46548/files
def normalize_source_lines(source_lines: str) -> str:
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints/version.py
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints/version.py
--- old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints/version.py
2022-06-10 10:42:05.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints/version.py
2022-08-08 09:10:14.000000000 +0200
@@ -1,5 +1,5 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '1.18.3'
-version_tuple = (1, 18, 3)
+__version__ = version = '1.19.2'
+__version_tuple__ = version_tuple = (1, 19, 2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints.egg-info/PKG-INFO
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints.egg-info/PKG-INFO
---
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints.egg-info/PKG-INFO
2022-06-10 10:42:05.000000000 +0200
+++
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints.egg-info/PKG-INFO
2022-08-08 09:10:14.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: sphinx-autodoc-typehints
-Version: 1.18.3
+Version: 1.19.2
Summary: Type hints (PEP 484) support for the Sphinx autodoc extension
Home-page: https://github.com/tox-dev/sphinx-autodoc-typehints
Download-URL:
https://github.com/tox-dev/sphinx-autodoc-typehints/archive/main.zip
@@ -17,10 +17,6 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
-Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Documentation :: Sphinx
Requires-Python: >=3.7
Description-Content-Type: text/markdown
@@ -94,7 +90,7 @@
directive, if present, otherwise fall back to using `:rtype:`. Use in
conjunction with
[napoleon_use_rtype](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_use_rtype)
to avoid generation of duplicate or redundant return type information.
-- `typehints_defaults` (default: `None`): If `None`, defaults are not added.
Otherwise adds a default annotation:
+- `typehints_defaults` (default: `None`): If `None`, defaults are not added.
Otherwise, adds a default annotation:
- `'comma'` adds it after the type, changing Sphinx??? default look to
???**param** (_int_, default: `1`) -- text???.
- `'braces'` adds `(default: ...)` after the type (useful for numpydoc like
styles).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints.egg-info/SOURCES.txt
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints.egg-info/SOURCES.txt
---
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints.egg-info/SOURCES.txt
2022-06-10 10:42:06.000000000 +0200
+++
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints.egg-info/SOURCES.txt
2022-08-08 09:10:14.000000000 +0200
@@ -8,6 +8,9 @@
setup.py
tox.ini
whitelist.txt
+.github/FUNDING.yml
+.github/SECURITY.md
+.github/dependabot.yml
.github/workflows/check.yml
src/sphinx_autodoc_typehints/__init__.py
src/sphinx_autodoc_typehints/py.typed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints.egg-info/requires.txt
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints.egg-info/requires.txt
---
old/sphinx_autodoc_typehints-1.18.3/src/sphinx_autodoc_typehints.egg-info/requires.txt
2022-06-10 10:42:05.000000000 +0200
+++
new/sphinx_autodoc_typehints-1.19.2/src/sphinx_autodoc_typehints.egg-info/requires.txt
2022-08-08 09:10:14.000000000 +0200
@@ -1,16 +1,16 @@
-Sphinx>=4.5
+Sphinx>=5.1.1
[testing]
covdefaults>=2.2
-coverage>=6.3
-diff-cover>=6.4
-nptyping>=2.1.2
-pytest>=7.1
+coverage>=6.4.2
+diff-cover>=6.5.1
+nptyping>=2.2
+pytest>=7.1.2
pytest-cov>=3
-sphobjinv>=2
-typing-extensions>=4.1
+sphobjinv>=2.2.2
+typing-extensions>=4.3
[type_comments]
[type_comments:python_version < "3.8"]
-typed-ast>=1.5.2
+typed-ast>=1.5.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/tests/roots/test-dummy/dummy_module.py
new/sphinx_autodoc_typehints-1.19.2/tests/roots/test-dummy/dummy_module.py
--- old/sphinx_autodoc_typehints-1.18.3/tests/roots/test-dummy/dummy_module.py
2022-06-10 10:41:55.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/tests/roots/test-dummy/dummy_module.py
2022-08-08 09:10:07.000000000 +0200
@@ -1,7 +1,7 @@
import typing
from dataclasses import dataclass
from mailbox import Mailbox
-from typing import Callable, Union
+from typing import Callable, Optional, Union
def get_local_function():
@@ -191,7 +191,7 @@
def function_with_typehint_comment_not_inline(x=None, *y, z, **kwargs): #
noqa: U100
- # type: (Union[str, bytes], *str, bytes, **int) -> None
+ # type: (Union[str, bytes, None], *str, bytes, **int) -> None
"""
Function docstring.
@@ -210,7 +210,7 @@
"""
def __init__(self, x=None): # noqa: U100
- # type: (Callable[[int, bytes], int]) -> None
+ # type: (Optional[Callable[[int, bytes], int]]) -> None
pass
def foo(self, x=1):
@@ -224,7 +224,7 @@
@classmethod
def mk(cls, x=None):
- # type: (Callable[[int, bytes], int]) -> ClassWithTypehintsNotInline
+ # type: (Optional[Callable[[int, bytes], int]]) ->
ClassWithTypehintsNotInline
"""
Method docstring.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinx_autodoc_typehints-1.18.3/tests/test_sphinx_autodoc_typehints.py
new/sphinx_autodoc_typehints-1.19.2/tests/test_sphinx_autodoc_typehints.py
--- old/sphinx_autodoc_typehints-1.18.3/tests/test_sphinx_autodoc_typehints.py
2022-06-10 10:41:55.000000000 +0200
+++ new/sphinx_autodoc_typehints-1.19.2/tests/test_sphinx_autodoc_typehints.py
2022-08-08 09:10:07.000000000 +0200
@@ -1,5 +1,6 @@
from __future__ import annotations
+import collections.abc
import pathlib
import re
import sys
@@ -15,6 +16,7 @@
Callable,
Dict,
Generic,
+ List,
Mapping,
Match,
NewType,
@@ -55,6 +57,12 @@
S = TypeVar("S", bound="miss") # type: ignore # miss not defined on purpose #
noqa: F821
W = NewType("W", str)
+# Mypy does not support recursive type aliases, but
+# other type checkers do.
+RecList = Union[int, List["RecList"]] # type: ignore
+MutualRecA = Union[bool, List["MutualRecB"]] # type: ignore
+MutualRecB = Union[str, List["MutualRecA"]] # type: ignore
+
class A:
def get_type(self) -> type:
@@ -146,6 +154,7 @@
(int, ":py:class:`int`"),
(type(None), ":py:obj:`None`"),
(type, ":py:class:`type`"),
+ (collections.abc.Callable, ":py:class:`~collections.abc.Callable`"),
(Type, ":py:class:`~typing.Type`"),
(Type[A], ":py:class:`~typing.Type`\\[:py:class:`~%s.A`]" % __name__),
(Any, ":py:data:`~typing.Any`"),
@@ -228,11 +237,11 @@
(V, ":py:class:`~typing.TypeVar`\\(``V``, contravariant=True)"),
(X, ":py:class:`~typing.TypeVar`\\(``X``, :py:class:`str`,
:py:class:`int`)"),
(Y, ":py:class:`~typing.TypeVar`\\(``Y``, bound= :py:class:`str`)"),
- (Z, ":py:class:`~typing.TypeVar`\\(``Z``, bound=
:py:class:`~test_sphinx_autodoc_typehints.A`)"),
+ (Z, ":py:class:`~typing.TypeVar`\\(``Z``, bound= A)"),
(S, ":py:class:`~typing.TypeVar`\\(``S``, bound= miss)"),
# ## These test for correct internal tuple rendering, even if not all
are valid Tuple types
# Zero-length tuple remains
- (Tuple[()], ":py:data:`~typing.Tuple`\\[()]"),
+ (Tuple[()], ":py:data:`~typing.Tuple`"),
# Internal single tuple with simple types is flattened in the output
(Tuple[(int,)], ":py:data:`~typing.Tuple`\\[:py:class:`int`]"),
(Tuple[(int, int)], ":py:data:`~typing.Tuple`\\[:py:class:`int`,
:py:class:`int`]"),
@@ -279,6 +288,14 @@
"...], :py:class:`~numpy.float64`]"
),
),
+ (
+ RecList,
+ (":py:data:`~typing.Union`\\[:py:class:`int`,
:py:class:`~typing.List`\\[RecList]]"),
+ ),
+ (
+ MutualRecA,
+ (":py:data:`~typing.Union`\\[:py:class:`bool`,
:py:class:`~typing.List`\\[MutualRecB]]"),
+ ),
],
)
def test_format_annotation(inv: Inventory, annotation: Any, expected_result:
str) -> None:
@@ -374,7 +391,7 @@
def maybe_fix_py310(expected_contents: str) -> str:
if PY310_PLUS:
for old, new in [
- ("*bool** | **None*", '"bool" | "None"'),
+ ("*bool** | **None*", '"Optional"["bool"]'),
("*int** | **str** | **float*", '"int" | "str" | "float"'),
("*str** | **None*", '"Optional"["str"]'),
("(*bool*)", '("bool")'),
@@ -719,7 +736,8 @@
Return type:
str
"""
- assert text_contents == maybe_fix_py310(dedent(expected_contents))
+ expected_contents = maybe_fix_py310(dedent(expected_contents))
+ assert text_contents == expected_contents
@pytest.mark.parametrize(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinx_autodoc_typehints-1.18.3/tox.ini
new/sphinx_autodoc_typehints-1.19.2/tox.ini
--- old/sphinx_autodoc_typehints-1.18.3/tox.ini 2022-06-10 10:41:55.000000000
+0200
+++ new/sphinx_autodoc_typehints-1.19.2/tox.ini 2022-08-08 09:10:07.000000000
+0200
@@ -1,6 +1,7 @@
[tox]
envlist =
fix
+ py311
py310
py39
py38
@@ -36,7 +37,7 @@
description = format the code base to adhere to our styles, and complain about
what we cannot do automatically
skip_install = true
deps =
- pre-commit>=2
+ pre-commit>=2.20
commands =
pre-commit run --all-files --show-diff-on-failure
@@ -45,8 +46,8 @@
setenv =
{tty:MYPY_FORCE_COLOR = 1}
deps =
- mypy==0.961
- types-docutils
+ mypy==0.971
+ types-docutils>=0.19
commands =
mypy --python-version 3.10 src
mypy --python-version 3.10 tests
@@ -60,8 +61,8 @@
skip_install = true
deps =
covdefaults>=2.2
- coverage>=6.3
- diff-cover>=6.4
+ coverage>=6.4.2
+ diff-cover>=6.5.1
extras =
parallel_show_output = true
commands =
@@ -71,6 +72,7 @@
coverage html -d {toxworkdir}/htmlcov
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main}
{toxworkdir}/coverage.xml
depends =
+ py311
py310
py39
py38
@@ -80,8 +82,8 @@
description = check that the long description is valid (need for PyPI)
skip_install = true
deps =
- build>=0.7
- twine>=4
+ build[virtualenv]>=0.8
+ twine>=4.0.1
extras =
commands =
pyproject-build -o {envtmpdir} --wheel --sdist .