Skip to content

Add mypy type checking for Python 3.14 and fix deprecation warning #1470

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

Merged
merged 1 commit into from
Jul 27, 2025

Conversation

tleonhardt
Copy link
Member

Add mypy type checking for Python 3.14 and use open() instead of codecs.open() due to deprecation in 3.14.

The first release candidate for Python 3.14 was released on 2025-07-22 and I did some local testing.

The first thing I realized is that mypy now works well with 3.14 and so we should add type checking on that platform to our GitLab Actions.

The second thing I noticed is that when we ran tests with pytests, we were getting a bunch of warnings due to codecs.open() being deprecated. Since at least Python 3.6 there has been no need for that as open() does everything it can do plus more.

…cs.open() due to deprecation in 3.14

The first release candidate for Python 3.14 was released on 2025-07-22 and I did some local testing.

The first thing I realized is that mypy now works well with 3.14 and so we should add type checking on that platform to our GitLab Actions.

The second thing I noticed is that when we ran tests with pytests, we were getting a bunch of warnings due to `codecs.open()` being deprecated.  Since at least Python 3.6 there has been no need for that as `open()` does everything it can do plus more.
@tleonhardt tleonhardt requested a review from kmvanbrunt as a code owner July 24, 2025 22:57
@tleonhardt tleonhardt self-assigned this Jul 24, 2025
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.41%. Comparing base (37c03c5) to head (f0c4a95).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1470      +/-   ##
==========================================
- Coverage   98.41%   98.41%   -0.01%     
==========================================
  Files          21       21              
  Lines        5869     5868       -1     
==========================================
- Hits         5776     5775       -1     
  Misses         93       93              
Flag Coverage Δ
unittests 98.41% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@tleonhardt tleonhardt merged commit 4f3ee8d into main Jul 27, 2025
34 checks passed
@tleonhardt tleonhardt deleted the python314 branch July 27, 2025 22:41
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