From 0142eced3dfde2641ff2a6baee547e6ed48401c5d00182f797c8488c6d9e27c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 7 Feb 2025 18:39:08 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-yamllint revision b7e95099fb70b2ec7866bd4adde7ffb8 --- .gitattributes | 23 +++ python-yamllint.changes | 328 ++++++++++++++++++++++++++++++++++++++++ python-yamllint.spec | 82 ++++++++++ yamllint-1.35.1.tar.gz | 3 + 4 files changed, 436 insertions(+) create mode 100644 .gitattributes create mode 100644 python-yamllint.changes create mode 100644 python-yamllint.spec create mode 100644 yamllint-1.35.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/python-yamllint.changes b/python-yamllint.changes new file mode 100644 index 0000000..ef08689 --- /dev/null +++ b/python-yamllint.changes @@ -0,0 +1,328 @@ +------------------------------------------------------------------- +Sat Mar 16 14:41:54 UTC 2024 - Dirk Müller + +- update to 1.35.1: + * Restore ignoration of files passed as command-line arguments + * Revert API change from version 1.35.0 + * Fix failure on broken symlinks that should be ignored + * API change: linter.run(stream, config) doesn't filter files + anymore + * Docs: Restore official Read the Docs theme + * Config: validate ignore-from-file inside rules + * Rule quoted-strings: fix only-when-needed in flow maps and + sequences + * Rule key-duplicates: add forbid-duplicated-merge-keys option + * Rule quoted-strings: add check-keys option + * Docs: add GitLab CI example + * Rule truthy: adapt forbidden values based on YAML version + +------------------------------------------------------------------- +Fri Dec 15 22:11:00 UTC 2023 - Dirk Müller + +- update to 1.33.0: + * Add support for Python 3.12, drop support for Python 3.7 + * Rule ``document-end``: fix spurious "missing document end" + * Rule ``empty-values``: add ``forbid-in-block-sequences`` + option + +------------------------------------------------------------------- +Thu Jun 1 05:40:16 UTC 2023 - Johannes Kastl + +- update to 1.32.0: + * Look for configuration file in parent directories + * Rule anchors: add new option forbid-unused-anchors + +------------------------------------------------------------------- +Wed May 17 13:27:45 UTC 2023 - Johannes Kastl + +- update to 1.31.0: + * Build: migrate from setup.py to pyproject.toml + * Docs: update some outdated URLs + * Rule colons: prevent error when space before is mandatory +- update to 1.30.0: + * Rule anchors: add new rule to detect undeclared or duplicated + anchors + * Python API: prevent using is_file_ignored() with null filepath + * Docs: fix misleading Python API example + * Docs: fix plain text code snippet example + * Docs: update pre-commit hook example +- update to 1.29.0: + * Add support for Python 3.11, drop support for Python 3.6 + * Rule float-values: fix bug on strings containing fordidden + values + * Stop releasing universal wheels + * Use proper Python 3 I/O type for file reading + * Rule indentation: fix indent-sequences in nested collections + * Docs: clarify disable-line and parser errors, give a workaround + * Refactors to apply some pyupgrade suggestions + * Allow using a list of strings in ignore configuration + * Add --list-files command line option + +------------------------------------------------------------------- +Mon May 8 13:54:44 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Wed Oct 12 18:25:20 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 1.28.0 + * Better compress PNG image in documentation + * Remove __future__ imports specific to Python 2 + * Remove inheritance from object specific to Python 2 + * Simplify GitHub Actions example in documentation + * Update ALE vim plugin link in documentation + * Update license to latest version of GPLv3 + * Pre-compile disable/enable rules regexes + * Rule quoted-strings: add allow-quoted-quotes option + * Add option ignore-from-file in config + +------------------------------------------------------------------- +Mon Jul 18 16:46:08 UTC 2022 - Ben Greiner + +- Update to 1.27.1 + * Fix failing test on key-duplicates for old PyYAML versions +- Release + * Add support for Python 3.10, drop Python 3.5 + * Refactor --format=auto logic + * Rule comments: allow whitespace after the shebang marker + * Attempt to clarify configuration file location in documentation + * Rule key-duplicates: don't crash on redundant closing brackets + or braces + * Remove UTF-8 headers in Python files, since Python 2 isn't + supported + * Rule octal-values: pre-compile regex for performance + * Rule new-lines: add the type: platform config option + * Add the new rule float-values +- Fix boo#1151703 on older stuff and ignore on Python >= 3.8 + +------------------------------------------------------------------- +Sun Apr 10 11:26:51 UTC 2022 - Sebastian Wagner + +- Update to version 1.26.3: + - Restore setuptools requirement for Python < 3.8 + This reverts commit 8f68248 "Remove runtime dep 'setuptools' for Python + < 3.8". It looks like removing setuptools induces problems on some + systems, see for example the linked discussion. + Fixes https://github.com/adrienverge/yamllint/issues/380. +- Update to version 1.26.2: + - setup: update python_requires to comply with PEP 345/440 + According to PEP 345 Requires-Python + (https://www.python.org/dev/peps/pep-0345/#requires-python), the value + of this field must be a valid Version Specifier + (https://www.python.org/dev/peps/pep-0345/#version-specifiers). Which + in turn expects this to comply with PEP 440 + (https://www.python.org/dev/peps/pep-0440/). + While not an issue for those that directly use `pip`, this will cause + issues for `poetry` users in the next release (if their current stance + is maintained). Discussion of the issue and there stance can be found + here: https://github.com/python-poetry/poetry/issues/4095. +- Update to version 1.26.1: + - line_length: skip all hash signs starting comment + - Remove runtime dep 'setuptools' for Python < 3.8 + > In recent versions of setuptools and Python, console-script entry + points are using stdlib importlib by default, thus setuptools is no + longer needed as a runtime dependency. + https://github.com/pypa/setuptools/pull/2197 + https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v4730 + https://docs.python.org/3/library/importlib.metadata.html +- Update to version 1.26.0: + - quoted-strings: Fix explicit octal recognition + PyYAML implements YAML spec version 1.1, not 1.2. Hence, values starting + with `0o` are not considered as numbers: they are just strings, so they + need quotes when `quoted-strings: {required: true}`. + >>> import yaml + >>> yaml.resolver.Resolver().resolve(yaml.nodes.ScalarNode, '100', (True, False)) + 'tag:yaml.org,2002:int' + >>> yaml.resolver.Resolver().resolve(yaml.nodes.ScalarNode, '0100', (True, False)) + 'tag:yaml.org,2002:int' + >>> yaml.resolver.Resolver().resolve(yaml.nodes.ScalarNode, '0o100', (True, False)) + 'tag:yaml.org,2002:str' + Let's try to prevent that. + Fixes https://github.com/adrienverge/yamllint/issues/351. + - End support for Python 2 + As planned and advertized, yamllint drops support for Python 2 on 2021. + - Allow only non-empty brackets/braces + We'd like to disallow brackets and braces in our YAML, but there's a + catch: the only way to describe an empty array or hash in YAML is to + supply an empty one (`[]` or `{}`). Otherwise, the value will be null. + This commit adds a `non-empty` option to `forbid` for brackets and + braces. When it is set, all flow and sequence mappings will cause errors + _except_ for empty ones. + - Add support for Python 3.9, drop Python 3.4 + Add support for Python 3.9 since it was officially released in October + and drop support for Python 3.4 since it is end-of-life (EOL). + - docs: Add configuration for integration with Arcanist +- Update to version 1.25.0: + - gitignore: Add /.eggs + Quick PR to ignore the `/.eggs` folder, which appears to be generated every + time the `python setup.py test` command is run. + The content of the `./.eggs/README.txt` file: + > This directory contains eggs that were downloaded by setuptools to build, + > test, and run plug-ins. + > + > This directory caches those eggs to prevent repeated downloads. + > + > However, it is safe to delete this directory. + - directives: Fix DOS lines messing with rule IDs + Fixes #325 + The linter allows a directive to contain trailing whitespace characters like + +, but does not trim them before iterating on the rules. As a result, the last + rule in the list contains the trailing whitespace characters and never matches + any existing rule. + I added the necessary trimming, as well as a test with 2 checks to go along + with it. + - Auto-change output format if GitHub Actions detected + - Add support for GitHub Annotations output format + Support the format used by GitHub Actions to annotate pull + requests with linter failures + - fix: add runtime dependency to setuptools + yamllint depends on pkg_resources.load_entry_point from setuptools to + make its command working, so this runtime dependency to setuptools is + necessary to be listed. + - Add 'forbid' configurations to the braces and brackets rules + Add 'forbid' configuration parameters to the braces and brackets rules + to allow users to forbid the use of flow style collections, flow + mappings and flow sequences. + - quoted-strings: Fix detecting strings with hashtag as requiring quotes + - octal-values: Prevent detection of 8 and 9 as octal values + - docs: Make 'yaml-file' config documentation clearer + Related to https://github.com/adrienverge/yamllint/issues/311. + - enhancement: add some metadata to provide extra info in its PyPI page + Add some metadata (project_urls) to provide extra info in its PyPI page. + Signed-off-by: Satoru SATOH + - Move setuptools' packaging configuration from setup.py to setup.cfg + Move setuptools' packaging configuration from setup.py to setup.cfg to + simplify setup.py and make its packaging more dedeclarative. + Signed-off-by: Satoru SATOH + - docs: Add Python API usage example + Fixes: #297 + - commas: Fix example in documentation + Error in the example snippet, it would NOT pass otherwise actually: + ``` + $ cat test.yml + strange var: + [10, 20,30, {x: 1, y: 2}] + $ yamllint -d "{extends: default, rules: {commas: {min-spaces-after: 1, max-spaces-after: 1}}}" test.yml + test.yml + 1:1 warning missing document start "---" (document-start) + 2:11 error too few spaces after comma (commas) + ``` + - docs: Add default values to rules with options + - CI: Add build environment without UTF-8 locales to travis-ci + Preventing regressions like #285 + +------------------------------------------------------------------- +Tue Jul 21 11:03:17 UTC 2020 - Marketa Calabkova + +- Update to 1.24.2 + * Add ``locale`` config option and make ``key-ordering`` locale-aware + * Revert ``locale`` config option from version 1.24.0 because of a bug + * Specify config with environment variable ``YAMLLINT_CONFIG_FILE`` + * Fix bug with CRLF in ``new-lines`` and ``require-starting-space`` + * Do not run linter on directories whose names look like YAML files + * Add ``locale`` config option and make ``key-ordering`` locale-aware + +------------------------------------------------------------------- +Tue Jul 7 06:14:04 UTC 2020 - Steve Kowalik + +- Update to 1.23.0: + * Allow rules to validate their configuration + * Add options extra-required and extra-allowed to quoted-strings + +------------------------------------------------------------------- +Thu Apr 16 07:39:02 UTC 2020 - Tomáš Chvátal + +- Update to 1.22.1: + * Fix quoted-strings rule with only-when-needed on corner cases + * Add check-keys option to the truthy rule + * Fix quoted-strings rule not working on sequences items + * Sunset Python 2 + * Fix new-lines rule on Python 3 with DOS line endings + * Fix quoted-strings rule not working for string values matching scalars + * Add required: only-when-needed option to the quoted-strings rule + +------------------------------------------------------------------- +Tue Feb 4 16:00:48 UTC 2020 - Marketa Calabkova + +- update to 1.20.0 + * Add --no-warnings option to suppress warning messages + * Use 'syntax' as rule name upon syntax errors + * Allow disabling all checks for a file with # yamllint disable-file + +------------------------------------------------------------------- +Wed Oct 30 12:21:46 UTC 2019 - Tomáš Chvátal + +- Update to 1.18.0: + * Lint .yamllint config file by default + * Also read config from .yamllint.yml and .yamllint.yaml + * Improve documentation for yaml-files + * Update documentation for pre-commit + * Explicitly disable empty-values and octal-values rules + +------------------------------------------------------------------- +Mon Aug 19 08:43:21 UTC 2019 - Tomáš Chvátal + +- Update to 1.17.0: + * Simplify installation instructions in the README + * Add OpenBSD installation instructions + * Make YAML file extensions configurable + +------------------------------------------------------------------- +Fri Jun 14 11:46:41 UTC 2019 - Marketa Calabkova + +- Update to 1.16.0 + * Add the allowed-values option to the truthy rule + * Allow configuration options to be a list of enums + +------------------------------------------------------------------- +Thu Feb 14 08:05:24 UTC 2019 - John Vandenberg + +- Update to 1.15.0 + * Add command line option - to read from standard input +- Disable a flaky test caused by PyYAML + +------------------------------------------------------------------- +Mon Feb 11 06:02:42 UTC 2019 - John Vandenberg + +- Update to 1.14.0 + * Fix documentation code snippets + * Drop Python 2.6 and 3.3 support, add Python 3.7 support + * Update documentation and tests for ``line-length`` + Unicode + Python 2 + * Allow rule configurations to lack options + * Add a new ``ignore-shebangs`` option for the ``comments`` rule + +------------------------------------------------------------------- +Sun Dec 30 04:03:53 UTC 2018 - John Vandenberg + +- Update to 1.13.0 + * Add a new -f colored option +- Update to 1.12.1 + * Fix the `quoted-strings` rule +- Update to 1.12.0 + * Add a new `quoted-strings` rule +- Changes file fix + +------------------------------------------------------------------- +Tue Dec 4 12:56:19 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Thu May 24 18:11:52 UTC 2018 - toddrme2178@gmail.com + +- Update to 0.11.1 + * Handle merge keys (`<<`) in the `key-duplicates` rule + * Update documentation about pre-commit + * Make examples for `ignore` rule clearer + * Clarify documentation on the 'truthy' rule + * Fix crash in parser due to a change in PyYAML > 3.12 +- Update to 1.11.0 + * Add a new `octal-values` rule +- Spec file cleanups + +------------------------------------------------------------------- +Thu Nov 16 17:46:17 UTC 2017 - toddrme2178@gmail.com + +- Initial version diff --git a/python-yamllint.spec b/python-yamllint.spec new file mode 100644 index 0000000..34934fb --- /dev/null +++ b/python-yamllint.spec @@ -0,0 +1,82 @@ +# +# spec file for package python-yamllint +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-yamllint +Version: 1.35.1 +Release: 0 +Summary: A linter for YAML files +License: GPL-3.0-only +Group: Development/Languages/Python +URL: https://github.com/adrienverge/yamllint +Source: https://files.pythonhosted.org/packages/source/y/yamllint/yamllint-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-PyYAML +Requires: python-pathspec >= 0.5.3 +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module pathspec >= 0.5.3} +# /SECTION +%python_subpackages + +%description +A linter for YAML files. + +YAMLlint does not only check for syntax validity, but for weirdnesses like key +repetition and cosmetic problems such as lines length, trailing spaces, +indentation, etc. + +%prep +%setup -q -n yamllint-%{version} +# override gh#adrienverge/yamllint#401, boo#1151703 fixed by importlib.resources in python >= 3.8 and a recent setuptools +sed 's/ setuptools/ setuptools; python_version < "3.8"/' setup.cfg + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/yamllint + +%check +export LANG="en_US.UTF8" +# skip test_run_with_user_global_config_file, probably same reason as upstreams GHA skip: '$HOME not overridable' +export GITHUB_RUN_ID=1 +%pyunittest -v + +%post +%python_install_alternative yamllint + +%postun +%python_uninstall_alternative yamllint + +%files %{python_files} +%doc README.rst +%license LICENSE +%python_alternative %{_bindir}/yamllint +%{python_sitelib}/yamllint +%{python_sitelib}/yamllint-%{version}*-info + +%changelog diff --git a/yamllint-1.35.1.tar.gz b/yamllint-1.35.1.tar.gz new file mode 100644 index 0000000..ef5fbe5 --- /dev/null +++ b/yamllint-1.35.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a003809f88324fd2c877734f2d575ee7881dd9043360657cc8049c809eba6cd +size 134583