Commit Graph

57 Commits

Author SHA1 Message Date
Adam Kelly
c8eda3733d Eliminate ctx.set_attr. 2019-04-05 09:50:31 +01:00
Joey
e4e7da3d54 Some socket cleanups 2019-03-23 12:21:55 -07:00
Adam Kelly
386f90fa25 Remove PyContext.get_attr. 2019-03-23 11:29:22 +00:00
ben
ad584df120 Allow context.set_attr to accept PyRef values in addition to PyObjectRef 2019-03-23 19:32:31 +13:00
ben
c1d5ce715f Change isinstance/issubclass to accept PyClassRef instead of PyCObject.
Also changed PyValue::class to return a PyClassRef.
2019-03-23 19:32:31 +13:00
ben
5c7812734d Use more specific ref type than PyObjectRef in PyContext 2019-03-23 13:00:12 +13:00
coolreader18
b0d8935731 Merge branch 'master' into coolreader18/immutable-vm-ref 2019-03-22 07:21:45 -05:00
Adam Kelly
23ee751880 Use vm.get_attribute to access attributes of modules. 2019-03-22 10:54:28 +00:00
coolreader18
a9051ab462 Convert all &mut VirtualMachine to &VirtualMachine 2019-03-22 01:48:14 -05:00
Windel Bouwman
76dbd8c6e8 Apply cargo formatting. 2019-03-18 20:21:35 +01:00
Windel Bouwman
18fc8c150b Merge master 2019-03-18 20:00:00 +01:00
Windel Bouwman
3191725022 Refactor into new-style PyObject 2019-03-18 17:48:46 +01:00
Joey
7bfd2e6e84 Move function items out of pyobject module 2019-03-15 21:27:11 -07:00
Windel Bouwman
c0b7ddfd2c Add write method to io.StringIO 2019-03-13 13:32:57 +01:00
Adam Kelly
0ff5155af9 Rename mk_module to make_module. 2019-03-10 17:10:51 +00:00
Roel Bruggink
8f6257b37f Make open a context manager 2019-03-10 03:11:28 +01:00
Windel Bouwman
6ba5b091e9 Use py_module at more places. 2019-03-09 12:38:14 +01: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
Joey Hain
2d71f6de28 bytes and bytearray 2019-03-03 20:01:07 -08:00
Windel Bouwman
9271115db7 Introduce py_class macro to define classes. (#589)
* Introduce py_class macro to define classes.
* rustfmt
2019-03-03 13:25:00 +00:00
silmeth
5949a9bd13 fix io module being imported multiple times 2019-02-26 20:23:43 +01:00
Joey Hain
f10fa6db44 Remove outer RefCell from PyObjectRef 2019-02-25 21:01:37 -08:00
Joey
eec76ef8e8 Don't require objtype import to use arg_check! macro 2019-02-21 08:38:02 -08:00
Joey
df76ffe116 Replace most relative imports with 2018-style crate 2019-02-20 08:50:53 -08:00
rmliddle
724d9c6dcb Fixed Inheritance on String & BytesIO to reflect CPython 2019-02-19 20:41:43 +11:00
Windel Bouwman
3d2d04596c Merge pull request #343 from ZapAnton/fix_various_clippy
Fixed various small clippy warnings
2019-02-07 17:35:29 +01:00
Adam Kelly
fd344ec1e0 Remove unnecessary to_bigint().unwrap() everywhere. 2019-02-06 17:38:01 +00:00
ZapAnton
3464828499 Fixed various small clippy warnings 2019-02-06 13:24:24 +03:00
Windel Bouwman
3fb0f32a87 Merge pull request #335 from ZapAnton/fix_ptr_arg
Fixed the 'ptr_arg' clippy warnings
2019-02-05 22:36:29 +01:00
ZapAnton
1a6840280b Fixed the 'ptr_arg' clippy warnings
This replaces all the occurrences of &<dynamic collection><T>
with the &[T].

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
2019-02-05 21:22:16 +03:00
ZapAnton
6fb91ddfed Fixed the 'len_zero' clippy warnings
This replaces all the occurrences of the <collection>.len() == 0
with the <collection>.is_empty() and the occurrences of the
<collection>.len() > 0 with the !<collection>.is_empty()

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
2019-02-05 20:54:49 +03:00
rmliddle
86e94f587b Comment fix and use of i64 instead of i32 2019-02-05 22:47:33 +11:00
rmliddle
ca815baeaf Factored out unix dependency 2019-02-05 20:57:06 +11:00
holygits
5cad1b0215 Revert 'file_no' -> 'fileno' attr naming 2019-02-05 16:39:22 +13:00
holygits
8854430651 Better error handling for file io
Add FileNotFoundError
Add PermissionError
Minor idomatic clean ups
2019-02-03 14:53:21 +13:00
Windel Bouwman
328f81a28e Merge pull request #266 from coolreader18/format-mk-module
Format module building in a more readable way
2019-01-30 18:09:17 +01:00
Windel Bouwman
892493e464 Rename PyObjectKind into PyObjectPayload 2019-01-30 18:06:27 +01:00
coolreader18
37b5669bed Fix syntax error 2019-01-30 10:13:55 -06:00
coolreader18
f193291471 Merge branch 'master' into format-mk-module 2019-01-30 10:09:47 -06:00
rmliddle
deb0688a99 Changed buffer imp. to use type + removed ByteArray Kind 2019-01-29 18:40:40 +11:00
coolreader18
e9bfea834a Format module building in a more readable way 2019-01-28 23:02:43 -06:00
rmliddle
9a86bbd718 ByteArray Usage 2019-01-28 18:30:19 +11:00
rmliddle
9efc68efcb Generalized Mode Handling 2019-01-22 21:59:10 +11:00
rmliddle
dda3d7ffb7 Bug fix for sequential Writes, New File Writes 2019-01-21 20:03:36 +11:00
rmliddle
3845e23881 -Logging length in FileIO write, +Bytes to String in TextIOBase 2019-01-19 14:13:12 +11:00
rmliddle
b54738978a Remaining IO open classes: TextBaseIO, TextWrapperIO 2019-01-17 21:20:31 +11:00
rmliddle
30165f6c8a open builtin 2019-01-16 20:16:56 +11:00
rmliddle
edc720e79f Buffered Objects for Open 2019-01-14 20:32:27 +11:00
rmliddle
2bbd4fd18f BufferedIOBase Read 2019-01-13 10:54:47 +11:00
rmliddle
5e1324fd23 os modes 2019-01-09 20:56:08 +11:00