Repository navigation
Raise the errors that were logged, merge MissingEntityException into NonExistentEntityError - #1226
Merged
Merged
Conversation
#453, as decided on 2026-11-15: - References.add() raises a ValueError for a claim with qualifiers or references, which it used to drop with a warning in the log. - Login and Clientlogin raise a TypeError for an unsupported keyword argument, which they used to ignore with a warning in the log. - Claim.ref_present() no longer warns for a normal case of MERGE_REFS_OR_APPEND. - write() no longer logs the exception it raises. - A missing entity, revision or MediaInfo title raises NonExistentEntityError (codes missing, nosuchrevid, missingtitle). MissingEntityException is a deprecated name of it, removed in 1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #453, with your answers: the four logged cases change, and
MissingEntityExceptionmerges intoNonExistentEntityError. The first item of the issue (theassertchecks) was done in #1213.Logged instead of raised
References.add()with a claim that has qualifiers or referencesValueError, nothing addedLogin/Clientloginwith a keyword argument other thanheaders,proxies,timeout,verifyTypeError, before any requestClaim.ref_present(), used byMERGE_REFS_OR_APPEND, for a new claim with 0 or 2+ referencesUserWarningwrite()when the API call failsMissingEntityExceptionmerged intoNonExistentEntityErrorA deleted entity, a revision that doesn't exist and a MediaInfo title that isn't found now raise
NonExistentEntityError, like an unknown id already did. Thecodetells them apart:codeno-such-entitymissingtitleget(),delete(),generate_entity_instances())missingget(revision=))nosuchrevidresponseis set where there's an API response.Deprecation:
MissingEntityExceptionis now another name ofNonExistentEntityError, served by a module__getattr__with aDeprecationWarning, likewbi_helpers.BColors. It goes in 1.0.except MissingEntityExceptionkeeps working, and also catches the unknown ids.except MWApiErrornow catches the missing entities too, sinceNonExistentEntityErroris anMWApiError. That's listed inupgrading.md.After the merge, I'll add
MissingEntityExceptionto the 1.0 removal table of #1192.Docs
upgrading.md: five entries in "Breaking changes in v0.15", and one in "Deprecated in v0.15, removed in 1.0".MissingEntityExceptionis no longer listed. TheNonExistentEntityErrordocstring lists the codes.Tests
References.add()is parametrized over qualifiers, references and both.MERGE_REFS_OR_APPENDtest turns warnings into errors.write()error test checks that nothing is logged.MissingEntityExceptiontests now expectNonExistentEntityErrorand check itscode. This includes the integration tests.wbi_exceptions.-W error::DeprecationWarning.🤖 Generated with Claude Code