Skip to content

Add DeprecatedDict mapping#243

Merged
fred3m merged 1 commit into
mainfrom
tickets/DM-55109
Jul 8, 2026
Merged

Add DeprecatedDict mapping#243
fred3m merged 1 commit into
mainfrom
tickets/DM-55109

Conversation

@fred3m

@fred3m fred3m commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

DeprecatedDict is a dict that warns the first time a deprecated key is read or written through targeted single-key access, while leaving bulk operations (copy, iterate, serialize, merge) silent. It eases migrating a field out of a mapping and onto a typed attribute while keeping the old key readable during a deprecation period.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.20635% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.73%. Comparing base (e52f197) to head (df66058).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/utils/deprecated.py 98.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
+ Coverage   94.59%   94.73%   +0.14%     
==========================================
  Files          51       51              
  Lines        3883     4007     +124     
==========================================
+ Hits         3673     3796     +123     
- Misses        210      211       +1     

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

Comment thread python/lsst/utils/deprecated.py Outdated
Comment thread python/lsst/utils/deprecated.py Outdated
Comment thread python/lsst/utils/deprecated.py Outdated
Comment thread python/lsst/utils/deprecated.py Outdated
Comment thread python/lsst/utils/deprecated.py Outdated
Comment thread python/lsst/utils/deprecated.py Outdated
Comment thread tests/test_deprecated.py Outdated
Comment thread tests/test_deprecated.py
DeprecatedDict is a dict that warns the first time a deprecated key is
read or written through targeted single-key access, while leaving bulk
operations (copy, iterate, serialize, merge) silent. It eases migrating a
field out of a mapping and onto a typed attribute while keeping the old
key readable during a deprecation period.
@fred3m
fred3m force-pushed the tickets/DM-55109 branch from 474a552 to df66058 Compare July 8, 2026 14:56
@fred3m
fred3m merged commit dc8415d into main Jul 8, 2026
23 checks passed
@fred3m
fred3m deleted the tickets/DM-55109 branch July 8, 2026 19:19
@timj

timj commented Jul 8, 2026

Copy link
Copy Markdown
Member

@fred3m I'm confused as to how you deleted the PR template for this repo that was asking you to make sure you had included a news fragment for the release notes...

@fred3m

fred3m commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, I didn't think that this was a release notes worthy addition.

@timj

timj commented Jul 8, 2026

Copy link
Copy Markdown
Member

For utils a whole new API is definitely release notes worthy 😄

@timj

timj commented Jul 8, 2026

Copy link
Copy Markdown
Member

I'll try to remember to add a note about it next week when I make the v30 release.

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.

3 participants