Skip to content

⬆️ deps: Update Python dev dependencies#87

Merged
SigureMo merged 3 commits into
mainfrom
renovate/python-dev-dependencies
Jul 11, 2026
Merged

⬆️ deps: Update Python dev dependencies#87
SigureMo merged 3 commits into
mainfrom
renovate/python-dev-dependencies

Conversation

@renovate

@renovate renovate Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
pytest-rerunfailures >=16.3>=16.4 age confidence
ruff (source, changelog) >=0.15.20>=0.15.21 age confidence
ty (changelog) >=0.0.54,!=0.0.55>=0.0.58,!=0.0.55 age confidence

Release Notes

pytest-dev/pytest-rerunfailures (pytest-rerunfailures)

v16.4

Compare Source

Breaking changes
++++++++++++++++

  • Drop support for pytest 8.1. Minimum pytest version is now 8.2.

Features
++++++++

  • Add support for pytest 9.1.

  • Rerun tests with failed subtests. This feature is only available on pytest 9.0
    and later. The pytest-subtests plugin is not supported.
    Fixes #&#8203;315 <https://github.com/pytest-dev/pytest-rerunfailures/issues/315>_.

  • Add --reruns-delay-backoff-factor option (and the matching
    reruns_delay_backoff_factor marker kwarg / ini setting) to grow the rerun
    delay after each attempt for an exponential backoff. The delay before the
    n-th re-run is reruns_delay * reruns_delay_backoff_factor ** (n - 1).
    The default factor is 1.0, so existing behaviour (a constant delay) is
    unchanged.

astral-sh/ruff (ruff)

v0.15.21

Compare Source

Released on 2026-07-09.

