Commit Graph

5992 Commits

Author SHA1 Message Date
Noah
16ff022014 Add the rustpython_common::{cell, rc} modules 2020-07-25 15:22:03 -04:00
Noah
0251f3e9a2 Move pyhash and some float ops to rustpython-common 2020-07-25 15:22:00 -04:00
hatee-hatee-hatee-ho
6735ac5902 implemented __repr__ method in impl_pyclass_sequence
* implemented sys.version_info.__repr__
* support 'module' optional parameter for 'pyclass sequence' attribute.
* Separated module name and class name of 'pystruct_sequence' attribute parameter
2020-07-26 00:24:53 +09:00
Jeong YunWon
546ac88c27 Merge pull request #1984 from LeBoucEtMistere/add_os_chown
Implementation of chown, lchown and fchown for the os module
2020-07-25 21:07:35 +09:00
Jeong YunWon
b280194e59 Merge pull request #2024 from BolunThompson/sys_base_executable
Add _base_executable variable to sys module
2020-07-25 20:46:11 +09:00
Bolun Thompson
447ddd1b09 Added newline for spacing
Accidentally removed newline for spacing in documentation; re added it.
2020-07-25 00:25:08 +00:00
Jeong YunWon
025f604585 Merge pull request #2019 from youknowone/pystr
Refactor str/bytes implementations with pystr
2020-07-25 04:14:41 +09:00
Depasse Arthur
428bf1e0a1 adding fchown function as a wrapper around chown 2020-07-24 17:18:12 +02:00
Depasse Arthur
deb5b08112 add support for passing fd as path argument in chown 2020-07-24 17:14:33 +02:00
Depasse Arthur
792c40badc adding lchown function as a wrapper around chown 2020-07-24 16:38:07 +02:00
Depasse Arthur
12dee0d55a Adding base snippets tests for os.chown 2020-07-24 16:18:48 +02:00
Depasse Arthur
dfffca4696 Running flake8 linter on test file 2020-07-24 16:18:48 +02:00
Depasse Arthur
6d541634c5 setting proper values for supports_{fd,dir_fd,follow_symlinks} sets for chown function 2020-07-24 16:18:48 +02:00
Depasse Arthur
eaa4a3bfd4 fixing clippy lint 2020-07-24 16:18:48 +02:00
Depasse Arthur
308468f1d5 First implementation of chown for the os module 2020-07-24 16:18:48 +02:00
Noah
c65ab9f5b8 Merge pull request #2022 from minoring/test-cmd
Add CPython 3.83 test test_cmd.py
2020-07-24 09:34:10 -04:00
minoring
f65765fcab Add CPython 3.83 test test_cmd.py
All tests are passed.
2020-07-24 19:46:18 +09:00
Jeong YunWon
10f53935dc clean up cformat a bit 2020-07-24 08:55:12 +09:00
Bolun Thompson
6a713a5b8b Added _base_executable variable to sys module 2020-07-23 16:11:38 -07:00
Jeong YunWon
466e6fcfc3 clean up unnssesary mut from cformat 2020-07-24 05:57:10 +09:00
Jeong YunWon
5b20601748 pystr py_cformat 2020-07-23 06:39:04 +09:00
Jeong YunWon
1b2d179b38 Add string typed formatting 2020-07-23 06:06:13 +09:00
Jeong YunWon
a0a73e5d97 format.rs owns related code 2020-07-23 06:06:13 +09:00
Jeong YunWon
d09488f159 Use ItemProtocol over vm.call_method("__getitem__") 2020-07-23 06:06:13 +09:00
Jeong YunWon
20812c61e9 Drop unused pub from cformat 2020-07-23 06:06:13 +09:00
Jeong YunWon
4dc39da128 cformat.rs owns related codes 2020-07-23 06:06:13 +09:00
Jeong YunWon
73877bcbbe refactor small codes 2020-07-23 06:05:49 +09:00
Jeong YunWon
d8876a1f7a Remove pystr::chars_len due to inaccessibility of cache 2020-07-23 04:15:39 +09:00
Jeong YunWon
0535d7a78d unify pystr py_pad 2020-07-23 04:09:25 +09:00
Jeong YunWon
4ab05249b1 pystr py_add 2020-07-23 03:41:53 +09:00
Jeong YunWon
5054615ac5 simplify str.isascii 2020-07-23 03:26:06 +09:00
Jeong YunWon
56850163a0 pystr py_iscase 2020-07-23 03:26:06 +09:00
Jeong YunWon
59beca2626 use BStr::repeat instead of original implementation 2020-07-23 03:26:06 +09:00
Jeong YunWon
26a43f9a63 zfill into pystr 2020-07-23 03:26:06 +09:00
Jeong YunWon
9ac8687373 Use to_owned when its intension is not display 2020-07-23 03:26:06 +09:00
Jeong YunWon
eeaf1d5092 {str,bytes}.join with pystr 2020-07-23 03:26:06 +09:00
Jeong YunWon
87e500a07b Merge pull request #2021 from RustPython/fix-mingw
Fix compilation on mingw/msys
2020-07-23 02:55:23 +09:00
Jeong YunWon
3f3a83c687 Merge pull request #1883 from youknowone/share-splitlines
Share str.splitlines and bytes.splitlines implementaion
2020-07-22 14:13:18 +09:00
Jeong YunWon
eb25ce6f2c Merge pull request #2016 from youknowone/sequence
Simplify SimpleSeq impls and remove duplicated length check for SeqMul
2020-07-22 14:12:58 +09:00
Noah
d52309255e Fix compilation on mingw/msys 2020-07-21 17:00:12 -05:00
Jeong YunWon
93c80ebe7d Remove redundant clone 2020-07-22 03:36:16 +09:00
Jeong YunWon
7f7e0ac770 unify sequence::cmp 2020-07-22 03:36:09 +09:00
Jeong YunWon
b677b88bdd sequence::cmp take DynPyIter instead of SimpleSeq
to avoid duplicated code generation for Box operation
2020-07-21 21:48:46 +09:00
Noah
a742ba01fa Merge pull request #2017 from BolunThompson/init_subclass
Implementation of __init_subclass__
2020-07-21 01:14:49 -05:00
Bolun Thompson
dd9eb28eb8 formatting 2020-07-20 20:14:12 -07:00
Bolun Thompson
3f7ad38458 Update vm/src/obj/objtype.rs
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
2020-07-20 20:14:12 -07:00
Bolun Thompson
94bafbb1ea Refactored unecessary code out and calls __get__ descriptor when needed 2020-07-20 20:14:12 -07:00
Bolun Thompson
8cccf13c80 Implemented kwargs on __init_subclass__ 2020-07-20 20:14:12 -07:00
Bolun Thompson
bb433bfd51 Mark expected failures and skipped tests 2020-07-20 20:13:49 -07:00
Bolun Thompson
8e52c29e3b Add test_subclassinit.py from CPython 3.8.5 2020-07-20 20:12:43 -07:00