Skip to content

Conversation

Copy link

Copilot AI commented Dec 15, 2025

The Pipedream and AsyncPipedream classes don't accept timeout despite the parent Client/AsyncClient classes supporting it and documentation showing it should work.

Changes

  • Add timeout: Optional[float] = None parameter to both Pipedream and AsyncPipedream constructors
  • Pass timeout through to parent class super().__init__() calls
  • Add unit tests for timeout parameter acceptance and propagation

Usage

from pipedream import Pipedream

client = Pipedream(
    project_id="my-project",
    access_token="token",
    timeout=5,  # Now accepted
)
Original prompt

This section details on the original issue you should resolve

<issue_title>timeout parameter not accepted in Pipedream constructor despite documentation</issue_title>
<issue_description>Bacground

The timeouts documentation shows setting a timeout at the client level: https://github.com/PipedreamHQ/pipedream-sdk-python?tab=readme-ov-file#timeouts

However, passing timeout to the constructor raises:

TypeError: Pipedream.__init__() got an unexpected keyword argument 'timeout'

Steps to Reproduce

from pipedream import Pipedream

client = Pipedream(
    project_id=settings.PIPEDREAM_PROJECT_ID,
    timeout=5,  # This causes the error
)

This also happens for AsyncPipedream.

Expected Behavior

The timeout parameter should be accepted and set a default timeout for all API calls made through the client instance.

Actual Behavior

TypeError is raised indicating timeout is not a valid parameter.

Workaround

Using pipedream.client.Client directly instead of the higher-level pipedream.Pipedream class. The lower-level class accepts the timeout parameter:

client = Client(
    project_id=settings.PIPEDREAM_PROJECT_ID,
    timeout=5,
)

This works, but requires:

  • Using the lower-level client class instead of the documented Pipedream class
  • Accessing the token via client._client_wrapper._get_token() instead of the raw_access_token property (which is only available on Pipedream)</issue_description>

<agent_instructions>Accept the timeout argument in the constructors exposed in src/pipedream/pipedream.py. It should be passed down to the parent class during initialization.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Wed Dec 17 2025 to showcase some of the refinements we've made.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

⚠️ This pull request appears to contain no changes and will be automatically closed.

If you believe this is an error, please add your changes and push them to the branch.

@github-actions github-actions bot closed this Dec 15, 2025
Copilot AI changed the title [WIP] Fix timeout parameter not accepted in Pipedream constructor Add timeout parameter to Pipedream and AsyncPipedream constructors Dec 15, 2025
Copilot AI requested a review from jverce December 15, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timeout parameter not accepted in Pipedream constructor despite documentation

2 participants