Skip to content
Open
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
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -75,6 +75,14 @@ jobs:
source .venv/bin/activate
pytest tests/test_basic.py -v || echo "No unit tests found, skipping"

- name: Run stdlib tests
run: |
source .venv/bin/activate
# We need to ensure we can import 'test' module which is usually in Lib/test
# In many CI environments/installations, test suite might be separate or require specific paths.
# For standard python installs it should work if it's installed.
python run_stdlib_tests.py

- name: Run e2e tests
run: |
source .venv/bin/activate
Expand Down
5 changes: 3 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,11 +567,12 @@ The following state-of-the-art optimizations have been implemented or are availa
|--------------|--------|-------------------|
| **Asyncio Function Caching** | ✅ Active | N/A |
| **Native Timers** (`IORING_OP_TIMEOUT`) | ✅ Available | 5.4+ |
| **Multishot Recv** (`IORING_OP_RECV` + `RECV_MULTISHOT`) | ✅ Available | 5.19+ |
| **Native Scheduler** (`Mutex<VecDeque>`) | ✅ Active | N/A |
| **Merged Ring Lock** (single lock per run_tick) | ✅ Active | N/A |
| **Registered FD Table** (`IOSQE_FIXED_FILE`) | ✅ Available | 5.1+ |
| **Zero-Copy Send** (`IORING_OP_SEND_ZC`) | ✅ Available | 6.0+ |
- **Zero-Copy Send (IORING_OP_SEND_ZC)**: Implemented. Available on Kernel 6.0+. Uses `submit_send_zc`.

- **Multishot Recv**: Implemented. (Runtime Feature Detection)

### Available (Runtime Feature Detection)

Expand Down
3 changes: 3 additions & 0 deletions python/uringcore/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ def run_forever(self) -> None:
"""Run the event loop until stop() is called."""
self._check_closed()
self._check_running()

if asyncio._get_running_loop() is not None:
raise RuntimeError("Cannot run the event loop while another loop is running")

self._running = True
self._thread_id = None
Expand Down
18 changes: 15 additions & 3 deletions run_stdlib_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,31 @@ def run_tests():
# We can load it using unittest
print("Loading test.test_asyncio...")


# Python 3.13 location might differ slightly or require strict module naming
try:
from test import test_asyncio
except ImportError:
print("Could not import test.test_asyncio. Are you on a standard Python install?")
return

# Create a test suite
suite = unittest.TestLoader().loadTestsFromModule(test_asyncio)
# Check if test_asyncio is a package or module
if hasattr(test_asyncio, "__path__"):
# It's a package, load all tests from it
print(f"Discovered test_asyncio package at {test_asyncio.__path__}")
suite = unittest.TestLoader().discover(
start_dir=test_asyncio.__path__[0],
pattern="test_*.py",
top_level_dir=os.path.dirname(test_asyncio.__path__[0])
)
else:
# It's a single module
suite = unittest.TestLoader().loadTestsFromModule(test_asyncio)

# Run it
print("Running asyncio stdlib tests with uringcore...")
result = unittest.TextTestRunner(verbosity=2).run(suite)
runner = unittest.TextTestRunner(verbosity=2)
result = runner.run(suite)

if not result.wasSuccessful():
sys.exit(1)
Expand Down
Loading
Loading