320 Commits

Author SHA1 Message Date
Jeong, YunWon
6eed8f42c7 split vm.import and vm.import_from (#5212) 2024-04-08 00:07:38 +09:00
Jeong, YunWon
3737f2a091 make adding a single module simpler for interpreter users (#4792) 2024-03-21 21:48:29 +09:00
Jeong, YunWon
4135da42ac Fix clippy (#5083)
* Fix clippy

* Fix nightly clippy
2023-10-06 03:17:03 +09:00
Dominic Elm
c25aa1add4 Print version and info text when executing the shell (#5057) 2023-08-31 17:46:00 +09:00
Jeong, YunWon
64c66e00d6 Fix encodings related error messages to be less confusing (#5049)
* Move cwd setup to interpreter code

* rework import encodings failure message

* try import_encodings only when `path_list` is set

* std::mem::take instead of drain(..).collect()

* Add empty path_list warnings to import_encodings

* Prepend current working directory when !safe_path

Co-authored-by: fanninpm <fanninpm@miamioh.edu>
2023-08-30 21:45:36 +09:00
Jeong, YunWon
4ba2892168 Better tips for Interpreter & InterpreterConfig (#5047)
Co-authored-by: fanninpm <fanninpm@miamioh.edu>
2023-08-30 20:00:07 +09: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
Dominic Elm
3131d56298 fixup: add note 2023-08-27 02:30:07 +09:00
Dominic Elm
9c2355117c Add ability to initialize cwd from PWD when targeting WASI 2023-08-27 02:30:07 +09:00
Jeong, YunWon
d4d362a9ca Update to Rust 1.72.0 2023-08-27 00:38:10 +09:00
Bobby Palmer
a58ede99f2 add int_max_str_digits input from command line (#5021)
* added int_max_str_digits to settings struct

* changed vm init to use the value from settings

* added error handling and set the settings default to -1 which sets the value to 4300
2023-07-06 01:24:11 +09:00
Jeong YunWon
f1b261b4f8 Adapt byte-offset location 2023-05-10 04:13:30 +09:00
Jeong YunWon
bac1cdc55f Remove compiler_core::CompileError 2023-05-06 18:22:25 +09:00
Jeong YunWon
19224505e8 module objects' type as PyModule 2023-04-20 20:48:57 +09:00
Jeong, YunWon
11aefa3e42 Merge pull request #4735 from youknowone/try_from_borrowed_object
apply TryFromBorrowed more
2023-03-27 15:11:57 +09:00
Jeong YunWon
494c7bda58 method calls to take &PyObject 2023-03-22 22:09:14 +09:00
Jeong YunWon
b08f415f80 remove useless refcount 2023-03-22 02:38:18 +09:00
Jeong YunWon
ab1de2942c type.__name__ & getattr optimization 2023-03-20 19:00:01 +09:00
Noa
456bc80697 Rework frozen modules and directly deserialize to CodeObject<Literal> 2023-03-06 13:45:33 -06:00
Jeong YunWon
f078f79c90 Flatten rustpython_parser interface 2023-02-22 20:32:31 +09:00
Jeong YunWon
a6f8c53924 Break down rustpython_parser::error module
because it doesn't share any common errors but specific error for each sub module
2023-02-22 20:28:01 +09:00
Discord9
763eaed2af feat: impl Detail option for not set SIG_INT 2023-01-31 16:32:40 +08:00
Bijan Naimi
134355e1e6 Improved the fix for the continuing problem in the shell (#4406) 2023-01-05 10:12:29 +09:00
Bijan Naimi
b96f13f15f fixed formatting issues again 2023-01-01 17:20:27 -08:00
Bijan Naimi
a6411b4bff fixed formatting issues 2023-01-01 17:11:44 -08:00
Bijan Naimi
817ed3d4e2 changed the shell logic for handling indents 2023-01-01 15:41:51 -08:00
Bijan Naimi
4afcf76b62 fixed formatting problems 2022-12-30 18:33:29 -08:00
Bijan Naimi
19e5590824 added quiet arg and stdin pipe check 2022-12-30 17:53:20 -08:00
Jeong YunWon
d935fbc445 Fix nightly clippy warnings 2022-12-05 12:18:16 +09:00
Dimitris Fasarakis Hilliard
d07547860b Fix issues with flame-it. 2022-11-23 18:57:53 +02:00
Jeong YunWon
8df1f07df9 InterpreterConfig 2022-09-05 17:56:11 +09:00
Jeong YunWon
597ad013b2 Fix pylib dependency for binary 2022-09-05 17:55:26 +09:00
Jeong YunWon
e8b9b4b4de move path "" to vm.initialize 2022-09-05 10:38:40 +09:00
Jeong YunWon
d32cd53948 Move pylib dependency out of vm 2022-09-03 17:10:26 +09:00
Jeong YunWon
07e339a7fb Create vm::compiler to handle CompileError variations 2022-08-23 01:43:19 +09:00
Jeong YunWon
d876673546 Move out CompileError to core as generic form 2022-08-23 01:30:00 +09:00
Jeong YunWon
9aacd144ca Integrate CompileError to compiler-core::BaseError 2022-08-22 23:18:41 +09:00
Jeong YunWon
31f95eeb1e integrate CodegenError to compiler-core::Error 2022-08-22 18:43:03 +09:00
Jeong YunWon
58f5122b3d codegen::{CompileError -> CodegenError} 2022-08-22 08:42:20 +09:00
Noa
ead2a392cc Update nix and rustyline 2022-08-18 20:02:17 -05:00
Jeong YunWon
42eb6554f0 impl _imp.check_hash_based_pycs 2022-08-15 16:09:32 +09:00
Jeong YunWon
f7a0c5fa19 --install-pip default to ensurepip 2022-08-14 06:13:01 +09:00
joohongpark
9cac7a36dd replace exit with Exitcode (#3956) 2022-08-04 15:46:17 +09:00
Jeong Yunwon
9b2a9d2377 TypeZoo uses &'static Py<PyType> 2022-05-27 10:35:01 +09:00
Jeong Yunwon
9db69d628f {Type,Exception}Zoo holds static ref 2022-05-27 10:23:33 +09:00
Jeong Yunwon
fb52694e41 PyAttributes key is PyStrInterned 2022-05-23 09:03:13 +09:00
Jeong Yunwon
93d1438345 PyObjBag refers Context instead of vm 2022-05-16 04:45:13 +09:00
Jeong Yunwon
e8c59360b9 Interpreter::run 2022-05-01 00:29:40 +09:00
Jeong Yunwon
c83d8fd68d exception-to-exitcode to vm method 2022-05-01 00:23:23 +09:00
Jeong Yunwon
846e38e110 Fix stderr usage in exit handling 2022-04-30 22:59:16 +09:00