Skip to content

fix(functions): remove py310 from RunTime and docs - #2726

Draft
dbrattli wants to merge 1 commit into
masterfrom
chore/disable-python-3.10-functions
Draft

fix(functions): remove py310 from RunTime and docs#2726
dbrattli wants to merge 1 commit into
masterfrom
chore/disable-python-3.10-functions

Conversation

@dbrattli

@dbrattli dbrattli commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove py310 from the RunTime Literal type in cognite/client/data_classes/functions.py
  • Update Functions API docstrings (_api/functions/__init__.py, regenerated _sync_api/functions/__init__.py) to drop py310 from the allowed runtime values
  • Update the mocked functions/limits test fixture accordingly

Ref:

py314 support will be added in a follow-up PR.

Test plan

  • uv run pytest tests/tests_unit/test_api/test_functions.py passes
  • uv run mypy on touched files passes

py310 is being disabled as a Functions runtime (see cognitedata/infrastructure#37224). py314 support will be added in a follow-up PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dbrattli
dbrattli requested review from a team as code owners July 28, 2026 09:47

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

Copy link
Copy Markdown
Contributor

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 removes the "py310" runtime option from the Cognite Functions API, updating the RunTime TypeAlias, docstrings, and unit tests accordingly. Additionally, some helper constants and regex patterns were added to the sync functions API module. There are no review comments, so I have no feedback to provide.

@dbrattli dbrattli changed the title chore(functions): remove py310 from RunTime and docs fix(functions): remove py310 from RunTime and docs Jul 28, 2026
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.68%. Comparing base (8b99b98) to head (290c3c6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2726      +/-   ##
==========================================
- Coverage   93.71%   93.68%   -0.03%     
==========================================
  Files         504      504              
  Lines       51294    51300       +6     
==========================================
- Hits        48070    48062       -8     
- Misses       3224     3238      +14     
Files with missing lines Coverage Δ
cognite/client/_api/functions/__init__.py 94.81% <ø> (ø)
cognite/client/_sync_api/functions/__init__.py 100.00% <100.00%> (ø)
cognite/client/data_classes/functions.py 95.49% <100.00%> (ø)
tests/tests_unit/test_api/test_functions.py 96.82% <ø> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@haakonvt haakonvt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🦄

@haakonvt haakonvt self-assigned this Jul 28, 2026
@haakonvt haakonvt added risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action labels Jul 28, 2026
@dbrattli
dbrattli marked this pull request as draft July 28, 2026 10:21
@dbrattli

Copy link
Copy Markdown
Contributor Author

@haakonvt We need to wait until 2026-10-01 because of https://docs.cognite.com/cdf/deprecated/#deprecated-and-retired-features-and-functionality so flipping back to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants