Commit Graph
9867 Commits
Author SHA1 Message Date
Noa 8dd18d97be PyObjectRef -> &PyObj, &PyRef<T> -> &Py<T> 2021-10-21 16:49:01 +09:00
Jeong YunWon e5a1c3b137 setattro uses PyObjectPtr 2021-10-21 16:31:22 +09:00
Jeong YunWon 70f8849f05 as_buffer uses ptr 2021-10-21 16:31:22 +09:00
Jeong YunWon 08b5768a82 iternext uses ptr 2021-10-21 16:31:22 +09:00
Jeong YunWon ad7925cac6 rich_compare uses ptr 2021-10-21 16:31:22 +09:00
Jeong YunWon 113ad3bdea as_mapping uses ptr 2021-10-21 16:31:22 +09:00
Jeong YunWon 77b904ce64 __del__ uses ptr 2021-10-21 16:31:22 +09:00
Jeong YunWon 73650259ec Callable with ptr 2021-10-21 16:31:22 +09:00
Jeong YunWon 41b02809f9 PyObjectPtr for __hash__ 2021-10-21 16:31:22 +09:00
Jeong YunWon 16efb5d878 PyObjectPtr: no RC even through function pointers 2021-10-21 16:31:22 +09:00
Jeong YunWon 439923ac4b Merge pull request #3352 from DimitrisJim/ast_mod
`ast` uses `#[pymodule]`
2021-10-21 16:11:50 +09:00
jfh 388f278783 Remove usage of py_module macro from ast. 2021-10-21 08:20:00 +03:00
Jeong YunWon fd2ba5159e Merge pull request #3204 from fanninpm/cleanup-skipped-tests
Clean up some skipped tests
2021-10-21 02:39:15 +09:00
Jeong YunWon 82fac6ce53 Merge pull request #3263 from Snowapril/suggestion
Implement keyword suggestion on `PyAttributeError` and `PyNameError` from cpython 3.10
2021-10-21 02:30:46 +09:00
Jeong YunWon 5ce05fcca0 Merge pull request #3330 from deantvv/uid-gid-from-object
posix: handle case -1 for `Uid` and `Gid`
2021-10-21 01:43:52 +09:00
Jeong YunWon 946f4ecc89 Merge pull request #3334 from DimitrisJim/namespace_fixes
Namespace fixes
2021-10-21 01:35:04 +09:00
Jeong YunWon a83ad7aa1c Merge pull request #3337 from deantvv/fix-os-putenv
os: fix putenv
2021-10-21 01:33:37 +09:00
Dean Li c56db2fafa os: fix putenv
Check key and value before calling `env::set_var`

From doc of `env::set_var`,
```

This function may panic if `key` is empty, contains an ASCII equals sign
`'='` or the NUL character `'\0'`, or when the value contains the NUL
character.
```
2021-10-20 23:15:39 +08:00
Dean Li 86920e21e5 posix: handle case -1 for Uid and Gid
For `Uid` and `Gid`, -1 means does not change the value.
2021-10-20 22:23:36 +08:00
Jeong YunWon 79ed45a4e5 Merge pull request #3350 from DimitrisJim/ci_build
Fix conflict from merges.
2021-10-20 15:37:07 +09:00
jfh 45b0fb3005 Fix conflict from merges. 2021-10-20 09:08:15 +03:00
Jim Fasarakis-Hilliard 0c07b7cbfc Merge pull request #3349 from AP2008/relocate-str
Relocate `vm.to_str` to `obj.str`
2021-10-20 08:54:24 +03:00
Jim Fasarakis-Hilliard b7dab09b7d Merge pull request #3347 from AP2008/relocate-rich_compare
Relocate `vm.rich_compare` to `obj.rich_compare`
2021-10-20 08:49:40 +03:00
Jim Fasarakis-Hilliard 497eead8e9 Merge pull request #3344 from ChJR/feature/relocate_is_instance
Relocate vm.isinstance to obj.is_instance
2021-10-20 08:45:06 +03:00
Aratrik fdd1baec65 Relocate vm.to_str to obj.str 2021-10-20 10:28:24 +05:30
Jim Fasarakis-Hilliard a4ff86190b Merge pull request #3346 from youknowone/set-repr
set repr push to buffer directly
2021-10-20 07:54:08 +03:00
Aratrik c427462554 Relocate vm.rich_compare to obj.rich_compare 2021-10-20 09:44:41 +05:30
snowapril 46347aa6d4 fix PyMethod::get to use vm.get_attribute
As cpython implementation, if `getattro` slot is not
`PyBaseObject::getattro`, then use `vm.get_attribute` not slot method.

Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
snowapril 1bff6a38d1 add decorators on failed tests
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
snowapril 8d0cefeb64 update test_exceptions.py from cpython 3.10 for suggestion feature
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
snowapril 1ee74403e2 Add name field on PyNameError
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
snowapril ff54d8ae53 Add name and obj attributes to PyAttributeError
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
snowapril db0d9df53f Add offer_suggestions on write_exception_inner
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
snowapril 6339390629 Implement keyword suggestion routine
`suggestions.rs` is almost porting of implementation of
[this](https://github.com/python/cpython/pull/16856) and
[this](https://github.com/python/cpython/pull/25397).

Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
Padraic Fanning 253ecda09e Clean up skips in test_unittest 2021-10-19 20:37:35 -04:00
Noa 68379da4c9 Merge pull request #3332 from youknowone/error-control
Handle error control flow in single branch
2021-10-19 15:49:47 -05:00
Jim Fasarakis-Hilliard 850187f246 Merge pull request #3343 from ChJR/feature/relocate_length
Relocate vm.obj_len to obj.length
2021-10-19 22:05:03 +03:00
Jim Fasarakis-Hilliard fcb6551443 Merge pull request #3342 from ChJR/feature/relocate_hash
Relocate vm._hash to obj.hash
2021-10-19 22:04:23 +03:00
Jeong YunWon 96dffd6b13 set repr push to buffer directly 2021-10-20 02:46:35 +09:00
ChJR e33ffd0d82 Replace vm.isinstance to obj.is_instance 2021-10-20 02:42:25 +09:00
ChJR 32e693f234 Replace vm.obj_len to obj.length 2021-10-20 02:33:46 +09:00
ChJR 83c3644add Replace vm._hash to obj.hash 2021-10-20 02:29:58 +09:00
Jim Fasarakis-Hilliard c406b54e89 Merge pull request #3341 from AP2008/relocate-del_attrs
Relocate `vm.del_attr` to `obj.del_attr`
2021-10-19 20:27:56 +03:00
ChJR d0f13f327b Relocate vm.isinstance to obj.is_instance 2021-10-20 02:15:44 +09:00
ChJR 0d32e1ae16 Relocate vm._hash to obj.hash 2021-10-20 02:10:36 +09:00
ChJR 6b14756542 Relocate vm.obj_len to obj.length 2021-10-20 02:08:45 +09:00
Aratrik 72c3a7027c Relocate vm.del_attr to obj.del_attr 2021-10-19 22:01:07 +05:30
Jeong YunWon 6e6a9f6d75 Merge pull request #3339 from DimitrisJim/bench_locals
Use as_object in benchmark locals.
2021-10-19 22:53:06 +09:00
jfh 6ce591d90c Use as_object in benchmark locals. 2021-10-19 16:50:27 +03:00
jfh c6a8511425 Add repr for namespaces. 2021-10-19 16:29:41 +03:00