Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,50 @@ jobs:
COMPILER_DIFFERENTIAL_ARGS="--stage-captures --require-discovery-coverage
--require-render-coverage"

compiler_differential_python_versions:
name: Native discovery on Python ${{ matrix.python }}
needs: [changes, lockfile]
if: needs.changes.outputs.compiler_differential == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
python: ["3.13", "3.14"]
env:
UV_PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
version: "0.12.3"
enable-cache: true
cache-dependency-glob: |
uv.lock
Cargo.lock
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install Python
run: uv python install ${{ matrix.python }}
- name: Install dependencies
run: uv sync --locked --all-groups --all-extras --python ${{ matrix.python }}
- name: Require native discovery to support this Python
run: >-
uv run --no-sync python -c "import sys, unicodedata, sqlbuild._native as n;
assert n.native_text_supported(sys.version_info[:2], unicodedata.unidata_version)"
- name: Compare native text helpers with this Python
run: >-
uv run --no-sync pytest
tests/integration/src/sqlbuild/compiler/test_native_python_compat_oracle.py
-n auto --dist loadfile
- name: Compare engines on fixtures, examples, the failure corpus and a few seeds
env:
PYTHONUNBUFFERED: "1"
run: >-
uv run --no-sync python -m scripts.run_compiler_differential
--corpus fixtures examples failures seeds --seeds 4 --jobs 4

format_performance:
name: Formatter performance guards
needs: [changes, lockfile]
Expand Down Expand Up @@ -488,7 +532,7 @@ jobs:
run: uv sync --locked --all-groups --all-extras
- name: Install base dependencies
working-directory: base
run: uv sync --locked --all-extras
run: uv sync --locked --all-groups --all-extras
- name: Compare base and head cold, warm and one-model edit compiles
env:
KIND: ${{ matrix.kind }}
Expand Down
8 changes: 8 additions & 0 deletions crates/sqlbuild-core/src/text/_helpers/alnum_tables.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//! The generated `str.isalnum()` tables, one per Unicode version of a supported CPython.

/// `(unicodedata.unidata_version, ranges)` for every table native text helpers can select.
pub(crate) const ALNUM_TABLES: [(&str, &[(u32, u32)]); 3] = [
("15.0.0", include!("../alnum_ranges/unicode_15_0_0.in")),
("15.1.0", include!("../alnum_ranges/unicode_15_1_0.in")),
("16.0.0", include!("../alnum_ranges/unicode_16_0_0.in")),
];
2 changes: 1 addition & 1 deletion crates/sqlbuild-core/src/text/_helpers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub(crate) mod alnum_ranges;
pub(crate) mod alnum_tables;
pub(crate) mod cleandoc;
pub(crate) mod sequence_matcher;
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
//! Generated by `scripts/generate_python_char_table.py`; do not edit.

/// The Unicode version of the Python that generated the table.
pub(crate) const PYTHON_ALNUM_UNICODE_VERSION: &str = "15.0.0";

/// Inclusive code point ranges where Python's `str.isalnum()` is true, in order.
pub(crate) const PYTHON_ALNUM_RANGES: &[(u32, u32)] = &[
// Generated by `scripts/generate_python_char_table.py`; do not edit.
// Inclusive code point ranges where `str.isalnum()` is true in Unicode 15.0.0, in order.
&[
(0x0030, 0x0039),
(0x0041, 0x005A),
(0x0061, 0x007A),
Expand Down Expand Up @@ -752,4 +748,4 @@ pub(crate) const PYTHON_ALNUM_RANGES: &[(u32, u32)] = &[
(0x2F800, 0x2FA1D),
(0x30000, 0x3134A),
(0x31350, 0x323AF),
];
]
Loading
Loading