snowapril
db0d9df53f
Add offer_suggestions on write_exception_inner
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-10-20 10:19:42 +09:00
Aratrik
d6fc20f64e
Relocate vm.set_attr to obj.set_attr
2021-10-19 14:50:53 +05:30
jfh
7bc10da154
Relocate vm.get_attribute to obj.get_attr.
2021-10-17 10:30:21 +03:00
Jeong YunWon
e3bb8404c8
use tuple rather than vec for FuncArgs
2021-10-14 17:31:31 +09:00
Jeong YunWon
256de1eb46
Move free functions in vm::exceptions to vm methods
2021-10-13 05:53:43 +09:00
Jeong YunWon
616dfc19e2
vm.new_tuple to convert rust tuple to python tuple
2021-10-11 01:06:07 +09:00
snowapril
1deb59ce40
modify PyType::name caller codes to use BorrowedValue
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-10-10 16:07:24 +09:00
Jeong YunWon
4f9f939f3c
Merge pull request #3221 from youknowone/pyref-intoobject
...
Remove PyRef::into_object()
2021-10-08 02:36:02 +09:00
ChJR
296f18326e
Make OSError subclass instead of itself
2021-10-08 02:33:44 +09:00
Jeong YunWon
4fb1cdb316
PyObjectWrap
2021-10-08 01:56:00 +09:00
Jeong YunWon
38b62e2585
PyObjectRef::try_into_value
...
as counterpart of TryFromObject::try_from_object
This is useful when the type to infer is known
2021-10-06 20:15:13 +09:00
Jeong YunWon
92de3619fa
move IntoPy{Object, Exception, Result} to vm::function
...
which are used to define function arguments - those functions are mostly placed in the crate
2021-10-06 19:10:16 +09:00
Jeong YunWon
2c8020a081
clean up py* attributes names
2021-10-02 16:59:33 +09:00
Jeong YunWon
fb25a15f2c
split rustpython-stdlib crate
2021-10-01 01:54:04 +09:00
Jeong YunWon
c3d8e792b7
tp_ -> slot_
2021-09-30 02:51:44 +09:00
Jeong YunWon
fb4581bd45
vm::sysmodule -> vm::stdlib::sys
2021-09-30 02:19:58 +09:00
Jeong YunWon
c3f46c773e
Expose exception types under vm::builtins
2021-09-30 01:12:45 +09:00
Jeong YunWon
06e439ee58
Merge pull request #3150 from deantvv/io-error-with-filename
...
OSError with filename and filename2
2021-09-30 00:18:13 +09:00
Dean Li
3af3b1f0d9
OSError with filename and filename2
...
Implement OSError members `filename` and `filename2` by adding a new
struct `IOErrorWithFilename` will implement `IntoPyException`.
This PR will *NOT* pass more CPython test(*) but will allow user to
access `attr:filename` in OSError exception which IMO is a important
feacture.
2021-09-28 20:08:57 +08:00
Jeong YunWon
dad7fae8ac
remove create_exception_type
2021-09-28 16:45:07 +09:00
Jeong YunWon
ba5ce91a15
remove exception_slots
2021-09-28 16:38:58 +09:00
Jeong YunWon
0317647e7a
clean up function::Arg imports
2021-09-22 21:03:16 +09:00
Jeong YunWon
ffef73c1d7
split Arg{Callble,Iterable} from pyobject.rs
2021-09-22 21:01:44 +09:00
Jeong YunWon
a5309a7888
Rename Py{Callable, Iterable} to Arg{..}
...
which were not a python object but just argument helper
2021-09-22 20:58:26 +09:00
Padraic Fanning
0ea56025ec
Replace master with main
...
Fixes #3067
2021-09-15 17:54:54 -04:00
Nikita Sobolev
b723bbfbb5
All exceptions are now modified with extend_exception! macro
2021-09-16 03:17:19 +09:00
Lee Dogeon
63b1696458
Derive name from tp_name
2021-09-09 00:07:36 +09:00
eldpswp99
55709b71b6
implement SlotConstructor for every class
2021-09-04 20:18:13 +09:00
sobolevn
a725e2b8cf
Adds alternative extend_exception! macro
2021-08-20 00:02:53 +03:00
sobolevn
81654d4cff
More exception types
2021-08-19 23:32:47 +03:00
sobolevn
155da36b73
More progress, adds more exception types and more tests
2021-08-19 15:30:17 +03:00
sobolevn
b5c03c6804
Adds pyexception macro
2021-08-19 10:40:15 +03:00
sobolevn
0ab0c0b50e
Typo
2021-08-18 22:20:36 +03:00
sobolevn
fc4a948ea9
WIP: adds better exception macro, refs #2771
2021-08-18 22:20:36 +03:00
sobolevn
cf6195934a
Cleans up pyproperty definitions
2021-08-12 19:03:25 +03:00
Jeong YunWon
4e60bcd741
clean up #[pymethod(magic)]
2021-08-12 06:44:52 +09:00
Jeong YunWon
a611ba2e45
handle cause and context with same code block
2021-08-10 04:20:51 +09:00
sobolevn
83914a9f54
Fixes infinite recursion on raise e from e, refs #2779
2021-08-09 20:58:36 +03:00
sobolevn
e939346850
Adds class field to PyGetSet to fix __qualname__ and (in future) repr, refs #2790
2021-08-08 18:53:57 +03:00
Nikita Sobolev
73ae7a6116
Adds __qualname__ to PyBuiltinMethod
2021-08-01 09:16:27 +09:00
Jeong YunWon
ff4efd0f60
Fix unnessessary borrow
2021-07-30 02:32:16 +09:00
Noah
68922a91a4
Overhaul CString handling
2021-06-10 20:53:27 -05:00
Noah
3d9812e748
Remove remaining borrow_value() uses
2021-05-20 10:30:42 -05:00
Noah
46e94b5720
Replace PyTuple.borrow_value() with .as_slice()
2021-05-20 10:29:49 -05:00
Noah
99104faaf7
Re-export pyobject::* from the root of the crate
2021-05-20 10:24:07 -05:00
Noah
b2470bba85
More socket stuff
2021-05-03 12:26:54 -05:00
Noah
f608626f27
Fix tests in test_ntpath/add functions to the nt module
2021-04-27 21:04:59 -05:00
Noah
2e33b227b3
Impl py_io::Write for String
2021-04-25 18:03:28 -05:00
Noah
e6d9af43ca
Miscellaneous fixes for aiohttp
2021-02-20 21:04:29 -06:00
Noah
0ab451c519
Rework the vm exception stack to handle errors better
2021-02-15 17:44:48 -06:00