diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bd7260..68197e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,29 +60,40 @@ jobs: - '3.10' - '3.11' - '3.12' + - '3.13' python-arch: - x86 - x64 + - arm64 exclude: + # Exclude OS and arch combinations that are not supported - os: ubuntu-latest python-arch: x86 - - os: macOS-latest + - os: ubuntu-latest + python-arch: arm64 + - os: windows-2019 python-arch: x86 + - os: windows-2019 + python-arch: arm64 + - os: windows-2022 + python-arch: arm64 - os: macOS-latest - python-version: 3.8 + python-arch: x86 - os: macOS-latest - python-version: 3.9 + python-arch: x64 + + # macOS arm64 is supported from 3.9 - os: macOS-latest - python-version: '3.10' - - os: windows-2019 - python-arch: x86 + python-version: 3.8 - os: windows-2019 python-version: 3.8 - os: windows-2019 python-version: 3.9 - os: windows-2019 python-version: '3.10' + - os: windows-2019 + python-version: '3.11' - os: windows-2019 python-version: '3.12' diff --git a/CHANGELOG.md b/CHANGELOG.md index 38dbb37..3c21852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # Changelog -## 1.14.1 - TBD +## 1.14.1 - 2024-11-12 * Update session id lookup logic to comply with MS-SMB2 spec * Remove connection from global connection cache even if failing to close it +* Added official support for Python 3.13 ## 1.14.0 - 2024-08-26 diff --git a/README.md b/README.md index 09f475e..4d90fe3 100644 --- a/README.md +++ b/README.md @@ -226,18 +226,12 @@ by running; # Recommend to have virtual environment installed at .venv path. pip install -r requirements-dev.txt pip install -e . - -# you can also run tox by installing tox -pip install tox ``` From there to run the basic tests run; ```bash -py.test -v --cov smbprotocol --cov-report term-missing - -# or with tox for dedicated virtual environments and multiple Python versions. -tox +python -m pytest -v --cov smbprotocol --cov-report term-missing ``` Before sending the code for review, besides making sure all the test pass, @@ -258,7 +252,7 @@ To run these tests set the following variables; * `SMB_PORT`: The port the SMB server is listening on, default is `445` * `SMB_SHARE`: The name of the share to connect to, a share with this name must exist as well as a share with the name`$SMB_SHARE-encrypted` must also exist that forces encryption -From here running `tox` or `py.test` with these environment variables set will +From here running `pytest` with these environment variables set will activate the integration tests. This requires either Windows 10 or Server 2016 as they support Dialect 3.1.1 diff --git a/pyproject.toml b/pyproject.toml index 530c1d8..ab83812 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,8 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12" + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13" ] dependencies = [ "cryptography >= 2.0", @@ -62,26 +63,3 @@ profile = "black" [tool.pytest.ini_options] testpaths = "tests" addopts = "--import-mode=importlib" - -[tool.tox] -legacy_tox_ini = """ -[tox] -envlist = sanity,py38,py39,py310,py311,py312 -skip_missing_interpreters = true -isolated_build = true - -[testenv] -deps = - -r{toxinidir}/requirements-dev.txt - -commands = - python -m pytest -v --cov smbclient --cov smbprotocol --cov-report term-missing - -passenv = - SMB_* - -[testenv:sanity] -commands = - python -m black . --check - python -m isort . --check-only -""" diff --git a/requirements-dev.txt b/requirements-dev.txt index 1a170fd..f32c5d2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,4 +7,3 @@ pyspnego pytest pytest-cov pytest-mock -tox diff --git a/tests/test_smbclient_shutil.py b/tests/test_smbclient_shutil.py index 58c8dc1..8bcf28e 100644 --- a/tests/test_smbclient_shutil.py +++ b/tests/test_smbclient_shutil.py @@ -640,9 +640,12 @@ def test_copymode_local_to_local_symlink_dont_follow(tmpdir): os.symlink(src_filename, src_link) os.symlink(dst_filename, dst_link) - expected = "chmod: follow_symlinks unavailable on this platform" - with pytest.raises(NotImplementedError, match=re.escape(expected)): + if os.name == "nt" and sys.version_info >= (3, 13): copymode(src_link, dst_link, follow_symlinks=False) + else: + expected = "chmod: follow_symlinks unavailable on this platform" + with pytest.raises(NotImplementedError, match=re.escape(expected)): + copymode(src_link, dst_link, follow_symlinks=False) def test_copymode_missing_src(smb_share):