Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fix python 3.12 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Dec 30, 2023
1 parent 144bdbc commit 78cbee5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"editor.formatOnSave": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll.ruff": false,
"source.organizeImports.ruff": true
"source.fixAll.ruff": "never",
"source.organizeImports.ruff": "explicit"
}
}
}
14 changes: 9 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dev = [
"sphinx-autobuild",
"sphinx-copybutton",
"sphinx-design",
"sphinx_rtd_theme_github_versions",
"tox-direct",
"types-mock",
"mock",
Expand Down Expand Up @@ -72,11 +73,14 @@ addopts = """
"""
# https://iscinumpy.gitlab.io/post/bound-version-constraints/#watch-for-warnings
filterwarnings = [
"error",
"ignore:.*socket.*:ResourceWarning",
# this deprecation is rather serious for gphotos-sync as it relies on sqlite
# doing date conversion quite heavily - will ignore the deprection for now
"ignore:sqlite3:DeprecationWarning: The default datetime adapter.*"
"error",
"ignore:.*socket.*:ResourceWarning",
# this deprecation is rather serious for gphotos-sync as it relies on sqlite
# doing date conversion quite heavily - will ignore the deprection for now
# DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12;
"ignore:.*sqlite3.*:DeprecationWarning:",
# like the above
"ignore:.*datetime.utcfromtimestamp:DeprecationWarning:"
]
# Doctest python code in docs, python code in src docstrings, test functions in tests
testpaths = "docs src tests"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_credentials/.gphotos.token
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"access_token": "ya29.a0AfB_byD9Qzo5Ah_YIJRQnbotK4OLKXCgQTIcolrABnIG3I9MEPB9FHGjLSpGUmenochN7WVHHafKwv0gFNNCgDp05Icth4mC3uCOnP5gs1rTNbZB6dYLoBENsjKjnoylT4_iwaLgbl6rwcij5xVmWg0NUlfcVhE1CRdkmXUaCgYKAZ8SARMSFQHGX2MiuUH3W4-Y-jyn-N9e1y6u4Q0174", "expires_in": 3599, "scope": ["https://www.googleapis.com/auth/photoslibrary.sharing", "https://www.googleapis.com/auth/photoslibrary.readonly"], "token_type": "Bearer", "expires_at": 1702828943.8575091, "refresh_token": "1//03CEqAzsnP-8PCgYIARAAGAMSNwF-L9Irz4_ilhRw0HIwVImT4gTCUPlV8YaCTYQiIjD4juWOI5eQh_-Rzh9nTmBND0jliOnabq4"}
{"access_token": "ya29.a0AfB_byAAnSEyVYmlxFIXG7A7lH8jkrSrd4RSnunI4rYyHfzdG-ZjSQiFxo5-OHV5rBgEnHoFMKK1Rj5PKxLCXVCEr-0yMiJs61wCCfzg36-UWQegZTV3kBotQH_Qk7HTkZcphp11fW5lbc3POClog-aOCfJLIbOe2UfA63MaCgYKAZsSARMSFQHGX2Mi3joogOa2oHnOerg_ojwUQg0174", "expires_in": 3599, "scope": ["https://www.googleapis.com/auth/photoslibrary.sharing", "https://www.googleapis.com/auth/photoslibrary.readonly"], "token_type": "Bearer", "expires_at": 1703971275.0828457, "refresh_token": "1//03CEqAzsnP-8PCgYIARAAGAMSNwF-L9Irz4_ilhRw0HIwVImT4gTCUPlV8YaCTYQiIjD4juWOI5eQh_-Rzh9nTmBND0jliOnabq4"}
1 change: 0 additions & 1 deletion tests/test_system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ def test_skip_video_on_album(self):

@patch.object(GooglePhotosDownload, "do_download_file")
def test_bad_ids(self, do_download_file):

do_download_file.side_effect = HTTPError(Mock(status=500), "ouch!")
with ts.SetupDbAndCredentials() as s:
args = [
Expand Down
1 change: 0 additions & 1 deletion tests/test_units/test_local_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

class TestLocalScan(TestCase):
def test_local_duplicate_names(self):

ps = "PIC00002 (2).jpg"
p = Path(test_data) / Path(ps)

Expand Down

0 comments on commit 78cbee5

Please sign in to comment.