From ad97028583be3c38e5515ac4587907cf0aaba5a2 Mon Sep 17 00:00:00 2001 From: Qi Zhao Date: Wed, 6 Nov 2024 16:43:16 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20python=5Fminifier=20?= =?UTF-8?q?support=203.12=20&=203.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyencrypt/encrypt.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyencrypt/encrypt.py b/pyencrypt/encrypt.py index 1ee4534..0923507 100644 --- a/pyencrypt/encrypt.py +++ b/pyencrypt/encrypt.py @@ -7,7 +7,7 @@ try: import python_minifier except ImportError as exc: - if sys.version_info.minor < 12: + if sys.version_info.minor < 14: raise ImportError("Couldn't import python_minifier.") from exc python_minifier = None diff --git a/setup.cfg b/setup.cfg index 159f79b..e1874ee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,7 @@ keywords = python-encrypt, import-hook install_requires = Cython >= 0.29.30 pycryptodome >= 3.14.1 - python-minifier >= 2.6.0; python_version < '3.12' + python-minifier >= 2.6.0; python_version < '3.14' click setuptools >= 66.1.0; python_version >= '3.12' setuptools <= 60.9.0; python_version < '3.12' From 6b74221e293b50fcfeb33d885b9d765857410a54 Mon Sep 17 00:00:00 2001 From: Qi Zhao Date: Wed, 6 Nov 2024 16:44:44 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20support=20Python=203?= =?UTF-8?q?.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 2 +- setup.cfg | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b04200..df65e3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04, macos-13, windows-latest] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12","3.13"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/setup.cfg b/setup.cfg index e1874ee..637bc50 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Programming Language :: Python :: Implementation :: CPython Environment :: Console license_files = LICENSE @@ -37,7 +38,7 @@ install_requires = click setuptools >= 66.1.0; python_version >= '3.12' setuptools <= 60.9.0; python_version < '3.12' -python_requires = >=3.6,<3.13 +python_requires = >=3.6,<3.14 packages = find: # package_dir = # = src From e4cebe5bce0264374d17a4f47c790d012e6e30b5 Mon Sep 17 00:00:00 2001 From: Qi Zhao Date: Wed, 6 Nov 2024 17:13:55 +0800 Subject: [PATCH 3/4] =?UTF-8?q?perf:=20=E2=9A=A1=EF=B8=8F=20Finder=20file?= =?UTF-8?q?=5Fpath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyencrypt/loader.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pyencrypt/loader.py b/pyencrypt/loader.py index 0d87a2c..eeb99f5 100644 --- a/pyencrypt/loader.py +++ b/pyencrypt/loader.py @@ -91,15 +91,11 @@ def find_spec( cls, fullname: str, path: Sequence[_Path], target: types.ModuleType = None ) -> ModuleSpec: if path: + filename = "{}{}".format(fullname.rsplit(".", 1)[-1], ENCRYPT_SUFFIX) if isinstance(path, _NamespacePath): - file_path = ( - Path(path._path[0]) - / f'{fullname.rsplit(".", 1)[-1]}{ENCRYPT_SUFFIX}' - ) + file_path = Path(path._path[0]) / filename else: - file_path = ( - Path(path[0]) / f'{fullname.rsplit(".", 1)[-1]}{ENCRYPT_SUFFIX}' - ) + file_path = Path(path[0]) / filename else: for p in sys.path: file_path = Path(p) / f"{fullname}{ENCRYPT_SUFFIX}" From 2f5987322503dfd03ea6a6e92a2928c510410616 Mon Sep 17 00:00:00 2001 From: Qi Zhao Date: Fri, 29 Nov 2024 18:00:37 +0800 Subject: [PATCH 4/4] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20skip=20windows=20on=20?= =?UTF-8?q?3.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df65e3f..8c90f49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,6 +21,9 @@ jobs: matrix: os: [ubuntu-20.04, macos-13, windows-latest] python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12","3.13"] + exclude: + - os: windows-latest + python-version: "3.13" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4