Skip to content

Pull Pylance with Pyright 1.1.414 - #11949

Closed
Heejae Chang (heejaechang) wants to merge 1 commit into
microsoft:mainfrom
heejaechang:sync-pylance-85a41a71-f854-4f14-b30a-52e674b40d41-6
Closed

Heejae Chang (heejaechang) wants to merge 1 commit into
microsoft:mainfrom
heejaechang:sync-pylance-85a41a71-f854-4f14-b30a-52e674b40d41-6

Conversation

@heejaechang

Copy link
Copy Markdown
Collaborator

Synchronizes Pylance compatibility changes with the current Pyright codebase.

Rollup:

  • Preserves fixed-tuple partial calls, complete overloads, generic identity and Unknown/Any distinctions across synthesized type reconstruction. Focused source regressions pass; the complete analyzer comparison was investigated without changing its raw findings or canonical rules.

REVIEWER: Review only Pyright/Pylance synchronization and compatibility changes in this PR; do not leave unrelated feedback.

Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
Co-authored-by: Rich Chiodo <rchiodo@microsoft.com>
Co-authored-by: Stella Huang <stellahuang@microsoft.com>
@rchiodo

Rich Chiodo (rchiodo) commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR.

@rchiodo

Copy link
Copy Markdown
Collaborator

Warning · Non-blocking recommendation

Please add focused test coverage for PartialFixedTupleArguments.

Partially bind one, several, and all elements of an unpacked fixed-tuple parameter; assert remaining arguments are accepted and incorrect types or arities produce diagnostics.

@rchiodo

Copy link
Copy Markdown
Collaborator

Warning · Non-blocking recommendation

Please add focused test coverage for partial_stub_round_trip.

Generate and reanalyze partial stubs covering retained overloads, generic identity, same-spelling TypeVars from distinct overload scopes, and nested Unknown versus Any; assert reconstructed call results preserve the original types.

@rchiodo

Copy link
Copy Markdown
Collaborator

Warning · Non-blocking recommendation

Please add focused test coverage for partial_instance_and_bound_call_serialization.

Query a partial instance and its bound call; assert both use synthesized protocol representations and retain the transformed remaining signature rather than the original declaration.

@rchiodo

Copy link
Copy Markdown
Collaborator

Result: ⚠️ needs-more-tests

Verification details

Verification: Automated verification is best effort. The PR author remains responsible for testing.

Summary: All 56 targeted existing tests passed, including partial-call, annotation-modifier, stub-generation, and type-server checks. Package TypeScript checking also passed after offline dependency preparation. The PR adds no tests, and existing coverage does not exercise its new partial reconstruction paths or fixed-tuple trimming. A temporary reviewer round-trip test failed to compile because of a reviewer-written API misuse; it established no PR defect. Those specific regression gaps remain unverified. **Reviewer dependency follow-up (nonblocking):** Suggest a separate PR adding `jest@^30.2.0`, `ts-jest@^29.4.7`, `typescript@~6.0.3` to the official reviewer dependency declarations, using `packages/pyright-internal/package.json` as the dependency/version evidence. Do not automatically create that PR. This is reviewer environment maintenance, not a required change to the reviewed PR.

Test runs: 4 passed, 1 failed, 1 not run

  • ⚠️ Not run | Dependency and test-runner discovery | printf 'profile=%s\n' "$AUTOMATION_SANDBOX_PROFILE"; node --version; pnpm --version; git status --short; git log -3 --oneline; git diff --stat HEAD~1 HEAD; test -f packages/pyright-internal/node_modules/jest/bin/jest.js && printf 'package-local jest present\n'; git ls-files 'packages/pyright-internal/jest' 'packages/pyright-internal/src/tests/typeServer' 'packages/pyright-internal/src/tests/stub'; node -e "for (const p of ['jest','ts-jest','typescript']) {try {console.log(p,require.resolve(p,{paths:['./packages/pyright-internal']}))} catch {console.log(p,'MISSING')}}"
  • ❌ Failed | unrelated to this PR | Temporary partial reconstruction checks | node ./node_modules/jest/bin/jest.js src/tests/typeServer/reviewerPartialVerification.test.ts --runInBand
  • ✅ Passed | Stub generator and in-process type-server tests | node ./node_modules/jest/bin/jest.js src/tests/typeServer/stubGenerator.test.ts src/tests/typeServer/typeServer.inProc.test.ts --runInBand
  • ✅ Passed | Targeted analyzer compatibility regressions | node ./node_modules/jest/bin/jest.js src/tests/typeEvaluator8.test.ts src/tests/typeEvaluator1.test.ts src/tests/typeEvaluator5.test.ts --runInBand --testNamePattern='^(Partial[1-9]|StructUnpack1|TypeForm.|Required[1-3]|TypedDictReadOnly.)$'
  • ✅ Passed | Offline dependency preparation | pnpm --filter pyright-internal install --offline --frozen-lockfile
  • ✅ Passed | Package TypeScript check | rm src/tests/typeServer/reviewerPartialVerification.test.ts && node ./node_modules/typescript/bin/tsc --noEmit
