diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b04200..8c90f49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,10 @@ 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"] + exclude: + - os: windows-latest + python-version: "3.13" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 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/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}" diff --git a/setup.cfg b/setup.cfg index 159f79b..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 @@ -33,11 +34,11 @@ 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' -python_requires = >=3.6,<3.13 +python_requires = >=3.6,<3.14 packages = find: # package_dir = # = src