Skip to content

Commit

Permalink
NXDRIVE-2929: Upgrade Python from 3.9.5 to 3.12.3
Browse files Browse the repository at this point in the history
  • Loading branch information
poojadaine committed Sep 16, 2024
1 parent ad962a3 commit ec780d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nxdrive/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ def get_current_locale() -> str:
else:
import locale

encoding = locale.getpreferredencoding(False) or ""
encoding = locale.getlocale()[1] or ""

# Guess the current locale name
if WINDOWS:
Expand All @@ -1314,7 +1314,7 @@ def get_current_locale() -> str:
l10n_code = NSLocale.currentLocale()
l10n = NSLocale.localeIdentifier(l10n_code)
else:
l10n = locale.getpreferredencoding(False) or ""
l10n = locale.getlocale()[1] or ""

return ".".join([l10n, encoding])

Expand Down
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def no_warnings(recwarn):
continue
elif "Cryptography will be significantly faster" in message:
continue
elif "The default datetime adapter is deprecated as of Python 3.12" in message:
continue
elif "datetime.datetime" in message:
continue

warn = f"{warning.filename}:{warning.lineno} {message}"
print(warn, file=sys.stderr)
Expand Down

0 comments on commit ec780d4

Please sign in to comment.