From 76db7778269a83284c76b0627be2256d23aeb6ae Mon Sep 17 00:00:00 2001 From: Hadi Alqattan Date: Mon, 6 Jan 2025 21:21:10 +0300 Subject: [PATCH] change: drop python 3.7 --- .github/workflows/fuzz.yml | 2 +- .pre-commit-config.yaml | 2 +- docs/CHANGELOG.md | 4 ++++ docs/README.md | 2 +- pycln/utils/pathu.py | 14 +++++++------- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 5a3d84e..907fe27 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01cb9d5..4830ab8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: rev: v3.19.1 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py38-plus] - repo: https://github.com/pycqa/isort rev: 5.13.2 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8688b08..9164f6d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,10 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## Changed + +- [Drop Python3.7 by @hadialqattan](https://github.com/hadialqattan/pycln) + ## [2.4.0] - 2023-11-14 ## Added diff --git a/docs/README.md b/docs/README.md index e8681cf..789ee0f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -43,7 +43,7 @@ ## Latest Release (PYPI) -Pycln requires Python 3.7+ and can be easily installed using the most common Python +Pycln requires Python 3.8+ and can be easily installed using the most common Python packaging tools. We recommend installing the latest stable release from PyPI with pip: ```bash diff --git a/pycln/utils/pathu.py b/pycln/utils/pathu.py index 7209bcf..935f8ff 100644 --- a/pycln/utils/pathu.py +++ b/pycln/utils/pathu.py @@ -127,7 +127,7 @@ def yield_sources( ) -@lru_cache() +@lru_cache def get_standard_lib_paths() -> Set[Path]: """Get paths to Python standard library modules. @@ -149,7 +149,7 @@ def get_standard_lib_paths() -> Set[Path]: return paths -@lru_cache() +@lru_cache def get_standard_lib_names() -> Set[str]: """Returns a set of Python standard library modules names. @@ -172,7 +172,7 @@ def get_standard_lib_names() -> Set[str]: return (names - IMPORTS_WITH_SIDE_EFFECTS) | BIN_IMPORTS -@lru_cache() +@lru_cache def get_third_party_lib_paths() -> Tuple[Set[Path], Set[Path]]: """Get paths to third party library modules. @@ -202,7 +202,7 @@ def get_third_party_lib_paths() -> Tuple[Set[Path], Set[Path]]: return paths, pth_paths -@lru_cache() +@lru_cache def get_local_import_path(path: Path, module: str) -> Optional[Path]: """Find the given local module file.py/__init_.py path. @@ -248,7 +248,7 @@ def get_local_import_pth_path(pth_paths: Set[Path], module: str) -> Optional[Pat return None -@lru_cache() +@lru_cache def get_local_import_from_path( path: Path, module: str, package: str, level: int ) -> Optional[Path]: @@ -365,7 +365,7 @@ def get_module_path( return None -@lru_cache() +@lru_cache def get_import_path(path: Path, module: str) -> Optional[Path]: """Find the given module file.py/__init__.py path. @@ -390,7 +390,7 @@ def get_import_path(path: Path, module: str) -> Optional[Path]: return get_module_path(paths, module) -@lru_cache() +@lru_cache def get_import_from_path( path: Path, module: str, package: str, level: int ) -> Optional[Path]: