* Resolve number slots via MRO in PyNumber and operator, ensure inherited and dynamically added methods are found.
Use class().mro_find_map() to mimic the same behaviour as CPython.
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
* CTRL+Z then Enter will now close shell on Windows.
* Additional comment.
* Use EOF const
* Add cfg(windows) for EOF_CHAR
---------
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
* Fix ldexp to prevent math range errors
Implemented IEEE 754-compliant handling for large numbers to avoid
overflow and represent results using scientific notation.
Fixes#5471
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
* Fix ldexp to handle denormalized inputs correctly
Detect denormalized input values below f64::MIN_POSITIVE
Scale subnormal inputs by 2^54 to bring them into normalized range
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
* tests(math): remove expectedFailure from testLdexp_denormal
As now we have implemented IEEE 754 format , so this will pass.
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
* Update Lib/test/test_math.py
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
* fixed formate in math.rs
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
---------
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
* Use ruff for unparse backend
* Update `test_future_stmt/*.py` from 3.13.7
* Mark failing tests
* Mark failing test
* Merge remote-tracking branch 'upstream/main' into ruff-unparse
* Reapply ruff code
* remove git symbols
* Unmark passing test
* Update changed files from 3.13.7 -> 3.13.8
* Reapply some patches
* Reaaply patches to `test_bytes.py`
* fix test markers in `test_exceptions.py`
* Patch `test_posix.py`
* Patched `test_{pyexpat,site,sysconfig}.py`
* Patched `test_typing.py`
* Patch failing tests in `test_typing.py`
* Update `seq_tests` from 3.13.8
* Mark failing tests in `test_genericalias.py`
* mark failing tests in `test_pyexpat.py`
* Mark failing tests in `test_posix.py`
* reapply patch
* mark failing tests
* skip flaky test
* Fix sqlite3 Connection initialization check
Add proper __init__ validation for sqlite3.Connection to ensure base class
__init__ is called before using connection methods. This fixes the
test_connection_constructor_call_check test case.
Changes:
- Modified Connection.py_new to detect subclassing
- For base Connection class, initialization happens immediately in py_new
- For subclassed Connection, db is initialized as None
- Added __init__ method that performs actual database initialization
- Updated _db_lock error message to match CPython: 'Base Connection.__init__ not called.'
This ensures CPython compatibility where attempting to use a Connection
subclass instance without calling the base __init__ raises ProgrammingError.
* use Initializer trait
Add proper __init__ validation for sqlite3.Cursor to ensure base class
__init__ is called before using cursor methods. This fixes the
test_cursor_constructor_call_check test case.
Changes:
- Modified Cursor to initialize with inner=None in py_new
- Added explicit __init__ method that sets up CursorInner
- Updated close() method to check for uninitialized state
- Changed error message to match CPython: 'Base Cursor.__init__ not called.'
This ensures CPython compatibility where attempting to use a Cursor
instance without calling the base __init__ raises ProgrammingError.
* Update ruff to 0.14.1
* Fix test regression in `test_compile`
* Unmark passing test
* Update `test_syntax` from 3.13.9
---------
Co-authored-by: Noa <coolreader18@gmail.com>
* Replace skips with expectedFailure markings for SimpleTest
* Uncomment Source-PEP451 tests and apply similar monkey-patches as before
* Uncomment Source-PEP302 tests and apply similar monkey-patches as before
* Uncomment Sourceless-PEP451 tests and apply similar monkey-patches as
before
* Uncomment Sourceless-PEP302 tests and apply similar monkey-patches as
before
* Update `test_call.py` from 3.13.7
* Update `test_yield_from.py` from 3.13.7
* Update more tests to 3.13.7
* More tests to 3.13.7
* Remove patch from passing test