Skip to content

Conversation

@wiese-m
Copy link
Contributor

@wiese-m wiese-m commented Oct 31, 2025

Summary

Fixed version import in playtest.py & added missing return type in version()

Closes #586
Closes #582

Copy link
Contributor

@joe-clickhouse joe-clickhouse left a comment

Choose a reason for hiding this comment

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

Thanks @wiese-m. Appreciate the PR. See my comment below about common. As for the return type, that's a good call. Though there are some other functions in common that could benefit from return types as well. So if you're up for it, I'd suggest adding correct return types to the rest of the functions in common if they're missing them!

I also recently found a default/typing-related bug tracked in #586. All that's required there is changing the type of executor_threads parameter in create_async_client from Optional[int] to just a plain int and then change the default value from None to 0.

I see you've opened #582 as well (thanks!). So if you wouldn't mind, I suggest combing all this into a single PR that:

  1. Adds return types to all the functions missing them in common.py
  2. Fixes the default value and type of executor_threads from #586
  3. Fixes the test path you issue you found in #582
  4. Reverts the version import in palaytest.py and uses the public entry point of clickhosue_connect.version()

Let me know if you have any questions and thanks again!

@wiese-m
Copy link
Contributor Author

wiese-m commented Nov 4, 2025

Thanks for answer & suggestions. I pushed all the necessary changes.

Copy link
Contributor

@joe-clickhouse joe-clickhouse left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the help.

@joe-clickhouse joe-clickhouse merged commit 01761c1 into ClickHouse:main Nov 4, 2025
35 checks passed
meirdev pushed a commit to meirdev/clickhouse-connect that referenced this pull request Nov 5, 2025
* fix version import

* add missing type

* add missing types

* fix ClickHouse#586: inconsistent type hint

* fix tls test path in contribution docs

* revert playtest
joe-clickhouse added a commit that referenced this pull request Nov 5, 2025
* add executor parameter to AsyncClient

* add note to change log

* fix: we only want to shutdown the executor if we created it

* add a custom object to represent the sentinel

* fix typing

* add warning log when executor_threads and executor are used

* fix ambiguous time bug (#587)

* fix version import (#583)

* fix version import

* add missing type

* add missing types

* fix #586: inconsistent type hint

* fix tls test path in contribution docs

* revert playtest

---------

Signed-off-by: Meir <[email protected]>
Co-authored-by: Joe S <[email protected]>
Co-authored-by: Marek Wiese <[email protected]>
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.

Inconsistent type hint in async client definition

2 participants