diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c4ffda0a..68fb490f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: matrix: os: [ubuntu-22.04, ubuntu-20.04] # Lets try to keep testing an LTS python and latest python - python-version: ['3.7', '3.12'] + python-version: ['3.7', '3.12', '3.13'] runs-on: ${{ matrix.os }} name: Ubuntu ${{ matrix.os }} with Python ${{ matrix.python-version }} @@ -106,7 +106,7 @@ jobs: strategy: matrix: # Lets try to keep testing an LTS python and latest python - python-version: ['3.7', '3.12'] + python-version: ['3.7', '3.12', '3.13'] name: Windows with Python ${{ matrix.python-version }} steps: diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4468cbc00..0797c2ebe 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -32,6 +32,7 @@ jobs: # env: # CIBW_SOME_OPTION: value - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: pyrdp-wheel-${{ matrix.os }} path: ./wheelhouse/*.whl diff --git a/pyproject.toml b/pyproject.toml index d59ef01b3..c0be36e81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Communications", "Topic :: Security", "Topic :: Software Development :: Libraries", @@ -54,7 +55,7 @@ dependencies = [ [project.optional-dependencies] full = [ 'wheel>=0.34.2', - 'av>=8,<12', + 'av>=8,<15', 'PySide6>=6.3,<7', 'qimage2ndarray>=1.6,<2', 'py-notifier>=0.5.0', diff --git a/pyrdp/mitm/DeviceRedirectionMITM.py b/pyrdp/mitm/DeviceRedirectionMITM.py index b481d05bb..30f1bc5f4 100644 --- a/pyrdp/mitm/DeviceRedirectionMITM.py +++ b/pyrdp/mitm/DeviceRedirectionMITM.py @@ -312,7 +312,7 @@ def sendForgedFileRead(self, deviceID: int, path: str) -> int: return completionID def sendForgedDirectoryListing(self, deviceID: int, path: str) -> int: - """ + r""" Send a forged directory listing request. Returns a request ID that can be used by the caller to keep track of which file belongs to which directory. Results are sent by using the DeviceRedirectionMITMObserver interface. :param deviceID: ID of the target device. diff --git a/pyrdp/mitm/FileMapping.py b/pyrdp/mitm/FileMapping.py index b932ce599..72055a01e 100644 --- a/pyrdp/mitm/FileMapping.py +++ b/pyrdp/mitm/FileMapping.py @@ -7,9 +7,9 @@ import hashlib import os import tempfile +import typing from logging import LoggerAdapter from pathlib import Path -from typing import io class FileMapping: @@ -18,7 +18,7 @@ class FileMapping: transferred over RDP. """ - def __init__(self, file: io.BinaryIO, dataPath: Path, filesystemPath: Path, filesystemDir: Path, log: LoggerAdapter): + def __init__(self, file: typing.BinaryIO, dataPath: Path, filesystemPath: Path, filesystemDir: Path, log: LoggerAdapter): """ :param file: the file handle for dataPath :param dataPath: path where the file is actually saved diff --git a/pyrdp/ui/qt.py b/pyrdp/ui/qt.py index 9fab5e099..1dd9ff5c3 100644 --- a/pyrdp/ui/qt.py +++ b/pyrdp/ui/qt.py @@ -49,7 +49,7 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed: """ image = None buf = None - + if bitsPerPixel == 15: if isCompressed: buf = rle.bitmap_decompress(data, width, height, 2) @@ -57,7 +57,7 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed: else: buf = data image = QImage(buf, width, height, QImage.Format_RGB555).transformed(QTransform(1.0, 0.0, 0.0, -1.0, 0.0, 0.0)) - + elif bitsPerPixel == 16: if isCompressed: buf = rle.bitmap_decompress(data, width, height, 2) @@ -65,7 +65,7 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed: else: buf = data image = QImage(buf, width, height, QImage.Format_RGB16).transformed(QTransform(1.0, 0.0, 0.0, -1.0, 0.0, 0.0)) - + elif bitsPerPixel == 24: if isCompressed: buf = rle.bitmap_decompress(data, width, height, 3) @@ -83,7 +83,7 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed: else: buf = data image = QImage(buf, width, height, QImage.Format_RGB888).transformed(QTransform(1.0, 0.0, 0.0, -1.0, 0.0, 0.0)) - + elif bitsPerPixel == 32: if isCompressed: buf = rle.bitmap_decompress(data, width, height, 4) @@ -106,7 +106,7 @@ def RDPBitmapToQtImage(width: int, height: int, bitsPerPixel: int, isCompressed: def convert8bppTo16bpp(buf: bytes): - """ + r""" WARNING: The actual 8bpp images work by using a color palette, which this method does not use. This method instead tries to transform indices into colors. This results in a weird looking image, but it can still be useful to see whats happening ¯\_(ツ)_/¯