Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

positron-python-upstream-merge

БесплатноЗапускает вложенные скриптыНе проверен

Use when merging a new microsoft/vscode-python release into extensions/positron-python, working through the monthly "INTERNAL: Python maintenance" checklist…

posit-devот posit-dev★ 4 361 звезда на GitHub

Об этом скилле

positron-python upstream merge

extensions/positron-python is a fork of microsoft/vscode-python. Each maintenance round applies the upstream diff between two release tags as one commit, then updates dependencies and CI. The risky part is not the conflicts. It is upstream behavior changes that land cleanly in code Positron depends on. So triage comes before applying, and behavior decisions go to the user.

Scripts are in .claude/skills/positron-python-upstream-merge/scripts/ (below: $S). Run them from the repo root on the user's feature branch. From step 2 on, the tree must be clean.

Inputs

  • START: the last upstream tag that was merged. Get it from the maintenance issue, or the title of the previous "upstream merge vX" PR. package.json's version is 2026.99.0-dev and does not tell you.
  • END: the new upstream release tag.
  • Earlier rounds may have cherry-picked some upstream commits (for example dependabot bumps) past START. The 3-way merge handles them: files come out ALREADY_UPSTREAM, or conflict only where Positron has an older version of the same bump.

Workflow

1. Preview and triage (no changes to the tree)

bash $S/preview.sh START END [path-to-local-vscode-python-clone]

The script fetches the tags into refs/vscode-python/* (kept for apply.sh) and prints per-status counts and a report dir:

  • files.tsv: each upstream-changed file as CLEAN, AUTOMERGE[...], CONFLICT[...], NEW, LOCKFILE_KEPT, and so on, with the count of Positron blocks in our copy.
  • commits.txt: upstream commits that touch files with Positron blocks. Read every one with git show <sha> and look at its commit message, which often explains the reason.

commits.txt only covers files with Positron blocks. Also review these, which it can't flag:

  • git diff refs/vscode-python/START refs/vscode-python/END -- package.json build/ python_files/ covers dependencies, contributions, test requirements, and the Python adapters.
  • NEW files and AUTOMERGE[...positron_blocks=0] files under src/client/ that Positron code calls. Use rg from src/client/positron/ to find out.

For each change, find the Positron callers of what it changes, especially in src/client/positron/. Then put it in one of these groups:

Group Typical areas
High: changes behavior that Positron code depends on interpreterService / getActiveInterpreter (positron/manager.ts starts a session from its result after onDidChangeInterpreter), new callers of _onConfigChanged() with no scope (Positron then defaults to startSession: true), activationManager, nativePythonFinder (PET), installers, python_files/posit kernel deps
Medium: build, toolchain, or CI TypeScript, @vscode/test-electron, webpack plugins, build/test-requirements.txt, upstream .github/ changes
Low: inert in Positron Environments extension (useEnvExtension() is forced to false), PYTHONSTARTUP/pythonrc.py/PyREPL (forced off in terminals/pythonStartup.ts), native REPL, Pylance-only paths, chat tools hidden with "when": "false", telemetry

A "Low" area can stop being inert. Check that the Positron override still exists before you rely on it.

STOP and report to the user with the groups, a recommendation for each High item (take upstream, keep Positron behavior, or adapt), and a list of manual validation areas. Wait for their decisions before you apply.

2. Apply

bash $S/apply.sh START END

This runs git diff | git apply --3way into the subdirectory, keeps Positron's package-lock.json, and deletes new upstream files that Positron's .gitignore excludes (build artifacts). Conflicted files keep their markers.

3. Resolve conflicts

Situation Resolution
package.json version / description Keep Positron's
Positron has an older version of the same bump (npm dep, action version, pinned requirement) Take upstream
extensions/positron-python/.github/** Take upstream. These files don't run in Positron CI; they are the reference for step 6
Upstream edits lines inside a Positron block Keep the Positron block. If the block holds commented-out upstream code, update that copy to the new upstream code so the next merge diffs cleanly
Upstream adds lines next to a Positron block Keep both
Upstream removes code that a Positron block only existed to override Take upstream and delete the Positron block that no longer has a purpose
A High item the user decided to keep in Positron Implement it inside // --- Start Positron --- / // --- End Positron --- with a comment that explains why

AUTOMERGE files with positron_blocks>0 merged silently. Read their diff too (git diff HEAD -- <file>): a clean textual merge can still change behavior around a Positron block.

Then run bash $S/check-markers.sh and fix everything it reports.

4. Commit the merge

Полный SKILL.md на GitHub

Установить positron-python-upstream-merge в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.gitignoreruff.tomlscripts/apply.shscripts/check-markers.shscripts/preview.shscripts/req_diff.pyscripts/test_req_diff.py

FAQ

Что делает скилл positron-python-upstream-merge?

Use when merging a new microsoft/vscode-python release into extensions/positron-python, working through the monthly "INTERNAL: Python maintenance" checklist issue, or refreshing positron-python's pinned Python requirements, ipykernel bundle, or PET version.

Как установить скилл positron-python-upstream-merge?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл positron-python-upstream-merge запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить positron-python-upstream-merge с