Skip to content

perf(imports): defer config and error imports on Python 3.15 - #634

Merged
HosseinNejatiJavaremi merged 8 commits into
SyntaxArc:masterfrom
heysaeid:feat/lazy-imports-followup
Nov 22, 2026
Merged

HosseinNejatiJavaremi merged 8 commits into
SyntaxArc:masterfrom
heysaeid:feat/lazy-imports-followup

Conversation

@heysaeid

Copy link
Copy Markdown
Contributor

Summary

  • Defer config and error imports on Python 3.15 while keeping imports eager on 3.14.
  • Preserve registered settings providers and remove the gRPC SDK dependency from error classes.
  • Use locked dependency sync in checkout and merge hooks.

Testing

49 of 63 Behave features passed on both Python 3.14 and 3.15, with 2,743 scenarios passing per version. Lint and package builds passed. The remaining 14 integration features are pending CI because the pinned Keycloak, Temporal, and StarRocks images timed out locally.

Saeid Noormohammadi added 6 commits November 22, 2026 12:30
Keep Python 3.14 eager while config, helper and adapter imports stop initializing unrelated transports. Defer error modules, global settings and the telemetry config template until first use, and cover the behavior with fresh-interpreter scenarios.
Store the stable protocol status integers directly so importing an error never loads the optional grpc package. Add fresh-interpreter checks with grpc blocked and verify every existing status value.
Tests and ty resolve against uv.lock; document the sync step and the version-mismatch failure it prevents.
A first-use import can register the BaseConfig fallback after an explicit provider is already active. Keep the explicit provider so error localization does not change with import timing.
Run locked sync after checkout and merge, including when pre-commit supplies no files. Report stale lockfiles instead of rewriting them.
@github-actions github-actions Bot added documentation Improvements or additions to documentation area:keycloak keycloak adapter package area:redis redis adapter package area:scylladb scylladb adapter package area:temporal temporal adapter package area:parsian-ipg Parsian IPG adapter package area:saman-ipg Saman IPG adapter package area:email Email adapter area:models Models, DTOs, errors area:configs Configuration layer area:helpers Utils, decorators, interceptors area:testing BDD tests and test containers labels Nov 22, 2026
@HosseinNejatiJavaremi
HosseinNejatiJavaremi merged commit 2a50f0d into SyntaxArc:master Nov 22, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:configs Configuration layer area:email Email adapter area:helpers Utils, decorators, interceptors area:keycloak keycloak adapter package area:models Models, DTOs, errors area:parsian-ipg Parsian IPG adapter package area:redis redis adapter package area:saman-ipg Saman IPG adapter package area:scylladb scylladb adapter package area:temporal temporal adapter package area:testing BDD tests and test containers documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants