-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test dt adapter #5524
Open
gitofanindya
wants to merge
37
commits into
wip-NXDRIVE-2929-upgrade-python-from-3.9.5-to-3.12.3
Choose a base branch
from
test_dt_adapter
base: wip-NXDRIVE-2929-upgrade-python-from-3.9.5-to-3.12.3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Test dt adapter #5524
Changes from 22 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
c75e217
Bump platformdirs from 4.2.2 to 4.3.6 in /tools/deps (#5265)
dependabot[bot] 106e3a6
Bump watchdog from 3.0.0 to 5.0.2 in /tools/deps (#5221)
dependabot[bot] 405f6d9
Bump pyobjc-framework-cocoa from 10.1 to 10.3.1 in /tools/deps (#4988)
dependabot[bot] 094f4de
Bump pyobjc-framework-fsevents from 10.1 to 10.3.1 in /tools/deps (#4…
dependabot[bot] 9aa9228
NXDRIVE-2954: [Mac] Certificate needs to be renewed (#5347)
gitofanindya 4a40d03
Bump send2trash from 1.7.1 to 1.8.3 in /tools/deps (#4775)
dependabot[bot] c5b58eb
Bump requests from 2.31.0 to 2.32.3 in /tools/deps (#4942)
dependabot[bot] c0fac40
NXDRIVE-2925: Ignore zero-byte files (#5372)
gitofanindya 9805a47
Bump black from 23.12.1 to 24.10.0 in /tools/deps (#5386)
dependabot[bot] b4b5d33
NXDRIVE-2967: Upgrade the deprecated datetime adapter
gitofanindya d898aa3
Merge branch 'master' of https://github.com/nuxeo/nuxeo-drive into te…
gitofanindya ed3221c
updated test_utils
gitofanindya 3ebc1c6
downgrading requests
gitofanindya 36c10af
upgraded requests
gitofanindya 4200605
Update utils.py
gitofanindya 69d0baf
Update utils.py
gitofanindya dda1df2
Update utils.py
gitofanindya 16485de
Update utils.py
gitofanindya 569349a
Update test_options.py
gitofanindya 1b9c085
Update test_proxy.py
gitofanindya 997db2f
Update utils.py
gitofanindya 3461608
Update conftest.py
gitofanindya 59208b8
Update requirements.txt 1
gitofanindya ad685a0
Update requirements-tests.txt 1
gitofanindya 55e58fa
Update requirements.txt 2
gitofanindya d31181b
Update requirements-tox.txt 1
gitofanindya a19ab90
Update requirements-tests.txt 2
gitofanindya 92f345f
Update requirements-pip.txt 1
gitofanindya 4bdd34d
Update requirements-bench.txt 1
gitofanindya b32ba20
Update direct_edit.py
gitofanindya 3657983
Update direct_edit.py 2
gitofanindya 9800c7b
Update requirements-tox.txt 3
gitofanindya bebf0ba
Update requirements-tests.txt 3
gitofanindya 4f2536f
Update requirements-tests.txt 4
gitofanindya d2e136c
Update requirements-tox.txt 4
gitofanindya 9d0ba23
Update requirements-tox.txt 4
gitofanindya a289429
Update requirements.txt 4
gitofanindya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -36,15 +36,15 @@ def dump(database: Path, dump_file: Path, /) -> None: | |||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
log.info(f"Dumping the database {database!r} into {dump_file!r}...") | ||||||||||||||||||||||||||||||||||
with sqlite3.connect(str(database)) as con, dump_file.open( | ||||||||||||||||||||||||||||||||||
mode="w", encoding="utf-8" | ||||||||||||||||||||||||||||||||||
) as f: | ||||||||||||||||||||||||||||||||||
con = sqlite3.connect(str(database)) | ||||||||||||||||||||||||||||||||||
with dump_file.open(mode="w", encoding="utf-8") as f: | ||||||||||||||||||||||||||||||||||
for line in con.iterdump(): | ||||||||||||||||||||||||||||||||||
f.write(f"{line}\n") | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# Force write of file to disk | ||||||||||||||||||||||||||||||||||
f.flush() | ||||||||||||||||||||||||||||||||||
fsync(f.fileno()) | ||||||||||||||||||||||||||||||||||
con.close() | ||||||||||||||||||||||||||||||||||
Comment on lines
+39
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Use context manager pattern for database connection to ensure proper cleanup This ensures the connection is closed even if an exception occurs during the dump process.
Suggested change
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
log.info("Dump finished with success.") | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
""" Common test utilities. """ | ||
|
||
import os | ||
import sys | ||
import tempfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
See NXDRIVE-742. | ||
""" | ||
|
||
import hashlib | ||
import os | ||
from pathlib import Path | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: The strftime('%s') format specifier is not guaranteed to work on all platforms, particularly Windows