Commit Graph

5884 Commits

Author SHA1 Message Date
Jeong YunWon
77e33c5338 slot_as_mapping never fails 2021-10-15 05:59:05 +09:00
Jeong YunWon
22b3679529 as_mapping never fails 2021-10-15 05:45:54 +09:00
Jeong Yunwon
0d2e20363a Fix windows build error 2021-10-15 04:47:10 +09:00
Jeong YunWon
8c42d0469c msvcrt uses #[pymodule] 2021-10-15 04:04:16 +09:00
Jeong YunWon
6c318f2de8 Merge pull request #3305 from youknowone/less-pymodule
replace py_module! from errno and sysconfigdata
2021-10-15 04:03:36 +09:00
Jeong YunWon
25e715e300 winreg uses #[pymodule] 2021-10-15 02:38:13 +09:00
Jeong YunWon
806c81b628 winreg constants to #[pymodule] 2021-10-15 02:38:13 +09:00
Jeong YunWon
de3df09e0e Merge pull request #3222 from youknowone/slots
clean up Callable and mark inline for slot methods
2021-10-15 02:16:03 +09:00
Jeong YunWon
b9ffa93eb1 replace py_module! from errno and sysconfigdata 2021-10-15 02:11:35 +09:00
Jeong YunWon
3cfd350628 fix fmt 2021-10-15 02:01:41 +09:00
Jeong YunWon
67a2110073 _winapi uses #[pymodule] 2021-10-15 01:28:23 +09:00
Jeong YunWon
b581d8303e _winapi constants to #[pymodule] 2021-10-15 01:26:49 +09:00
jfh
0e193f8ec3 Implement unconstructible for dict_views. 2021-10-14 17:10:16 +03:00
jfh
37ba1b8a87 Mark internal types as not constructible. 2021-10-14 12:09:31 +03:00
Jeong YunWon
e3bb8404c8 use tuple rather than vec for FuncArgs 2021-10-14 17:31:31 +09:00
Jeong YunWon
2acacec967 Callable::call -> PyType::call for readability 2021-10-14 17:29:54 +09:00
Jeong YunWon
c086e17bc6 mark inilne for slots 2021-10-14 17:28:58 +09:00
Jeong YunWon
67d0cdf8fe inline slot hash 2021-10-14 17:26:05 +09:00
Jeong YunWon
521a50b6a1 clean up Callable 2021-10-14 17:26:04 +09:00
Jeong YunWon
19dc69cef8 Merge pull request #3295 from DimitrisJim/cmp_recursions
Handle recursions when comparing objects.
2021-10-14 16:54:58 +09:00
Jeong YunWon
f44c61efe5 Merge pull request #3293 from DimitrisJim/recursive_inst_subcls
Fix recursions in isinstance and issubclass.
2021-10-14 16:16:13 +09:00
jfh
54a5db29ae Handle recursions when comparing objects. 2021-10-14 10:13:25 +03:00
Jeong YunWon
8cdde9150e Rename slot traits to drop Slot prefix 2021-10-14 13:44:22 +09:00
Jeong YunWon
b99cb2fffc Expose slot wrapper functions 2021-10-14 13:37:46 +09:00
Jeong YunWon
7cae6d24fe Refactor PyType creation 2021-10-14 13:37:45 +09:00
Jeong YunWon
c99b342fcd Merge pull request #3291 from DimitrisJim/unconstructible
Add Unconstructible trait
2021-10-14 13:28:23 +09:00
jfh
ff67ad445c Annotate iterators with Unconstructible. 2021-10-14 05:54:26 +03:00
jfh
4fad83e3cc Fix recursions in isinstance and issubclass. 2021-10-13 19:32:31 +03:00
jfh
8428048820 Add Unconstructible trait. 2021-10-13 18:53:47 +03:00
Jeong YunWon
9c6eaa5603 Merge pull request #3164 from moreal/correct-pystr-startswith
Fix `PyStr::startswith`
2021-10-13 23:01:51 +09:00
Jeong YunWon
9ee566b929 Merge pull request #3288 from Snowapril/add_getattro_for_ga
Add missing `SlotGetattro` for `GenericAlias`
2021-10-13 22:58:22 +09:00
Jeong YunWon
c39d1436e0 Merge pull request #3133 from youknowone/exception-utils-as-vm-methods
Exception utils as vm methods
2021-10-13 22:35:51 +09:00
snowapril
f3fc4e40dd add missing SlotConstructor keyword on impl
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-13 15:14:01 +09:00
snowapril
6d3289f8cb add SlotGetattro on GenericAlias
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-13 15:14:01 +09:00
Jeong YunWon
7d6b36a55f Merge pull request #3273 from youknowone/into-pystrref
migrate TryIntoRef to IntoPyStrRef
2021-10-13 15:06:01 +09:00
Jim Fasarakis-Hilliard
e97ad7d81d Merge pull request #3287 from Snowapril/fix-dir-incompatibility
Fix `dir` incompatibility with cpython
2021-10-13 09:03:05 +03:00
Jim Fasarakis-Hilliard
a81f97dd9e Merge pull request #3280 from DimitrisJim/bad_indexing
Fix deadlocks when slicing mutable sequences.
2021-10-13 08:14:41 +03:00
Aphek
e732669224 Make it possible for rust functions to increase recursion depth (#3252)
Make it possible for rust functions to increase recursion depth
2021-10-13 08:12:12 +03:00
jfh
0539d33ce4 Export saturated index via slicable, use better naming conventions. 2021-10-13 07:05:26 +03:00
snowapril
c10e64647d add missing dir in GenericAlias
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-13 12:40:24 +09:00
snowapril
213ffd9ff3 move dir in builtins to vm
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-13 12:40:24 +09:00
Jeong YunWon
256de1eb46 Move free functions in vm::exceptions to vm methods 2021-10-13 05:53:43 +09:00
Jeong YunWon
319914d021 Optional subrange operation in StartsEndsWithArgs 2021-10-13 05:39:53 +09:00
Jeong YunWon
527a4d9f92 Do not check type when bytecode instruction already knows that 2021-10-13 03:59:30 +09:00
Moreal
a18e6a7b2b Wrap range with its meaning 2021-10-13 00:48:17 +09:00
Moreal
580849dec3 Apply cargo clippy 2021-10-13 00:39:04 +09:00
Moreal
2c66612ee5 Pass slicer manually 2021-10-13 00:39:04 +09:00
Moreal
fa6fa21f70 Pass calculated range instead args 2021-10-13 00:39:04 +09:00
Moreal
643777302b Pass len from caller of anystr::startendswith 2021-10-13 00:39:04 +09:00
Moreal
22eb3018cf Deprecate AnyStr::chars_len again
I implemented 84e5f4212d6a5707748293b9603493661ac33355 again but I deprecate
the method again because it is too expensive.
See also https://github.com/RustPython/RustPython/pull/3164#discussion_r725438699
2021-10-13 00:39:04 +09:00