Skip to content

Commit 6ebaaf9

Browse files
authored
Merge pull request #135 from codecrafters-io/andy/upgrade-python
CC-2005: [Interpreter] [Python] Use uv and upgrade to 3.14
2 parents 068a540 + 86c3faf commit 6ebaaf9

File tree

32 files changed

+151
-118
lines changed

32 files changed

+151
-118
lines changed

compiled_starters/python/.codecrafters/compile.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
#
77
# Learn more: https://codecrafters.io/program-interface
88

9+
set -e # Exit on failure
10+
911
# (This file is empty since Python programs don't use a compile step)

compiled_starters/python/.codecrafters/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
#
77
# Learn more: https://codecrafters.io/program-interface
88

9-
exec pipenv run python3 -m app.main "$@"
9+
set -e # Exit on failure
10+
11+
exec uv run --quiet -m app.main "$@"

compiled_starters/python/.gitignore

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ ipython_config.py
9494
# install all needed dependencies.
9595
#Pipfile.lock
9696

97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
97103
# poetry
98104
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99105
# This is especially recommended for binary packages to ensure reproducibility, and is more
@@ -106,8 +112,10 @@ ipython_config.py
106112
#pdm.lock
107113
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108114
# in version control.
109-
# https://pdm.fming.dev/#use-with-ide
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110116
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
111119

112120
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113121
__pypackages__/
@@ -151,3 +159,16 @@ dmypy.json
151159

152160
# Cython debug symbols
153161
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
.idea/
169+
170+
# Ruff stuff:
171+
.ruff_cache/
172+
173+
# PyPI configuration file
174+
.pypirc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14

compiled_starters/python/Pipfile

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

compiled_starters/python/Pipfile.lock

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

compiled_starters/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Time to move on to the next stage!
4343

4444
Note: This section is for stages 2 and beyond.
4545

46-
1. Ensure you have `python (3.13)` installed locally
46+
1. Ensure you have `uv` installed locally
4747
2. Run `./your_program.sh` to run your program, which is implemented in
4848
`app/main.py`.
4949
3. Commit your changes and run `git push origin master` to submit your solution

compiled_starters/python/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the Python version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: python-3.13
11-
buildpack: python-3.13
10+
# Available versions: python-3.14
11+
buildpack: python-3.14
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[project]
2+
name = "codecrafters-interpreter"
3+
version = "0.1.0"
4+
requires-python = ">=3.14"
5+
dependencies = []

compiled_starters/python/uv.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)