Noa
0494472c0e
Don't define object.__class_getitem__
2021-08-21 16:15:58 -05:00
Noa
95a947d7e3
__class_getitem__ isn't a special method
2021-08-21 16:11:58 -05:00
Noa
4f0feef92f
Merge pull request #2633 from fanninpm/update-typing
...
Update typing to CPython 3.8
2021-08-21 15:00:44 -05:00
Jeong YunWon
b0d906eddf
Merge pull request #2921 from sobolevn/vm-typos
...
Fixes typos in vm/
2021-08-22 00:03:14 +09:00
sobolevn
5f0cddee81
Fixes typos in vm/
2021-08-21 17:09:48 +03:00
Jeong YunWon
7868070295
Merge pull request #2896 from whjpji/support_unicode_array
...
Support unicode array type.
2021-08-21 22:26:18 +09:00
Jeong YunWon
629fadf920
Fix pip with new typing
2021-08-21 22:14:14 +09:00
Frank King
e652ae8fc0
Support unicode array type.
2021-08-21 20:18:05 +08:00
Myunghoon Park
48437d0b93
adjust dict reverse iterator next to new dict entries structure
2021-08-21 21:15:37 +09:00
voidSatisfaction
e3f48bea95
Add math.dist function and enabled its tests ( #2920 )
...
Add math.dist function and enable its tests
2021-08-21 12:28:49 +03:00
Lee Dogeon
216b597155
Introduce __text_signature__ property
2021-08-21 02:03:39 +09:00
Jeong YunWon
1e7af98765
Merge pull request #2911 from Snowapril/fix-reversed-iter
...
Implement methods for `PyReverseSequenceIterator`
2021-08-19 20:54:44 +09:00
Jeong YunWon
119df1a3ba
Merge pull request #2913 from DimitrisJim/iter_meths
...
Add remaining methods to sequence iterator.
2021-08-19 20:39:20 +09:00
jfh
52149d0e70
Add remaining methods to sequence iterator.
2021-08-19 13:46:14 +03:00
snowapril
aac16f122e
test: remove expectedFailure annotations
...
By implement general PyReverseSequenceIterator and make PyStr to use it,
now three tests fixed.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-19 19:09:23 +09:00
snowapril
aa82a34b4c
iter: remove PyStrReverseIterator
...
This commit removes `PyStrReverseIterator` and its traits for using
general `PyReverseSequenceIterator` for `PyStr` type.
In previous rustpython, `PyStrReverseIterator` type registered in
`TypeZoo`, even it had no methods(e.g. `length_hint`, `reduce`, `setstate`)
Therefore, by removing `PyStrReverseIterator`, `PyStr` enable to use
`PySequenceReverseIterator`.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-19 19:09:23 +09:00
snowapril
0623db2e18
iter: impl methods for PyReverseSequenceIterator
...
This commit implements `length_hint`, `reduce`, `setstate`, `next` for
`PyReverseSequenceIterator`.
In previous rustpython, it did not conduct methods well for
general object.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-19 19:09:23 +09:00
Jeong YunWon
06c4127f47
Merge pull request #2910 from RustPython/coolreader18/pop_back-3
...
Further clarify pop_back using iterator adaptors
2021-08-19 14:12:02 +09:00
Padraic Fanning
650b60cc7e
Remove namespace conflicts with io and re
2021-08-18 20:08:19 -04:00
Padraic Fanning
0892e54a63
Comment out sections of typing.py that don't work
...
They will be fixed later.
2021-08-18 20:08:18 -04:00
Padraic Fanning
79779f87a5
Add '_py_abc' to the frame stack
...
This restores an alteration made by @coolreader18 a while back.
2021-08-18 20:08:18 -04:00
Padraic Fanning
48de03506c
Implement "__class_getitem__" (barely working)
2021-08-18 20:08:18 -04:00
Padraic Fanning
3921ea405c
Make __class_getitem__ always a class method
...
c.f. lines 2695-2725 of typeobject.c in CPython source
2021-08-18 20:08:18 -04:00
Padraic Fanning
fab274a9e0
Update typing to CPython 3.8
2021-08-18 20:08:17 -04:00
Noa
79794019c7
Further clarify pop_back using iterator adaptors
2021-08-18 15:25:35 -05:00
Jim Fasarakis-Hilliard
5ad023535f
Merge pull request #2909 from youknowone/dict-pop
...
remove double-get from DictDataType::pop_back
2021-08-18 22:00:40 +03:00
Snowapril
4632972de4
Implement missing Iterator & ReverseIterator and its methods ( #2906 )
...
Implement missing methods of string iterators.
2021-08-18 21:23:03 +03:00
Jim Fasarakis-Hilliard
0a6edab958
Merge pull request #2905 from DimitrisJim/skip_deadlocks
...
Skip tests that cause RustPython to occasionally hang.
2021-08-18 21:09:13 +03:00
Jeong YunWon
b58e11f1f4
remove double-get from DictDataType::pop_back
2021-08-19 01:41:22 +09:00
jfh
d64cf86cac
Skip tests that cause RustPython to hang.
2021-08-19 00:43:51 +09:00
Padraic Fanning
5d4faf0ccf
Skip tests that sometimes hang the CI
...
Tested with `act`.
2021-08-19 00:42:35 +09:00
Noa
e277acc747
Merge pull request #2902 from eldpswp99/dict-remain-order-after-delete
...
make dict remain order after delete
2021-08-17 15:53:55 -05:00
eldpswp99
564eb2991e
resolving deadlock and redundant lookup, grammatic mistakes
2021-08-18 02:28:58 +09:00
Jeong YunWon
0834ae3039
Merge pull request #2212 from pmp-p/patch-1
...
WASI: add a note for rust wasm target setup
2021-08-18 02:00:48 +09:00
Jeong YunWon
1d89e633dc
Merge pull request #2903 from Snowapril/fix-syntax-test
...
Add syntax error detection routine for global symbol
2021-08-18 01:27:44 +09:00
Jeong YunWon
f20bb6cac7
Merge pull request #2900 from DimitrisJim/reversed_iter_type
...
Add reversed iterator type.
2021-08-18 01:01:45 +09:00
snowapril
38237c30d3
compiler: add is_global() check at top of errors
...
add `!symbol.is_global()` condition check before entrying global symbol
errors
This change will decrease hot path cost.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-18 00:35:14 +09:00
Jeong YunWon
77ab21ce8d
Merge pull request #2463 from fanninpm/test-base64
...
Add test_base64 from CPython 3.8.7
2021-08-17 23:30:38 +09:00
Jim Fasarakis-Hilliard
fe4c3a5460
Merge branch 'master' into reversed_iter_type
2021-08-17 17:12:34 +03:00
eldpswp99
b49a1e9f5e
remove test_ordered_dict delitem expected failure to passed test
2021-08-17 22:50:32 +09:00
eldpswp99
fca7b41744
optimize popitem using nentries which implies next insertion index
2021-08-17 21:24:06 +09:00
snowapril
13bbefdd4e
compiler: impl syntax error detect for global kind
...
This commit fixes `test_global_parap_err_first` test in
[test_syntax.py](https://github.com/RustPython/RustPython/blob/master/Lib/test/test_syntax.py#L678 ) and implement the other syntax errors detection as cpython 3.8 provided for global symbol.
Below syntax error conditions are added.
* name {} is parameter and global
```python
>>>>> def test(a):
..... global a
.....
SyntaxError: name 'a' is parameter and global at line 2 column 2
global a
```
* annotated name {} can't be global
```python
>>>>> def test():
..... a: int
..... global a
.....
SyntaxError: annotated name 'a' can't be global at line 3 column 2
global a
```
* name {} is assigned to before global description
```python
>>>>> a = 100
>>>>> def test():
..... a = 10
..... global a
.....
SyntaxError: name 'a' is assigned to before global declaration at line 3 column 2
global a
```
* name {} is used prior to global declaration
```python
>>>>> a = 10
>>>>> def test():
..... print(a)
..... global a
.....
SyntaxError: name 'a' is used prior to global declaration at line 3 column 2
global a
```
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-17 21:14:13 +09:00
eldpswp99
ce99057c81
make dict delete remains order
2021-08-17 20:41:37 +09:00
Jeong YunWon
6b6a667890
Merge pull request #2901 from Tetramad/pprint
...
Update pprint module to Python3.8
2021-08-17 17:13:45 +09:00
Jeong YunWon
7e3be9163d
Merge pull request #2860 from youknowone/try-from-int
...
TryFromBorrowedObject for int types
2021-08-17 17:12:56 +09:00
Tetramad
f6fbea3019
Update pprint module to Python3.8
...
Add `sort_dicts` parameter to several functions and new `pp` function.
2021-08-17 13:59:07 +09:00
jfh
ca6ab792f0
Add reversed iterator type.
2021-08-17 05:29:49 +03:00
Jim Fasarakis-Hilliard
25eeba86b8
Merge pull request #2899 from sobolevn/fixes-ci
...
Fix the failing CI
2021-08-17 02:04:31 +03:00
sobolevn
10fe2d4763
Attempt to fix the failing CI
2021-08-17 01:32:25 +03:00
Jeong YunWon
2da818c0de
Merge pull request #2894 from owljoa/fix-math-pow-test
...
Fix failed test pow in test_math
2021-08-16 20:55:56 +09:00