Commit Graph

527 Commits

Author SHA1 Message Date
Joey Hain
894fa591d0 Merge remote-tracking branch 'origin/master' into joey/set-dict-payload
Conflicts:
      vm/src/pyobject.rs
2019-03-05 18:39:51 -08:00
Windel Bouwman
6ba25ef1c8 Merge pull request #575 from holygits/fix/bytearray-as-hex
Bytearray hex formatting
2019-03-05 19:58:32 +01:00
Ryan Liddle
b7c03b4be5 Merge pull request #601 from RustPython/ellipsis
Add ellipsis syntax.
2019-03-05 18:30:44 +11:00
Windel Bouwman
458ead0cbc Merge pull request #600 from adrian17/as_ratio
Add float.as_integer_ratio()
2019-03-05 07:22:38 +01:00
Windel Bouwman
883a4944c8 Merge pull request #598 from palaviv/dir-module
Fix module dir
2019-03-05 07:20:12 +01:00
Windel Bouwman
05929b3d7b Add ellipsis type, test and do rustfmt. 2019-03-05 07:19:00 +01:00
holygits
f4ba94a397 Fix formatting 2019-03-05 19:03:25 +13:00
Joey Hain
d9c35f94c2 Convert dict payload 2019-03-04 21:46:21 -08:00
Joey Hain
bf1fe9e5f2 Convert set payload 2019-03-04 21:46:17 -08:00
holygits
0584b85d86 Bytearray hex formatting 2019-03-05 10:59:10 +13:00
Adrian Wielgosik
eed0b3ca45 Add float.as_integer_ratio() 2019-03-04 20:52:56 +01:00
Aviv Palivoda
d24f79b17d dir show module content 2019-03-04 21:27:03 +02:00
Joey Hain
f820aeb1ea Convert complex payload 2019-03-04 09:04:24 -08:00
Adam
4ce0a7c216 Merge pull request #586 from RustPython/joey/float-range-any-payload
Convert more objects to `Any` payload
2019-03-04 14:40:06 +00:00
ben
b1a070acc2 Only use real isinstance/issubclass for builtins and move the real
versions to the vm.
2019-03-04 19:55:58 +13:00
Joey Hain
2d71f6de28 bytes and bytearray 2019-03-03 20:01:07 -08:00
Joey Hain
e7fb116210 Convert more objects to Any payload 2019-03-02 13:27:00 -08:00
Joey Hain
4558dbf210 Fix build (rustfmt) 2019-03-02 13:25:42 -08:00
Windel Bouwman
b98926a0fb Merge pull request #572 from RustPython/joey/fun-with-functions
Derive types, arity, conversions and more from rust fns
2019-03-02 20:56:52 +01:00
Windel Bouwman
30ddb48037 Use PyResult at more places. 2019-03-02 14:10:46 +01:00
Joey Hain
3478251d40 Merge remote-tracking branch 'origin/master' into joey/fun-with-functions
Conflicts:
      vm/src/lib.rs
      vm/src/pyobject.rs
      wasm/lib/src/vm_class.rs
2019-03-02 04:04:22 -08:00
Windel Bouwman
8f52e15d32 Minor clippy fixes. 2019-03-02 11:14:35 +01:00
Windel Bouwman
c8afeae0f7 Merge pull request #577 from RustPython/kill_scope_variant
Remove Scope variant from PyObject.
2019-03-02 10:30:41 +01:00
coolreader18
58e1533b12 Fix clippy lint for float_is_integer 2019-03-01 20:12:54 -06:00
coolreader18
f364ea5943 Fix a bunch of clippy lints 2019-03-01 18:41:45 -06:00
Adam Kelly
c2e2441388 Remove Scope variant from PyObject. 2019-03-01 20:47:09 +00:00
Joey
990c29469a Merge remote-tracking branch 'origin/master' into joey/fun-with-functions
Conflicts:
      vm/src/pyobject.rs
2019-02-28 10:44:46 -08:00
ben
5779124f11 rustfmt 2019-02-28 20:40:32 +13:00
ben
e30d91febc Swap naming of is{instance, subclass} <-> real_is{instance, subclass} 2019-02-28 20:32:57 +13:00
ben
52c32fab3a Call __instancecheck__ and __subclasscheck__ as part of isinstance and issubclass 2019-02-28 20:30:31 +13:00
Windel Bouwman
b0ee1947c7 Merge pull request #565 from alexpantyukhin/add_kwarg_handling_to_int
add kwarg handling for int
2019-02-28 07:36:08 +01:00
Joey Hain
67f8c02087 cleanup 2019-02-27 20:05:04 -08:00
Joey Hain
713edc57ee Convert some objstring methods to new style. 2019-02-27 19:53:31 -08:00
Joey Hain
7f75e3ee8a Significant improvements to new function definition style
- PyRef<T> type for accepting references to payloads.
- Args<T> type for consuming remaining positional args
  (mirrors python `*args`).
- KwArgs<T> type for consuming remaining keyword args
  (mirrors python `*kwargs`).
- OptArg<T> type for consuming remaining keyword args
  (no python code equivalent, only possible in native functions like in cpython).
- PyIterable<T> for accepting an iterator over a sequence of Ts.
- Arity checking (but TypeError messages need work)
2019-02-27 19:53:20 -08:00
apantykhin
7e2c702c5e fix fmt 2019-02-27 21:22:24 +00:00
alexpantyukhin
d806a19c23 add kwarg handling for int 2019-02-27 19:58:32 +00:00
Adam Kelly
676130fc49 Use refcells in frames to solve frame mutability problem. 2019-02-27 10:47:33 +00:00
Adam Kelly
4dd6592aad Keep a stack of frames in the VM. 2019-02-27 10:47:33 +00:00
Windel Bouwman
6c8584cc11 Merge pull request #564 from alexpantyukhin/int_shifts
add overflow errors for int shifts.
2019-02-27 10:55:19 +01:00
alexpantyukhin
70ad78eb21 fix error messages. 2019-02-27 13:22:27 +04:00
Windel Bouwman
9404c7c657 Merge pull request #548 from rickyhan/new_vm_fns
Move set_item to DictProtocol
2019-02-27 09:40:12 +01:00
alexpantyukhin
15e6187583 add overflow errors for int shifts. 2019-02-27 11:11:38 +04:00
ricky han
30145ec6e2 cargo fmt 2019-02-26 17:47:03 -05:00
ricky han
0a2aa1e64b fix compile 2019-02-26 17:39:56 -05:00
Adrian Wielgosik
45da6b8af1 Add list.sort, sorted() 2019-02-26 22:03:45 +01:00
Joey Hain
3dcbc4d2aa Fix set 2019-02-25 22:20:15 -08:00
Joey Hain
92fd12c9bd Fix scope 2019-02-25 22:07:08 -08:00
Joey Hain
d3646925ea Fix float() 2019-02-25 21:57:37 -08:00
Joey Hain
b28b164d75 Fix generators 2019-02-25 21:35:59 -08:00
Joey Hain
e959908a49 Fix iterator 2019-02-25 21:26:15 -08:00