From c56ee01ffa60682993b48e1c1016390933e9bbc0 Mon Sep 17 00:00:00 2001 From: Ryan Gang Date: Wed, 2 Apr 2025 21:21:35 +0530 Subject: [PATCH 1/2] feat: add Dockerfile for Python 3.13 with Pipenv setup --- dockerfiles/python-3.13.Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 dockerfiles/python-3.13.Dockerfile diff --git a/dockerfiles/python-3.13.Dockerfile b/dockerfiles/python-3.13.Dockerfile new file mode 100644 index 0000000..875de46 --- /dev/null +++ b/dockerfiles/python-3.13.Dockerfile @@ -0,0 +1,22 @@ +FROM python:3.13-alpine + +RUN pip install --no-cache-dir "pipenv>=2024.4.0" + +COPY Pipfile /app/Pipfile +COPY Pipfile.lock /app/Pipfile.lock + +WORKDIR /app + +ENV LANG="en_US.UTF-8" +ENV PIPENV_VENV_IN_PROJECT=1 + +RUN pipenv install + +# Force environment creation +RUN pipenv run python3 -c "import sqlparse" # Ensure the deps are available +RUN pipenv --venv + +RUN mkdir -p /app-cached +RUN mv /app/.venv /app-cached/.venv + +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Pipfile,Pipfile.lock" From fbd024a7dd5bb730590a53ee38c41d1a5a6c239f Mon Sep 17 00:00:00 2001 From: Ryan Gang Date: Wed, 2 Apr 2025 21:21:53 +0530 Subject: [PATCH 2/2] feat: update Python version to 3.13 in configuration and documentation files --- compiled_starters/python/README.md | 2 +- compiled_starters/python/codecrafters.yml | 4 ++-- solutions/python/01-dr6/code/README.md | 2 +- solutions/python/01-dr6/code/codecrafters.yml | 4 ++-- starter_templates/python/config.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiled_starters/python/README.md b/compiled_starters/python/README.md index 1430a41..b38e375 100644 --- a/compiled_starters/python/README.md +++ b/compiled_starters/python/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `python (3.8+)` installed locally +1. Ensure you have `python (3.13)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `app/main.py`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/compiled_starters/python/codecrafters.yml b/compiled_starters/python/codecrafters.yml index ec2956e..0e01962 100644 --- a/compiled_starters/python/codecrafters.yml +++ b/compiled_starters/python/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Python version used to run your code # on Codecrafters. # -# Available versions: python-3.12 -language_pack: python-3.12 +# Available versions: python-3.13 +language_pack: python-3.13 diff --git a/solutions/python/01-dr6/code/README.md b/solutions/python/01-dr6/code/README.md index 1430a41..b38e375 100644 --- a/solutions/python/01-dr6/code/README.md +++ b/solutions/python/01-dr6/code/README.md @@ -29,7 +29,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `python (3.8+)` installed locally +1. Ensure you have `python (3.13)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `app/main.py`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/solutions/python/01-dr6/code/codecrafters.yml b/solutions/python/01-dr6/code/codecrafters.yml index ec2956e..0e01962 100644 --- a/solutions/python/01-dr6/code/codecrafters.yml +++ b/solutions/python/01-dr6/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Python version used to run your code # on Codecrafters. # -# Available versions: python-3.12 -language_pack: python-3.12 +# Available versions: python-3.13 +language_pack: python-3.13 diff --git a/starter_templates/python/config.yml b/starter_templates/python/config.yml index 31b9d2c..22a0370 100644 --- a/starter_templates/python/config.yml +++ b/starter_templates/python/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: python (3.8+) + required_executable: python (3.13) user_editable_file: app/main.py