chore: use stdlib typing for Concatenate/ParamSpec/overload; align Black target-version - #1839
Open
jacalata wants to merge 1 commit into
Open
chore: use stdlib typing for Concatenate/ParamSpec/overload; align Black target-version#1839jacalata wants to merge 1 commit into
jacalata wants to merge 1 commit into
Conversation
…typing These three names live in stdlib `typing` since Python 3.10, which is the repo's supported minimum (`requires-python = ">=3.10"`). Only `Self` still requires `typing_extensions` for 3.10 users, so keep that import in place until 3.10 support drops. Also drop `py39` from Black's `target-version` array and add `py314` -- py39 is below the supported minimum, py314 is already in the CI test matrix. No behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jacalata
enabled auto-merge (squash)
August 6, 2026 21:23
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates typing imports to rely more on the stdlib typing module and adjusts Black’s configured target Python versions.
Changes:
- Replace
typing_extensionsusage with stdlibtypingforParamSpec/Concatenatewhere applicable - Split typing imports in
jobs_endpoint.py(overloadfromtyping,Selffromtyping_extensions) - Update Black
target-versionby droppingpy39and addingpy314
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tableauserverclient/server/request_factory.py | Switch ParamSpec/Concatenate imports to stdlib typing |
| tableauserverclient/server/endpoint/jobs_endpoint.py | Move overload to stdlib typing while keeping Self on typing_extensions |
| tableauserverclient/server/endpoint/endpoint.py | Switch ParamSpec/Concatenate imports to stdlib typing |
| pyproject.toml | Update Black target-version list (drop 3.9, add 3.14) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,12 +1,9 @@ | |||
| import xml.etree.ElementTree as ET | |||
| from typing import Any, Callable, TypeVar, TYPE_CHECKING | |||
| from typing import Any, Callable, Concatenate, ParamSpec, TypeVar, TYPE_CHECKING | |||
Comment on lines
11
to
+17
| from typing import ( | ||
| Any, | ||
| Callable, | ||
| Concatenate, | ||
| Generic, | ||
| Optional, | ||
| ParamSpec, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small housekeeping. Two adjustments that are safe today under the current
requires-python = ">=3.10":Concatenate,ParamSpec, andoverloadall exist in stdlibtypingfrom Python 3.10 (or earlier). Move them offtyping_extensions.Selfstays ontyping_extensionssince stdlibtyping.Selfis 3.11+ and we still support 3.10.target-versiondropspy39(below the supported minimum) and addspy314(already in the CI matrix).No behavior change; mypy, pytest, and black --check are all clean locally.
A separate followup issue tracks the broader 3.10-EOL cleanup (including moving
Selfand removing thetomlifallback).