Skip to content

Add ConnectorTable.extend() method#1021

Merged
sirosen merged 1 commit intoglobus:mainfrom
sirosen:connector-table-extend
Mar 4, 2025
Merged

Add ConnectorTable.extend() method#1021
sirosen merged 1 commit intoglobus:mainfrom
sirosen:connector-table-extend

Conversation

@sirosen
Copy link
Copy Markdown
Member

@sirosen sirosen commented Aug 2, 2024

This method allows ConnectorTable consumers to extend the class with an additional connector (or, if they chain calls, multiple connectors). The new connector is written into the new subclass as a part of its _connectors tuple and as an attribute.

The base ConnectorTable class is left unmodified, meaning that callers who extend the table cannot conflict.


The motivation for this work is for usages in primarily internal applications like the GCS CLI, where new connectors are sometimes supported for testing before they are generally available. Additionally, users beta testing such connectors may want SDK support.

At time of writing, there is at least one internal connector under development which cannot be added to the SDK yet.


📚 Documentation preview 📚: https://globus-sdk-python--1021.org.readthedocs.build/en/1021/

This method allows ConnectorTable consumers to extend the class with
an additional connector (or, if they chain calls, multiple connectors).
The new connector is written into the new subclass as a part of its
`_connectors` tuple and as an attribute.

The base ConnectorTable class is left unmodified, meaning that callers
who extend the table cannot conflict.

A usage example is provided in the docstring for `extend()` to
instruct users on proper usage.
@sirosen sirosen force-pushed the connector-table-extend branch from 28b65c8 to 6f6c331 Compare February 21, 2025 15:57
@sirosen sirosen marked this pull request as ready for review February 21, 2025 15:57
Copy link
Copy Markdown
Contributor

@m1yag1 m1yag1 left a comment

Choose a reason for hiding this comment

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

Only one minor thing I saw with the changelog. Other than that, it looks good!

Comment thread changelog.d/20250221_095128_sirosen_connector_table_extend.rst
@sirosen sirosen merged commit 54a1656 into globus:main Mar 4, 2025
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.

2 participants