Skip to content

Commit cce8b0d

Browse files
[CIVIS-11075] ENH updates for Python 3.13 and civis-python v2.7.1 (#101)
* DEP update python core dependencies * DEP update python and uv versions * ENH update core deps * MAINT update changelog * MAINT update changelog
1 parent adf1c03 commit cce8b0d

File tree

6 files changed

+72
-64
lines changed

6 files changed

+72
-64
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ Version number changes (major.minor.micro) in this package denote the following:
99

1010
## Unreleased
1111

12+
## [8.3.0]
13+
14+
- Python version updated: 3.12.8 -> 3.13.5
15+
- uv version updated: 0.5.18 -> 0.7.19
16+
- New core dependencies added:
17+
* polars 1.31.0 (supported by civis-python since v2.6.0)
18+
- Core dependencies updated to latest versions:
19+
* awscli 2.22.33 -> 2.27.48
20+
* boto3 1.35.97 -> 1.39.2
21+
* civis 2.4.3 -> 2.7.1
22+
* numpy 2.2.1 -> 2.3.1
23+
* pandas 2.2.3 -> 2.3.0
24+
* requests 2.32.3 -> 2.32.4
25+
* scikit-learn 1.6.1 -> 1.7.0
26+
* scipy 1.15.1 -> 1.16.0
27+
1228
## [8.2.0]
1329

1430
- Python version updated: 3.12.7 -> 3.12.8

Dockerfile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
ARG PLATFORM=linux/x86_64
2-
ARG BASE_IMAGE=python:3.12.8-slim
2+
ARG BASE_IMAGE=python:3.13.5-slim
33

4-
# This is the primary build target used for the production image
5-
FROM --platform=$PLATFORM $BASE_IMAGE AS production
4+
FROM --platform=$PLATFORM $BASE_IMAGE AS uv-installed
65

76
# Disable pip warnings https://stackoverflow.com/a/72551258
87
ENV PIP_ROOT_USER_ACTION=ignore
@@ -32,26 +31,29 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -y --no-install-recommends &&
3231
apt-get clean -y && \
3332
rm -rf /var/lib/apt/lists/*
3433

35-
COPY requirements-full.txt .
36-
37-
RUN pip install --progress-bar off --no-cache-dir -r requirements-full.txt && \
38-
rm requirements-full.txt
39-
4034
# Install uv.
41-
ADD https://astral.sh/uv/0.5.18/install.sh /uv-installer.sh
35+
ADD https://astral.sh/uv/0.7.19/install.sh /uv-installer.sh
4236
RUN sh /uv-installer.sh && rm /uv-installer.sh
4337
ENV PATH="/root/.local/bin/:$PATH" \
4438
UV_SYSTEM_PYTHON=1
4539

40+
# This is the primary build target used for the production image
41+
FROM --platform=$PLATFORM uv-installed AS production
42+
43+
COPY requirements-full.txt .
44+
45+
RUN uv pip install --no-progress --no-cache -r requirements-full.txt && \
46+
rm requirements-full.txt
47+
4648
# Instruct joblib to use disk for temporary files. Joblib defaults to
4749
# /shm when that directory is present. In the Docker container, /shm is
4850
# present but defaults to 64 MB.
4951
# https://github.com/joblib/joblib/blob/0.11/joblib/parallel.py#L328L342
5052
ENV JOBLIB_TEMP_FOLDER=/tmp
5153

52-
ENV VERSION=8.2.0 \
54+
ENV VERSION=8.3.0 \
5355
VERSION_MAJOR=8 \
54-
VERSION_MINOR=2 \
56+
VERSION_MINOR=3 \
5557
VERSION_MICRO=0
5658

5759
# This build target is for testing in CircleCI.
@@ -61,8 +63,7 @@ COPY CHANGELOG.md .
6163

6264
# This build target is for updating dependencies.
6365
# See generate-requirements.full.sh.
64-
FROM --platform=$PLATFORM $BASE_IMAGE AS pip-tools
65-
RUN pip install -U --no-cache-dir pip pip-tools --progress-bar off
66+
FROM --platform=$PLATFORM uv-installed AS update-deps
6667
CMD ["/bin/bash"]
6768

6869
# Default to the production build target.

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
services:
2-
pip-tools:
2+
update-deps:
33
build:
44
context: .
55
dockerfile: ./Dockerfile
6-
target: pip-tools
6+
target: update-deps
77
volumes:
88
- .:/app
99
stdin_open: true

generate-requirements-full.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Run this script to update requirements-core.txt.
33
# It uses Docker to ensure that the environment matches what will be used in the production image.
44
set -e
5-
docker compose run --rm pip-tools /bin/sh -c "apt-get update -y && apt-get install -y git && pip install --upgrade pip-tools && pip-compile --output-file=requirements-full.txt --pip-args='--prefer-binary' --strip-extras --upgrade requirements-core.txt"
5+
docker compose run --rm update-deps /bin/sh -c "uv pip compile --output-file=requirements-full.txt --upgrade requirements-core.txt"

requirements-core.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# awscli v2 is not officially available on PyPI (https://github.com/aws/aws-cli/issues/4947).
22
# Specifying awscli in requirements-core.txt here ensures that it (and its transitive dependencies)
33
# are taken into account when generating the final requirements-full.txt file.
4-
awscli @ git+https://github.com/aws/aws-cli@2.22.33
5-
boto3==1.35.97
6-
civis==2.4.3
7-
numpy==2.2.1
8-
pandas==2.2.3
9-
requests==2.32.3
10-
scikit-learn==1.6.1
11-
scipy==1.15.1
4+
awscli @ git+https://github.com/aws/aws-cli@2.27.48
5+
boto3==1.39.2
6+
civis==2.7.1
7+
numpy==2.3.1
8+
pandas==2.3.0
9+
polars==1.31.0
10+
requests==2.32.4
11+
scikit-learn==1.7.0
12+
scipy==1.16.0

requirements-full.txt

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,31 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile --output-file=requirements-full.txt --pip-args='--prefer-binary' --strip-extras requirements-core.txt
6-
#
7-
attrs==24.3.0
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile --output-file=requirements-full.txt requirements-core.txt
3+
attrs==25.3.0
84
# via
95
# jsonschema
106
# referencing
11-
awscli @ git+https://github.com/aws/aws-cli@2.22.33
7+
awscli @ git+https://github.com/aws/aws-cli@6804a17061546394f88e1fe6d1bf9b24cd8a09ec
128
# via -r requirements-core.txt
13-
awscrt==0.23.4
9+
awscrt==0.26.1
1410
# via awscli
15-
boto3==1.35.97
11+
boto3==1.39.2
1612
# via -r requirements-core.txt
17-
botocore==1.35.97
13+
botocore==1.39.2
1814
# via
1915
# boto3
2016
# s3transfer
21-
certifi==2024.12.14
17+
certifi==2025.6.15
2218
# via requests
23-
cffi==1.17.1
24-
# via cryptography
25-
charset-normalizer==3.4.1
19+
charset-normalizer==3.4.2
2620
# via requests
27-
civis==2.4.3
21+
civis==2.7.1
2822
# via -r requirements-core.txt
29-
click==8.1.8
23+
click==8.2.1
3024
# via civis
31-
cloudpickle==3.1.0
25+
cloudpickle==3.1.1
3226
# via civis
3327
colorama==0.4.6
3428
# via awscli
35-
cryptography==43.0.1
36-
# via awscli
3729
distro==1.8.0
3830
# via awscli
3931
docutils==0.19
@@ -45,68 +37,68 @@ jmespath==1.0.1
4537
# awscli
4638
# boto3
4739
# botocore
48-
joblib==1.4.2
40+
joblib==1.5.1
4941
# via
5042
# civis
5143
# scikit-learn
5244
jsonref==1.1.0
5345
# via civis
54-
jsonschema==4.23.0
46+
jsonschema==4.24.0
5547
# via civis
56-
jsonschema-specifications==2024.10.1
48+
jsonschema-specifications==2025.4.1
5749
# via jsonschema
58-
numpy==2.2.1
50+
numpy==2.3.1
5951
# via
6052
# -r requirements-core.txt
6153
# pandas
6254
# scikit-learn
6355
# scipy
64-
pandas==2.2.3
56+
pandas==2.3.0
57+
# via -r requirements-core.txt
58+
polars==1.31.0
6559
# via -r requirements-core.txt
6660
prompt-toolkit==3.0.38
6761
# via awscli
68-
pycparser==2.22
69-
# via cffi
7062
python-dateutil==2.9.0
7163
# via
7264
# awscli
7365
# botocore
7466
# pandas
75-
pytz==2024.2
67+
pytz==2025.2
7668
# via pandas
7769
pyyaml==6.0.2
7870
# via civis
79-
referencing==0.35.1
71+
referencing==0.36.2
8072
# via
8173
# jsonschema
8274
# jsonschema-specifications
83-
requests==2.32.3
75+
requests==2.32.4
8476
# via
8577
# -r requirements-core.txt
8678
# civis
87-
rpds-py==0.22.3
79+
rpds-py==0.26.0
8880
# via
8981
# jsonschema
9082
# referencing
9183
ruamel-yaml==0.17.21
9284
# via awscli
93-
ruamel-yaml-clib==0.2.8
85+
ruamel-yaml-clib==0.2.12
9486
# via awscli
95-
s3transfer==0.10.4
87+
s3transfer==0.13.0
9688
# via boto3
97-
scikit-learn==1.6.1
89+
scikit-learn==1.7.0
9890
# via -r requirements-core.txt
99-
scipy==1.15.1
91+
scipy==1.16.0
10092
# via
10193
# -r requirements-core.txt
10294
# scikit-learn
10395
six==1.17.0
10496
# via python-dateutil
105-
tenacity==9.0.0
97+
tenacity==9.1.2
10698
# via civis
107-
threadpoolctl==3.5.0
99+
threadpoolctl==3.6.0
108100
# via scikit-learn
109-
tzdata==2024.2
101+
tzdata==2025.2
110102
# via pandas
111103
urllib3==1.26.20
112104
# via
@@ -115,5 +107,3 @@ urllib3==1.26.20
115107
# requests
116108
wcwidth==0.2.13
117109
# via prompt-toolkit
118-
zipp==3.20.2
119-
# via awscli

0 commit comments

Comments
 (0)