From 11e90165337b0e91c5326c9afe83f8f6c8c1342c6febb1747c5fff1107a2b925 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 14 Jan 2024 10:22:38 +0000 Subject: [PATCH] - update to 1.25.2: * Allow Sphinx explicitly to write in parallel. * Fixed crash when documenting ParamSpecArgs * Fixed a bug where if a class has an attribute and a constructor argument with the same name, the constructor argument type would be rendered incorrectly (issue 308) * Fixed napoleon handling of numpy docstrings with no specified return type. * Fix a `Field list ends without a blank line` warning (issue 305). * More robust determination of rtype location / fix issue 302 * Improvements to the location of the return type * Use format_annotation to render class attribute type annotations * Fix overloads support * Fix spacing between `:rtype:` and directives * Handle types from types module * If module is \_io, use io instead * Put rtype before examples or usage section * Remove redundant return type for attributes * Handle collections.abc.Callable as well as typing.Callable * Put Literal args in code blocks * Fix Optional role to be data. * Fixed default options not displaying for parameters without type hints. * Use hatchling instead of setuptools * Add support for typing.ParamSpec * Allow star prefixes for parameter names in docstring - Update to version 1.19.2 python-sphinx-autodoc-typehints-system-object.inv.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinx-autodoc-typehints?expand=0&rev=43 --- ...-autodoc-typehints-system-object.inv.patch | 11 +++--- python-sphinx-autodoc-typehints.changes | 36 +++++++++++++++++-- python-sphinx-autodoc-typehints.spec | 7 ++-- sphinx_autodoc_typehints-1.19.2.tar.gz | 3 -- sphinx_autodoc_typehints-1.25.2.tar.gz | 3 ++ 5 files changed, 45 insertions(+), 15 deletions(-) delete mode 100644 sphinx_autodoc_typehints-1.19.2.tar.gz create mode 100644 sphinx_autodoc_typehints-1.25.2.tar.gz diff --git a/python-sphinx-autodoc-typehints-system-object.inv.patch b/python-sphinx-autodoc-typehints-system-object.inv.patch index 9bf2de0..d762cc8 100644 --- a/python-sphinx-autodoc-typehints-system-object.inv.patch +++ b/python-sphinx-autodoc-typehints-system-object.inv.patch @@ -2,9 +2,11 @@ tests/conftest.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -18,17 +18,8 @@ collect_ignore = ["roots"] +Index: sphinx_autodoc_typehints-1.25.2/tests/conftest.py +=================================================================== +--- sphinx_autodoc_typehints-1.25.2.orig/tests/conftest.py ++++ sphinx_autodoc_typehints-1.25.2/tests/conftest.py +@@ -19,16 +19,8 @@ collect_ignore = ["roots"] @pytest.fixture(scope="session") def inv(pytestconfig: Config) -> Inventory: @@ -14,8 +16,7 @@ - if inv_dict is not None: - return Inventory(inv_dict) - -- print("Downloading objects.inv") -- url = "https://docs.python.org/{v.major}.{v.minor}/objects.inv".format(v=sys.version_info) +- url = f"https://docs.python.org/{sys.version_info.major}.{sys.version_info.minor}/objects.inv" - inv = Inventory(url=url) - pytestconfig.cache.set(cache_path, inv.json_dict()) - return inv diff --git a/python-sphinx-autodoc-typehints.changes b/python-sphinx-autodoc-typehints.changes index 032c6f6..3762c00 100644 --- a/python-sphinx-autodoc-typehints.changes +++ b/python-sphinx-autodoc-typehints.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Sun Jan 14 10:21:24 UTC 2024 - Dirk Müller + +- update to 1.25.2: + * Allow Sphinx explicitly to write in parallel. + * Fixed crash when documenting ParamSpecArgs + * Fixed a bug where if a class has an attribute and a constructor + argument with the same name, the constructor argument + type would be rendered incorrectly (issue 308) + * Fixed napoleon handling of numpy docstrings with no specified + return type. + * Fix a `Field list ends without a blank line` warning (issue 305). + * More robust determination of rtype location / fix issue 302 + * Improvements to the location of the return type + * Use format_annotation to render class attribute type annotations + * Fix overloads support + * Fix spacing between `:rtype:` and directives + * Handle types from types module + * If module is \_io, use io instead + * Put rtype before examples or usage section + * Remove redundant return type for attributes + * Handle collections.abc.Callable as well as typing.Callable + * Put Literal args in code blocks + * Fix Optional role to be data. + * Fixed default options not displaying for parameters without + type hints. + * Use hatchling instead of setuptools + * Add support for typing.ParamSpec + * Allow star prefixes for parameter names in docstring + ------------------------------------------------------------------- Fri Jul 21 12:06:28 UTC 2023 - Johannes Kastl @@ -6,10 +36,10 @@ Fri Jul 21 12:06:28 UTC 2023 - Johannes Kastl ------------------------------------------------------------------- Fri Oct 7 16:20:26 UTC 2022 - Yogalakshmi Arunachalam -- Update to version 1.19.2 +- 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 - + ------------------------------------------------------------------- Thu Jul 14 16:34:24 UTC 2022 - Ben Greiner @@ -100,7 +130,7 @@ Tue Aug 3 09:42:00 UTC 2021 - Matej Cepl Sat Apr 24 14:11:17 UTC 2021 - Matej Cepl - Remove no-net-tests.patch as adding the fixed - python-sphinx-autodoc-typehints-system-object.inv.patch + python-sphinx-autodoc-typehints-system-object.inv.patch makes tests requiring network working (gh#agronholm/sphinx-autodoc-typehints#174). diff --git a/python-sphinx-autodoc-typehints.spec b/python-sphinx-autodoc-typehints.spec index b4b110f..c84ef7f 100644 --- a/python-sphinx-autodoc-typehints.spec +++ b/python-sphinx-autodoc-typehints.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,7 +28,7 @@ %{?sle15_python_module_pythons} Name: python-sphinx-autodoc-typehints%{psuffix} -Version: 1.19.2 +Version: 1.25.2 Release: 0 Summary: Type hints (PEP 484) support for the Sphinx autodoc extension License: MIT @@ -38,9 +38,8 @@ Source: https://files.pythonhosted.org/packages/source/s/sphinx_autodoc_ # PATCH-FIX-OPENSUSE python-sphinx-autodoc-typehints-system-object.inv.patch gh#agronholm/sphinx-autodoc-typehints#174 mcepl@suse.com # Don't download inventory from the Internet, but use the local one. Patch0: python-sphinx-autodoc-typehints-system-object.inv.patch +BuildRequires: %{python_module hatch_vcs} BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools >= 36.2.7} -BuildRequires: %{python_module setuptools_scm >= 1.7.0} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros diff --git a/sphinx_autodoc_typehints-1.19.2.tar.gz b/sphinx_autodoc_typehints-1.19.2.tar.gz deleted file mode 100644 index f875ade..0000000 --- a/sphinx_autodoc_typehints-1.19.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:872fb2d7b3d794826c28e36edf6739e93549491447dcabeb07c58855e9f914de -size 31801 diff --git a/sphinx_autodoc_typehints-1.25.2.tar.gz b/sphinx_autodoc_typehints-1.25.2.tar.gz new file mode 100644 index 0000000..531c494 --- /dev/null +++ b/sphinx_autodoc_typehints-1.25.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cabc2537e17989b2f92e64a399425c4c8bf561ed73f087bc7414a5003616a50 +size 37173