CVF-9875: Drop pysynthetic/PyContracts for Python 3.10+ support#1
Draft
heindsight wants to merge 1 commit into
Draft
CVF-9875: Drop pysynthetic/PyContracts for Python 3.10+ support#1heindsight wants to merge 1 commit into
heindsight wants to merge 1 commit into
Conversation
PyContracts 1.8.12 (pulled transitively via pysynthetic) is abandoned and
breaks on Python >=3.10 (uses collections.Container, removed in 3.10) and
>=3.11 (inspect.ArgSpec). Replace the single @synthesize_property('timeout')
with a plain, settable instance attribute (default 10) so consumers can run
on Python 3.10+ with spr-client-lib 1.0.0. Behaviour preserved: callers set
.timeout (e.g. cvf-streamer-builder sets 300) via attribute assignment.
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.
PyContracts 1.8.12 (pulled in transitively via pysynthetic) is abandoned and is incompatible with modern Python: it uses
collections.Container(removed in 3.10) andinspect.ArgSpec(removed in 3.11). That blocks any consumer from running on Python >=3.10.This replaces the lone
@synthesize_property('timeout', contract=int, default=10)on thexoclass with a plain, settable instance attribute (self.timeout = 10in__init__) and dropspysyntheticfrominstall_requires. Behaviour is preserved —timeoutis still a read/write attribute (consumers like cvf-streamer-builder set.timeout = 300via attribute assignment); only theintruntime-contract check is dropped (no functional impact). Bumped to 0.3.0.Verified
import xolib+ the timeout default/override on Python 3.10. Required so cvf-streamer-builder (CVF-9875) can move to spr-client-lib 1.0.0 on Python 3.10. (Includes the v0.2.4 websocket-client unpinning, not previously merged to master.)