Sync up to main attrs repository#3
Merged
gabbard merged 12 commits intogabbard:masterfrom Feb 14, 2019
Merged
Conversation
* Don't cache hash codes across deserialization. Because the hash code cache field gets serialized and deserialized by Pickle, previously when you deserialize a cache_hash=True attrs object, the hashcode will be the hashcode the object had at serialization-time. However, if your object had fields with hash codes which were not deterministic between interpreter runs, then on a new interpreter run your deserialized object would have a hash code which differs from a newly created identical object. This commit fixes that by clearing the cache on deserialization. It needs to override the __setstate__ method to do so, so this commit also forbids using a custom __setstate__ on a cache_hash=True object. Closes #482 . * Improve exception type * Minor tweaks to comments formatting * Fix test for Python 2.7 * Fix error in comment * Make nomenclature consistent for slotted/dict classes * Remove hasattr() * Improve comments and error message for custom __setstate__ + cache_hash=True * Drop use of for test classes for cache hash serialization * Make changelog note this is a breaking change * Make exception message point to tracking issue * Fix test classes for Python 2.7
message is deprecated.
* Clarify execution order in init Fixes #461 * Clarify attributes are processed in the order of declaration * Simple past is good enough
* Use isolated builds * try to upgrade all the things * Try to upgrade only setuptools
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.
No description provided.