Skip to content

[9.0] Follow DiracX client changes#8117

Merged
chaen merged 2 commits intoDIRACGrid:integrationfrom
chrisburr:diracx-client-fixes
Apr 4, 2025
Merged

[9.0] Follow DiracX client changes#8117
chaen merged 2 commits intoDIRACGrid:integrationfrom
chrisburr:diracx-client-fixes

Conversation

@chrisburr
Copy link
Copy Markdown
Member

Required for DIRACGrid/diracx#441

@chrisburr chrisburr force-pushed the diracx-client-fixes branch from 303a5e7 to 68f9862 Compare April 4, 2025 11:09

@contextmanager
def DiracXClient() -> _DiracClient:
def DiracXClient() -> Iterator[SyncDiracClient]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Iterator?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this function yields an instance of SyncDiracClient. The previous type hint is wrong. The contextmanager decorator then transforms Generator[T, None, None] -> ContextManager[T].

(Iterator[T] is an alias for Generator[T, None, None])

@chaen chaen merged commit 1990037 into DIRACGrid:integration Apr 4, 2025
23 checks passed
@DIRACGridBot DIRACGridBot added the sweep:ignore Prevent sweeping from being ran for this PR label Apr 4, 2025
@chrisburr chrisburr deleted the diracx-client-fixes branch April 4, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweep:ignore Prevent sweeping from being ran for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants