Shahar Naveh
4bf32a04f4
Apply some clipy lints ( #6045 )
2025-07-30 12:16:02 +09:00
Jeong, YunWon
c529c247bb
PyRef::into_ref() ( #3744 )
2025-07-03 14:07:30 +09:00
Jeong YunWon
3673372d3d
Fix cspell warnings
2025-06-27 12:32:59 +09:00
Jeong, YunWon
fe2c9bf361
Fix stable clippy ( #5843 )
2025-06-27 12:12:21 +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
Noa
6b72d2ef5d
Check+lint examples, tests, and benches in CI
2025-03-28 11:26:12 +09:00
Stefan Lukas
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
Noa
a596568151
Use lexopt for argument parsing ( #5602 )
2025-03-19 12:28:58 -05:00
Ashwin Naren
b870b0e1b5
2024 edition formatting
...
Signed-off-by: Ashwin Naren <arihant2math@gmail.com >
2025-02-26 11:48:22 -08:00
James Clarke
1bd143027a
Switched to system implementation of libffi and fixed minor lint errors
2024-06-30 13:29:04 +01:00
Jeong, YunWon
6eed8f42c7
split vm.import and vm.import_from ( #5212 )
2024-04-08 00:07:38 +09:00
rrupy
2f8e5189d3
Use ast::Suite::parse instead of deprecated parse_program. ( #5186 )
2024-03-05 22:37:42 +09:00
Jeong, YunWon
bda7c5cf06
Fix examples/package_embed ( #5096 )
2023-10-18 15:27:51 -07:00
Jeong YunWon
bac1cdc55f
Remove compiler_core::CompileError
2023-05-06 18:22:25 +09:00
Jeong YunWon
98eef0804e
Method overhaul with PyMethodDef
2023-04-30 17:33:23 +09:00
Jeong YunWon
f314328294
lifetime bounded TryFromBorrwoedObject
2023-03-19 04:57:06 +09:00
Jeong YunWon
310a83427c
cspell derive
2023-03-16 22:42:03 +09:00
Jeong YunWon
21afc1933a
Update cspell for compiler
2023-03-16 22:39:09 +09:00
Jeong YunWon
b60271a6cf
deprecate vm.invoke
2023-03-08 01:35:30 +09:00
Jeong YunWon
f078f79c90
Flatten rustpython_parser interface
2023-02-22 20:32:31 +09:00
Jeong YunWon
3942a08e0c
Simplify examples/call_between_rust_and_python
2023-02-09 21:31:32 +09:00
Jan Krecke
a442056e24
changed unraisable exception type to base exception
...
- print exception type to screen to match cpython behaviour
- included sample script to illustrate behaviour at sys.exit()
2022-12-25 13:58:15 +09:00
Jeong YunWon
d935fbc445
Fix nightly clippy warnings
2022-12-05 12:18:16 +09:00
gelox
340816d435
Add direct member access to example
...
In the example demonstrating how to call between rust and python add
direct member access.
2022-11-21 21:50:31 +01:00
gelox
445cb6cc8b
Format
2022-11-21 21:50:22 +01:00
gelox
88299ef0bb
Fix review comments
2022-11-21 21:50:09 +01:00
gelox
357cf7863c
Add example for calling between rust and python
...
Add an example which illustrates how to call between rust and python.
Most importantly there no examples which illustrate how to call rust
from python and it is not obvious how to do this.
2022-11-21 21:49:36 +01:00
Jeong YunWon
d94f638784
Fix nightly clippy warnings
2022-10-16 02:38:50 +09:00
Jeong YunWon
55061c7b6a
new_syntax_error working without full compiler
...
Fix #4100
2022-08-23 05:08:24 +09:00
Jeong YunWon
fc6d614bf4
rustpython-bytecode -> rustpython-compiler-core
2022-08-22 08:42:20 +09:00
Jeong YunWon
d45f3da192
Add source_path to ParseError
2022-08-22 08:42:20 +09:00
joohongpark
9cac7a36dd
replace exit with Exitcode ( #3956 )
2022-08-04 15:46:17 +09:00
Jeong Yunwon
bae68873dd
Adapt BlockExpr to example/generator.rs
2022-06-16 01:07:26 +09:00
Jeong Yunwon
eb8c640518
generator sample
2022-06-16 01:07:26 +09:00
Jeong Yunwon
fcd564ad97
Replace kybra_like to project-neutral example
2022-06-16 01:07:26 +09:00
Jeong Yunwon
f3de183607
Add example kybra_like
2022-06-16 01:07:26 +09:00
Jeong Yunwon
93d1438345
PyObjBag refers Context instead of vm
2022-05-16 04:45:13 +09:00
Jeong Yunwon
6fd5094c05
Remove Interpreter::default() not to trap users init without stdlib
2022-04-30 05:09:33 +09:00
Kangzhi Shi
9a2eef6fab
fix compile
2021-11-27 13:49:05 +02:00
Jeong YunWon
256de1eb46
Move free functions in vm::exceptions to vm methods
2021-10-13 05:53:43 +09:00
Jeong YunWon
5cd375aaa9
clean up functions and methods
2021-10-11 16:10:01 +09:00
Jeong YunWon
cb9bfce007
clean up use statements
2021-09-26 04:05:53 +09:00
Christoph Herzog
bca704ed99
Examples Wording Issue - relative <=> relevant
...
Just a simple drive-by fix for the wording in the freeze example
2021-09-09 13:53:46 +02:00
Noah
99104faaf7
Re-export pyobject::* from the root of the crate
2021-05-20 10:24:07 -05:00
Noah
da6332475b
Merge pull request #2403 from RustPython/coolreader18/bincode-libmap
...
Serialize entire frozen hashmap to bytes
2021-01-29 02:18:13 -06:00
Noah
58503cb0fa
Serialize entire frozen hashmap to bytes
2021-01-29 00:46:51 -06:00
Noah
bcf58d9091
Misc fixes
2021-01-14 12:37:37 -06:00
Noah
a4aef93327
Make all builtin functions have names
2020-12-17 16:29:43 -06:00
Noah
b30ca99a09
Implement string interning
2020-11-08 21:35:04 -06:00
Noah
70907babe6
Fix wasm + examples
2020-11-07 15:43:23 -06:00