Commit Graph

10217 Commits

Author SHA1 Message Date
Jeong YunWon
f737028799 dedent blocks 2022-01-29 11:45:40 +09:00
Moreal
2733202076 Correct typing.io initialization 2022-01-28 23:07:19 +09:00
Moreal
d531e90319 Do not split name if the type is heap type 2022-01-28 23:04:16 +09:00
Moreal
758d52909f Add type.__name__ setter 2022-01-28 23:03:36 +09:00
Jeong YunWon
a0c00b259a Merge pull request #3526 from burck1/module-filecmp
Add the filecmp module from cpython v3.10.2
2022-01-25 20:06:05 +09:00
Alex Burck
986b755f3a cargo run --release -- -m test test_genericalias -v
== RustPython 3.9.0alpha (heads/module-filecmp:7b7378509, Jan 23 2022, 21:05:31) [rustc 1.58.1]
== macOS-11.6.1-x86_64-64bit little-endian
== cwd: /private/var/folders/fv/652pf8d94lg8fmxym5m8g9xh0000gn/T/test_python_1550
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 2.26 [1/1] test_genericalias
test_class_methods (test.test_genericalias.BaseTest) ... ok
test_copy (test.test_genericalias.BaseTest) ... ok
test_dir (test.test_genericalias.BaseTest) ... ok
test_equality (test.test_genericalias.BaseTest) ... ok
test_exposed_type (test.test_genericalias.BaseTest) ... ok
test_generic_subclass (test.test_genericalias.BaseTest) ... ok
test_instantiate (test.test_genericalias.BaseTest) ... ok
test_isinstance (test.test_genericalias.BaseTest) ... ok
test_issubclass (test.test_genericalias.BaseTest) ... ok
test_no_chaining (test.test_genericalias.BaseTest) ... ok
test_no_kwargs (test.test_genericalias.BaseTest) ... ok
test_parameter_chaining (test.test_genericalias.BaseTest) ... ok
test_parameters (test.test_genericalias.BaseTest) ... ok
test_pickle (test.test_genericalias.BaseTest) ... ok
test_repr (test.test_genericalias.BaseTest) ... expected failure
test_subclassing (test.test_genericalias.BaseTest) ... ok
test_subclassing_types_genericalias (test.test_genericalias.BaseTest) ... ok
test_subscriptable (test.test_genericalias.BaseTest) ... ok
test_type_generic (test.test_genericalias.BaseTest) ... ok
test_type_subclass_generic (test.test_genericalias.BaseTest) ... ok
test_unbound_methods (test.test_genericalias.BaseTest) ... ok
test_union (test.test_genericalias.BaseTest) ... ok
test_union_generic (test.test_genericalias.BaseTest) ... expected failure
test_unsubscriptable (test.test_genericalias.BaseTest) ... ok
test_weakref (test.test_genericalias.BaseTest) ... ok

----------------------------------------------------------------------

Ran 25 tests in 0.052s

OK (expected failures=2)
test_genericalias passed

== Tests result: SUCCESS ==

1 test OK.

Total duration: 164 ms
Tests result: SUCCESS
2022-01-23 21:57:01 -06:00
Alex Burck
51c2261762 enable filecmp in Lib/test/test_genericalias.py 2022-01-23 21:56:20 -06:00
Alex Burck
b19874154d cargo run --release -- -m test test_filecmp -v
== RustPython 3.9.0alpha (heads/module-filecmp:7b7378509, Jan 23 2022, 21:05:31) [rustc 1.58.1]
== macOS-11.6.1-x86_64-64bit little-endian
== cwd: /private/var/folders/fv/652pf8d94lg8fmxym5m8g9xh0000gn/T/test_python_607
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 8.81 [1/1] test_filecmp
test_cmpfiles (test.test_filecmp.DirCompareTestCase) ... ok
test_default_ignores (test.test_filecmp.DirCompareTestCase) ... ok
test_dircmp (test.test_filecmp.DirCompareTestCase) ... ok
test_dircmp_subdirs_type (test.test_filecmp.DirCompareTestCase)
Check that dircmp.subdirs respects subclassing. ... ok
test_report_full_closure (test.test_filecmp.DirCompareTestCase) ... ok
test_report_partial_closure (test.test_filecmp.DirCompareTestCase) ... ok
test_cache_clear (test.test_filecmp.FileCompareTestCase) ... ok
test_different (test.test_filecmp.FileCompareTestCase) ... ok
test_matching (test.test_filecmp.FileCompareTestCase) ... ok

----------------------------------------------------------------------

Ran 9 tests in 0.041s

OK
test_filecmp passed

== Tests result: SUCCESS ==

1 test OK.

Total duration: 97 ms
Tests result: SUCCESS
2022-01-23 21:54:07 -06:00
Alex Burck
1f8cc27e77 add os import for _dummy_os 2022-01-23 21:50:36 -06:00
Alex Burck
f5fcbfa7f7 Copy filecmp module and tests from cpython v3.10.2 2022-01-23 21:49:43 -06:00
Jeong YunWon
3328184712 Merge pull request #3508 from youknowone/non-exhaustive
add #[non_exhaustive]
2022-01-22 21:01:14 +09:00
Jeong YunWon
9377134161 add #[non_exhaustive] 2022-01-22 20:22:58 +09:00
Jeong YunWon
64a7523b8a Merge pull request #3523 from hackerwins/staticmethod
Add staticmethod in macros and apply it to maketrans
2022-01-22 18:54:35 +09:00
Hackerwins
f46dd59c91 Remove unexpected successes in test_shlex 2022-01-22 17:32:31 +09:00
Hackerwins
c36c90beab Apply staticmethod to maketrans
https://docs.python.org/3.10/library/stdtypes.html?highlight=maketrans#str.maketrans
2022-01-22 17:32:31 +09:00
Hackerwins
494fc43711 Use staticmethod in macros 2022-01-22 17:32:26 +09:00
Noa
c97e238fd0 Merge pull request #3486 from afpro/main
fix android ssl import error (PyBaseExceptionRef/VirtualMachine/conve…
2022-01-22 01:51:16 -06:00
Jeong YunWon
e3fb3f1367 Merge pull request #3479 from chrismoradi/fix-abstractmethods
Fix __isabstractmethod__ for class/static methods and properties
2022-01-22 16:50:35 +09:00
Jeong YunWon
86ffe9adc4 Merge pull request #3499 from moreal/bugfix/genericalias-getitem-method
Expose `types.GenericAlias.__getitem__`
2022-01-22 15:50:21 +09:00
Moreal
caf045a62c Merge remote-tracking branch 'upstream/main' into bugfix/genericalias-getitem-method 2022-01-22 10:26:43 +09:00
Jeong YunWon
0040d4ef6d Merge pull request #3522 from fanninpm/test-shlex
Update test_shlex.py to CPython 3.9
2022-01-18 17:53:09 +09:00
Padraic Fanning
344539f5c3 Unmark passing test 2022-01-17 11:19:46 -05:00
Padraic Fanning
d347dbb01e Update shlex.py to CPython 3.9 2022-01-17 11:14:43 -05:00
Padraic Fanning
65cb692810 Update test_shlex.py to CPython 3.9 2022-01-17 11:13:36 -05:00
Jeong YunWon
460ab670d4 Merge pull request #3521 from fanninpm/test-random
Update test_random.py to CPython 3.9
2022-01-17 16:58:29 +09:00
Padraic Fanning
4f6486da19 Unmark passing tests 2022-01-16 20:43:55 -05:00
Padraic Fanning
a4ef5f0fd1 Mark erroring tests 2022-01-16 20:39:26 -05:00
Padraic Fanning
510a52b59d Fix case where length = 0 2022-01-16 20:24:56 -05:00
Padraic Fanning
f01463fc12 Add proper error message for negative length 2022-01-16 20:24:18 -05:00
Padraic Fanning
0d979d8b3e Allow random.getrandbits(0) 2022-01-16 20:23:40 -05:00
Padraic Fanning
6b795a7e49 Deduplicate random.randbytes
random.randbytes() is now in random.py
2022-01-16 16:18:06 -05:00
Padraic Fanning
e766513ad3 Update random.py to CPython 3.9*
*for the most part, and keeps our annotations
2022-01-16 14:24:25 -05:00
Padraic Fanning
d59042912e Update test_random.py to CPython 3.9 2022-01-16 13:59:10 -05:00
Noa
9c728dfe53 Merge pull request #3516 from coolreader18/fix-ci
Fix doctests in ci
2022-01-14 19:53:26 -06:00
Noa
1188369956 Fix clippy warnings with 1.58 & convert some format strings to capture-args 2022-01-13 23:53:25 -06:00
Noa
78b17ba940 Fix doctests in ci 2022-01-13 23:26:02 -06:00
Noa
730fda0f9e Fix doc comment for Interpreter 2022-01-13 23:26:01 -06:00
Moreal
964304e8bd Expose types.GenericAlias.__getitem__ 2021-12-12 13:10:33 +09:00
Noa
db3b3127df Merge pull request #3488 from deantvv/frozen-import-helper
import_helper: refactor `frozen_modules`
2021-12-09 11:32:22 -06:00
Jeong YunWon
38513cb468 Merge pull request #3462 from qingshi163/mapping-protocol2
Refactor Mapping Protocol and Item Protocol
2021-12-03 21:18:25 +09:00
Kangzhi Shi
ae538943c0 fix ass_subscript check 2021-12-01 20:40:04 +02:00
Kangzhi Shi
6a996b04c8 move obj downcast to AsMapping 2021-12-01 20:16:18 +02:00
Jeong YunWon
40991b9645 Merge pull request #3489 from TeamTamoad/uuid-3.9
Update uuid to version 3.9.9
2021-12-02 01:28:56 +09:00
Narawit Rakket
bc1bbc06dd test(uuid): remove unnecessary expectedFailure from test_uuid 2021-12-01 20:01:05 +07:00
Narawit Rakket
16a048a552 feat(uuid): update uuid to version 3.9.9 2021-12-01 20:00:48 +07:00
Jeong YunWon
189a55c09f Merge pull request #3455 from BongYang/collection_abc
Update _collection_abc.py Cpython v3.9.7
2021-12-01 21:18:34 +09:00
Dean Li
45d02859cb import_helper: refactor frozen_modules
`frozen_modules` requires non-trivial changes in import (`imp.rs`)
and from the doc it is deprecated since 3.3 which makes this feacture
unlikely to be support on this project.
So instead of implementing this feature, I make `frozen_modules` to
raise exception if `frozen` is required. Other than that, all implementation
is just like the upstream version (except one TODO comment to remind
us there is something not fully supported)
2021-12-01 20:06:38 +08:00
LeeJungwon
d6031baaa6 Update _collection_abc.py Cpython v3.9.7 2021-12-01 16:46:59 +09:00
Noa
021563932b Merge pull request #3453 from youknowone/posonly-kwargs
allow passing a named argument to varkwargs function
2021-11-30 15:22:50 -06:00
afpro
f3ea13df6f fix android ssl import error (PyBaseExceptionRef/VirtualMachine/convert_openssl_error) 2021-11-30 16:04:55 +08:00