Kanika Kapoor
2078b72ab2
Merge c048ec9faf4bfe02da004dce69471897933c3617 into 82b4fff934e22fa37f0e6bce43d541ef2e04c6ca
2026-02-03 00:59:57 +00:00
killcerr
82b4fff934
fix #440 ( #457 )
...
* fix #440
* fix #440
* fix #440
* fix #440
* fix #440
* fix #440
* fix #440
* add test
* add test
2026-02-02 21:45:11 +08:00
blueloveTH
2fa14c5884
fix #455
2026-01-30 14:42:45 +08:00
blueloveTH
cf965a1957
fix #456
2026-01-30 14:40:05 +08:00
blueloveTH
48b70c944e
fix #426
2026-01-26 17:50:03 +08:00
blueloveTH
2281b9bb44
fix #424
2026-01-26 17:24:29 +08:00
blueloveTH
979addecf9
improve extend and choice
2026-01-14 16:49:02 +08:00
blueloveTH
9ef38d605b
fix bool-int ops
2026-01-14 16:14:08 +08:00
blueloveTH
9e4636b619
improve math tests
2026-01-07 16:59:10 +08:00
blueloveTH
a1bfebd30c
Update 300_import.py
2026-01-06 15:18:04 +08:00
blueloveTH
3e182d5c6b
add tests for .pyc
2026-01-06 15:11:39 +08:00
BLUELOVETH
5f7bf4924b
Support running compiled bytecodes ( #421 )
2026-01-05 19:40:21 +08:00
Kanika Kapoor
c048ec9faf
Fix context manager __exit__ not being called on exception ( #395 )
...
Problem: When an exception occurs in a WITH block, __exit__ was not called,
preventing proper cleanup of context managers.
Solution:
1. Wrap WITH block body in try-except structure
2. On normal exit: call __exit__(None, None, None)
3. On exception: call __exit__ with exception info before re-raising
Changes:
- compiler.c: Wrap WITH body in try-except, ensure __exit__ called in both paths
- ceval.c: Update OP_WITH_EXIT to accept three arguments (exc_type, exc_val, exc_tb)
- tests/520_context.py: Add test to verify __exit__ called on exceptions
2025-12-27 01:12:15 +05:30
blueloveTH
1e2135e153
discard '_'
2025-12-25 18:12:04 +08:00
blueloveTH
8ff3f44179
fix https://github.com/pocketpy/pocketpy/issues/394
2025-12-25 17:42:24 +08:00
blueloveTH
ecdea105d6
fix https://github.com/pocketpy/pocketpy/issues/408
2025-12-25 17:40:07 +08:00
blueloveTH
e23fd85ebd
add bin
2025-12-19 16:36:43 +08:00
blueloveTH
2eb84b562e
add stdc module
2025-12-16 17:10:45 +08:00
blueloveTH
6cad72453b
fix error of "A() takes no arguments"
2025-12-09 14:45:08 +08:00
blueloveTH
5c7fb79a14
support del slice for list
2025-12-09 13:43:33 +08:00
zhs628
fc991ab697
Increase coverage 2025 12 01 ( #412 )
...
* 通过引发py_call错误覆盖相关调用者的ok==false分支
* Revert "通过引发py_call错误覆盖相关调用者的ok==false分支"
This reverts commit 36dc0b5d81a02a83dfdeca2d4d6d265f5f793b4b.
* add test
* rename test files
* fix bugs
* fix bugs
2025-12-04 21:01:29 +08:00
blueloveTH
0b91c2968b
add picoterm.sscanf
2025-11-27 14:41:13 +08:00
blueloveTH
6f9b7943d4
add wcwidth and wcswidth
2025-11-27 11:31:14 +08:00
blueloveTH
bfe471dc12
small refactor
2025-11-24 11:41:37 +08:00
BLUELOVETH
c45a5df1e8
add setup_gc_debug_callback ( #406 )
...
* [no ci] backup
* [no ci] backup
* [no ci] fix
* [no ci] fix
* [no ci] fix
* [no ci] fix
* [no ci] fix
* [no ci] fix
* [no ci] fix
* [no ci] fix
---------
Co-authored-by: 张皓晟 <2067144018@qq.com>
2025-11-23 16:30:22 +08:00
blueloveTH
4827e6dea3
add picoterm module
2025-11-23 00:14:14 +08:00
blueloveTH
b0b3bdef86
fix some bug
2025-11-11 16:09:33 +08:00
Daniel Saier
e39e63191f
Add support for some missing escape sequences ( #399 )
2025-10-08 21:56:54 +08:00
blueloveTH
0251f924c3
fix leak and improve pickle
2025-10-08 21:09:14 +08:00
blueloveTH
c30a7adaff
add cpy11__float_div_mod
2025-09-29 11:24:41 +08:00
blueloveTH
354e8fc03f
support divmod for pos float
2025-09-28 19:31:47 +08:00
blueloveTH
50db32f36e
Update 25_rfstring.py
2025-09-17 14:19:48 +08:00
blueloveTH
62491dd99a
reimpl str.format
2025-09-17 14:10:26 +08:00
blueloveTH
f12a379760
add maxlen for deque
2025-09-08 20:07:54 +08:00
blueloveTH
1ab175006d
fix a bug of property
2025-08-31 13:35:25 +08:00
blueloveTH
6e9dd9516b
Update 28_exception.py
2025-08-31 01:52:18 +08:00
blueloveTH
4a81e975c8
fix a bug
2025-08-31 01:28:33 +08:00
blueloveTH
0b7f63ccaf
Update 28_exception.py
2025-08-31 00:13:54 +08:00
blueloveTH
c658b5a7a4
backup
2025-08-31 00:09:55 +08:00
blueloveTH
1d16d1a6f7
disable finally cuz it is buggy
2025-08-30 21:34:37 +08:00
blueloveTH
b57b16efaf
Update 28_exception.py
2025-08-29 23:47:51 +08:00
blueloveTH
5f265e5ec8
Revert "test new sweep algo"
...
This reverts commit 410a3c5dd42d577b9c31713ed0af673f29decfc2.
2025-08-29 23:43:21 +08:00
blueloveTH
410a3c5dd4
test new sweep algo
2025-08-29 23:35:39 +08:00
blueloveTH
648c1bedb4
[skip ci] add a bad case
2025-08-28 19:34:53 +08:00
blueloveTH
054fcba7e4
fix gc bug
2025-08-26 00:51:55 +08:00
blueloveTH
0c897df2c6
backup
2025-08-26 00:48:58 +08:00
blueloveTH
9a23eb6c9e
fix a bug
2025-08-26 00:32:22 +08:00
blueloveTH
0ce88fa70c
backup
2025-08-25 20:16:11 +08:00
blueloveTH
b7abcf19b1
remove trailing newline
2025-08-05 13:40:01 +08:00
blueloveTH
7016a8780c
use 24 bytes data
...
Update pocketpy.h
Update pocketpy.h
2025-07-13 23:55:45 +08:00