Skip to content

Commit d8b647e

Browse files
committed
Merge main into SQLite callback lifetime fixes
Assisted-by: Codex:gpt-6
2 parents a9c7a56 + 65bbaca commit d8b647e

331 files changed

Lines changed: 30548 additions & 14124 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yaml‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
env:
22-
CARGO_ARGS: --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env,doc
23-
CARGO_ARGS_NO_SSL: --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,host_env,doc
22+
CARGO_ARGS: --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,ssl-rustls-aws-lc,host_env,doc,ucd_3_2_0
23+
CARGO_ARGS_NO_SSL: --no-default-features --features stdlib,importlib,stdio,encodings,sqlite,host_env,doc,ucd_3_2_0
2424
CARGO_ARGS_MOST_FEATS: --features capi,encodings,jit,sqlite,threading
2525
# Crates excluded from workspace builds:
2626
# - rustpython_wasm: requires wasm target
@@ -328,7 +328,12 @@ jobs:
328328
329329
- name: Test openssl build
330330
if: env.RUN_RUST_TESTS == 'true' && runner.os == 'Linux'
331-
run: cargo build --locked --no-default-features --features ssl-openssl
331+
run: |
332+
cargo build --locked --no-default-features --features ssl-openssl
333+
cargo build --locked --release --features threading,jit,ssl-openssl ${{ env.CARGO_ARGS_NO_SSL }}
334+
target/release/rustpython -B extra_tests/snippets/stdlib_ssl.py
335+
target/release/rustpython -B -m test -v --single-process --timeout=300 test_ssl
336+
timeout-minutes: 30
332337

333338
- name: Test vendored OpenSSL build
334339
if: env.RUN_RUST_TESTS == 'true' && runner.os == 'Linux'
@@ -1154,7 +1159,7 @@ jobs:
11541159

11551160
- name: build rustpython
11561161
if: env.RUN_WASM_WASI == 'true'
1157-
run: cargo build --locked --profile wasm-release --target wasm32-wasip1 --no-default-features --features freeze-stdlib,stdlib,stdio,importlib,host_env,doc --verbose
1162+
run: cargo build --locked --profile wasm-release --target wasm32-wasip1 --no-default-features --features freeze-stdlib,stdlib,stdio,importlib,host_env,doc,ucd_3_2_0 --verbose
11581163
- name: run snippets
11591164
if: env.RUN_WASM_WASI == 'true'
11601165
run: |

‎.github/workflows/cron-ci.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- .github/workflows/cron-ci.yaml
1515

1616
env:
17-
CARGO_ARGS: --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls-aws-lc,jit,host_env,doc
17+
CARGO_ARGS: --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls-aws-lc,jit,host_env,doc,ucd_3_2_0
1818

1919
jobs:
2020
# codecov collects code coverage data from the rust tests, python snippets and python test suite.
@@ -42,7 +42,7 @@ jobs:
4242
- run: sudo apt-get update && sudo apt-get -y install lcov
4343

4444
- name: Run cargo-llvm-cov with Rust tests.
45-
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --exclude rustpython-capi --verbose --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls-aws-lc,jit,host_env,doc
45+
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --exclude rustpython-capi --verbose --no-default-features --features stdlib,importlib,stdio,encodings,ssl-rustls-aws-lc,jit,host_env,doc,ucd_3_2_0
4646

4747
- name: Run cargo-llvm-cov with Python snippets.
4848
run: python scripts/cargo-llvm-cov.py

‎Cargo.lock‎

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

‎Cargo.toml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license.workspace = true
1111

1212
[features]
1313
capi = ["dep:rustpython-capi", "threading"]
14-
default = ["threading", "stdlib", "stdio", "importlib", "ssl-rustls-aws-lc", "host_env", "mimalloc", "doc"]
14+
default = ["threading", "stdlib", "stdio", "importlib", "ssl-rustls-aws-lc", "host_env", "mimalloc", "doc", "ucd_3_2_0"]
1515
doc = ["rustpython-vm/doc", "rustpython-stdlib?/doc"]
1616
mimalloc = ["dep:mimalloc"]
1717
host_env = ["rustpython-vm/host_env", "rustpython-stdlib?/host_env"]
@@ -32,6 +32,7 @@ ssl-rustls-aws-lc-fips = ["ssl-rustls-aws-lc", "rustls/fips"]
3232
ssl-openssl = ["ssl", "rustpython-stdlib/ssl-openssl"]
3333
ssl-openssl-vendor = ["ssl-openssl", "rustpython-stdlib/ssl-openssl-vendor"]
3434
tkinter = ["rustpython-stdlib/tkinter"]
35+
ucd_3_2_0 = ["rustpython-stdlib?/ucd_3_2_0"]
3536

3637
[build-dependencies]
3738
winresource = "0.1"
@@ -67,6 +68,13 @@ rustls-graviola = { workspace = true }
6768
rustpython-stdlib = { workspace = true }
6869
ruff_python_parser = { workspace = true }
6970

71+
# Only the criterion benchmarks below are measured. Without `bench = false`,
72+
# `cargo bench` (and `cargo codspeed build`) also builds the library and binary
73+
# unit-test harnesses with the LTO bench profile, adding a full extra link of
74+
# the interpreter that is never run.
75+
[lib]
76+
bench = false
77+
7078
[[bench]]
7179
name = "execution"
7280
harness = false
@@ -78,6 +86,7 @@ harness = false
7886
[[bin]]
7987
name = "rustpython"
8088
path = "src/main.rs"
89+
bench = false
8190

8291
[[example]]
8392
name = "custom_tls_providers"
@@ -183,7 +192,7 @@ rustpython-vm = { path = "crates/vm", default-features = false, version = "0.6.1
183192
rustpython-pylib = { path = "crates/pylib", version = "0.6.1" }
184193
rustpython-stdlib = { path = "crates/stdlib", default-features = false, version = "0.6.1" }
185194
rustpython-sre_engine = { path = "crates/sre_engine", version = "0.6.1" }
186-
rustpython-unicode = { path = "crates/unicode", version = "0.6.1" }
195+
rustpython-unicode = { path = "crates/unicode", default-features = false, version = "0.6.1" }
187196
rustpython-wtf8 = { path = "crates/wtf8", version = "0.6.1" }
188197
rustpython-doc = { path = "crates/doc", version = "0.6.1" }
189198

@@ -267,7 +276,7 @@ pkcs8 = "0.11"
267276
proc-macro2 = "1.0.105"
268277
psm = "0.1"
269278
pymath = { git = "https://github.com/RustPython/pymath.git", rev = "dd1e9a4cf26d68caf3b549c09476f52e356e16a3", features = ["mul_add", "malachite-bigint", "complex"] }
270-
pyo3 = "0.29"
279+
pyo3 = "0.30"
271280
quote = "1.0.45"
272281
radium = "1.1.1"
273282
rand = "0.10"

‎Lib/_py_abc.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ def _abc_caches_clear(cls):
9292
def __instancecheck__(cls, instance):
9393
"""Override for isinstance(instance, cls)."""
9494
# Inline the cache checking
95-
subclass = instance.__class__
95+
try:
96+
subclass = instance.__class__
97+
except AttributeError:
98+
# Fall back to the type when the instance has no __class__,
99+
# matching the behaviour of the built-in isinstance() (gh-153772).
100+
subclass = type(instance)
96101
if subclass in cls._abc_cache:
97102
return True
98103
subtype = type(instance)

0 commit comments

Comments
 (0)