286 Commits

Author SHA1 Message Date
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, YunWon
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 Lee
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äsman
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
Jeong YunWon
746cb0493f Merge pull request #4508 from marvinmednick/pathconf_names
Pathconf names
2023-02-22 00:03:43 +09:00
Jeong YunWon
2e27587f15 Merge pull request #4530 from itsankitkp/handle-panic-strftime-new
Return arg in case of invalid param in strftime
2023-02-22 00:03:04 +09:00
Jeong YunWon
42c0752370 less flaky syntax_async (#4536) 2023-02-21 23:17:11 +09:00
Jeong YunWon
e42553867f Update extra_tests/snippets/stdlib_datetime.py 2023-02-21 23:14:53 +09:00
Jeong YunWon
955347e426 posix.pathconf_names only for linux 2023-02-21 19:45:04 +09:00
Marvin Mednick
468f1aa312 Implmentation for os.pathconf_names 2023-02-21 19:15:29 +09:00
Ankit Kumar Pandey
fcfe8e1ac8 Return arg in case of invalid param in strftime
Chrono panics in case of unsupported formats, this patch handles such
cases and returns supplied format as a result.
2023-02-20 21:05:16 +05:30
Jeong YunWon
e5735cde67 Merge pull request #4517 from youknowone/cpython-3.11
trying to go with CPython 3.11
2023-02-20 13:50:10 +09:00
Jeong YunWon
75f3f3c8c4 Fix syntax_async.py for 3.11 2023-02-20 02:06:21 +09:00
Zhiyan Xiao
3b8d670c81 Add unicodedata.east_asian_width (#4523) 2023-02-20 01:38:02 +09:00