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

Handling getdefaultlocale() deprecation warnings #754

Merged
merged 4 commits into from
Aug 20, 2023

Conversation

caronc
Copy link
Owner

@caronc caronc commented Nov 12, 2022

Description:

Related issue (if applicable): #659

Deprecation warnings of the locale handling in Apprise taken care of. Some backwards compatibility carried forward allowing users to set the LC_ALL, LC_TYPE LANG, and LANGUAGE environment variables (in that order) to over-ride default settings.

This change will allow Apprise Locale to function correctly after Python v3.13 and eliminate deprecation warnings that show on Python v3.11+

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@659-locale-deprecation-handling

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" "schema://"

# No Deprecation warnings will now be displayed on versions of Apprise running Python v3.11 or newer. 

@caronc caronc force-pushed the 659-locale-deprecation-handling branch from 813382f to 1b1d116 Compare August 20, 2023 03:33
@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2023

Codecov Report

Patch coverage: 90.47% and project coverage change: -0.02% ⚠️

Comparison is base (e46f8fe) 99.52% compared to head (e76598f) 99.51%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #754      +/-   ##
==========================================
- Coverage   99.52%   99.51%   -0.02%     
==========================================
  Files         123      123              
  Lines       16328    16345      +17     
  Branches     3327     3329       +2     
==========================================
+ Hits        16251    16266      +15     
- Misses         68       70       +2     
  Partials        9        9              
Files Changed Coverage Δ
apprise/utils.py 99.59% <66.66%> (-0.41%) ⬇️
apprise/AppriseLocale.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caronc caronc force-pushed the 659-locale-deprecation-handling branch 2 times, most recently from 99a2013 to 55ed5e5 Compare August 20, 2023 04:09
@caronc caronc force-pushed the 659-locale-deprecation-handling branch from 55ed5e5 to e76598f Compare August 20, 2023 04:14
@caronc caronc merged commit 5fd568f into master Aug 20, 2023
12 checks passed
@caronc caronc deleted the 659-locale-deprecation-handling branch August 20, 2023 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants