2663 Commits

Author SHA1 Message Date
blueloveTH
beb1557d00 bump to v2.2.0 2026-07-22 12:49:00 +08:00
BLUELOVETH
4e2b40db2d
test fastpath for self.* read (#535)
* test fastpath for `self.*` read

* bak
2026-07-22 12:36:58 +08:00
Md Kaif
7fd7e2db15
fix(float): abs(-0.0) should return 0.0 (#534)
abs(-0.0) returns -0.0 instead of 0.0, and math.fabs(-0.0) does the
same. Both come from the idiom (x < 0) ? -x : x. Since -0.0 < 0 is
false, the negative zero is returned unchanged.

The idiom appears twice, once in dmath_fabs and once open-coded in
float__abs__. Fix dmath_fabs by clearing the sign bit, the same way
dmath_copysign just above it works, and make float__abs__ call the
shared helper instead of repeating the comparison.

abs(-0.0) == 0.0 is true even with the bug, because -0.0 == 0.0 under
IEEE 754, so the added tests compare str(...) to check the sign.
2026-07-21 19:36:08 +08:00
Md Kaif
005550e92a
fix(str): zfill should preserve a leading sign (#533)
zfill writes the padding zeros before the whole string, so a leading
+ or - ends up in the middle of the result instead of staying in front.
For example "-5".zfill(4) gave '00-5' where CPython gives '-005'.

CPython inserts the padding after the sign character, and the sign
counts toward the requested width. Write the sign first, then the
zeros, then the rest of the string. delta is still computed before
this, so the total length is unchanged.

The existing tests only covered unsigned strings, which is why this
went unnoticed. Added three asserts alongside them.
2026-07-21 19:09:11 +08:00
thermalPasteMilkshake
e144785436
re-checking (#531) 2026-07-11 10:25:27 +08:00
blueloveTH
27fde79de6 Update py_object.c 2026-07-09 12:46:04 +08:00
blueloveTH
21ff0751dc fix error name 2026-07-06 17:42:01 +08:00
felfoldy
21248a0baf
Add inspect.signature (#526)
* Add inspect.signature tests

* Implement inspect.signature
2026-07-06 12:00:58 +08:00
Rob McMullen
ea82f56373
Fixed missing '\u85' line separator from str.splitlines (#524)
Very thanks! Your contribution is professional and exceptional.
2026-07-01 11:43:16 +08:00
Rob McMullen
664ce091f8
Added str.splitlines (#523)
* uses same algorithm as CPython, supports all CPython eol characters
  in https://docs.python.org/3/library/stdtypes.html#str.splitlines
2026-06-28 21:56:47 +08:00
blueloveTH
94e71d8581 expose divmod 2026-06-24 16:38:18 +08:00
Steve Chen
894ace2963
Fix JSON integer and float serialization. (#519)
* Fix JSON integer and float serialization.

* Simplify float serialization round-trip fix

* fix round trip check

* fix lexer EOF OOB read and list.sort comparator signature

* revert

* fix cases

* Update os.c

* add `long_v1`

---------

Co-authored-by: blueloveTH <blueloveTH@foxmail.com>
2026-06-18 11:39:41 +08:00
blueloveTH
8c4ed3bc34 fix a bug of str 2026-06-02 20:42:03 +08:00
BLUELOVETH
c624833cfb
Add more gc control to improve performance (#510)
* add more gc control

* fix

* Update gc.c

* Update ceval.c

* [no ci] Update 711_gc.py
2026-04-29 13:55:41 +08:00
blueloveTH
c39d86e999 add __mod__ 2026-04-29 12:54:04 +08:00
blueloveTH
33b26ebd95 Update 930_deterministic_float.py
temp fix

Update math.c
2026-04-22 18:31:23 +08:00
BLUELOVETH
f67b24450b
Merge pull request #504 from pocketpy/test-math-py34
[no ci] Add math tests from python 3.4
2026-04-22 18:15:10 +08:00
Nikhil Goyal
b99d18a9f6 fix(debugger): prevent memory leak in DAP setBreakpoints error path 2026-04-21 17:35:46 +05:30
Nikhil Goyal
973bbdfea4 fix(core): prevent memory leak in py_execo error path 2026-04-17 20:45:27 +05:30
blueloveTH
5d30381e19 fix #498 2026-04-17 11:10:55 +08:00
blueloveTH
d62b1b4eec remove linalg compat script 2026-04-07 10:58:12 +08:00
Hezekiah M. Carty
94c67437a8 Add typing.(override, TypeIs, TypeGuard) 2026-04-04 09:27:33 -06:00
blueloveTH
2600eb5352 Update lz4.c 2026-04-04 16:09:06 +08:00
blueloveTH
2a2e9ae1f2 Update lz4.c 2026-04-04 15:41:15 +08:00
blueloveTH
6e3ed84a9e fix stdc.memcpy 2026-04-04 13:24:25 +08:00
blueloveTH
9a57b281e8 add := fix #446 2026-03-28 17:53:39 +08:00
Steve
37780ed884 feat: implement itemgetter and typing placeholders #486 2026-03-25 23:17:43 -04:00
blueloveTH
005a2725a1 add PK_ENABLE_DLL 2026-03-24 11:02:34 +08:00
blueloveTH
a2f16e5f1f pre-release 2026-03-18 15:10:24 +08:00
blueloveTH
a69cca59f4 post fix
Update dll.c

Update dll.c
2026-03-18 15:04:26 +08:00
wdskuki
984c0eefcc
Fix C extension module import on Linux (#472)
* Fix C extension module import on Linux

* minor fix

---------

Co-authored-by: wdsmini <wdsmini@wdsmini.local>
Co-authored-by: blueloveTH <blueloveTH@foxmail.com>
2026-03-18 14:55:38 +08:00
blueloveTH
cf70668a2f improve py_inspect_currentfunction 2026-03-13 22:05:52 +08:00
blueloveTH
35917fc5f4 fix #468 2026-03-04 14:30:35 +08:00
Tanisha Vasudeva
1d33267092
feat: implement dict.popitem() method (#443) (#467)
* Added popitem()

* fix

---------

Co-authored-by: blueloveTH <blueloveTH@foxmail.com>
2026-03-03 14:55:56 +08:00
blueloveTH
440acd82f8 refactor chunked_array2d 2026-02-23 00:35:00 +08:00
blueloveTH
427d2293e0 add vec4i 2026-02-22 21:47:34 +08:00
blueloveTH
9f1ac4d6c3 fix dmath 2026-02-21 21:30:33 +08:00
blueloveTH
b07db073fd remove colorcvt 2026-02-21 21:12:52 +08:00
blueloveTH
aaf611eff3 up 2026-02-21 21:08:33 +08:00
blueloveTH
5845d0e938 up 2026-02-19 18:41:32 +08:00
blueloveTH
d5b711f50c fix #447 2026-02-05 11:27:12 +08:00
blueloveTH
cbbe319520 fix #458 2026-02-05 11:20:11 +08: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