From 0262806461e1dee6613ceeb9ce140e9eea9d68f4dab49ff0be19bd390d1f1e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 4 Sep 2020 13:58:32 +0000 Subject: [PATCH] Accepting request 832116 from home:jayvdb:branches:devel:languages:python - Include change log and docs in package - Update to v20.8b1 OBS-URL: https://build.opensuse.org/request/show/832116 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-black?expand=0&rev=21 --- black-19.10b0.tar.gz | 3 --- black-20.8b1.tar.gz | 3 +++ python-black.changes | 34 +++++++++++++++++++++++++++++ python-black.spec | 51 +++++++++++++++++++++++++++----------------- 4 files changed, 68 insertions(+), 23 deletions(-) delete mode 100644 black-19.10b0.tar.gz create mode 100644 black-20.8b1.tar.gz diff --git a/black-19.10b0.tar.gz b/black-19.10b0.tar.gz deleted file mode 100644 index 75335d1..0000000 --- a/black-19.10b0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539 -size 1019740 diff --git a/black-20.8b1.tar.gz b/black-20.8b1.tar.gz new file mode 100644 index 0000000..5a9ed3c --- /dev/null +++ b/black-20.8b1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea +size 1096433 diff --git a/python-black.changes b/python-black.changes index 580e91d..c465d41 100644 --- a/python-black.changes +++ b/python-black.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Fri Sep 4 12:19:10 UTC 2020 - John Vandenberg + +- Include change log and docs in package +- Update to v20.8b1 + * Explicitly depend on Click 7.1.2 or newer as `Black` no longer + works with versions older than 7.0 +- from v20.8b0 + * Re-implemented support for explicit trailing commas: now it + works consistently within any bracket pair, including nested + structures + * Reindents docstrings when reindenting code around it + * Show colored diffs + * Supports Python 3.8 code, e.g. star expressions in return statements + * No longer normalizes capital R-string prefixes as those have a + community-accepted meaning + * Uses exit code 2 when specified configuration file doesn't exit + * Works on AWS Lambda + * Added `--force-exclude` argument + * Removed deprecated `--py36` option + * Fixed `--diff` output when EOF is encountered + * Fixed `# fmt: off` handling around decorators + * Fixed unstable formatting with some `# type: ignore` comments + * Fixed invalid removal on organizing brackets followed by indexing + * Introduced `black-primer`, a CI tool that allows us to run + regression tests against existing open source users of Black + * Introduced property-based fuzzing to our test suite based on + Hypothesis and Hypothersmith + * Implemented experimental and disabled by default long string + rewrapping hidden under a `--experimental-string-processing` + flag while it's being worked on; this is an undocumented and + unsupported feature + * Vim plugin prefer virtualenv packages over global packages + ------------------------------------------------------------------- Mon Aug 24 21:56:53 UTC 2020 - Benjamin Greiner diff --git a/python-black.spec b/python-black.spec index 938a3c0..84c5d68 100644 --- a/python-black.spec +++ b/python-black.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-black -Version: 19.10b0 +Version: 20.8b1 Release: 0 Summary: A code formatter written in, and written for Python License: MIT @@ -30,15 +30,15 @@ BuildRequires: %{python_module aiohttp_cors} BuildRequires: %{python_module appdirs} BuildRequires: %{python_module attrs >= 18.1.0} BuildRequires: %{python_module base >= 3.6} -BuildRequires: %{python_module click >= 6.5} -BuildRequires: %{python_module mypy_extensions} -BuildRequires: %{python_module pathspec} +BuildRequires: %{python_module click >= 7.1.2} +BuildRequires: %{python_module mypy_extensions >= 0.4.3} +BuildRequires: %{python_module pathspec >= 0.6} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module regex} +BuildRequires: %{python_module regex >= 2020.1.8} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module toml >= 0.9.4} -BuildRequires: %{python_module typed-ast} +BuildRequires: %{python_module toml >= 0.10.1} +BuildRequires: %{python_module typed-ast >= 1.4.0} BuildRequires: %{python_module typing_extensions} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -46,12 +46,12 @@ Requires: python-aiohttp >= 3.3.2 Requires: python-aiohttp_cors Requires: python-appdirs Requires: python-attrs >= 18.1.0 -Requires: python-click >= 6.5 -Requires: python-mypy_extensions -Requires: python-pathspec -Requires: python-regex -Requires: python-toml >= 0.9.4 -Requires: python-typed-ast +Requires: python-click >= 7.1.2 +Requires: python-mypy_extensions >= 0.4.3 +Requires: python-pathspec >= 0.6 +Requires: python-regex >= 2020.1.8 +Requires: python-toml >= 0.10.1 +Requires: python-typed-ast >= 1.4.0 Requires: python-typing_extensions Requires(post): update-alternatives Requires(postun): update-alternatives @@ -71,6 +71,7 @@ also recognizes YAPF's block comments to the same effect. %prep %setup -q -n black-%{version} +sed -i '1{/#!/d}' src/black_primer/cli.py src/black_primer/lib.py %build %python_build @@ -79,9 +80,17 @@ also recognizes YAPF's block comments to the same effect. %python_install %python_clone -a %{buildroot}%{_bindir}/black %python_clone -a %{buildroot}%{_bindir}/blackd -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/black-primer +%{python_expand cp src/black_primer/primer.json %{buildroot}%{$python_sitelib}/black_primer/ +%fdupes %{buildroot}%{$python_sitelib} +} %check +# Copy one of the executable scripts into the PATH +mkdir ~/bin +cp $(ls %{buildroot}%{_bindir}/black-* | head -1) ~/bin/black +export PATH=$PATH:~/bin + # test_expression_diff - sometimes fails on async timing in OBS skiptests="test_expression_diff" # https://github.com/psf/black/issues/1109 @@ -91,20 +100,22 @@ fi %pytest -k "not ($skiptests)" %post -%python_install_alternative black blackd +%python_install_alternative black blackd black-primer %postun %python_uninstall_alternative black %files %{python_files} -%doc README.md +%doc README.md CHANGES.md docs/*.md docs/reference +%license LICENSE %python_alternative %{_bindir}/black %python_alternative %{_bindir}/blackd -%license LICENSE +%python_alternative %{_bindir}/black-primer %{python_sitelib}/_black_version.py* -%{python_sitelib}/black.py* -%{python_sitelib}/blackd.py* -%{python_sitelib}/blib2to3 +%{python_sitelib}/black_primer/ +%{python_sitelib}/black/ +%{python_sitelib}/blackd/ +%{python_sitelib}/blib2to3/ %{python_sitelib}/black-%{version}-py*.egg-info %pycache_only %{python_sitelib}/__pycache__/*