Kanika Kapoor
565fe1d017
Merge c048ec9faf4bfe02da004dce69471897933c3617 into 6dd3a6dbb3dd26342ba143724330ab802baf897c
2026-02-24 23:50:09 +05:30
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
82bd2838ce
fix abs name
2026-01-06 14:32:00 +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
10c53e0621
update cov
2025-12-02 22:04:42 +08:00
blueloveTH
bfe471dc12
small refactor
2025-11-24 11:41:37 +08:00
blueloveTH
96505249d6
fix #401
2025-11-02 14:45:29 +08:00
blueloveTH
0251f924c3
fix leak and improve pickle
2025-10-08 21:09:14 +08:00
lightovernight
b44a5afc97
upgrade isattach to status ( #398 )
...
* fix an fatal error
* fix bug : rerefrence invaild
* implement better exception support
* fix bug : might crash when eval executes
* upgrade istattach to status
* some fix
* Update ceval.c
---------
Co-authored-by: blueloveTH <blueloveth@foxmail.com>
2025-10-07 21:51:46 +08:00
blueloveTH
9b59a9764e
Update ceval.c
2025-10-07 20:23:22 +08:00
blueloveTH
226febea82
Update ceval.c
2025-09-17 14:16:48 +08:00
blueloveTH
62491dd99a
reimpl str.format
2025-09-17 14:10:26 +08:00
blueloveTH
6f7df0c3af
Update ceval.c
2025-09-17 02:00:55 +08:00
blueloveTH
d3d61dde0c
refactor code
2025-09-08 15:41:44 +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
0ce88fa70c
backup
2025-08-25 20:16:11 +08:00
blueloveTH
5dba2cd8e6
remove is_virtual
2025-08-22 16:51:05 +08:00
blueloveTH
b786fda39d
add exception breakpoint
2025-08-18 11:40:13 +08:00
blueloveTH
01f04b2e41
add py_tpsetfinal
2025-07-17 11:24:39 +08:00
blueloveTH
39958a92d2
Update ceval.c
2025-07-12 21:21:29 +08:00
blueloveTH
7d484f8fa3
fix config.h
2025-07-01 15:13:46 +08:00
blueloveTH
0a44220f66
Update ceval.c
2025-06-30 01:46:28 +08:00
blueloveTH
d5bd9359d9
Update ceval.c
2025-06-30 01:27:38 +08:00
blueloveTH
0b09246a6d
add RELOAD_MODE
2025-06-22 13:01:50 +08:00
blueloveTH
0f8c7d6d11
some refactor
2025-06-22 00:31:19 +08:00
blueloveTH
02b27b66c5
some builtin changes
2025-06-21 20:33:47 +08:00
blueloveTH
c29b389c78
revert
2025-06-17 04:59:44 +08:00
blueloveTH
25cbd9c1f1
some refactor
2025-06-14 15:44:18 +08:00
blueloveTH
141f187705
add py_tpclassattrs and py_tpbase
2025-06-10 23:07:53 +08:00
BLUELOVETH
a53af18ee8
Make py_Name opaque pointer ( #370 )
...
* backup
* backup
* backup
* backup
* backup
* backup
* Update codeobject.c
* backup
* Update ceval.c
* backup
* backup
* fix all
* revert ci
* fix all
* fix all
* fix pybind
* add `PK_ENABLE_CUSTOM_SNAME`
2025-06-05 22:26:28 +08:00
blueloveTH
45828643b7
fix line_profiler
2025-05-28 17:33:03 +08:00
blueloveTH
f4b2cd4a5f
fix line_profiler
2025-05-28 11:24:36 +08:00
blueloveTH
c4ab63ca15
draft LineProfiler
2025-05-28 01:49:33 +08:00
blueloveTH
6708c85f57
add bool reset to settrace
2025-05-26 20:01:01 +08:00
blueloveTH
4438b54846
refactor watchdog
2025-05-22 17:17:06 +08:00
blueloveTH
f9320f8a3e
add PK_ENABLE_WATCHDOG
2025-05-20 18:16:11 +08:00
blueloveTH
ae13cc6ea9
fix https://github.com/pocketpy/pocketpy/issues/338
2025-05-19 14:03:18 +08:00
blueloveTH
8751e82ee0
...
2025-03-12 14:49:08 +08:00
blueloveTH
9ecfc0196f
...
...
...
...
...
...
...
...
...
...
2025-03-11 01:13:16 +08:00
blueloveTH
cef0a4a254
fix #351
2025-03-11 00:16:00 +08:00
blueloveTH
c99f0ee919
partially fix #351
2025-03-10 23:56:02 +08:00
blueloveTH
6b61c85dac
...
2025-03-06 17:02:05 +08:00
blueloveTH
a9955cd210
rename to py_Frame
2025-03-06 12:02:57 +08:00
blueloveTH
db7c577c94
implement settrace
2025-03-06 11:59:50 +08:00
blueloveTH
483e6fcb57
implement tracefunc
2025-03-06 00:48:16 +08:00
blueloveTH
64a4ae4676
add TraceInfo
2025-03-06 00:05:10 +08:00
blueloveTH
19d0cfd4fd
plan to implement tracefunc
2025-03-05 02:14:29 +08:00
blueloveTH
160bc99d04
improve performance
2025-03-04 23:32:14 +08:00
AryanK37
50e5f521c2
Fix typos
2025-03-03 21:23:30 +05:30