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

Fix the way obsolete messages are stored #1132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Sep 23, 2024

Closes #1124

Previously, the Catalog.obsolete dictionary would use the msgid as a key to store messages.
When there are two messages with the same id but a different context, the latter one overwrites the former.

The fix is to use Catalog._get_key as the key, same as for _messages.

This might be considered a breaking change, however the only documentation for Catalog.obsolete is this:
image

The docs never say anything about how the keys are computed, so I think it should be safe to make this change (and perhaps document it too?)

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.26%. Comparing base (f91754b) to head (835ba63).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1132   +/-   ##
=======================================
  Coverage   91.26%   91.26%           
=======================================
  Files          27       27           
  Lines        4602     4602           
=======================================
  Hits         4200     4200           
  Misses        402      402           
Flag Coverage Δ
macos-12-3.10 90.06% <100.00%> (ø)
macos-12-3.11 90.00% <100.00%> (ø)
macos-12-3.12 90.17% <100.00%> (ø)
macos-12-3.13-dev 89.70% <100.00%> (ø)
macos-12-3.8 89.99% <100.00%> (ø)
macos-12-3.9 89.99% <100.00%> (ø)
macos-12-pypy3.10 90.06% <100.00%> (ø)
ubuntu-22.04-3.10 90.09% <100.00%> (ø)
ubuntu-22.04-3.11 90.02% <100.00%> (ø)
ubuntu-22.04-3.12 90.19% <100.00%> (ø)
ubuntu-22.04-3.13-dev 89.72% <100.00%> (ø)
ubuntu-22.04-3.8 90.01% <100.00%> (ø)
ubuntu-22.04-3.9 90.01% <100.00%> (ø)
ubuntu-22.04-pypy3.10 90.09% <100.00%> (ø)
windows-2022-3.10 90.21% <100.00%> (ø)
windows-2022-3.11 90.14% <100.00%> (ø)
windows-2022-3.12 90.31% <100.00%> (ø)
windows-2022-3.13-dev 89.84% <100.00%> (ø)
windows-2022-3.8 90.13% <100.00%> (ø)
windows-2022-3.9 90.13% <100.00%> (ø)
windows-2022-pypy3.10 90.21% <100.00%> (ø)

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.

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.

Obsoletes with same ID from different contexts get removed on update
1 participant