-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit resolves #13 by validating that arbitrary objects passed to the `KeyPool.release()` method have been previously returned from the `KeyPool.acquire()` method. Specifically, this commit adds a new private exception class `beartype.roar._BeartypeUtilKeyPoolException`, raises an instance of that exception in the `KeyPool.release()` method when the passed object was *not* previously returned from the `KeyPool.acquire()` method, and tests this to now be the case. Thanks to @Heliotrop3, the formidable code assassin, for their unswerving dedication to the cause of bear justice. ## Issues Resolved * **`KeyPool` release validation.** This commit resolves issue #13 by validating that objects passed to the `release()` method of the private `beartype._util.cache.pool.utilcachepool.KeyPool` class have been previously returned from the `acquire()` method of that class. (*Unceasing siezures!*)
- Loading branch information
1 parent
384d36c
commit a6159b9
Showing
3 changed files
with
58 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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