Commit Graph
361 Commits
Author SHA1 Message Date
Jeong YunWon 993ea8923c Rename members 2025-06-27 12:32:59 +09:00
Jeong YunWon 7ac61f3840 fix cspell warnings 2025-04-04 16:15:54 +09:00
Noa 0b35946972 Make FromArgs default field take an expression, not a string literal 2025-03-31 11:48:06 +09:00
Jeong YunWon 549cce24c8 Add #[pystruct(skip)] 2025-03-26 22:40:43 +09: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
Ashwin Naren b870b0e1b5 2024 edition formatting
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-02-26 11:48:22 -08:00
Noa 52208b3c90 Update to syn2 (#5556) 2025-02-25 11:54:13 +09:00
Ashwin Naren d698b28ce5 Ensure pymethod cannot be both magic and named simultaneously + macro documentation (#5538)
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-02-22 17:22:31 +09:00
Jeong YunWon 2919df1df5 Mark rust-version 1.78 2024-08-08 23:20:17 +09:00
Jeong YunWon 8673169ee7 0.4.0 2024-08-07 08:38:21 +09:00
James Clarke 08c9a4d86b Added lints and deny.toml 2024-06-25 03:59:40 +01:00
Jeong YunWon 8816cd41d5 0.3.1 2024-04-10 17:39:57 +09:00
Jeong YunWon 1208416b92 0.3.0 release 2023-09-06 18:49:55 +09:00
Jeong YunWon f256934f93 Merge define_exception into pyexception 2023-04-24 02:06:13 +09:00
discord9 94bdb6b97a feature: PyTraverse derive macro for traverse object's childrens(like CPython's tp_traverse) (#4872) 2023-04-23 21:43:49 +09:00
Jeong YunWon 42a22c280d use workspace dependencies 2023-02-06 15:30:38 +09:00
Noa c7faae9b22 Bump all crate versions to 0.2.0 2023-01-11 00:14:28 -06:00
Noa 185dd4a795 Split derive-impl and derive 2022-12-19 18:48:17 -06:00
Noa 38a735af3b Tidy up -derive, make use of let-else 2022-12-19 18:48:17 -06:00
Padraic Fanning 5701061e63 Fix new (v1.66) Clippy warnings 2022-12-17 13:12:11 -05:00
Jeong YunWon 6d140fb0e7 Merge pull request #4223 from youknowone/nightly-clippy
Fix nightly clippy warnings
2022-10-17 13:28:53 +09:00
Steve Shi 2c5cacf9f2 Refactor Mapping Protocol (#4222) 2022-10-17 09:51:22 +09:00
Jeong YunWon d94f638784 Fix nightly clippy warnings 2022-10-16 02:38:50 +09:00
Jeong YunWon ef887adc8b Merge pull request #4208 from moreal/pymember-tbool
* Support `T_BOOL` member type
* Configure `pymember`'s MemberKind manually
* Provide setter in `pymember`
* Implement `Frame.f_trace_lines`
2022-10-15 17:13:27 +09:00
Moreal 6bf6f58ecf Provide setter in pymember 2022-10-15 14:16:42 +09:00
Steve Shi 186990f4f2 Refactor Sequence Protocol (#4137)
* Refactor Sequence Protocol

* rebase

* fixup

* fix inherit slots

* rebase

* fix io slot_init

* mark unsuccess test_xml_etree
2022-10-10 20:21:15 +02:00
Moreal a300a244f1 Configure pymember's MemberKind manually 2022-10-10 17:17:32 +09:00
Jeong YunWon e002191a48 pyproperty -> pygetset
Though it actually create a getset descriptor,
we didn't change the name because its concept was a property for writers.
Now we have `pymember`, another property-like descriptor. So naming them under
same level would be less confusing instead of telling everybody
"it is a getset but we call it pyproperty"
2022-09-18 14:18:49 +09:00
Moreal e7b39bdc8a Implement MemberDescrObject setter 2022-09-18 06:49:37 +09:00
Lee Dogeon 4ccdc19208 Implement __slots__ with member_descriptor (#4106) 2022-08-25 02:11:23 +09:00
Jeong YunWon 60a6714d5d remove Mode from codegen root 2022-08-23 05:15:27 +09:00
Jeong YunWon fc6d614bf4 rustpython-bytecode -> rustpython-compiler-core 2022-08-22 08:42:20 +09:00
Jeong YunWon 6eeaf976a2 sort Cargo.toml dependencies 2022-08-22 08:42:20 +09:00
Jeong YunWon 4d0d9ff1a1 Refactor symboltables and _ast to use codegen when possible 2022-08-22 08:42:20 +09:00
Jeong YunWon fb5ac9e79b reorganize compiler crates 2022-08-22 04:42:42 +09:00
Jeong Yunwon f5ed346716 Fix clippy warnings 2022-08-16 07:36:25 +09:00
Jeong YunWon d59af76be5 Fix compile_bytecode 2022-08-15 20:09:31 +09:00
Jeong Yunwon 055c5cfb97 pyimpl -> pyclass 2022-08-05 01:18:10 +09:00
Kangzhi Shi 069c6c9a1e refactor replace nonnull with pointerslot 2022-07-24 07:36:38 +09:00
Kangzhi Shi c24457521d proto heaptypeext 2022-07-24 07:36:38 +09:00
Lee Dogeon 5d2146ea75 Unify getset words to GetSet 2022-07-18 05:46:57 +09:00
Alexander Guettler b3d9e08076 Fix broken module_names in compile_dir for sub-directories 2022-06-16 11:58:48 +09:00
Jeong Yunwon d05645ea58 update syn-ext 2022-05-28 01:41:55 +09:00
Jeong Yunwon 9b2a9d2377 TypeZoo uses &'static Py<PyType> 2022-05-27 10:35:01 +09:00
Jeong YunWon 0b01e04271 Merge pull request #3638 from youknowone/derive
rustpython-doc as external module
2022-05-27 08:57:31 +09:00
Jeong Yunwon fb52694e41 PyAttributes key is PyStrInterned 2022-05-23 09:03:13 +09:00
Alexander Scharinger 1c734b0626 object.__sizeof__() 2022-05-20 08:49:16 +02:00
Jeong Yunwon e609aca7ea rustpython-doc as external module
not to archive every version of them to repository
2022-05-11 21:43:12 +09:00
Jeong YunWon 88080505e4 Add PyTypSlot::init 2022-04-27 02:22:05 +09:00
Jeong Yunwon a7135024a5 &PyTuple and &PyTupleRef works like &[PyObjectRef] 2022-04-24 12:26:48 +09:00