Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-python-lsp-black for openSUSE:Factory checked in at 2023-07-01 23:18:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-python-lsp-black (Old) and /work/SRC/openSUSE:Factory/.python-python-lsp-black.new.13546 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-lsp-black" Sat Jul 1 23:18:32 2023 rev:6 rq:1096294 version:1.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-python-lsp-black/python-python-lsp-black.changes 2022-10-28 19:30:44.550996062 +0200 +++ /work/SRC/openSUSE:Factory/.python-python-lsp-black.new.13546/python-python-lsp-black.changes 2023-07-01 23:18:38.314471545 +0200 @@ -1,0 +2,8 @@ +Sat Jul 1 13:42:33 UTC 2023 - Ben Greiner <c...@bnavigator.de> + +- Update to 1.3.0 + * Support for black's preview and skip-magic-trailing-comma + config options. + * Better TOML support. + +------------------------------------------------------------------- Old: ---- python-lsp-black-1.2.1-gh.tar.gz New: ---- python-lsp-black-1.3.0-gh.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-lsp-black.spec ++++++ --- /var/tmp/diff_new_pack.f4eFvv/_old 2023-07-01 23:18:39.062476029 +0200 +++ /var/tmp/diff_new_pack.f4eFvv/_new 2023-07-01 23:18:39.066476053 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-python-lsp-black # -# 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 @@ -17,25 +17,29 @@ Name: python-python-lsp-black -Version: 1.2.1 +Version: 1.3.0 Release: 0 Summary: Black plugin for the Python LSP Server License: MIT URL: https://github.com/python-lsp/python-lsp-black Source: https://github.com/python-lsp/python-lsp-black/archive/refs/tags/v%{version}.tar.gz#/python-lsp-black-%{version}-gh.tar.gz BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module black >= 22.3.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-lsp-server >= 1.4.0} -BuildRequires: %{python_module toml} +BuildRequires: %{python_module tomli if %python-base < 3.11} # /SECTION BuildRequires: fdupes Requires: python-black >= 22.3.0 Requires: python-python-lsp-server -Requires: python-toml +%if 0%{?python_version_nodots} < 311 +Requires: python-tomli +%endif BuildArch: noarch %python_subpackages @@ -54,10 +58,10 @@ %setup -q -n python-lsp-black-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -66,6 +70,6 @@ %files %{python_files} %doc README.md %{python_sitelib}/pylsp_black -%{python_sitelib}/python_lsp_black-%{version}*-info +%{python_sitelib}/python_lsp_black-%{version}.dist-info %changelog ++++++ python-lsp-black-1.2.1-gh.tar.gz -> python-lsp-black-1.3.0-gh.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/.envrc new/python-lsp-black-1.3.0/.envrc --- old/python-lsp-black-1.2.1/.envrc 1970-01-01 01:00:00.000000000 +0100 +++ new/python-lsp-black-1.3.0/.envrc 2023-05-19 14:15:51.000000000 +0200 @@ -0,0 +1 @@ +layout python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/.github/workflows/python.yml new/python-lsp-black-1.3.0/.github/workflows/python.yml --- old/python-lsp-black-1.2.1/.github/workflows/python.yml 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/.github/workflows/python.yml 2023-05-19 14:15:51.000000000 +0200 @@ -11,7 +11,7 @@ runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: [3.8, 3.9, "3.10", "3.11"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/.pre-commit-config.yaml new/python-lsp-black-1.3.0/.pre-commit-config.yaml --- old/python-lsp-black-1.2.1/.pre-commit-config.yaml 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/.pre-commit-config.yaml 2023-05-19 14:15:51.000000000 +0200 @@ -1,25 +1,25 @@ repos: - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.3.0 hooks: - id: black exclude: fixtures args: [--check, --config=pyproject.toml] -- repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 +- repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.942 + rev: v1.3.0 hooks: - id: mypy - additional_dependencies: [black, types-pkg_resources, types-setuptools, types-toml] + additional_dependencies: [black, types-pkg_resources, types-setuptools] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.4.0 hooks: - id: check-merge-conflict - id: debug-statements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/CHANGELOG.md new/python-lsp-black-1.3.0/CHANGELOG.md --- old/python-lsp-black-1.2.1/CHANGELOG.md 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/CHANGELOG.md 2023-05-19 14:15:51.000000000 +0200 @@ -1,3 +1,24 @@ +## Version 1.3.0 (2023/05/19) + +### Issues Closed + +* [Issue 36](https://github.com/python-lsp/python-lsp-black/issues/36) - python-lsp-black ignores skip-magic-trailing-comma in .config/black ([PR 37](https://github.com/python-lsp/python-lsp-black/pull/37) by [@wstevick](https://github.com/wstevick)) +* [Issue 35](https://github.com/python-lsp/python-lsp-black/issues/35) - python-lsp-black does not respect black configurations + +In this release 2 issues were closed. + +### Pull Requests Merged + +* [PR 47](https://github.com/python-lsp/python-lsp-black/pull/47) - direnv support, by [@haplo](https://github.com/haplo) +* [PR 46](https://github.com/python-lsp/python-lsp-black/pull/46) - Add Python 3.11, drop 3.7 from test matrix, by [@haplo](https://github.com/haplo) +* [PR 45](https://github.com/python-lsp/python-lsp-black/pull/45) - Test preview and skip-magic-trailing-comma config parsing, by [@haplo](https://github.com/haplo) +* [PR 44](https://github.com/python-lsp/python-lsp-black/pull/44) - pre-commit autoupdate, by [@haplo](https://github.com/haplo) +* [PR 40](https://github.com/python-lsp/python-lsp-black/pull/40) - Replace the obsolete toml package with tomllib/tomli, by [@mgorny](https://github.com/mgorny) +* [PR 38](https://github.com/python-lsp/python-lsp-black/pull/38) - Added missing `preview` kwarg in `black.FileMode`. Fixes #35., by [@JesusTorrado](https://github.com/JesusTorrado) +* [PR 37](https://github.com/python-lsp/python-lsp-black/pull/37) - Add the possibility to configure skip-magic-trailing-comma, by [@wstevick](https://github.com/wstevick) ([36](https://github.com/python-lsp/python-lsp-black/issues/36)) + +In this release 7 pull requests were closed. + ## Version 1.2.1 (2022-04-12) ### Pull Requests Merged diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/CHANGELOG.temp new/python-lsp-black-1.3.0/CHANGELOG.temp --- old/python-lsp-black-1.2.1/CHANGELOG.temp 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/CHANGELOG.temp 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -## Version 1.2.1 (2022-04-12) - - -### Pull Requests Merged - -* [PR 34](https://github.com/python-lsp/python-lsp-black/pull/34) - Disable Autopep8 and Yapf if this plugin is installed, by [@bageljrkhanofemus](https://github.com/bageljrkhanofemus) - -In this release 1 pull request was closed. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/Makefile new/python-lsp-black-1.3.0/Makefile --- old/python-lsp-black-1.2.1/Makefile 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/Makefile 2023-05-19 14:15:51.000000000 +0200 @@ -14,7 +14,7 @@ pre-commit run -a mypy test: - pytest -v . + pytest -vv . build: lint test python3 setup.py sdist bdist_wheel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/pylsp_black/plugin.py new/python-lsp-black-1.3.0/pylsp_black/plugin.py --- old/python-lsp-black-1.2.1/pylsp_black/plugin.py 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/pylsp_black/plugin.py 2023-05-19 14:15:51.000000000 +0200 @@ -1,15 +1,20 @@ import logging import os +import sys from functools import lru_cache from pathlib import Path from typing import Dict, Optional import black -import toml from pylsp import hookimpl from pylsp._utils import get_eol_chars from pylsp.config.config import Config +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib + logger = logging.getLogger(__name__) @@ -87,6 +92,8 @@ line_length=config["line_length"], is_pyi=config["pyi"], string_normalization=not config["skip_string_normalization"], + magic_trailing_comma=not config["skip_magic_trailing_comma"], + preview=config["preview"], ) try: # Black's format_file_contents only works reliably when eols are '\n'. It gives @@ -131,6 +138,7 @@ "fast": False, "pyi": filename.endswith(".pyi"), "skip_string_normalization": False, + "skip_magic_trailing_comma": False, "target_version": set(), "preview": settings.get("preview", False), } @@ -152,8 +160,9 @@ return defaults try: - pyproject_toml = toml.load(str(pyproject_filename)) - except (toml.TomlDecodeError, OSError): + with open(pyproject_filename, "rb") as f: + pyproject_toml = tomllib.load(f) + except (tomllib.TOMLDecodeError, OSError): logger.warning( "Error decoding pyproject.toml, using defaults: %r", defaults, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/setup.cfg new/python-lsp-black-1.3.0/setup.cfg --- old/python-lsp-black-1.2.1/setup.cfg 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/setup.cfg 2023-05-19 14:15:51.000000000 +0200 @@ -1,6 +1,6 @@ [metadata] name = python-lsp-black -version = 1.2.1 +version = 1.3.0 author = Python LSP contributors author_email = f...@fidelramos.net description = Black plugin for the Python LSP Server @@ -18,7 +18,10 @@ [options] packages = find: -install_requires = python-lsp-server>=1.4.0; black>=22.3.0; toml +install_requires = + python-lsp-server>=1.4.0 + black>=22.3.0 + tomli; python_version<'3.11' python_requires = >= 3.7 [options.entry_points] @@ -26,7 +29,7 @@ [options.extras_require] # add any types-* packages to .pre-commit-config.yaml mypy additional_dependencies -dev = isort>=5.0; flake8; pre-commit; pytest; mypy; pytest; types-pkg_resources; types-setuptools; types-toml +dev = isort>=5.0; flake8; pre-commit; pytest; mypy; pytest; types-pkg_resources; types-setuptools [flake8] max-line-length = 88 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/tests/fixtures/config/pyproject.toml new/python-lsp-black-1.3.0/tests/fixtures/config/pyproject.toml --- old/python-lsp-black-1.2.1/tests/fixtures/config/pyproject.toml 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/tests/fixtures/config/pyproject.toml 2023-05-19 14:15:51.000000000 +0200 @@ -2,4 +2,6 @@ line-length = 20 --fast = true pyi = true +skip-magic-trailing-comma = true skip-string-normalization = true +preview = true \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-lsp-black-1.2.1/tests/test_plugin.py new/python-lsp-black-1.3.0/tests/test_plugin.py --- old/python-lsp-black-1.2.1/tests/test_plugin.py 2022-04-12 13:55:44.000000000 +0200 +++ new/python-lsp-black-1.3.0/tests/test_plugin.py 2023-05-19 14:15:51.000000000 +0200 @@ -233,8 +233,9 @@ "target_version": set(), "pyi": True, "fast": True, + "skip_magic_trailing_comma": True, "skip_string_normalization": True, - "preview": False, + "preview": True, } @@ -264,6 +265,7 @@ "target_version": set(), "pyi": False, "fast": False, + "skip_magic_trailing_comma": False, "skip_string_normalization": False, "preview": False, }