2623 Commits

Author SHA1 Message Date
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
e82b2b98cf Update math.c 2026-01-07 16:47:21 +08:00
blueloveTH
d3d83bd126 minor fix 2026-01-06 14:56:27 +08:00
blueloveTH
82bd2838ce fix abs name 2026-01-06 14:32:00 +08:00
blueloveTH
45f18f8431 add some more registers 2026-01-06 14:09:11 +08:00
blueloveTH
0bdbf17d46 add mark for serializer 2026-01-06 13:53:26 +08:00
blueloveTH
07a65a8f21 add py_execo 2026-01-06 13:24:06 +08:00
blueloveTH
b4ba0d91d5 minor fix 2026-01-06 13:08:14 +08:00
blueloveTH
b775d239a5 fix import pyc 2026-01-06 11:24:33 +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
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
36ee9dddd8 improve periphery 2025-12-18 18:06:27 +08:00
blueloveTH
63334872f6 rename fix 2025-12-17 11:19:49 +08:00
blueloveTH
b60710aa3d fix add module 2025-12-17 11:18:11 +08:00
blueloveTH
671ea14c4f improve ffigen 1 2025-12-16 23:29:05 +08:00
blueloveTH
64ec1ed313 backup 2025-12-16 17:31:07 +08:00
blueloveTH
2eb84b562e add stdc module 2025-12-16 17:10:45 +08:00
blueloveTH
2684038ccf backup 2025-12-09 16:04:38 +08:00
blueloveTH
a094dcb34d Update vm.c 2025-12-09 14:47:58 +08:00
blueloveTH
3731efba5c Update vm.c 2025-12-09 14:47:04 +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
blueloveTH
d11c377f4c some fix 2025-12-07 21:22:13 +08:00
blueloveTH
2ceea8b96d add cute_png.Image 2025-12-07 21:14:59 +08:00
blueloveTH
195d69676f Update array2d.c 2025-12-06 21:43:29 +08:00
blueloveTH
096d93697a Update array2d.c 2025-12-06 21:41:29 +08:00
blueloveTH
10c53e0621 update cov 2025-12-02 22:04:42 +08:00
blueloveTH
ef9b4779f4 improve heap 2025-11-28 12:56:25 +08:00
blueloveTH
ea14ec8463 improve memory profile 2025-11-27 19:50:02 +08:00
blueloveTH
57af91015c Update objectpool.c 2025-11-27 15:23:53 +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
1f782b799c update setup_gc_debug_callback 2025-11-26 23:47:43 +08:00
blueloveTH
673c3e2802 Update heap.c 2025-11-26 23:32:14 +08:00
blueloveTH
272388ed8f Update heap.c 2025-11-26 23:30:22 +08:00
blueloveTH
d03610071a Update time.c 2025-11-26 23:13:54 +08:00
blueloveTH
1d30103f6a fix time module 2025-11-26 22:56:39 +08:00
blueloveTH
e2c065d18d Update time.c 2025-11-26 22:06:15 +08:00
blueloveTH
c3291ef718 Update time.c 2025-11-26 21:55:18 +08:00
blueloveTH
a05eb008a4 refactor threads 2025-11-26 00:37:54 +08:00