Kanika Kapoor
53f0164b7e
Merge c048ec9faf4bfe02da004dce69471897933c3617 into 24428793fc097b79e75c89350ac4d07f20755eac
2026-02-05 23:14:08 +05:00
blueloveTH
cbbe319520
fix #458
2026-02-05 11:20:11 +08:00
blueloveTH
2281b9bb44
fix #424
2026-01-26 17:24:29 +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
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
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
a55f62c860
set def_line for function
2025-08-22 17:08:18 +08:00
blueloveTH
5dba2cd8e6
remove is_virtual
2025-08-22 16:51:05 +08:00
blueloveTH
ccd00e83a5
fix https://github.com/pocketpy/pocketpy/issues/336
2025-07-03 18:11:35 +08:00
blueloveTH
bf8ec59dc5
fix https://github.com/pocketpy/pocketpy/issues/377
2025-06-27 18:02:14 +08:00
blueloveTH
03e368b755
fix macrobind
2025-06-18 12:51:14 +08:00
blueloveTH
3688f69123
fix read_literal
2025-06-18 00:12:24 +08:00
blueloveTH
57cd40da6f
add compile time func
2025-06-17 23:22:13 +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
340309b5d4
fix https://github.com/pocketpy/pocketpy/issues/367
2025-05-21 19:33:49 +08:00
blueloveTH
fac83607f0
fix a bug
2025-05-19 14:11:48 +08:00
blueloveTH
e473fe7f05
fix a bug
2025-05-19 14:06:20 +08:00
blueloveTH
ae13cc6ea9
fix https://github.com/pocketpy/pocketpy/issues/338
2025-05-19 14:03:18 +08:00
blueloveTH
332a51945c
fix a bug
2025-04-26 22:14:58 +08:00
blueloveTH
0d9bf2e7de
optimize small string
2025-04-26 21:43:57 +08:00
blueloveTH
64a4ae4676
add TraceInfo
2025-03-06 00:05:10 +08:00
blueloveTH
8c8c5f13cf
add a new util script
2025-03-03 19:54:39 +08:00
blueloveTH
68273017b8
fix class in local scope
2025-02-28 19:19:22 +08:00
blueloveTH
4ead475cd1
fix bugs
2025-02-28 16:57:26 +08:00
blueloveTH
2e31412d3a
backup
2025-02-28 15:40:17 +08:00
blueloveTH
5a72730853
backup
2025-02-24 20:56:49 +08:00
blueloveTH
ce97587689
...
2025-01-23 13:14:41 +08:00
blueloveTH
697312cae5
fix impl of pep695
2025-01-06 14:09:39 +08:00
blueloveTH
6d2547723f
replace all free
2024-12-31 11:01:51 +08:00
blueloveTH
fb8e963905
replace all malloc
2024-12-31 10:58:48 +08:00
blueloveTH
3b76266c6a
...
2024-12-26 14:23:23 +08:00
blueloveTH
4df11f3c6f
support empty tuple ()
2024-12-18 19:29:39 +08:00
blueloveTH
89b6fd59f1
...
2024-12-14 13:15:59 +08:00
blueloveTH
93c2608c19
fix context bug
2024-12-06 13:22:02 +08:00
blueloveTH
eb5b84f21a
clean up #defines
2024-11-24 14:47:05 +08:00
blueloveTH
620db020ed
...
2024-11-23 16:38:57 +08:00
blueloveTH
2f96054a4e
remove unused code
2024-11-13 10:51:54 +08:00
blueloveTH
6266161118
fix ** associativity
2024-11-12 19:06:17 +08:00
blueloveTH
cbae815d37
Revert "update parse_expression"
...
This reverts commit 8e3c3354498e1c960185e74522d78befd0e469f4.
2024-11-12 18:59:52 +08:00
blueloveTH
8e3c335449
update parse_expression
2024-11-12 18:52:42 +08:00
blueloveTH
068ec948ec
...
2024-11-12 18:16:28 +08:00
blueloveTH
5a47ae6f42
fix True not False bug
2024-11-12 18:12:58 +08:00
blueloveTH
0ffea55fa0
...
2024-10-26 17:04:32 +08:00
blueloveTH
ff6970101e
...
2024-10-26 16:49:01 +08:00
blueloveTH
00bdfe66cf
...
2024-10-26 16:14:27 +08:00