Skip to content

Commit

Permalink
Merge branch 'master' into wip-NXDRIVE-2980-implement-github-runner-f…
Browse files Browse the repository at this point in the history
…or-macos-intel-based-architecture
  • Loading branch information
mr-shekhar authored Dec 5, 2024
2 parents 8d44df9 + 8afe9d6 commit 507b676
Show file tree
Hide file tree
Showing 37 changed files with 85 additions and 45 deletions.
8 changes: 8 additions & 0 deletions docs/changes/5.5.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Release date: `2024-xx-xx`
- [NXDRIVE-2971](https://jira.nuxeo.com/browse/NXDRIVE-2971): Fix security issue: pyca/cryptography has a vulnerable OpenSSL included in cryptography wheels
- [NXDRIVE-2954](https://jira.nuxeo.com/browse/NXDRIVE-2954): [Mac] Certificate needs to be renewed
- [NXDRIVE-2980](https://jira.nuxeo.com/browse/NXDRIVE-2980): Implement GitHub runner for macos intel based architecture
- [NXDRIVE-2976](https://hyland.atlassian.net/browse/NXDRIVE-2976): Fix security issue: Black vulnerable to Regular Expression Denial of Service (ReDoS)

## Tests

Expand All @@ -42,19 +43,25 @@ Release date: `2024-xx-xx`
## Minor Changes

- Upgraded `altgraph` from 0.17 to 0.17.4
- Upgraded `attrs` from 23.2.0 to 24.2.0
- Upgraded `authlib` from 1.3.0 to 1.3.1
- Upgraded `black` from 23.12.1 to 24.10.0
- Upgraded `boto3` from 1.34.17 to 1.35.21
- Upgraded `botocore` from 1.34.17 to 1.35.21
- Upgraded `build` from 1.2.1 to 1.2.2
- Upgraded `cachetools` from 5.3.3 to 5.5.0
- Upgraded `certifi` from 2023.7.22 to 2024.7.4
- Upgraded `cryptography` from 42.0.5 to 43.0.1
- Upgraded `docutils` from 0.20.1 to 0.21.2
- Upgraded `execnet` from 2.0.2 to 2.1.1
- Upgraded `faker` from 22.0.0 to 29.0.0
- Upgraded `filelock` from 3.14.0 to 3.16.1
- Upgraded `flake8` from 6.1.0 to 7.1.1
- Upgraded `future` from 0.18.3 to 1.0.0
- Upgraded `macholib` from 1.14 to 1.16.3
- Upgraded `more-itertools` from 10.2.0 to 10.5.0
- Upgraded `mypy` from 1.10.0 to 1.11.2
- Upgraded `nodeenv` from 1.8.0 to 1.9.1
- Upgraded `types-python-dateutil` from 2.8.19.20240106 to 2.9.0.20240906
- Upgraded `typing-extensions` from 4.9.0 to 4.12.2
- Upgraded `pefile` from 2023.2.7 to 2024.8.26
Expand All @@ -72,6 +79,7 @@ Release date: `2024-xx-xx`
- Upgraded `pyobjc-framework-systemconfiguration` from 10.1 to 10.3.1
- Upgraded `pytest-benchmark` from 3.4.1 to 4.0.0
- Upgraded `python-dateutil` from 2.8.2 to 2.9.0.post0
- Upgraded `pytest-xdist` from 3.5.0 to 3.6.1
- Upgraded `responses` from 0.24.1 to 0.25.3
- Upgraded `requests` from 2.31.0 to 2.32.3
- Upgraded `send2trash` from 1.7.1 to 1.8.3
Expand Down
1 change: 1 addition & 0 deletions nxdrive/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
In this file we cannot use a relative import here, else Drive will not start when packaged.
See https://github.com/pyinstaller/pyinstaller/issues/2560
"""

import locale
import platform
import signal
Expand Down
1 change: 1 addition & 0 deletions nxdrive/behavior.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Allow or disallow server deletions.
"""

from types import SimpleNamespace

Behavior = SimpleNamespace(server_deletion=True)
1 change: 1 addition & 0 deletions nxdrive/client/local/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" API to access local resources for synchronization. """

from .base import FileInfo, get

# Get the local client related to the current OS
Expand Down
1 change: 1 addition & 0 deletions nxdrive/client/uploader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Uploader used by the Remote client for all upload stuff.
"""

import json
from abc import abstractmethod
from logging import getLogger
Expand Down
1 change: 1 addition & 0 deletions nxdrive/client/uploader/direct_transfer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Uploader used by the Direct Transfer feature.
"""

import json
from logging import getLogger
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions nxdrive/client/uploader/sync.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Uploader used by the synchronization engine.
"""

from pathlib import Path
from typing import Any, Dict, Optional

Expand Down
1 change: 1 addition & 0 deletions nxdrive/dao/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Query formatting in this file is based on http://www.sqlstyle.guide/
"""

import sys
from contextlib import suppress
from logging import getLogger
Expand Down
1 change: 1 addition & 0 deletions nxdrive/dao/engine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Query formatting in this file is based on http://www.sqlstyle.guide/
"""

import json
import os
import shutil
Expand Down
1 change: 1 addition & 0 deletions nxdrive/dao/manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Query formatting in this file is based on http://www.sqlstyle.guide/
"""

from logging import getLogger
from pathlib import Path
from sqlite3 import Cursor, IntegrityError, Row
Expand Down
4 changes: 1 addition & 3 deletions nxdrive/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,7 @@ def resume_transfer(
meth = (
self.dao.get_download
if nature == "download"
else self.dao.get_dt_upload
if is_direct_transfer
else self.dao.get_upload
else self.dao.get_dt_upload if is_direct_transfer else self.dao.get_upload
)
func = partial(meth, uid=uid) # type: ignore
self._resume_transfers(nature, func, is_direct_transfer=is_direct_transfer)
Expand Down
1 change: 1 addition & 0 deletions nxdrive/fatal_error.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Fatal error screen management using either Qt or OS-specific dialogs.
"""

import sys
from contextlib import suppress
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions nxdrive/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Enable or disable the synchronization features.
"""

from types import SimpleNamespace
from typing import List

Expand Down
1 change: 1 addition & 0 deletions nxdrive/gui/application.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Main Qt application handling OS events and system tray UI. """

import os
import webbrowser
from contextlib import suppress
Expand Down
1 change: 1 addition & 0 deletions nxdrive/osi/darwin/pyNotificationCenter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Python integration macOS notification center. """

from typing import TYPE_CHECKING, Dict

from CoreServices import (
Expand Down
1 change: 1 addition & 0 deletions nxdrive/qt/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Put here all PyQt constants used across the project.
"""

from .imports import (
QAbstractSocket,
QDialogButtonBox,
Expand Down
1 change: 1 addition & 0 deletions nxdrive/qt/imports.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Put here all PyQt imports used across the project.
"""

from PyQt5.QtCore import (
QT_VERSION_STR,
QAbstractListModel,
Expand Down
1 change: 1 addition & 0 deletions nxdrive/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
This state is set at the start of the application to know if it has crashed at the previous run.
"""

from types import SimpleNamespace

State = SimpleNamespace(about_to_quit=False, crash_details="", has_crashed=False)
1 change: 1 addition & 0 deletions nxdrive/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Most of functions are pure enough to be decorated with a LRU cache.
Each *maxsize* is adjusted depending of the heavy use of the decorated function.
"""

import os
import os.path
import re
Expand Down
1 change: 1 addition & 0 deletions tests/benchmarks/test_safe_filename.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
If is not the most efficient for small ASCII-only filenames,
but it is the best when there are non-ASCII characters.
"""

import pytest

FILENAMES = [
Expand Down
1 change: 1 addition & 0 deletions tests/cleanup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Cleanup old test users and workspaces."""

import env
from nuxeo.client import Nuxeo

Expand Down
4 changes: 3 additions & 1 deletion tests/integration/windows/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def test_argument_log_filename(exe, tmp, file):
assert log.is_file()


@pytest.mark.parametrize("folder", ["azerty", "$alice", "léa", "mi Kaël", "こん ツリ ^^"])
@pytest.mark.parametrize(
"folder", ["azerty", "$alice", "léa", "mi Kaël", "こん ツリ ^^"]
)
def test_argument_nxdrive_home(exe, tmp, folder):
path = tmp()
path.mkdir(parents=True, exist_ok=True)
Expand Down
1 change: 1 addition & 0 deletions tests/markers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Collection of pytest markers to ease test filtering."""

import os

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/old_functional/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Common test utilities. """

import os
import sys
import tempfile
Expand Down
1 change: 1 addition & 0 deletions tests/old_functional/test_behavior.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test application Behavior.
"""

from nxdrive.behavior import Behavior

from .. import ensure_no_exception
Expand Down
1 change: 1 addition & 0 deletions tests/old_functional/test_direct_transfer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test the Direct Transfer feature in different scenarii.
"""

import logging
import re
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/old_functional/test_local_changes_when_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test if changes made to local file system when Drive is offline sync's back
later when Drive becomes online.
"""

import pytest

from nxdrive.constants import WINDOWS
Expand Down
1 change: 1 addition & 0 deletions tests/old_functional/test_local_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
See NXDRIVE-742.
"""

import hashlib
import os
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/old_functional/test_synchronization_dedup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test behaviors when the server allows duplicates and not the client.
"""

from pathlib import Path

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/old_functional/test_transfer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test pause/resume transfers in different scenarii.
"""

import re
from unittest.mock import patch

Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_autolock.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test the Auto-Lock feature used heavily by Direct Edit.
"""

from pathlib import Path
from typing import List, Tuple
from unittest.mock import Mock, patch
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_pytest_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Tests for pytests_random: a pytest plugin to mitigate random failures.
Adapted from github.com/pytest-dev/pytest-rerunfailures
"""

import pytest

pytest_plugins = "pytester"
Expand Down
1 change: 1 addition & 0 deletions tools/cleanup_application_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Remove files from the package that are not needed and too big.
This script can be launched after PyInstaller and before installers creation.
"""

import os
import shutil
import sys
Expand Down
6 changes: 3 additions & 3 deletions tools/deps/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ future==1.0.0; sys_platform == "win32" \
--hash=sha256:929292d34f5872e70396626ef385ec22355a1fae8ad29e1a734c3e43f9fbc216 \
--hash=sha256:bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05
# via pefile
macholib==1.14 ; sys_platform == "darwin" \
--hash=sha256:c500f02867515e6c60a27875b408920d18332ddf96b4035ef03beddd782d4281 \
--hash=sha256:0c436bc847e7b1d9bda0560351bf76d7caf930fb585a828d13608839ef42c432
macholib==1.16.3 ; sys_platform == "darwin" \
--hash=sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30 \
--hash=sha256:0e315d7583d38b8c77e815b1ecbdbf504a8258d8b3e17b61165c6feb60d18f2c
# via pyinstaller
pefile==2024.8.26 ; sys_platform == "win32" \
--hash=sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632 \
Expand Down
Loading

0 comments on commit 507b676

Please sign in to comment.