Skip to content

Commit 76c4d31

Browse files
committed
Remove uv.lock files from Python Worker C3 templates
1 parent 1a2bbf8 commit 76c4d31

File tree

12 files changed

+10
-1109
lines changed

12 files changed

+10
-1109
lines changed

.changeset/green-dancers-sin.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
always load container image into local store during build
77

8-
98
BuildKit supports different [build drivers](https://docs.docker.com/build/builders/drivers/). When using the more modern `docker-container` driver (which is now the default on some systems, e.g. a standard Docker installation on Fedora Linux), it will not automatically load the built image into the local image store. Since wrangler expects the image to be there (e.g. when calling `getImageRepoTags`), it will thus fail, e.g.:
109

1110
```

.changeset/silly-terms-hunt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-cloudflare": minor
3+
---
4+
5+
Remove lockfiles from Python C3 templates

packages/create-cloudflare/src/templates.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,6 @@ export const downloadRemoteTemplate = async (
827827

828828
function updatePythonPackageName(path: string, projectName: string) {
829829
const pyprojectTomlPath = resolve(path, "pyproject.toml");
830-
const uvLockPath = resolve(path, "uv.lock");
831830
if (!existsSync(pyprojectTomlPath)) {
832831
// Not a python template
833832
return;
@@ -840,12 +839,6 @@ function updatePythonPackageName(path: string, projectName: string) {
840839
`"${projectName}"`,
841840
);
842841
writeFile(pyprojectTomlPath, pyprojectTomlContents);
843-
let uvLockContents = readFile(uvLockPath);
844-
uvLockContents = uvLockContents.replace(
845-
'"tbd"',
846-
`"${projectName.toLowerCase()}"`,
847-
);
848-
writeFile(uvLockPath, uvLockContents);
849842
s.stop(`${brandColor("updated")} ${dim("`pyproject.toml`")}`);
850843
}
851844

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/py/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Worker without having to restart `wrangler`.
66

77
### Types and autocomplete
88

9-
This project also includes a pyproject.toml and uv.lock file with some requirements which
9+
This project also includes a pyproject.toml file with some requirements which
1010
set up autocomplete and type hints for this Python Workers project.
1111

1212
To get these installed you'll need `uv`, which you can install by following

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/py/uv.lock

Lines changed: 0 additions & 274 deletions
This file was deleted.

packages/create-cloudflare/templates/hello-world-durable-object/py/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Worker without having to restart `wrangler`.
66

77
### Types and autocomplete
88

9-
This project also includes a pyproject.toml and uv.lock file with some requirements which
9+
This project also includes a pyproject.toml file with some requirements which
1010
set up autocomplete and type hints for this Python Workers project.
1111

1212
To get these installed you'll need `uv`, which you can install by following

packages/create-cloudflare/templates/hello-world-durable-object/py/uv.lock

Lines changed: 0 additions & 274 deletions
This file was deleted.

packages/create-cloudflare/templates/hello-world-with-assets/py/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Worker without having to restart `wrangler`.
66

77
### Types and autocomplete
88

9-
This project also includes a pyproject.toml and uv.lock file with some requirements which
9+
This project also includes a pyproject.toml file with some requirements which
1010
set up autocomplete and type hints for this Python Workers project.
1111

1212
To get these installed you'll need `uv`, which you can install by following

packages/create-cloudflare/templates/hello-world-with-assets/py/uv.lock

Lines changed: 0 additions & 274 deletions
This file was deleted.

packages/create-cloudflare/templates/hello-world/c3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
platform: "workers",
1212
async configure(ctx) {
1313
if (ctx.args.lang === "python") {
14-
for (const file of ["pyproject.toml", "uv.lock"]) {
14+
for (const file of ["pyproject.toml"]) {
1515
const contents = await readFile(
1616
resolve(ctx.project.path, file),
1717
"utf8",

0 commit comments

Comments
 (0)