From b493369ffb6963fcc2c8ed5004749d1069f03be7e6c489cffd38bf6271b2a0e5 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 19 Jan 2023 16:01:53 +0000 Subject: [PATCH] Accepting request 1059533 from home:bnavigator:branches:devel:languages:python:numeric - Update to 6.3.0 * Add ignore-self-only-init option by @thejcannon in #560 - Release 6.2.3 * Fix decorator parsing for async functions by @cdce8p in #577 * fix: do not pass file names with pre-commit by @yajo in #610 - Release 6.2.2 * Fix false positive of google convention missing args descriptions by @stinovlas in #619 - Release 6.2.1 * Add https protocol on websites at the README.rst by @realFranco in #611 * Use tomllib/tomli for reading .toml configs by @mgorny in #608 - Release 6.2.0 * Exempt properties from D401 by @TomFryers in #546 * Add support for Python 3.10 by @hugovk in #554 * Add D419: Add and switch to "Docstring is empty" error code by @thejcannon in #559 * Allow for hanging indent when documenting args in Google style by @rmorshea in #564 * Fix match option to only consider basename when given a path argument by @oczkoisse in #550 - Drop integration-tests-invocation.patch OBS-URL: https://build.opensuse.org/request/show/1059533 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydocstyle?expand=0&rev=29 --- integration-tests-invocation.patch | 30 ------------------ pydocstyle-6.1.1.tar.gz | 3 -- pydocstyle-6.3.0.tar.gz | 3 ++ python-pydocstyle.changes | 26 ++++++++++++++++ python-pydocstyle.spec | 50 ++++++++++++++---------------- 5 files changed, 52 insertions(+), 60 deletions(-) delete mode 100644 integration-tests-invocation.patch delete mode 100644 pydocstyle-6.1.1.tar.gz create mode 100644 pydocstyle-6.3.0.tar.gz diff --git a/integration-tests-invocation.patch b/integration-tests-invocation.patch deleted file mode 100644 index a529d75..0000000 --- a/integration-tests-invocation.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 9379ef5b73a8a07a6e8c95185db33b849a9d015f Mon Sep 17 00:00:00 2001 -From: John Vandenberg -Date: Sun, 15 Sep 2019 14:13:44 +0700 -Subject: [PATCH] test_integration: Use sys.executable - -Literal `python` is often `python2` and may not be present at all. - -Closes https://github.com/PyCQA/pydocstyle/issues/177 ---- - src/tests/test_integration.py | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -Index: pydocstyle-6.1.1/src/tests/test_integration.py -=================================================================== ---- pydocstyle-6.1.1.orig/src/tests/test_integration.py -+++ pydocstyle-6.1.1/src/tests/test_integration.py -@@ -99,9 +99,10 @@ class SandboxEnv: - run_target = self.tempdir if target is None else \ - os.path.join(self.tempdir, target) - -- cmd = shlex.split("{} {} {}" -- .format(self.script_name, run_target, args), -- posix=False) -+ cmd = shlex.split( -+ ('"{}" -m {} {} {}' if sys.platform == "nt" else '{} -m {} {} {}') -+ .format(sys.executable, self.script_name, run_target, args), -+ posix=False) - p = subprocess.Popen(cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) diff --git a/pydocstyle-6.1.1.tar.gz b/pydocstyle-6.1.1.tar.gz deleted file mode 100644 index fa06aa4..0000000 --- a/pydocstyle-6.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ec238b731737da7c9ce3f7c135ee35b992b76a8bfa896007b90bf69a112927c -size 73982 diff --git a/pydocstyle-6.3.0.tar.gz b/pydocstyle-6.3.0.tar.gz new file mode 100644 index 0000000..f21e07f --- /dev/null +++ b/pydocstyle-6.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29ed0e8b1abe5f4590132f456b6f9cbf0866b89fabf836bc9474fde706e2e13e +size 78058 diff --git a/python-pydocstyle.changes b/python-pydocstyle.changes index bc614a2..b97b783 100644 --- a/python-pydocstyle.changes +++ b/python-pydocstyle.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Thu Jan 19 10:24:42 UTC 2023 - Ben Greiner + +- Update to 6.3.0 + * Add ignore-self-only-init option by @thejcannon in #560 +- Release 6.2.3 + * Fix decorator parsing for async functions by @cdce8p in #577 + * fix: do not pass file names with pre-commit by @yajo in #610 +- Release 6.2.2 + * Fix false positive of google convention missing args + descriptions by @stinovlas in #619 +- Release 6.2.1 + * Add https protocol on websites at the README.rst by @realFranco + in #611 + * Use tomllib/tomli for reading .toml configs by @mgorny in #608 +- Release 6.2.0 + * Exempt properties from D401 by @TomFryers in #546 + * Add support for Python 3.10 by @hugovk in #554 + * Add D419: Add and switch to "Docstring is empty" error code by + @thejcannon in #559 + * Allow for hanging indent when documenting args in Google style + by @rmorshea in #564 + * Fix match option to only consider basename when given a path + argument by @oczkoisse in #550 +- Drop integration-tests-invocation.patch + ------------------------------------------------------------------- Thu Jul 14 16:30:49 UTC 2022 - Ben Greiner diff --git a/python-pydocstyle.spec b/python-pydocstyle.spec index eba19b3..b39e17a 100644 --- a/python-pydocstyle.spec +++ b/python-pydocstyle.spec @@ -1,7 +1,7 @@ # # spec file for package python-pydocstyle # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,34 +16,32 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-pydocstyle -Version: 6.1.1 +Version: 6.3.0 Release: 0 Summary: Python docstring style checker License: MIT Group: Development/Languages/Python URL: https://github.com/PyCQA/pydocstyle/ +# Only the Repository Archive has the tests Source: https://github.com/PyCQA/pydocstyle/archive/%{version}.tar.gz#/pydocstyle-%{version}.tar.gz -# Tests invoke pip and pycodestyle directly, when they should use sys.executable. -# https://github.com/PyCQA/pydocstyle/pull/403 -Patch0: integration-tests-invocation.patch -# Tests invoke pip +BuildRequires: %{python_module base >= 3.6} +BuildRequires: %{python_module importlib-metadata >= 2 if %python-base < 3.8} BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry-core} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six > 1.10.0} -BuildRequires: %{python_module snowballstemmer} -BuildRequires: %{python_module toml} +BuildRequires: %{python_module snowballstemmer >= 2.2.0} +BuildRequires: %{python_module tomli >= 1.2.3 if %python-base < 3.11} BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-six > 1.10.0 -Requires: python-snowballstemmer +Requires: python-snowballstemmer >= 2.2.0 +Requires: (python-importlib-metadata >= 2 if python-base < 3.8) +Requires: (python-tomli >= 1.2.3 if python-base < 3.11) Requires(post): update-alternatives Requires(postun):update-alternatives -Provides: python-pep257 = %{version} +Provides: python-pep257 = %{version}-%{release} Obsoletes: python-pep257 < %{version} BuildArch: noarch %python_subpackages @@ -61,23 +59,21 @@ conventions. %prep %setup -q -n pydocstyle-%{version} -%patch0 -p1 -dos2unix README.rst - -# Disable pip fixture -sed -i /^pytestmark/d src/tests/test_integration.py +# Stupid poetry! +sed -i '/version/ s/0.0.0-dev/%{version}/' pyproject.toml +# remove shebang +sed -i -e '/^#! \//, 1d' src/pydocstyle/__main__.py +# Disable pip fixture: We have the package already installed with a proper cmd +# Can't get the builddeps from network +sed -i /^pytestmark.*install_package/d src/tests/test_integration.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/pydocstyle -%{python_expand # -sed -i -e '/^#! \//, 1d' %{buildroot}%{$python_sitelib}/pydocstyle/__main__.py -dos2unix %{buildroot}%{$python_sitelib}/pydocstyle/__main__.py -%fdupes %{buildroot}%{$python_sitelib} -} +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check export PYTHONPATH=$(pwd)/src @@ -94,6 +90,6 @@ export PYTHONPATH=$(pwd)/src %license LICENSE-MIT %python_alternative %{_bindir}/pydocstyle %{python_sitelib}/pydocstyle -%{python_sitelib}/pydocstyle-%{version}-py*.egg-info +%{python_sitelib}/pydocstyle-%{version}.dist-info %changelog