Skip to content
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

Default locale logical compatibility with Python 3.12 #1054

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
python-version: "3.10"
- os: "ubuntu-latest"
python-version: "3.11"
- os: "ubuntu-latest"
python-version: "3.12"

defaults:
run:
Expand Down Expand Up @@ -117,6 +119,7 @@ jobs:
# and run project-specific tasks.
- name: Setup project
run: |
python -m pip install --upgrade pip setuptools wheel
pip install --editable=.
python setup.py compile_catalog

Expand Down
3 changes: 3 additions & 0 deletions apprise/AppriseLocale.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ def detect_language(lang=None, detect_fallback=True):
try:
# Acquire our locale
lang = locale.getlocale()[0]
# Compatibility for Python >= 3.12
if lang == 'C':
lang = AppriseLocale._default_language

except (ValueError, TypeError) as e:
# This occurs when an invalid locale was parsed from the
Expand Down