Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pylint for openSUSE:Factory checked in at 2022-09-04 22:11:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pylint (Old) and /work/SRC/openSUSE:Factory/.python-pylint.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pylint" Sun Sep 4 22:11:46 2022 rev:28 rq:1001087 version:2.15.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pylint/python-pylint.changes 2021-12-25 20:16:26.761239857 +0100 +++ /work/SRC/openSUSE:Factory/.python-pylint.new.2083/python-pylint.changes 2022-09-04 22:11:55.056308541 +0200 @@ -1,0 +2,63 @@ +Sat Aug 27 10:01:43 UTC 2022 - Ben Greiner <[email protected]> + +- Update to version 2.15.0 + * In pylint 2.15.0, we added a new check missing-timeout to warn + of default timeout values that could cause a program to be + hanging indefinitely. + * We improved pylint's handling of namespace packages. More + packages should be linted without resorting to using the + --recursive=y option. +- Release highlights from 2.14 + * With 2.14 pylint only supports Python version 3.7.2 and above. + * We introduced several new checks among which duplicate-value + for sets, comparison-of-constants, and checks related to + lambdas. We removed no-init and made no-self-use optional as + they were too opinionated. We also added an option to generate + a toml configuration: --generate-toml-config. + * We migrated to argparse from optparse and refactored the + configuration handling thanks to Dani??l van Noord. On the user + side it should change the output of the --help command, and + some inconsistencies and bugs should disappear. The behavior + between options set in a config file versus on the command line + will be more consistent. For us, it will permit to maintain + this part of the code easily in the future and anticipate + optparse's removal in Python 3.12. + * As a result of the refactor there are a lot of internal + deprecations. If you're a library maintainer that depends on + pylint, please verify that you're ready for pylint 3.0 by + activating deprecation warnings. + * We continued the integration of pylint-error and are now at + 33%!. We still welcome any community effort to help review, + integrate, and add good/bad examples + <https://github.com/PyCQA/pylint/issues/5953>`_. This should be + doable without any pylint or astroid knowledge, so this is the + perfect entrypoint if you want to contribute to pylint or open + source without any experience with our code! +- Release highlights from 2.13 + * In 2.13, we introduced a new check to deal with unicode + security issues. On top of that a lot of work was done inside + the unicode checker by @CarliJoy. We also introduced a new + check when importing private name and for unnecessary ellipsis + among other. + * We fixed long standing issues related to duplicate code that + could not be disabled, line numbers that were not accurate some + of the time, and added the ability to lint all files in a + directory without specifying each one. One of the most + anticipated issue from the repository. Thank you @matusvalo ! + * A lot of undefined-variables and used-before-assignment issues + were resolved thanks to @jacobtylerwalls. + * We started integrating pylint-error the documentation created + by @vald-phoenix a developer from Hlyniane, Ukraine. We hope + he's doing well despite the current situation. The deployment + is set up but there's still a lot to do so we welcome any + community effort help to review, integrate, and add good/bad + examples. This should be doable without any pylint or astroid + knowledge, so this is the perfect entrypoint if you want to + contribute to pylint without investing any time learning the + internals. + * This release is the last one to support interpreter below + 3.7.2, 3.6 end of life was reached in december 2021. +- Add pylint-pr7367-pythonpathtest.patch + * gh#PyCQA/pylint#7367 + +------------------------------------------------------------------- Old: ---- pylint-2.12.2-gh.tar.gz New: ---- pylint-2.15.0-gh.tar.gz pylint-pr7367-pythonpathtest.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pylint.spec ++++++ --- /var/tmp/diff_new_pack.Put3fw/_old 2022-09-04 22:11:56.308312063 +0200 +++ /var/tmp/diff_new_pack.Put3fw/_new 2022-09-04 22:11:56.320312097 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pylint # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,11 +16,9 @@ # -%{?!python_module:%define python_module() python3-%{**}} %bcond_without tests -%define skip_python2 1 Name: python-pylint -Version: 2.12.2 +Version: 2.15.0 Release: 0 Summary: Syntax and style checker for Python code License: GPL-2.0-or-later @@ -28,28 +26,46 @@ URL: https://github.com/pycqa/pylint # Tests are no longer packaged in the PyPI sdist, use GitHub archive Source: https://github.com/PyCQA/pylint/archive/refs/tags/v%{version}.tar.gz#/pylint-%{version}-gh.tar.gz +# PATCH-FIX-UPSTREAM gh#PyCQA/pylint#7367 +Patch0: pylint-pr7367-pythonpathtest.patch +BuildRequires: %{python_module base >= 3.7.2} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-astroid >= 2.9 -Requires: python-isort >= 4.2.5 -Requires: python-mccabe >= 0.6 +Requires: python-dill >= 0.2 Requires: python-platformdirs >= 2.2 -Requires: python-toml >= 0.9.2 +Requires: python-tomlkit >= 0.10.1 +Requires: (python-astroid >= 2.12.4 with python-astroid < 2.14.0~dev0) +Requires: (python-isort >= 4.2.5 with python-isort < 6) +Requires: (python-mccabe >= 0.6 with python-mccabe < 0.8) +%if 0%{?python_version_nodots} < 311 +Requires: python-tomli >= 1.1.0 +%endif %if 0%{?python_version_nodots} < 310 Requires: python-typing-extensions >= 3.10 %endif %if %{with tests} -BuildRequires: %{python_module GitPython > 3} -BuildRequires: %{python_module astroid >= 2.9} -BuildRequires: %{python_module isort >= 4.2.5} -BuildRequires: %{python_module mccabe >= 0.6} +# SECTION pylint deps +BuildRequires: %{python_module astroid >= 2.12.4 with %python-astroid < 2.14.0~dev0} +BuildRequires: %{python_module dill >= 0.2} +BuildRequires: %{python_module isort >= 4.2.5 with %python-isort < 6} +BuildRequires: %{python_module mccabe >= 0.6 with %python-mccabe < 0.8} BuildRequires: %{python_module platformdirs >= 2.2} +BuildRequires: %{python_module tomli >= 1.1.0 if %python-base < 3.11} +BuildRequires: %{python_module tomlkit >= 0.10.1} +# typing-extensions for python310 required for tests only, same as gh#PyCQA/astroid#1585 +BuildRequires: %{python_module typing-extensions >= 3.10} +# /SECTION +# SECTION test deps +BuildRequires: %{python_module GitPython > 3} BuildRequires: %{python_module pytest-benchmark} +BuildRequires: %{python_module pytest-timeout} BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module toml >= 0.9.2} -BuildRequires: %{python_module typing-extensions >= 3.10 if %python-base < 3.10} +BuildRequires: %{python_module requests} +# /SECTION %endif Requires(post): update-alternatives Requires(postun):update-alternatives @@ -75,17 +91,15 @@ %prep %autosetup -p1 -n pylint-%{version} sed -i '1{/^#!/ d}' pylint/__main__.py -# unpin upper bounds for astroid and mccabe -sed -i -e 's/\(mccabe>=.*\),<.*/\1/' -e 's/\(astroid>=.*\),<.*/\1/' setup.cfg %build export LC_ALL="en_US.UTF-8" -%python_build +%pyproject_wheel %install export LC_ALL="en_US.UTF-8" -%python_install -for p in pylint epylint pyreverse symilar ; do +%pyproject_install +for p in pylint epylint pyreverse symilar pylint-config ; do %python_clone -a %{buildroot}%{_bindir}/$p done %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -93,32 +107,25 @@ %if %{with tests} %check export LC_ALL="en_US.UTF-8" -# The test suite tampers with the PYTHONPATH, e.g. upstreams fix for -# https://github.com/PyCQA/pylint/issues/3636 -# so make sure that the macro set PYTHONPATH does not result in conflicting imports -mv pylint pylint.tmp -%pytest --benchmark-disable --ignore tests/test_epylint.py -# result of the mentioned tampering: other tests must not have pwd in PYTHONPATH, but test_epylint needs it -export PYTHONPATH=$PWD -%pytest --benchmark-disable tests/test_epylint.py -mv pylint.tmp pylint +%pytest --benchmark-disable %endif %post -%python_install_alternative pylint epylint pyreverse symilar +%python_install_alternative pylint epylint pyreverse symilar pylint-config %postun %python_uninstall_alternative pylint %files %{python_files} %license LICENSE -%doc ChangeLog README.rst +%doc README.rst %doc examples/ %python_alternative %{_bindir}/pylint +%python_alternative %{_bindir}/pylint-config %python_alternative %{_bindir}/epylint %python_alternative %{_bindir}/pyreverse %python_alternative %{_bindir}/symilar %{python_sitelib}/pylint/ -%{python_sitelib}/pylint-%{version}-py*.egg-info +%{python_sitelib}/pylint-%{version}*-info %changelog ++++++ pylint-2.12.2-gh.tar.gz -> pylint-2.15.0-gh.tar.gz ++++++ ++++ 143719 lines of diff (skipped) ++++++ pylint-pr7367-pythonpathtest.patch ++++++ diff --git a/tests/testutils/test_testutils_utils.py b/tests/testutils/test_testutils_utils.py index 79f4e2a81..943a3479e 100644 --- a/tests/testutils/test_testutils_utils.py +++ b/tests/testutils/test_testutils_utils.py @@ -6,6 +6,8 @@ import os import sys from pathlib import Path +import pytest + from pylint.testutils.utils import _test_cwd, _test_environ_pythonpath, _test_sys_path @@ -50,22 +52,27 @@ def test__test_cwd(tmp_path: Path) -> None: assert os.getcwd() == cwd -def test__test_environ_pythonpath_no_arg() -> None: - python_path = os.environ.get("PYTHONPATH") - with _test_environ_pythonpath(): - assert os.environ.get("PYTHONPATH") == python_path - new_pythonpath = "./whatever/:" - os.environ["PYTHONPATH"] = new_pythonpath - assert os.environ.get("PYTHONPATH") == new_pythonpath - assert os.environ.get("PYTHONPATH") == python_path - [email protected]("old_pythonpath", ["./oldpath/:", None]) +def test__test_environ_pythonpath_no_arg(old_pythonpath: str) -> None: + real_pythonpath = os.environ.get("PYTHONPATH") + with _test_environ_pythonpath(old_pythonpath): + with _test_environ_pythonpath(): + assert os.environ.get("PYTHONPATH") is None + new_pythonpath = "./whatever/:" + os.environ["PYTHONPATH"] = new_pythonpath + assert os.environ.get("PYTHONPATH") == new_pythonpath + assert os.environ.get("PYTHONPATH") == old_pythonpath + assert os.environ.get("PYTHONPATH") == real_pythonpath -def test__test_environ_pythonpath() -> None: - python_path = os.environ.get("PYTHONPATH") - new_pythonpath = "./whatever/:" - with _test_environ_pythonpath(new_pythonpath): - assert os.environ.get("PYTHONPATH") == new_pythonpath - newer_pythonpath = "./something_else/:" - os.environ["PYTHONPATH"] = newer_pythonpath - assert os.environ.get("PYTHONPATH") == newer_pythonpath - assert os.environ.get("PYTHONPATH") == python_path +@ pytest.mark.parametrize("old_pythonpath", ["./oldpath/:", None]) +def test__test_environ_pythonpath(old_pythonpath: str) -> None: + real_pythonpath = os.environ.get("PYTHONPATH") + with _test_environ_pythonpath(old_pythonpath): + new_pythonpath = "./whatever/:" + with _test_environ_pythonpath(new_pythonpath): + assert os.environ.get("PYTHONPATH") == new_pythonpath + newer_pythonpath = "./something_else/:" + os.environ["PYTHONPATH"] = newer_pythonpath + assert os.environ.get("PYTHONPATH") == newer_pythonpath + assert os.environ.get("PYTHONPATH") == old_pythonpath + assert os.environ.get("PYTHONPATH") == real_pythonpath