⚠️ Dependency and test-runner discovery diagnostic output
Container profile: typescript; Node v24.19.0; pnpm 11.21.0.
Git metadata was unavailable in the container.
jest MISSING
ts-jest MISSING
typescript MISSING
packages/pyright-internal/package.json declares these dependencies. Offline preparation subsequently succeeded, and package-local Node runners executed successfully.
❌ Temporary partial reconstruction checks diagnostic output
Test suite failed to run
reviewerPartialVerification.test.ts:65:51 TS2554: Expected 3 arguments, but got 1.
reviewerPartialVerification.test.ts:66:51 TS2554: Expected 3 arguments, but got 1.
The reviewer-written test called printType without its required flags and callback arguments.
Test Suites: 1 failed, 1 total
Tests: 0 total
This was a reviewer harness error, not a production-code failure. The temporary file was subsequently removed.

@rchiodo Rich Chiodo (rchiodo) added the review-auto:approved Automated review: no blocking findings (approval posted). label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@github-actions

Copy link
Copy Markdown
Contributor

Compared candidate 22075f6492d3d7ce312874ea9cef4d7825983e8a against its first parent e6d4bda989a07e384ed087ce73af5b6b4d69b64d.

View the full release history charts with the base and PR results.

Execution time history

Execution time history

Peak memory history

Peak memory history

Download the chart artifact.

Type checker benchmark

🟢 No performance regressions detected.

Regression threshold: 20.0%
Statistic: median
Variance guard: >1.0s time and >100.0 MB memory

Package Checker Files checked Time Time delta Peak memory Memory delta Status
ansible pyright 583 20.499s -0.8% 1133.4 MB +3.8% 🟢 Pass
click pyright 17 2.366s +1.8% 358.1 MB -0.7% 🟢 Pass
homeassistant pyright 9850 142.148s -0.1% 6084.5 MB -1.6% 🟢 Pass
numpy pyright 356 36.189s -0.3% 1217.8 MB +0.6% 🟢 Pass
pandas pyright 1459 81.583s +3.8% 3640.7 MB +1.2% 🟢 Pass
pytest pyright 243 9.683s +0.3% 860.6 MB +0.1% 🟢 Pass
requests pyright 19 1.422s +1.3% 341.6 MB -0.5% 🟢 Pass
torch pyright 2400 117.298s -2.4% 4763.0 MB +1.2% 🟢 Pass
transformers pyright 2901 125.367s +10.0% 4962.4 MB -6.0% 🟢 Pass

Pyright stats

Package Parsed/bound Checked Find Read Tokenize Parse Imports Bind Check Cycles
ansible 988 583 0.047s 0.083s 0.403s 0.777s 0.210s 0.977s 17.420s 0.000s
click 111 17 0.000s 0.013s 0.090s 0.160s 0.030s 0.213s 1.580s 0.000s
homeassistant 11150 9850 0.663s 0.747s 2.887s 4.593s 1.960s 6.310s 120.197s 0.000s
numpy 606 356 0.010s 0.057s 0.380s 0.743s 0.250s 0.873s 33.200s 0.000s
pandas 1899 1459 0.037s 0.193s 0.803s 1.677s 0.230s 2.040s 75.347s 0.000s
pytest 545 243 0.010s 0.047s 0.283s 0.437s 0.090s 0.570s 7.883s 0.000s
requests 167 19 0.000s 0.010s 0.067s 0.127s 0.030s 0.157s 0.823s 0.000s
torch 3078 2400 0.133s 0.343s 1.517s 3.307s 0.553s 4.453s 105.517s 0.000s
transformers 3536 2901 0.170s 0.413s 2.100s 3.830s 0.897s 9.180s 109.693s 0.000s

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

Labels

review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants