Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
/ numbsql Public archive

Commit dd916e7

Browse files
committed
feat: support python 3.10
1 parent 2653d1a commit dd916e7

5 files changed

Lines changed: 102 additions & 69 deletions

File tree

.github/workflows/auto-rebase.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- labeled
1111

1212
jobs:
13-
auto-rebase:
13+
autorebase:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: tibdex/github-app-token@v1

.github/workflows/ci.yml

Lines changed: 75 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,43 @@ jobs:
1818
matrix:
1919
os:
2020
- ubuntu-latest
21-
- macos-10.15
22-
- macos-11
21+
- macos-latest
2322
python-version:
2423
- "37"
2524
- "38"
2625
- "39"
26+
- "310"
2727
exclude:
28-
- os: macos-11
28+
- os: macos-latest
2929
python-version: "37"
30+
31+
# 3.10 cannot be built with nixos-unstable-small as of 2022-01-14
32+
- os: macos-latest
33+
python-version: "310"
34+
3035
runs-on: ${{ matrix.os }}
3136
steps:
3237
- uses: actions/checkout@v2
38+
3339
- uses: cachix/install-nix-action@v16
3440
with:
3541
nix_path: nixpkgs=channel:nixos-unstable-small
42+
3643
- uses: cachix/cachix-action@v10
3744
with:
3845
name: numbsql
3946
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
4047
extraPullNames: nix-community,poetry2nix
4148

42-
- run: nix build -L --keep-going '.#numbsql${{ matrix.python-version }}' --no-link
43-
- run: nix path-info -Shr '.#numbsql${{ matrix.python-version }}'
49+
- name: build and test
50+
run: nix build --no-link --keep-going '.#numbsql${{ matrix.python-version }}'
51+
52+
- name: show closure size
53+
run: |
54+
set -euo pipefail
55+
56+
nix path-info -Shr '.#numbsql${{ matrix.python-version }}' | sort -h -k2
57+
4458
conda:
4559
runs-on: ${{ matrix.os }}
4660
strategy:
@@ -60,37 +74,63 @@ jobs:
6074
- numba: null
6175
llvmlite: null
6276
include:
63-
- os: macos-10.15
64-
python-version: "3.7.1"
65-
# 3.7.5 is the oldest Python 3.7 available from the setup-python
66-
# action
67-
#
68-
# see
69-
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
77+
# 3.7.5 is the oldest Python 3.7 available from the setup-python
78+
# action
79+
#
80+
# see
81+
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
7082
- os: windows-latest
7183
python-version: "3.7.5"
84+
deps:
85+
numba: "0.53"
86+
llvmlite: "0.36"
87+
88+
- os: windows-latest
89+
python-version: "3.7.5"
90+
deps:
91+
numba: null
92+
llvmlite: null
7293
exclude:
7394
# macos-11 isn't supported on 3.7.x
7495
- os: macos-latest
7596
python-version: "3.7.1"
97+
deps:
98+
numba: null
99+
llvmlite: null
100+
101+
- os: macos-latest
102+
python-version: "3.7.1"
103+
deps:
104+
numba: "0.53"
105+
llvmlite: "0.36"
76106
# windows + 3.7.1 has memory access violations, likely due to an
77107
# incompatible sqlite binary + python libsqlite library version
78108
#
79109
# these are the kinds of errors that will keep you up at night
80110
- os: windows-latest
81111
python-version: "3.7.1"
112+
deps:
113+
numba: null
114+
llvmlite: null
115+
116+
- os: windows-latest
117+
python-version: "3.7.1"
118+
deps:
119+
numba: "0.53"
120+
llvmlite: "0.36"
82121
defaults:
83122
run:
84123
shell: bash -l {0}
85124
steps:
86125
- uses: actions/checkout@v2
87126
- uses: actions/setup-python@v2
127+
id: install_python
88128
with:
89129
python-version: ${{ matrix.python-version }}
90130

91131
- run: pip3 install poetry2conda poetry
92132

93-
- run: poetry add --lock "numba@${{ matrix.deps.numba }}" "llvmlite@${{ matrix.deps.llvmlite }}"
133+
- run: poetry add --lock "numba@${{ matrix.deps.numba }}" "llvmlite@${{ matrix.deps.llvmlite }}" --python "${{ steps.install_python.outputs.python-version }}"
94134
if: ${{ matrix.deps.numba != null && matrix.deps.llvmlite != null }}
95135

96136
- run: poetry2conda --dev pyproject.toml - | tee environment.yaml
@@ -107,11 +147,32 @@ jobs:
107147

108148
- run: pip install .
109149
- run: pytest --numprocesses auto
150+
151+
dry-run-release:
152+
runs-on: ubuntu-latest
153+
steps:
154+
- uses: actions/checkout@v2
155+
with:
156+
fetch-depth: 0
157+
158+
- uses: cachix/install-nix-action@v16
159+
with:
160+
nix_path: nixpkgs=channel:nixos-unstable-small
161+
162+
- uses: cachix/cachix-action@v10
163+
with:
164+
name: numbsql
165+
extraPullNames: nix-community,poetry2nix
166+
167+
- name: dry run semantic-release
168+
run: ./ci/release/dry_run.sh
169+
110170
release:
111171
runs-on: ubuntu-latest
112172
needs:
113-
- nix
114173
- conda
174+
- dry-run-release
175+
- nix
115176
steps:
116177
- uses: tibdex/github-app-token@v1
117178
id: generate_token
@@ -120,12 +181,6 @@ jobs:
120181
private_key: ${{ secrets.APP_PRIVATE_KEY }}
121182

122183
- uses: actions/checkout@v2
123-
if: ${{ github.event_name == 'pull_request' }}
124-
with:
125-
fetch-depth: 0
126-
127-
- uses: actions/checkout@v2
128-
if: ${{ github.event_name != 'pull_request' }}
129184
with:
130185
fetch-depth: 0
131186
token: ${{ steps.generate_token.outputs.token }}
@@ -139,12 +194,7 @@ jobs:
139194
name: numbsql
140195
extraPullNames: nix-community,poetry2nix
141196

142-
- name: dry run semantic-release
143-
if: ${{ github.event_name == 'pull_request' }}
144-
run: ./ci/release/dry_run.sh
145-
146197
- name: run semantic-release
147-
if: ${{ github.event_name != 'pull_request' }}
148198
run: ./ci/release/run.sh
149199
env:
150200
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

flake.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
};
105105
}
106106
])
107-
[ "37" "38" "39" ]
107+
[ "37" "38" "39" "310" ]
108108
)))
109109
];
110110
} // (
@@ -121,7 +121,8 @@
121121
packages.numbsql37 = pkgs.numbsql37;
122122
packages.numbsql38 = pkgs.numbsql38;
123123
packages.numbsql39 = pkgs.numbsql39;
124-
packages.numbsql = pkgs.numbsql39;
124+
packages.numbsql310 = pkgs.numbsql310;
125+
packages.numbsql = pkgs.numbsql310;
125126

126127
defaultPackage = packages.numbsql;
127128

@@ -195,7 +196,7 @@
195196
devShell = pkgs.mkShell
196197
{
197198
nativeBuildInputs = with pkgs; [
198-
numbsqlDevEnv39
199+
numbsqlDevEnv310
199200
poetry
200201
prettierTOML
201202
# useful for testing sqlite things with a sane CLI, i.e., with

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ classifiers = [
1515
]
1616

1717
[tool.poetry.dependencies]
18-
python = ">=3.7.1,<3.10"
18+
python = ">=3.7.1,<3.11"
1919
llvmlite = ">=0.36,<0.39"
2020
numba = ">=0.53,<0.56"
2121
numpy = ">=1.21,<2"

0 commit comments

Comments
 (0)