From c1c0aef8d9e92bc673b7f0e3807e00ef364416c4 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Mon, 26 Aug 2024 12:42:05 +0200 Subject: [PATCH 1/3] Update years in license --- LICENSE.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.rst b/LICENSE.rst index ceb7152..f38a047 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -1,4 +1,4 @@ -Copyright (c) 2016-2023 Renata Hodovan, Akos Kiss. +Copyright (c) 2016-2024 Renata Hodovan, Akos Kiss. All rights reserved. Redistribution and use in source and binary forms, with or without From fc08d998a8c6685a3f826228e4bb7196a7c3ae0d Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Mon, 26 Aug 2024 12:43:49 +0200 Subject: [PATCH 2/3] Remove support of Python 3.7 Python 3.7 reached its end of life in June 2023 and it is not even supported by some of the GH actions. --- .github/workflows/main.yml | 2 +- README.rst | 2 +- setup.cfg | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee73869..0d0033e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', 'pypy-3.9'] + python-version: [3.8, 3.9, '3.10', '3.11', '3.12', 'pypy-3.9'] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/README.rst b/README.rst index d7f215f..7c666bc 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,7 @@ test is **1-minimal**). Requirements ============ -* Python_ >= 3.7 +* Python_ >= 3.8 .. _Python: https://www.python.org diff --git a/setup.cfg b/setup.cfg index 3d5f7ce..7cd1944 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,6 @@ classifiers = Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -25,10 +24,9 @@ platform = any [options] packages = find: -python_requires = >=3.7 +python_requires = >=3.8 install_requires = chardet - importlib-metadata; python_version < "3.8" inators [options.entry_points] From 38a4ed736910a762ed9459024a43d6b3a9c5faba Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Mon, 26 Aug 2024 12:47:36 +0200 Subject: [PATCH 3/3] Use 'yield from' directly instead of yielding each element one by one --- picire/iterator.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/picire/iterator.py b/picire/iterator.py index 445658c..4029f40 100644 --- a/picire/iterator.py +++ b/picire/iterator.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2023 Renata Hodovan, Akos Kiss. +# Copyright (c) 2016-2024 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # . @@ -90,15 +90,13 @@ def __call__(self, n): i=-1..-n to remove subset -i-1). """ if self._subset_first: - for i in self._subset_iterator(n): - yield i + yield from self._subset_iterator(n) for i in self._complement_iterator(n): yield -i - 1 else: for i in self._complement_iterator(n): yield -i - 1 - for i in self._subset_iterator(n): - yield i + yield from self._subset_iterator(n) def __str__(self): def _str(a):