Skip to content

Add SDK-version headers#200

Open
Sirsho1997 wants to merge 4 commits intomainfrom
feature-UpdateVersionHeaders
Open

Add SDK-version headers#200
Sirsho1997 wants to merge 4 commits intomainfrom
feature-UpdateVersionHeaders

Conversation

@Sirsho1997
Copy link
Collaborator

@Sirsho1997 Sirsho1997 commented Dec 1, 2025

Add information that identifies the SDK type (JS vs. Python) and the version of the SDK being used to make requests.

The goal

  • to identify what SDK is being used for the requests
  • along with the version

Main changes

  • Updating description in setup.py
  • Add DeprecationWarning to 'skipResponse'
  • Adding version.py
  • Adding additional headers to websocket {"X-SDK-Type": "python", "X-SDK-Version" = __version__}

Copy link
Contributor

@teith teith left a comment

Choose a reason for hiding this comment

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

LGTM

self._tasks: Dict[str, asyncio.Task] = {}
self._additional_headers: Dict[str, str] = {
"X-SDK-Type": "python",
"X-SDK-Version": __version__
Copy link
Contributor

Choose a reason for hiding this comment

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

str(__version__) or f"{__version__}"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is already a str in runware/version.py

@@ -0,0 +1,2 @@
__version__ = "0.4.33"
Copy link
Contributor

@teith teith Dec 2, 2025

Choose a reason for hiding this comment

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

why can't we keep it in __init__.py?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It kept crashing due to circular imports!

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