Preview features
  • Add --add-ignore for adding ruff:ignore comments (#​26346)
  • [flake8-comprehensions] Drop C409 tuple comprehension preview behavior (#​25707)
  • Avoid whitespace normalization when formatting comments (#​26455)
  • [pyupgrade] Lint and fix use of deprecated abc decorators (UP051) (#​26417)
Bug fixes
  • Refine non-empty f-string detection (#​26526)
  • Detect syntax errors in individual notebook cells (#​26419)
  • [flake8-implicit-str-concat] Fix ISC003 autofix incorrectly stripping + from comments (#​26554)
Rule changes
  • [flake8-executable] Mark EXE004 fix as unsafe (#​26033)
  • [flake8-pyi] Mark PYI061 fixes as unsafe in Python files (#​26533)
  • [pydocstyle] Skip overload-with-docstring in stub files (D418) (#​26318)
Performance
  • Avoid per-token source index visitor calls (#​26506)
  • Cache parenthesized expression boundaries in the formatter (#​26344)
  • Improve performance of rendering edits in preview mode (#​26565)
  • Inline fits_element in formatter (#​26429)
  • Inline formatter printing hot paths (#​26504)
  • Lazily create builtin bindings (#​26510)
  • Skip empty trivia scans in the source indexer (#​26507)
  • Use ICF for macOS release builds (#​25780)
Formatter
  • Add --extend-exclude to ruff format (#​26372)
Documentation
  • Add "How does Ruff's import sorting compare to isort?" link to README (#​26530)
  • Fix Mozilla Firefox repository link in README (#​26537)
  • [flake8-bandit] Fix misleading docstring for mako-templates (S702) (#​26432)
  • [ruff] Fix non-triggering example for if-key-in-dict-del (RUF051) (#​26433)
Contributors
astral-sh/ty (ty)

v0.0.58

Compare Source

Released on 2026-07-09.

Bug fixes
  • Fix protocol matching for class variables (#​26669)
  • Fix reflected binary dispatch for runtime classes (#​26623)
  • Support cached properties in protocols (#​26681)
Diagnostics
  • Add assignability context to upper-bound diagnostics (#​26645)
  • Add blanket ignore comment rule (#​26426)
  • Improve protocol attribute diagnostic context (#​26644)
Library support
  • Pydantic: Add fields from mixin classes (#​26631)
  • Pydantic: Add support for validate_by_{name,alias} (#​26598)
  • Pydantic: Add support for validation_alias (#​26629)
  • Pydantic: Fix float conversion in unions (#​26655)
  • Pydantic: Ignore private attributes (#​26630)
  • Pydantic: Make BaseSettings fields optional by default (#​26628)
  • Pydantic: Recognize frozen models via config (#​26648)
  • Pydantic: Support dict model configurations (#​26632)
  • Pydantic: Support validation of RootModel fields (#​26634)
  • Pydantic: Understand ellipsis as providing no default value (#​26637)
Core type checking
  • Gate membership narrowing on __contains__ semantics (#​25964)
  • Handle callable classes in solver (#​26090)
  • Infer ModuleType.__doc__ as str in the presence of a docstring (#​26505)
  • Infer metaclass-declared attributes on class instances (#​26512)
  • Respect user stub overlays during module resolution (#​26123)
Performance
  • Avoid allocating decorated parameter names (#​26666)
  • Optimize TypeCollector (#​26593)
Contributors

v0.0.57

Compare Source

Released on 2026-07-07.

Bug fixes
  • Detect async generator expressions containing await (#​26568)
  • Preserve exhaustive gradual match patterns (#​26523)
LSP server
  • Fix selection range behavior for strings (#​26532)
  • Recognize that dedent ends doctest block when parsing docstrings for signature help (#​26552)
  • Render reStructuredText hyperlinks as Markdown in hover docstrings (#​25907)
  • Update __slots__ string when renaming an attribute (#​26438)
Documentation
  • Document PYTHONPATH support in module discovery (#​3889)
Library support
  • Add support for extra arguments in Pydantic model constructors (#​26520)
  • Detect Pydantic model configurations (#​26573)
  • Distinguish lax and strict mode for Pydantic models (#​26587)
Core type checking
  • Fix subtyping/assignability for @property protocol members (#​25332)
  • Narrow isinstance against intersections containing invalid member (#​26545)
  • Narrow match subjects through structural patterns (#​25942)
  • Preserve generic functools.partial signatures (#​24583)
  • Preserve generic variadic callback semantics (#​26521)
  • Preserve invariant materialization on generic specializations (#​26578)
  • Preserve literal enum member names (#​26592)
Performance
  • Avoid exponential invariant constraint paths (#​26538)
  • Batch parallel jobs when finding references (#​26534)
  • Build module names directly in CompactString (#​26546)
  • Elide default use-def state (#​26398)
  • Reuse owned buffers for string literals (#​26547)
  • Use ICF for macOS release builds (#​3709)
  • Use cached class literal lookup for is_subclass_of (#​26585)
Contributors

v0.0.56

Compare Source

Released on 2026-07-01.

Bug fixes
  • Avoid MRO cycle when collecting NamedTuple fields (#​26464)
  • Model int and str enum value normalization (#​26349)
  • Prefer reflected operators by runtime class (#​26434, #​26474)
CLI
  • Exit with status 130 when interrupted (#​26465)
Performance
  • Avoid exponential OR-pattern reachability (#​26481)
  • Reduce bound typevar identity overhead (#​26396)
Core type checking
  • Infer generic class pattern capture types (#​26479)
  • Narrow exact tuples through sequence patterns (#​26424)
  • Recognize inherited enum member constructors (#​26410)
  • Respect return-context inference when filtering overloads (#​26454)
  • Sync vendored typeshed stubs (#​26501). Typeshed diff
Contributors

v0.0.55

Compare Source

Released on 2026-06-26.

LSP server
  • Render full diagnostics in color (#​26384)
Documentation
  • Document colored diagnostic output (#​3858)
Performance
  • Improve vendored filesystem concurrency (#​26408)
  • Optimize enum comparisons in equality evaluation (#​26340)
  • Remove redundant semantic index shrinks (#​26392)
  • Use never-change durability for one-shot checks (#​26359)
Core type checking
  • Correct enum alias detection and scalar constructors (#​26345)
  • Fix structural pattern binding inference (#​26411)
  • Improve variable-length tuple slicing (#​26151)
  • Infer class and mapping pattern bindings (#​25941)
  • Infer empty collection constructors from later uses (#​26389)
  • Skip shadowed submodule bindings during import analysis (#​26385)
  • Sync vendored typeshed stubs (#​26406). Typeshed diff
  • Track literal iterable emptiness for reachability (#​25222)
  • Validate positional class patterns against __match_args__ (#​26195)
Contributors

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, only on Monday (* 0-3 * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies label Jul 6, 2026
@renovate renovate Bot force-pushed the renovate/python-dev-dependencies branch 4 times, most recently from 84a4c91 to 186387c Compare July 11, 2026 11:13
@renovate renovate Bot changed the title ⬆️ deps: Update Python dev dependencies ⬆️ deps: Update dependency pytest-rerunfailures to >=16.4 Jul 11, 2026
@renovate renovate Bot force-pushed the renovate/python-dev-dependencies branch from 186387c to 80592e7 Compare July 11, 2026 13:30
@renovate renovate Bot changed the title ⬆️ deps: Update dependency pytest-rerunfailures to >=16.4 ⬆️ deps: Update Python dev dependencies Jul 11, 2026
@SigureMo

Copy link
Copy Markdown
Contributor

@ShigureNyako 调研一下 ty 最近对结构化模式匹配的相关问题有解决方案吗?自从 0.0.54 引入一些类型推导但是推导的貌似不太对,原来 Unknown 能过的结果现在都挂了

@ShigureNyako

Copy link
Copy Markdown
Member

结论:这个失败确实是 ty 的结构化模式匹配推导回归,但起点是 0.0.55,不是 0.0.54。

我在本 PR 的 head 80592e7、完整依赖环境中复现了 CI 命令 ty check --error-on-warning src/watchfs tests

  • ty 0.0.53 / 0.0.54:通过(0 diagnostics)
  • ty 0.0.55 / 0.0.56 / 0.0.57 / 0.0.58:均为同样的 32 diagnostics

报错都来自泛型 Result[T, E] = Ok[T] | Err[E] 的 class pattern capture:如 case Ok((mapping, bidirectional))case Err(err)。0.0.55 后捕获值被推成 object,继而产生 unresolved-attribute / invalid-argument-type / invalid-return-type。这与 0.0.55 引入的 class/mapping pattern binding inference 及其 follow-up fix 对得上;0.0.56 的 generic class-pattern fix 和 0.0.57 的 structural subject narrowing 都没有修复本例。失败日志在 Python 3.12 lint job

建议当前把约束改为 ty>=0.0.54,<0.0.55(或精确 pin ty==0.0.54);现有 !=0.0.55 不够,因为 0.0.56–0.0.58 仍复现。代码侧可用显式 cast 绕过,但会在多处增加噪声并削弱检查价值,不建议作为首选。上游暂未找到覆盖这个「泛型 class pattern capture 退化为 object」的现成 issue,适合用这里的最小 Ok[T] | Err[E] 例子另报 upstream,再在修复版本发布后解除上界。

@SigureMo SigureMo 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.

@copilot ty 就临时 pin 一下吧

Comment thread pyproject.toml Outdated
dev = [
"ty>=0.0.54,!=0.0.55",
"ruff>=0.15.20",
"ty>=0.0.58,!=0.0.55",

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.

Suggested change
"ty>=0.0.58,!=0.0.55",
"ty>=0.0.54,<0.0.55",

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@copilot ty 就临时 pin 一下吧

Done — pinned ty to >=0.0.54,<0.0.55 in commit ⬆️ deps: pin ty to >=0.0.54,<0.0.55.

Copilot AI requested a review from SigureMo July 11, 2026 16:17
@renovate

renovate Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@SigureMo

Copy link
Copy Markdown
Contributor

@copilot 你好歹更新下 lockfile 啊

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@copilot 你好歹更新下 lockfile 啊

Updated uv.lock to resolve ty 0.0.54 and record the pinned range in commit 81b8a39.

@SigureMo SigureMo merged commit 3ad9591 into main Jul 11, 2026
4 checks passed
@SigureMo SigureMo deleted the renovate/python-dev-dependencies branch July 11, 2026 16:26
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.

3 participants