Who this is for
Follow this guide if either of these applies to you:- Your project requires
cowboy-sdkfor Actor code. Cowboy CLI releasescli-v0.0.37tocli-v0.0.39generatedependencies = ["cowboy-sdk>=0.1.2"]inpyproject.toml. - A Python environment you use has the historical Actor package installed:
cowboy-sdk0.1.0 or 0.1.1 from PyPI, or a locally built Actor SDK 0.1.2. Use the package check in Migrate an existing environment to identify it.
cli-v0.0.40 or later already require cowboy-actor-sdk and need no changes.
What changed
The Actor SDK is now published ascowboy-actor-sdk. The name cowboy-sdk belongs to the client SDK from version 0.2.0 onward.
- Actor code doesn’t change. It still imports
cowboy_sdk, for examplefrom cowboy_sdk import actor, public. - Deployed Actors are unaffected. On chain, Actors run the PVM’s own copy of the SDK, not a package installed from PyPI. Nothing needs to be redeployed.
- Requirements must change. Once
cowboy-sdk0.2.0 is published, a requirement such ascowboy-sdk>=0.1.2resolves to the client, which has nocowboy_sdkmodule.
cowboy_sdk/ directory, and pip and uv track those files per package. If cowboy-actor-sdk is installed while cowboy-sdk 0.1.x is still present, later removing or upgrading cowboy-sdk deletes the files the two share, including cowboy_sdk/__init__.py. Neither tool reports an error when this happens.
Update your project
-
Replace the requirement. In
pyproject.toml, changecowboy-sdktocowboy-actor-sdk:Make the same change wherever else you install the Actor SDK, such as requirements files, CI workflows and Dockerfiles. If the project also uses the client SDK (import cowboy), require it separately ascowboy-sdk>=0.2oncecowboy-sdk0.2.0 is published; until then that requirement can’t be resolved. Without that lower bound, a resolver can pick 0.1.1, the historical Actor release. -
Remove the old source override. Older CLIs told you to point uv at a local SDK build because the SDK wasn’t on PyPI yet. Delete that block:
cowboy-actor-sdkis installed from PyPI and needs no override. Keep one only if you deliberately test an unreleased SDK build; its key is thencowboy-actor-sdk. -
Regenerate the lock and sync the environment:
--reinstall-packagerestores any shared files that removingcowboy-sdkdeletes, so this is safe even if both packages were installed. The last command prints nothing when the environment is healthy. Commitpyproject.tomlanduv.lockonce they no longer contain a machine-specific source override or path. If you install with pip from a requirements file, follow Migrate an existing environment instead: pip doesn’t remove packages that you drop from a requirements file.
Stopgap: pin cowboy-sdk<0.2
If you can’t migrate yet, change the requirement to cowboy-sdk<0.2 so that the 0.2.0 client is never selected. With the old [tool.uv.sources] override still in place, uv keeps installing your local file. This is not a fix:
- From PyPI,
cowboy-sdk<0.2installs 0.1.1. That release has nocowboy_sdk.testingmodule and nopublicdecorator, so Actors and tests generated by the CLI fail to import. - It keeps the historical package in your environment. Installing the client later replaces it. Never require
cowboy-actor-sdkalongside it: overlapping files can break imports immediately, and removing either package can delete files the other needs. - New Actor SDK releases are published only as
cowboy-actor-sdk.
Migrate an existing environment
For a uv project, follow Update your project. For other environments, activate the intended environment and use its Python to list the distributions that registercowboy_sdk:
cowboy-sdk, remove that historical Actor distribution before installing cowboy-actor-sdk; otherwise, skip the uninstall. Older source-installed clients can also report version 0.1.0, but register cowboy instead and should remain installed.
If the list includes cowboy-actor-sdk, use Repair a broken environment instead of the commands below: a plain install does not restore deleted files when the distribution is already registered.
- pip
- uv pip
pip install --upgrade cowboy-sdk in an environment that has the historical Actor package installed. Once cowboy-sdk 0.2.0 is published, the upgrade uninstalls 0.1.x, which deletes the Actor SDK’s files, and installs the client.
Check your environment
uv run python -c "from cowboy_sdk import codec, testing, public". Each name catches a different broken state: codec fails when shared files have been deleted, testing fails when only the published 0.1.0 or 0.1.1 is installed, and public fails when one of those published releases has overwritten the Actor SDK.
pip list also keeps showing cowboy-actor-sdk in a broken environment, so use the import check above.
Repair a broken environment
These commands repair every broken state described on this page. In the pip and uv pip tabs, first run the package check in Migrate an existing environment; uninstallcowboy-sdk only if it is listed, then reinstall cowboy-actor-sdk even if it is already listed. If you want the client SDK and cowboy-sdk 0.2.0 is published, install cowboy-sdk>=0.2 after the uninstall and before the reinstall.
- pip
- uv pip
- uv project
cowboy_sdk/ file again from cowboy-actor-sdk. --no-deps leaves the Actor SDK’s dependencies alone; if pip check then reports a missing requirement such as cbor2, run pip install cowboy-actor-sdk.
Troubleshooting
For the Actor SDK’s features and testing tools, see the SDK overview and Testing Actors.