Jeong Yunwon
625f8675ae
Introduce AsPyObject to replace IdProtocol
2022-04-17 10:32:01 +09:00
Jeong Yunwon
9be1dc1f8b
no more IdProtocol-depending api
2022-04-17 10:25:02 +09:00
Jeong Yunwon
7edebbf28c
Remove DerefToPyType
2022-04-17 10:16:31 +09:00
Jeong Yunwon
2e6875c8d5
checkpoint
2022-04-17 09:56:42 +09:00
Jeong Yunwon
ba1a9b5b7e
issubclass takes &impl Borrow<PyObject>
2022-04-17 09:50:54 +09:00
Jeong Yunwon
dd09a9489b
Remove DerefToPyType for &DerefToPyType
2022-04-17 09:46:15 +09:00
Jeong Yunwon
dca59e9832
Add borrow for wrapping types
2022-04-17 09:40:39 +09:00
Jeong YunWon
adce97a03f
Merge pull request #3623 from youknowone/jit-warning
...
remove warning from jit test
2022-04-17 09:17:31 +09:00
Jeong YunWon
3a3bf82285
Merge pull request #3624 from youknowone/vm-split
...
split vm into multiple files
2022-04-17 09:17:04 +09:00
Jeong Yunwon
828c28ebb8
Replace vm.extract_elements with TryFromBorrowedObject
2022-04-17 06:09:45 +09:00
Jeong Yunwon
fac28934f6
Refactor extract_elements_with
2022-04-17 06:09:45 +09:00
Jeong Yunwon
60e0e5f95d
Refactor try_value_with
2022-04-17 06:09:45 +09:00
Jeong Yunwon
c2f9498ca6
Split vm.rs into segments
2022-04-17 06:09:45 +09:00
Jeong Yunwon
d7daf42756
atexit hold its features itself
2022-04-17 04:10:10 +09:00
Jeong Yunwon
e8b0732f5e
remove warning from jit test
2022-04-17 04:02:01 +09:00
Jeong YunWon
f817b7f124
Merge pull request #3621 from youknowone/update-asdl
...
Fix update_asdl
2022-04-17 02:47:34 +09:00
Jeong YunWon
27266f3f12
Merge pull request #3620 from youknowone/stdlib-struct
...
Move `_struct` module to stdlib
2022-04-17 02:45:16 +09:00
Jeong Yunwon
4f4e87729b
Fix ast/asdl_rs.py
2022-04-17 02:24:41 +09:00
Jeong Yunwon
be9aaf71a6
Move _struct module to stdlib
2022-04-17 02:00:07 +09:00
Jeong Yunwon
c64b0442a1
split buffer formats to vm/src/buffer.rs
2022-04-17 01:49:52 +09:00
Jeong YunWon
5553558261
Merge pull request #3606 from youknowone/pyobject
...
split pyobject.rs to multiple files
2022-04-17 00:53:19 +09:00
Jeong YunWon
366290bf9a
Merge pull request #3561 from tkmikan/patch-1
...
Add __format__ type check in f-string
2022-04-16 03:42:10 +09:00
tkmikan
3f8aed1c86
Add __format__ type check in f-string
2022-04-16 01:04:35 +09:00
Jeong YunWon
cc8153ffda
Merge pull request #3384 from OddBloke/oddbloke/fstat
...
stdlib/os.rs: update wrong-type exception text for __fspath__
2022-04-16 00:53:32 +09:00
Jeong Yunwon
ff4cf69667
Hide PyLease, PyThreadingConstraint from crate root
2022-04-16 00:49:06 +09:00
Jeong Yunwon
2c92174b17
move PyAttributes to pytype.rs
2022-04-16 00:49:06 +09:00
Jeong Yunwon
86a8831124
vm::funciton::arithmetic
2022-04-16 00:49:05 +09:00
Jeong Yunwon
475d04c67e
IntoPyRef to vm::function
2022-04-16 00:46:37 +09:00
Jeong Yunwon
a5b36e1937
split pyobject.rs
2022-04-16 00:45:19 +09:00
Jeong YunWon
dc795873c3
Merge pull request #3449 from waroad/update_test_string
...
Update test_string.py
2022-04-16 00:40:18 +09:00
Jeong YunWon
1d68ade54e
Merge pull request #3387 from OddBloke/oddbloke/type_name
...
Get (most of) test_type_name passing
2022-04-16 00:39:28 +09:00
Jeong Yunwon
f5fa66205e
use entry to fill attributes
2022-04-16 00:38:12 +09:00
Daniel Watkins
9712a322f9
Lib/test: remove expectedFailure decorator from now-fixed tests
...
Evidently the changes to how we handle `__name__` and `__qualname__`
have fixed the errors we were seeing in test_enum and test_typing.
2022-04-16 00:38:12 +09:00
Daniel Watkins
2960ebc0d1
test/test_builtin.py: run most of test_type_name
...
The remaining failures are due to what appears to be a fundamental
difference between how RustPython and CPython handle surrogate
characters/codepoints-which-aren't-characters. They are wrapped with
`self.assertRaises(AssertionError)` so we will notice once they start
passing.
https://github.com/RustPython/RustPython/issues/935 is most likely
related.
2022-04-16 00:38:12 +09:00
Daniel Watkins
f6bf48a8f1
builtins/pytype.rs: set __qualname__ in slot_new
...
This matches CPython's behaviour, and means that setting `__name__`
won't modify `__qualname__`.
(This is done in type_new_set_ht_name in typeobject.c in CPython.)
2022-04-16 00:38:12 +09:00
Daniel Watkins
f971a0058f
builtins/pytype.rs: set __module__ in type() calls
2022-04-16 00:38:12 +09:00
Daniel Watkins
9192b77922
builtins/pytype.rs: don't permit null chars in type names
...
This is presumably a hard requirement for CPython, but even though we
don't use null-terminated strings, we should retain consistency with
their API.
2022-04-16 00:37:45 +09:00
Daniel Watkins
98079878cb
stdlib/os.rs: update wrong-type exception text for __fspath__
...
In CPython this error message is constructed by path_converter in
posixmodule.c[0].
[0] https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L1260
2022-04-16 00:10:30 +09:00
Jeong YunWon
3cb8f86b65
Merge pull request #3617 from youknowone/cleanup
...
clean up imports and useless allow attributes
2022-04-16 00:08:36 +09:00
waroad
42fcc5eb46
Update test_string.py
...
Location of errors have changed
Co-authored-by: Jeong YunWon <jeong@youknowone.org >
2022-04-16 00:00:31 +09:00
waroad
8bcd60bd1b
Update string.py from 3.8.3
...
update file to matching version
2022-04-16 00:00:31 +09:00
Jeong Yunwon
6357a1acbe
clean up imports and useless allow attributes
2022-04-15 23:58:20 +09:00
Jeong YunWon
28eff1d56d
Merge pull request #3616 from youknowone/fix-ci
...
Fix CI
2022-04-15 20:50:45 +09:00
Jeong Yunwon
0fb5327271
run clippy on nightly to avoid current stable crash
2022-04-15 20:41:05 +09:00
Jeong Yunwon
15b4205d1a
use unsigned_abs()
2022-04-15 20:24:55 +09:00
Jeong YunWon
61f7d241c0
Merge pull request #3615 from youknowone/fix-nightly
...
Fix nightly build error (issue #3614 )
2022-04-15 19:46:24 +09:00
Jeong Yunwon
49016b6a94
Fix nightly build error (issue #3614 )
...
suggested by @petrochenkov
in https://github.com/RustPython/RustPython/issues/3614#issuecomment-1099980599
2022-04-15 18:52:26 +09:00
Jeong YunWon
10a2b0c6c2
Merge pull request #3605 from youknowone/pycontext-new
...
PyContext::new don't create a new context
2022-04-14 04:45:00 +09:00
Jeong YunWon
6c908698a3
Merge pull request #3604 from youknowone/arg-sequence
...
rename non-protocol PySequence to ArgSequence to avoid confusion
2022-04-14 03:59:28 +09:00
Jeong Yunwon
df1aa5add7
PyContext::new don't create a new context
2022-04-14 03:58:45 +09:00