AnswerDotAI / AnswerDotAI/fastlite
Segmentation fault with APSW 3.50.4.0 when creating database on Python 3.12.8 (Apple M1)
- Dominant language
- Jupyter Notebook
- Stars
- 232
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
## Bug Description
Installing the latest FastLite (0.2.1) results in a segmentation fault when attempting to create a database. The issue is caused by APSW version 3.50.4.0, which is installed as a dependency.
## Environment
- **FastLite version:** 0.2.1
- **APSW version:** 3.50.4.0 (installed by default with FastLite 0.2.1)
- **Python version:** 3.12.8
- **OS:** macOS (Apple M1)
- **SQLite version:** 3.47.1
- **Package manager:** uv
## Steps to Reproduce
1. Install FastLite 0.2.1:
```bash
uv pip install fastlite==0.2.1
```
2. Run minimal reproduction code:
```python
from fastlite import database
db = database('annotations.db')
print("✓ works")
```
3. Observe segmentation fault
## Expected Behavior
Database should be created successfully without crashing.
## Actual Behavior
```
[1] 1608 segmentation fault python test.py
```
The program crashes with a segmentation fault on the `database()` call.
## Workaround
Downgrading APSW to version 3.49.1.0 resolves the issue:
```bash
uv pip install apsw==3.49.1.0
```
After downgrading, the same code executes successfully without any segmentation fault.
## Additional Context
- Raw SQLite3 operations work fine (tested with `import sqlite3; sqlite3.connect('test.db')`)
- The issue appears to be specific to APSW 3.50.4.0
- APSW 3.49.1.0 works correctly with FastLite 0.2.1
## Suggested Fix
Consider pinning APSW to a known working version (e.g., `apsw>=3.49.1.0,<3.50.0`) in FastLite's dependencies until compatibility with APSW 3.50.x can be verified.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.