Noa
4f0feef92f
Merge pull request #2633 from fanninpm/update-typing
...
Update typing to CPython 3.8
2021-08-21 15:00:44 -05: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
Jeong YunWon
1e7af98765
Merge pull request #2911 from Snowapril/fix-reversed-iter
...
Implement methods for `PyReverseSequenceIterator`
2021-08-19 20:54:44 +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
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
fab274a9e0
Update typing to CPython 3.8
2021-08-18 20:08:17 -04: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
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
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
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
eldpswp99
b49a1e9f5e
remove test_ordered_dict delitem expected failure to passed test
2021-08-17 22:50:32 +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
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
Kim Dong In
6fa88ab05a
Fix failed test pow in test_math
...
add two conditions to raise ValueError for input values
case 1: NaN, when both input values are finite, and base is negative and exponent is non-integer
case 2: divde by zero, when base is 0 exponent is negative value
2021-08-16 16:45:45 +09:00
jfh
f7b6730c5d
Mark failing tests.
2021-08-16 08:42:56 +03:00
jfh
8723952cce
Add test_enumerate from CPython 3.8.
2021-08-16 07:30:38 +03:00
voidSatisfaction
67ede59c32
Add math.prod function and enable its tests
2021-08-15 23:20:28 +09:00
Jim Fasarakis-Hilliard
a4dce8068f
Merge pull request #2887 from DimitrisJim/reverse_deque_iterator
...
Add reverse deque iterator.
2021-08-14 23:06:05 +03:00
jfh
8978e8ccda
Add reverse deque iterator.
2021-08-14 22:07:41 +03:00
Snowapril
7cc2a5431f
Fix frozenset copy to return self ( #2883 )
...
Fix frozenset copy to return zelf if called on frozenset instance
2021-08-14 15:56:22 +03:00
fermian
b1207ab39e
Update test_collections.py
2021-08-14 17:27:43 +09:00
Jeong YunWon
9d99ea9376
Merge pull request #2879 from moreal/bugfix/unnecessary-slot-overwrite
...
Remove unnecessary slot wrapper addition
2021-08-14 16:14:39 +09:00
Moreal
597771d16e
Unmark fixed tests
2021-08-14 15:25:39 +09:00
Jeong YunWon
289ddeaa3c
Merge pull request #2878 from DimitrisJim/sets_reduce
...
Add reduce for set, frozenset.
2021-08-14 12:50:07 +09:00
Noa
cc40ae025e
Merge pull request #2851 from deantvv/fix-os-sendfile
...
Fix os sendfile
2021-08-13 20:34:21 -05:00
jfh
ac0d5ff8b0
Add reduce for set, frozenset.
2021-08-14 01:11:13 +03:00
Jeong YunWon
634a6c2435
Merge pull request #2875 from DimitrisJim/retry_set_ops
...
Retrying contains, remove, discard with a frozenset.
2021-08-14 00:27:20 +09:00
jfh
4a460248b9
Retrying contains, remove, discard with a frozenset.
2021-08-13 17:33:13 +03:00
Jeong YunWon
805abb78e8
Merge pull request #2871 from DimitrisJim/deque_init
...
Deque.__init__ handles initialization.
2021-08-13 14:43:58 +09:00
jfh
64818913b8
Deque.__init__ handles initialization.
2021-08-12 21:04:41 +03:00
Jim Fasarakis-Hilliard
987516bc1f
Merge pull request #2868 from DimitrisJim/reverse_list_it
...
Fix pickling, length hint, iteration for reverse list iterators.
2021-08-12 21:02:55 +03:00
jfh
0c6375c031
Fix pickling, length hint, iteration for reverse list iterators. Refactor common functionality.
2021-08-12 20:26:59 +03:00
eldpswp99
c29a1d2632
remove improper setter of deque.maxlen
...
before: maxlen was writable
d = deque()
d.maxlen = 10 was allowed
after : make maxlen read-only
the before code raise attributError
2021-08-12 22:51:00 +09:00
Jeong YunWon
d2a9316344
Merge pull request #2853 from eldpswp99/support-deque.extend-recursive-call
...
support deque.extend recursive call
2021-08-12 22:20:56 +09:00
eldpswp99
ab8c6bf97a
support deque.insert when idx is gte to len
...
before: when idx >= len it doesn't insert the element to the end
it inserted to index len-1
after: when idx >= len it inserts the element to the end of the deque
2021-08-12 20:03:24 +09:00
Jim Fasarakis-Hilliard
5982e8c11c
Merge pull request #2859 from DimitrisJim/fix_faulty_length_hint
...
Fix length hint for dictionary iterators.
2021-08-12 00:20:06 +03:00
jfh
0c4d579adc
Fix length hint for dictionary iterators.
2021-08-11 23:46:00 +03:00
Nikita Sobolev
090672800a
Adds __rmul__ to collections.deque ( #2844 )
...
* Adds `__rmul__` to `collections.deque`, refs #2834
2021-08-11 17:58:46 +03:00
eldpswp99
2528d25fbe
support deque.extend recursive call
...
before: RustPython hangs when
d = deque('a')
d.extend(d)
after: it extends to the copy of it
2021-08-11 22:33:21 +09:00