Commit Graph

2842 Commits

Author SHA1 Message Date
Noah
904959b0b7 Add builtinfunc.__call__ 2019-10-01 19:15:29 -05:00
Noah
a129080560 Don't forward all type properties to type_type 2019-10-01 21:54:12 +00:00
Noah
c38df6994c Add type.__bases__ property 2019-10-01 21:24:23 +00:00
Noah
418addcffa Fix properties on the type type 2019-10-01 21:23:17 +00:00
Noah
36a4e107d7 Merge pull request #1414 from RustPython/coolreader18/enum-module
Fix weirdness with type.__new__()/type()/metaclass.__new__() in order to support enum
2019-10-01 07:26:31 -05:00
HyeockJinKim
cc8f221c67 Implement __eq__, __ne__ of slice
Compute __eq__ and __ne__ by comparing start,
stop and step of slice

Issue #1431
2019-10-01 14:39:21 +09:00
Aviv Palivoda
da17726a90 Merge pull request #1380 from mpajkowski/os_scandir_contextmanager
os.scandir refinement
2019-09-30 23:53:33 +03:00
coolreader18
78069284a8 Only have type_new on object 2019-09-29 23:22:59 -05:00
Noah
d22cac2dd8 Rename new slots to tp_new 2019-09-29 23:14:37 -05:00
Noah
2bb04f4836 Don't try to put __new__ on every type 2019-09-29 23:14:37 -05:00
coolreader18
b581975ef6 Fix clippy lints 2019-09-29 23:14:36 -05:00
coolreader18
c46b5b50bd Fix weirdness with type.__new__()/type()/metaclass.__new__() 2019-09-29 23:14:31 -05:00
coolreader18
4313abcdad Fix type.__new__ for enum 2019-09-29 23:13:08 -05:00
Johan
dd6ca78c19 extend_class for PyNone (#1436)
* extend_class for PyNone

* Apply clippy
2019-09-29 19:07:41 +02:00
Noah
e95c23f351 Merge pull request #1434 from ChJR/feature/sys._git
Add sys._git (#1358)
2019-09-29 09:46:37 -05:00
Jeong YunWon
ca24ca20e8 Merge pull request #1435 from HyeockJinKim/issue1431
Add __repr__ of slice
2019-09-29 17:38:02 +09:00
HyeockJinKim
442e0d0255 Add __repr__ of slice
Issue: #1431
2019-09-29 16:54:04 +09:00
Windel Bouwman
e2444b1ca3 Merge pull request #1429 from lntuition/fix-int-with-byte
Fix error in int.from_bytes and int.to_bytes
2019-09-29 09:36:39 +02:00
HyeockJinKim
5df5ba67ed extend_class for PySlice 2019-09-29 15:32:58 +09:00
lntuition
8336bc9524 Rename struct and arguments of int.from_bytes and int.to_bytes 2019-09-29 12:27:39 +09:00
lntuition
0700a9e81d Fix argument keyword error in int.to_bytes
Add IntToByteOptions struct to fix int argument keyword error in int.to_bytes
Also fix some ValueError to OverflowError like cPython
2019-09-28 18:33:09 +09:00
lntuition
33131ab79b Fix argument keyword error in int.from_bytes
Add IntFromByteOptions struct to fix int argument keyword error in int.from_bytes

Fixed: #1427
2019-09-28 18:01:22 +09:00
coolreader18
d0f7b5f347 Invert the inverted boolean 2019-09-28 00:41:41 -05:00
Noah
499bf146bd Only overwrite the locals in __build_class__ if it's a class 2019-09-28 00:41:41 -05:00
j30ng
b056044b5a Fix CI Build in Rust 1.38.0 2019-09-28 03:24:47 +09:00
j30ng
3768233c8e Enable Zero-padding with Format Strings 2019-09-28 00:36:48 +09:00
Noah
c181a7cae2 Merge pull request #1424 from dralley/fix-float
Allow float() to be called without an argument
2019-09-26 23:10:38 -05:00
Daniel Alley
32b4a9255f Allow float() to be called without an argument
closes #1421
2019-09-26 22:54:47 -04:00
Daniel Alley
a964f216c4 Fix clippy warnings 2019-09-26 17:45:36 -04:00
Noah
d6d305f4a4 Merge branch 'master' of https://github.com/RustPython/RustPython 2019-09-26 11:06:23 -05:00
Jeong YunWon
f209929dbc Merge pull request #1413 from ChJR/hotfix/exit
Fix exit()
2019-09-26 20:16:08 +09:00
HyeonGyu Lee (Vazrupe)
00823dd923 Fix panic when using negative int for bytes()
Fixes #1401
2019-09-26 13:24:00 +09:00
Marcin Pajkowski
c893a5e307 Implement context manager protocol for os.scandir 2019-09-25 21:44:28 +02:00
Noah
d88167bb73 Bump crate versions 2019-09-25 11:57:38 -05:00
Windel Bouwman
51c3f71eed Merge pull request #1406 from lntuition/fix-1405
Fix int type casting error with negative base value
2019-09-25 17:15:48 +02:00
Hyunji Kim
239115f686 itertools.compress 2019-09-25 22:55:05 +09:00
Sang-Heon Jeon
545e9d39df Fix int type casting error with negative base value
Change base type from u32 to PyIntRef

Fixed: #1405
2019-09-25 01:01:21 +09:00
ChJR
1cf11f5961 Add SystemExit BaseException 2019-09-25 00:26:04 +09:00
Daniel Alley
c6bebae462 Clippy 2019-09-24 09:42:58 -04:00
Daniel Alley
6a3e38d4da Cargo Format 2019-09-24 09:42:50 -04:00
Daniel Alley
ecb3cd4df5 Fix implementation of range slicing
closes #1373
2019-09-24 09:31:22 -04:00
Daniel Alley
36efb50563 Refactor for less allocations 2019-09-24 09:31:22 -04:00
Daniel Alley
6ba7655cdb Rewrite if-let as match statement 2019-09-24 09:31:22 -04:00
Daniel Alley
12b961f212 Fix bug where [::0] did not throw ValueError 2019-09-23 15:46:58 -04:00
Daniel Alley
a6662315c3 Fix typo 2019-09-23 15:41:48 -04:00
Noah
0160cd1159 Merge pull request #1402 from lntuition/Fix-typo
Fix Typo in vm/src/stdlib/pystruct.rs
2019-09-23 12:29:08 -05:00
Noah
eae16695e3 Merge pull request #1409 from ChJR/feature/sys.implementation.name
Change sys.implementation.name to only has lowercase
2019-09-23 12:26:03 -05:00
ChJR
1531d19352 Change sys.implementation.name to only has lowercase 2019-09-24 01:51:33 +09:00
Noah
2a9ae1e797 Merge pull request #1398 from Writtic/module_copysign
Update copysign module of math
2019-09-23 11:31:20 -05:00
Noah
dd9bece293 Fix os_open 2019-09-23 11:26:04 -05:00