Skip to content

CVF-9875: Drop pysynthetic/PyContracts for Python 3.10+ support#1

Draft
heindsight wants to merge 1 commit into
sohonetfrom
CVF-9875
Draft

CVF-9875: Drop pysynthetic/PyContracts for Python 3.10+ support#1
heindsight wants to merge 1 commit into
sohonetfrom
CVF-9875

Conversation

@heindsight

Copy link
Copy Markdown

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) and inspect.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 the xo class with a plain, settable instance attribute (self.timeout = 10 in __init__) and drops pysynthetic from install_requires. Behaviour is preserved — timeout is still a read/write attribute (consumers like cvf-streamer-builder set .timeout = 300 via attribute assignment); only the int runtime-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.)

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.
@heindsight heindsight changed the base branch from master to sohonet June 11, 2026 18:59
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.

1 participant