Commit Graph
296 Commits
Author SHA1 Message Date
Jeong, YunWon 52301ddbe5 Fix PyFunction doc behavior (#5827) 2025-06-23 22:37:51 +09:00
Jeong YunWon 3f1d39e5db Fix DictUpdate validation 2025-06-22 00:00:07 +09:00
largemouth 0dac02f443 chore: fix some typos in comment
Signed-off-by: largemouth <largemouth@aliyun.com>
2025-06-17 21:59:25 +09:00
Rex Ledesma 4e2e0b41c6 chore: add ruff format --check (#5774)
* chore: add `ruff format --check`

* fix tests
2025-05-12 14:20:01 +09:00
Hanif Ariffin 253cc4e846 Fix usize not using the same hash as PyInt when used as key into a di… (#5756)
* Fix usize not using the same hash as PyInt when used as key into a dictionary

* Fix test that unexpectedly succeed!

* Update extra_tests/snippets/builtin_object.py
2025-05-01 14:55:19 +09:00
Ashwin Naren 8dc1718002 Match statements rewrite (#5628) 2025-04-10 14:00:54 +09:00
2230d6c751 Fix not throwing the same error as CPython in test_pathlib.test_expanduser (#5578)
* Fix not throwing the same error as CPython when trying to expanduser of a non-existent user

Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>

* add pwd test

* Skip pwd test on windows

---------

Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2025-04-05 15:33:33 +09:00
ivan-shrimp 3ad8fd711f fix expression list order
don't emit a no-op when unpacking a single element

assume positional args stored as tuple in extended call
2025-03-31 18:00:19 +09:00
Jeong, YunWon cd89aa51f0 Fix _ctypes.Array base and metaclass (#5620) 2025-03-27 19:45:04 +09:00
Ashwin Naren 01d470ff77 _ctypes pt. 4 (#5582)
* correct error type when symbol is not found

* restype get/set

* base of PyCSimple for PyCArray

* PyCSimple::to_arg

* par down ctypes

* nt._LOAD_LIBRARY_SEARCH_DEFAULT_DIRS

* arguments for ctypes function

* force failure to import ctypes
2025-03-25 09:09:29 +09:00
Ashwin Naren 8e22c399df partially fix sys.getwindowsversion() (#5595) 2025-03-14 11:38:35 +09:00
Ashwin Naren 40e3f49ab7 _ctypes pt. 3 (#5530)
* Initial CFuncPtr implementation

* function calling via libffi

* working no-arg function call

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-03-03 15:53:04 +09:00
Ashwin Naren 235adafa0b tests
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-02-25 17:19:53 +09:00
Ashwin Naren e2b0fe4266 _ctypes pt. 2 (#5524)
* add __version__

* add more types/constants

* shared library and ExternalLibs implementation

* FreeLibrary for windows

* fixed PyCSimple

* LoadLibrary and FreeLibrary for non-windows

* fault-tolerant float equality

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-02-20 10:50:10 +09:00
Ashwin Naren fde87a340c Initial _ctypes implementation (#5519)
* initial _ctypes implementation with _CData, get_errno, and set_errno

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-02-15 16:03:58 +09:00
Ashwin Naren a46ce8ec3a Mark version 3.13.0 (#5495)
* bump to 3.13.1
* fix some tests
* strip left whitespace from doc
* remove specific difflib test that was causing issues
* fix test_enum

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-02-13 14:11:01 +09:00
Jeong, YunWon 8f5cc6174c fix windows sleep 2025-02-07 07:53:28 +09:00
Shubham Patil 38593fbd85 Check operand types in bool or, and, xor to be PyInt (#5461)
* Added Tests for Bitwise or, and, xor type error

* Sync binary operator order comment with actual implementation

* Check operand types in bool or, and, xor to be PyInt

PyNumber methods are expected to type check both arguments.

Dispatch is not done by inverting parameter order for __r<op>__ (example __ror__) when calls are handled via PyNumberMethods
2024-12-30 16:44:27 +09:00
Oskar Skog 3dced01af0 Move os.system from posix.rs to os.rs
Fixes #5100
2024-12-06 12:19:34 +09:00
Jonathan Rotter 7996a10116 await in list comprehension (#5334)
* check if comprehension element contains await

* force execution to pause in async gen
2024-05-27 16:54:56 +09:00
toofooboo 41979f0823 chore: fix some typos in comments (#5243)
Signed-off-by: toofooboo <cmaker@foxmail.com>
2024-04-19 21:10:22 +09:00
Moreal bf985c8ac6 Fix None.__ne__ bug 2024-04-14 13:07:13 +09:00
Evan Rittenhouse 1ab133dae8 None.__ne__(None) should be NotImplemented (#5124) 2024-01-08 15:03:57 +09:00
ChenyG dc4f6994fb Support slice hash (#5123)
* make slice object hashable

* Update test_slice.py from CPython v3.12

* remove TODO

* remove outdated tests
2023-11-25 13:11:17 +09:00
Jeong, YunWonandCPython developers af884cb284 First step for Python 3.12 support (#5078)
* Mark 3.12

* Update importlib from Python 3.12.0

* Update test_importlib from Python3.12

* Mark failings tests from importlib

* Update test.support from Python3.12

* Fix unsupported parser feature

* mark failing test

* Update functools from Python 3.12

* manual type annotation

* slice behavior changed in 3.12

* empty unittest.main returns non-zero

* test_decimal from CPython 3.12

* Mark failing tests

* Update test_unicode from CPython 3.12

* Update test_functools from Python 3.12

* Update enum from Python 3.12

* enum

* Doc format changed

* Update test_module from CPython

---------

Co-authored-by: CPython developers <>
2023-10-22 19:19:05 -07:00
Junho LeeandJeong YunWon d4be55c2ea Add command line parameter -P (#4611)
* Add command line parameter -P

* Modify the value of safe_path to be set

---------

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
2023-08-30 19:32:27 +09:00
Dan NäsmanandDimitrisJim 1cdc5d3294 Add get_int_max_str_digits and set_int_max_str_digits in sys. (#5014)
---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
2023-06-17 23:46:22 +03:00
Jeong, YunWon 3d2c51962b Update parser (#5012) 2023-06-18 02:38:42 +09:00
Jim Fasarakis-Hilliard 5c81649b19 Return SyntaxError with null byte input in eval. (#5013)
* Return SyntaxError with null byte input in eval.

* Special case MacOS for now, add a note for future sanity.
2023-06-17 16:58:28 +03:00
Jim Fasarakis-Hilliard 3a2a1d1b74 Remove unecessary unsafe, remove generated file in extra_snippets. (#4998) 2023-06-11 06:03:01 +03:00
Patrick 0e24cf48c6 Fix abc error message (#4987)
* Print correct error message for abc instantiation

* Update dataclasses abc test
2023-05-23 16:43:52 +09:00
Patrick He 8312831bc9 fix python linting errors 2023-05-19 14:05:36 -04:00
Patrick He 2786831d32 add test 2023-05-19 13:34:33 -04:00
Jeong YunWon 98eef0804e Method overhaul with PyMethodDef 2023-04-30 17:33:23 +09:00
Jeong YunWon f256934f93 Merge define_exception into pyexception 2023-04-24 02:06:13 +09:00
Jeong YunWon 06b0484ea3 Reduce runtime of stdlib_collections_deque 2023-04-20 17:33:36 +09:00
Christopher Gambrell d918f7e51b 'n' support for float format (#4865) 2023-04-16 00:06:20 +09:00
Ankit Kumar Pandey cb6cf107ba handle panic if str is not defined in unraisablehook (#4864) 2023-04-15 23:47:19 +09:00
minhrongcon2000 d39b44c4d3 Fix panic from test_int__format__locale
fix #4588
2023-03-23 15:48:51 +09:00
Tomer Chachamu 8bfbfe3e46 Fix str.splitlines to recognise unicode line terminators 2023-03-18 01:10:59 +00:00
Jeong YunWon 21afc1933a Update cspell for compiler 2023-03-16 22:39:09 +09:00
Jeong YunWon e96dd96864 Refactor zlib and add wbits to zlib.compress() 2023-03-15 23:52:51 +09:00
Zhiyan Xiao 79840126b9 Add test cases for __sub__ and __rsub__ methods of set and frozenset 2023-03-06 22:46:07 +09:00
black formatter 865c4984f6 format tests with black 2023-03-05 22:34:55 +09:00
Jeong YunWon 987ad12181 relocate int-unrelated tests to proper files 2023-03-05 22:34:55 +09:00
DimitrisJim 8294d4ae8e Disallow __debug__ as args, kwargs name. 2023-03-01 12:15:41 +02:00
Jeong YunWon fcacdb2791 macos test for pathconf_names 2023-02-27 14:23:22 +09:00
Jeong YunWon ae3de43a62 retry 10times in windows 2023-02-24 21:44:10 +09:00
Jeong YunWon fbb5e78176 double windows sleep for syntax_async 2023-02-24 15:44:22 +09:00
Jeong YunWon 1336ca5d9d Fix syntax_async 2023-02-23 20:05:34 +09:00