Commit Graph
14106 Commits
Author SHA1 Message Date
Noa c9161c02b6 Merge pull request #5625 from youknowone/clippy
Apply nightly clippy suggestions
2025-03-26 23:40:42 -05:00
Noa 6e79a2aa8a Merge pull request #5626 from youknowone/remove-unused-deps
Remove unused dependency
2025-03-26 23:37:52 -05:00
Noa bea25a0285 Merge pull request #5627 from youknowone/once-cell
Replace direct use of once_cell to std
2025-03-26 23:36:31 -05:00
Jeong, YunWon c96fd3d900 Merge pull request #4700 from youknowone/cspell
Activate cspell lint
2025-03-27 13:25:08 +09:00
Noa 2ab8716c95 Merge pull request #5623 from coolreader18/refactor-codecs
Refactor codecs
2025-03-26 14:01:26 -05:00
NoaandJeong, YunWon e3d96aa3ca Remove commented-out code
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2025-03-26 12:42:03 -05:00
Jeong YunWon 10d2837041 rework dicts 2025-03-27 02:15:03 +09:00
Jeong YunWon 372e683063 disable cspell from files with a bunch of OS jargons 2025-03-27 01:47:17 +09:00
Jeong YunWon 5f6f6cce92 add cspell to CI 2025-03-27 01:30:09 +09:00
Jeong YunWon 549cce24c8 Add #[pystruct(skip)] 2025-03-26 22:40:43 +09:00
Jeong YunWon 97fa11d526 Remove unused dependency 2025-03-26 20:18:29 +09:00
Jeong YunWon ad5788589b Remove more direct use of OnceCell 2025-03-26 18:22:23 +09:00
Jeong YunWon ec09599d84 Remoce once_cell::Lazy usage 2025-03-26 18:22:23 +09:00
Noa f323d14ed3 Refactor codecs 2025-03-26 02:24:01 -05:00
Jeong YunWon bc38e9dedd Apply nightly clippy suggestions 2025-03-26 14:52:23 +09:00
Noa 7ac90f5cbc Merge pull request #5587 from coolreader18/wtf8
Allow surrogates in str
2025-03-25 21:08:01 -05:00
Noa f3b8d5515a Address comments 2025-03-25 21:06:56 -05:00
Noa bd55baefa6 Optimize Wtf8Codepoints::count 2025-03-25 19:05:12 -05:00
Noa a86126419c Fix remaining tests 2025-03-25 19:05:12 -05:00
Noa 5c22697344 Implement fsencode/fsdecode for FsPath 2025-03-25 19:05:12 -05:00
Noa cc6f3d3051 Make TextIOWrapper wtf8-compatible 2025-03-25 19:05:12 -05:00
Noa b36b32bfe8 Make re wtf8-compatible 2025-03-25 19:05:12 -05:00
Noa 3945d3b2fe Make format wtf8-compatible 2025-03-25 19:05:12 -05:00
Noa ba1b5811ee Update encoding to use wtf8 2025-03-25 19:05:11 -05:00
Noa 7f4582bb23 Make cformat wtf8-compatible 2025-03-25 19:05:11 -05:00
Noa cace112b1a Allow surrogates in str 2025-03-25 19:05:11 -05:00
Noa e3a1031081 Refactor cformat in prep for wtf8 2025-03-26 08:36:16 +09:00
Jeong, YunWon 2a41072b44 Windows installer via cargo-packager (#5549)
* cargo-packager config

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>

* add templates

* update release.yml

* update wix installer config

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-03-25 10:27:45 +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 9779de98b8 _tkinter pt. 1 (#5583)
* Add _tkinter module and gate

* add tkinter module

* add tcl_error

* fix tk setup and add demo

* fix TK_VERSION

* create and TkApp
2025-03-23 12:25:52 +09:00
Noa c585678ec9 Merge format and literal back into this repo (and update malachite) (#5618)
* Merge format and literal back into this repo

* Update format and literal to work

* Update malachite

* Remove RustPython/Parser from Cargo.toml
2025-03-23 09:27:13 +09:00
Jeong, YunWon eaf4cdf5e1 Update to ruff_python_parser 0.11 (#5615)
* Update to ruff_python_parser 0.11

* Try fix windows long paths error
2025-03-23 08:28:29 +09:00
Noa 948368fdb4 Try fix windows long paths error 2025-03-20 11:29:49 -05:00
Myeongseon Choi 0717d5a331 remove wrong cpython_only tag 2025-03-20 14:35:04 +09:00
Myeongseon Choi a9bfaa96c5 remove unnecessary cpython_only 2025-03-20 14:35:04 +09:00
Myeongseon Choi 70a5774737 Update CPYTHON_SPECIFIC_MODS to include '_testlimitedcapi' 2025-03-20 14:35:04 +09:00
Myeongseon Choi 2d3b125d51 Add expectedFailure and skip decorators for RUSTPYTHON tests in test_class.py 2025-03-20 14:35:04 +09:00
Myeongseon Choi 4081c08b5a add cpython_only tag for tests required _testlimitedcapi 2025-03-20 14:35:04 +09:00
Myeongseon Choi 70c36a48a8 Copy test_class.py from cpython v3.13.2 2025-03-20 14:35:04 +09:00
Ashwin Naren 37bd49cf38 add _pylong.py at 3.13.2 2025-03-20 14:33:54 +09:00
Ashwin Naren 081dc4e8ca removed cgib (#5609) 2025-03-20 14:28:53 +09:00
Ashwin Naren a4466adf8b add _aix_support 2025-03-20 14:28:26 +09:00
Noa bfe72689fc Remove -merge from Cargo.lock gitattributes 2025-03-20 14:28:03 +09:00
Noa 950a8d5694 Update to ruff_python_parser 0.11 2025-03-19 22:45:57 -05:00
a6b4ef7f5d Replace Python parser with ruff parser (#5494)
* stage1

* compiler pass build

* introduce rustpython-compiler-source

* stage2

* fixup

* pass compile

* Fix hello world compiler test

* Fix code generation for if-elif-else statement

* Fix code generation for lambda expression

* Fix code generation for integers

* Fix code generation for fstrings

* Fix code generation for if statement

* Fix code generation for if statement

* Fix code generation for if statement

* Fix code generation for fstring

* Fix code generation for class definition

* Replace feature flags

* Initialize frozen core modules

* Allow __future__ import after module doc comment

* Disable ast module

* Commit remaining fixes for compile errors in examples

* Fix some warnings

* Update ast stdlib module

* Update ast stdlib module

* Update ast stdlib module

* Update ast stdlib module

* Update ast stdlib module

* Split ast stdlib module into files

* Fix codegen for positional arguments with defaults

* Update ast stdlib module

* Update ast stdlib module

* Extract string and constant handling from expression.rs

* Always add required fields to AST nodes

* Compile doc strings correctly again

* Enable "ast" Cargo feature by default

* Refactor compilation of big integer literal

* Update ast stdlib module

* Update ast stdlib module

* Update ast stdlib module

* Reset barebones example

* Fix some left-over warnings

* Undo accidential change

* Adapt shell to ruff parser

* Pin parser to v0.4.10

* fix clippy

* Add TODO about interactive mode

* Fix compilation of complex number expression

* Remove moved code

* Update test case to ruff v0.4.10

* Apply suggestion

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>

* Apply suggestion

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>

* Fix compilation of fstring expression

* Fix compilation of fstring expression

* Fix wasm compile errors

* Attach correct source locations to ast objects

* Fix some more wasm compile errors

* Consider compile mode and enable AST stdlib module again

* Fix incorrect AST source location end column

* Fix compile error if "compiler" feature is not enabled

* Fix regrtests

* Fix some test_ast tests

* Add source range to type ignore

* Fix incompatibility with Rust 2024 edition

* Fix todos by implementing missing ast conversions and deleting unused code

* Appease clippy

* Fix remaining ast tests

* Fix remaining ast tests

* Mark/fix remaining tests

* Fix more

* Hacky windows fix

---------

Co-authored-by: Kangzhi Shi <shikangzhi@gmail.com>
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
Co-authored-by: Noa <coolreader18@gmail.com>
2025-03-19 21:06:03 -05:00
+1 45c0fa0e77 Floating Point Power and While Loop JIT (#5614)
* Initial commit for power function

* Float power jit developed

* Addded support for Floats and Ints

* Integration Testing for JITPower implementation.

* Update instructions.rs

* Update int_tests.rs

* Update float_tests.rs

* Updated cranelift and power function to use magic bs

* Updated the compile_fpow accuracy

* updating while loop test

* Update instructions.rs

cranelift more like painlift

* Update instructions.rs

* Update instructions.rs

* initial commit for making stable PR ready features

* fixed final edge case for compile_ipow

* fixed final edge case for compile_ipow

* commenting out compile_ipow

* fixed spelling errors

* removed unused tests

* forgot to run clippy

* Cleaned the branch

* While loop implementation for Cranelift 0.116.1

* Floating Point

* Removed testing print statement

* Resolved some formatting

* Fixed cargo fmt warning

* Fixed int div and int exp issues

* Fixed formatting

---------

Co-authored-by: Nick <nick@Samanthas-MBP.wi.rr.com>
Co-authored-by: JoeLoparco <loparcojoseph@gmail.com>
Co-authored-by: Daniel O'Hear <149127239+dohear@users.noreply.github.com>
Co-authored-by: Joseph Loparco <149088810+JoeLoparco@users.noreply.github.com>
Co-authored-by: Nick <nick@pcp090057pcs.mu.edu>
Co-authored-by: dohear <daniel.ohear@marquette.edu>
Co-authored-by: Nathan Rusch <nathan.rusch@icloud.com>
Co-authored-by: Nick <nick@pcp093574pcs.mu.edu>
Co-authored-by: Joseph Loparco <--global loparcoJoseph@gmail.com>
Co-authored-by: Nick <nick@Samanthas-MacBook-Pro.local>
2025-03-19 13:50:42 -05:00
Noa a596568151 Use lexopt for argument parsing (#5602) 2025-03-19 12:28:58 -05:00
Jeong, YunWon bd94d8d50c Remove uu.py and test_uu.py (#5607)
* Remove uu.py and test_uu.py

* patch email.message
2025-03-17-main-21
2025-03-14 11:42:26 +09:00
Ashwin Naren 7fab64ed9c Revert "Update statistics to 3.13.2 (#5592)" (#5606)
This reverts commit ff970b0e1c.
2025-03-14 11:41:14 +09:00
Ashwin Naren 8e22c399df partially fix sys.getwindowsversion() (#5595) 2025-03-14 11:38:35 +09:00