diff --git a/blue-0.8.0.tar.gz b/blue-0.8.0.tar.gz deleted file mode 100644 index edc08bc..0000000 --- a/blue-0.8.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e097b83a5937b9c420e4a18063525f5b38e65a4396976ea681bdb405f07269d1 -size 86462 diff --git a/blue-0.9.0.tar.gz b/blue-0.9.0.tar.gz new file mode 100644 index 0000000..cba71dc --- /dev/null +++ b/blue-0.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6191156d022a688f911daba92dcf673d64ff342cd9ceeb13be429cae997f95c +size 87751 diff --git a/python-blue.changes b/python-blue.changes index 5a3aa43..a8c6dd0 100644 --- a/python-blue.changes +++ b/python-blue.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed May 4 17:28:34 UTC 2022 - Matej Cepl + +- Upgrade to 0.9.0: + - Fix test suite failures due to a confluence of problems + - Upgrade dependency on Black to 22.1.0 to support Python 3.10 + - Add link to demo site at https://iblueit.dev + ------------------------------------------------------------------- Sat Apr 23 18:57:58 UTC 2022 - Matej Cepl diff --git a/python-blue.spec b/python-blue.spec index 9f2c7ea..a6b4b49 100644 --- a/python-blue.spec +++ b/python-blue.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-blue -Version: 0.8.0 +Version: 0.9.0 Release: 0 Summary: A code formatter written in, and written for Python License: MIT @@ -67,6 +67,7 @@ HTML Documentation and examples for %name. %prep %autosetup -p1 -n blue-%{version} + # avoid pytest addopts for coverage checks sed -i '/--cov/d' tox.ini diff --git a/unpin-black.patch b/unpin-black.patch index 1a2881b..eb059a4 100644 --- a/unpin-black.patch +++ b/unpin-black.patch @@ -1,12 +1,15 @@ -Index: blue-0.8.0/blue/__init__.py -=================================================================== ---- blue-0.8.0.orig/blue/__init__.py -+++ blue-0.8.0/blue/__init__.py -@@ -387,8 +387,9 @@ def main(): +--- + blue/__init__.py | 5 +++-- + setup.py | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +--- a/blue/__init__.py ++++ b/blue/__init__.py +@@ -448,8 +448,9 @@ def main(): 'Black', 'Blue' ) # Change the config param callback to support setup.cfg, tox.ini, etc. -- config_param = black.main.params[21] +- config_param = black.main.params[25] - assert config_param.name == 'config' + # the index changed somewhere between black 21.7b and 21.12b + cfgidx = {p.name: i for (i, p) in enumerate(black.main.params)}['config'] @@ -14,16 +17,14 @@ Index: blue-0.8.0/blue/__init__.py config_param.callback = read_configs # Change the version string by adding a redundant Click `version_option` # decorator on `black.main`. Fortunately the added `version_option` takes -Index: blue-0.8.0/setup.py -=================================================================== ---- blue-0.8.0.orig/setup.py -+++ blue-0.8.0/setup.py +--- a/setup.py ++++ b/setup.py @@ -37,7 +37,7 @@ setup( packages=['blue'], tests_require=['tox'], cmdclass={'test': Tox}, -- install_requires=['black==21.7b0', 'flake8>=3.8'], -+ install_requires=['black>=21.7b0', 'flake8>=3.8'], +- install_requires=['black==22.1.0', 'flake8>=3.8'], ++ install_requires=['black>=22.1.0', 'flake8>=3.8'], project_urls={ 'Documentation': 'https://blue.readthedocs.io/en/latest', 'Source': 'https://github.com/grantjenks/blue.git', diff --git a/unpin-tomli.patch b/unpin-tomli.patch index fc3ec17..34b4863 100644 --- a/unpin-tomli.patch +++ b/unpin-tomli.patch @@ -1,10 +1,10 @@ --- - blue/__init__.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) + blue/__init__.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) --- a/blue/__init__.py +++ b/blue/__init__.py -@@ -15,7 +15,10 @@ import black.strings +@@ -70,7 +70,10 @@ import black.strings from black import Leaf, Path, click, token from black.cache import user_cache_dir from black.comments import ProtoComment, make_comment @@ -16,14 +16,3 @@ from black.linegen import LineGenerator as BlackLineGenerator from black.lines import Line from black.nodes import ( -@@ -263,8 +266,8 @@ def parse_pyproject_toml(path_config: st - - If parsing fails, will raise a tomli.TOMLDecodeError - """ -- with open(path_config, encoding="utf8") as f: -- pyproject_toml = tomli.load(f) # type: ignore # due to deprecated API usage -+ with open(path_config, mode='rb') as f: -+ pyproject_toml = tomli.load(f) - config = pyproject_toml.get("tool", {}).get("blue", {}) - return {k.replace("--", "").replace("-", "_"): v for k, v in config.items()} -