Skip to content

Conversation

@haakonvt
Copy link
Contributor

@haakonvt haakonvt commented Oct 30, 2025

Note to reviewer:

  1. Commit history is clean - please review commit-by-commit!
  2. Github only shows the most recent 250 commits, and this PR boasts 300+ ( :hurtrealbad: ), so you need to review those outside the UI 🕺

@haakonvt haakonvt requested review from a team as code owners October 30, 2025 12:34
@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@haakonvt haakonvt force-pushed the v8-change-requests-to-httpx branch 7 times, most recently from 8f8308e to 66518da Compare November 5, 2025 11:53
@amorken
Copy link
Contributor

amorken commented Nov 5, 2025

/gemini review
(lol)

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a major version bump to 8.0.0a0, with the primary change being the introduction of full asynchronous support using httpx. This is a significant and well-executed refactoring that makes almost all API methods async. The SDK is now async-first, with a synchronous CogniteClient wrapping the new AsyncCogniteClient for backward compatibility. In addition to the async refactoring, this PR removes several deprecated methods and parameters, such as the generic aggregate and filter methods, and the partitions parameter in most __call__ methods. It also improves some APIs, like insert_dataframe which now infers identifier types. All these breaking changes are clearly documented in the updated MIGRATION_GUIDE.md. The changes are extensive but appear to be correct, consistent, and of high quality. I have not found any issues of high or critical severity.

Aasnaess
Aasnaess previously approved these changes Nov 5, 2025
Copy link

@Aasnaess Aasnaess left a comment

Choose a reason for hiding this comment

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

LGTM

@haakonvt haakonvt changed the title release 8.0.0a0 to PyPI release 8.0.0a1 to PyPI Nov 6, 2025
@codecov

This comment was marked as outdated.

yield dps_lst[0] if is_single else dps_lst
elif is_single:
yield from chunk_fn(dps_lst[0]) # type: ignore [misc]
for chunk in chunk_fn(dps_lst[0]):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not yield from?

Copy link
Contributor Author

@haakonvt haakonvt Nov 7, 2025

Choose a reason for hiding this comment

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

Inside an async generator function

@haakonvt haakonvt force-pushed the v8-change-requests-to-httpx branch from f05ee51 to f0d63ae Compare November 9, 2025 11:13
@haakonvt haakonvt force-pushed the v8-change-requests-to-httpx branch from f0d63ae to c605eee Compare November 10, 2025 12:59
@haakonvt haakonvt force-pushed the v8-change-requests-to-httpx branch from c605eee to 1ba5b84 Compare November 10, 2025 13:27
@haakonvt haakonvt changed the title release 8.0.0a1 to PyPI release 8.0.0a1 to PyPI (DM-3062) Nov 10, 2025
- Extending a `Datapoints` instance is no longer supported.
- **ClientConfig**:
- `max_workers` has now permanently moved to `global_config` after the deprecation period
- `timeout`: default has been increased from 30 sec to 60 sec
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the rationale for this?

def get(self, url: str, params: dict[str, Any] | None = None, headers: dict[str, Any] | None = None) -> Response:
async def get(
self, url: str, params: dict[str, Any] | None = None, headers: dict[str, Any] | None = None
) -> httpx.Response:
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should not return httpx objects, that's an abstraction leak that I'd like to get rid of. We should wrap them in our own Response object instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same for the sync client

self.disable_ssl: bool = False
self.proxies: dict[str, str] | None = {}
self.proxy: str | httpx.Proxy | None = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, should not deal with httpx objects directly. Wrap it in our own instead.

sort=prep_sort,
)

def __iter__(self) -> Iterator[TimeSeries]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why have the __iter__ methods been removed? - not mentioned in migration guide.


- id: sync-client-codegen
name: run sync codegen on changed files
entry: poetry run python scripts/sync_client_codegen/main.py run --files
Copy link
Collaborator

Choose a reason for hiding this comment

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

This fails if the sync client is not up to date right?

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.

9 participants