Commit Graph

2111 Commits

Author SHA1 Message Date
Aviv Palivoda
37b40c55da Add frozen _bootstrap_external.py 2019-06-10 19:18:32 +03:00
Aviv Palivoda
0d9a066712 Add sys.meta_path 2019-06-10 19:18:32 +03:00
Aviv Palivoda
f2145880fa Don't set __file__ for frozen modules 2019-06-10 19:18:32 +03:00
Aviv Palivoda
f1af6b1f40 Include _bootstrap.py as str 2019-06-10 19:18:32 +03:00
Aviv Palivoda
698044b128 Add Module.__name__ 2019-06-10 19:18:32 +03:00
Aviv Palivoda
e88d6ac1ef Add init_importlib 2019-06-10 19:18:32 +03:00
Aviv Palivoda
7ff59b27d7 Add _bootsrap.py as frozen module 2019-06-10 19:18:32 +03:00
coolreader18
740e8387b8 Merge pull request #1027 from alanjds/format-bang
Feature: str.format accepting !r, !s and !a
2019-06-10 10:56:00 -05:00
Alan Justino
854bacf452 Fix the Rust tests 2019-06-09 18:45:08 -03:00
Alan Justino
f0a2b4c50b Apply the {!r} on str.format calls
By the Python docs, the `!` forces a conversion of the argument before
applying the normal formating logic described after the `:` marker.

See: https://docs.python.org/3.4/library/string.html#format-string-syntax
2019-06-09 18:11:10 -03:00
Alan Justino
e19b674abf FormatSpec got a preconversor:FormatPreconversor to handle !r, !s and !a 2019-06-09 16:22:22 -03:00
coolreader18
68011df6cb Merge pull request #1024 from yanganto/str_isprintable
str.isprintable
2019-06-09 13:07:47 -05:00
Alan Justino
65d0093822 Dont fail on '{!r}'.format(...) 2019-06-09 13:46:13 -03:00
Antonio Yang
f76be43d26 str.isprintable
- check unicode type by unicode_categories
- rm redundant check of empty string
2019-06-09 23:33:38 +08:00
Windel Bouwman
eb234ca3c5 Merge pull request #1021 from mkurnikov/speed-up-file-open
Get io reader/writer classes only when needed
2019-06-08 16:13:42 +02:00
Windel Bouwman
a1e2da6807 Merge pull request #1020 from RustPython/coolreader18/no-pwd-android
Disable the pwd module on android
2019-06-08 16:12:23 +02:00
Maxim Kurnikov
baf62d56d2 get io reader/writer classes only when needed 2019-06-08 02:49:45 +03:00
coolreader18
2b555cb40e Merge pull request #1016 from mkurnikov/fix-io-open-r
Fix io.open("r") case and address some TODOs
2019-06-07 12:07:47 -05:00
coolreader18
50252b4e80 Disable the pwd module on android 2019-06-07 11:57:50 -05:00
Aviv Palivoda
8fccad1e09 Print warning to stderr
Co-Authored-By: coolreader18 <33094578+coolreader18@users.noreply.github.com>
2019-06-07 18:59:41 +03:00
Maxim Kurnikov
c0e1702869 split mode/type for io.open properly, fix open('r') case 2019-06-07 16:34:16 +03:00
Aviv Palivoda
d2a82b1acd Add _warnings 2019-06-07 15:14:27 +03:00
Windel Bouwman
1b7088c353 Merge pull request #1017 from michelhe/memoryview_obj
Fix memoryview.obj misimplementation.
2019-06-05 13:22:49 +02:00
coolreader18
74d52ee82f Merge pull request #1011 from palaviv/_imp2
More _imp
2019-06-05 00:43:10 -05:00
Michel Heily
b2cdeab0c6 Fix memoryview.obj misimplementation.
The memoryview skeleton did not correctly assign the "obj" attribute;
The "obj" attribute was assigned to the memoryview class and not the memryview object,
leading to a funny bug that can be reproduced as follows:

```python

m1 = memoryview(b'1234')
m2 = memoryview(b'abcd')

print(m1.obj)
```

the result would be the value inside `m2` instead that of `m1`
2019-06-05 02:36:45 +03:00
Maxim Kurnikov
bc33921fdb make empty exception message format compatible with CPython 2019-06-04 14:59:28 +03:00
coolreader18
e871ab0673 Merge pull request #1013 from mkurnikov/source-line-in-traceback
Add indented source lines in traceback
2019-06-02 23:05:59 -05:00
Maxim Kurnikov
58b1f4a8ee add indented source line in traceback 2019-06-02 18:21:52 +03:00
Maxim Kurnikov
3b5cc1ad2f more doc comments, split with_exit() method for context manager __exit__ into two methods 2019-06-02 01:37:25 +03:00
Aviv Palivoda
106f5f7054 Add _imp.is_frozen_package 2019-06-01 15:15:16 +03:00
Aviv Palivoda
0acce07631 Add _imp.init_frozen 2019-06-01 15:11:55 +03:00
Aviv Palivoda
4faaf2d6ca Add _imp.get_frozen_object 2019-06-01 15:03:45 +03:00
Aviv Palivoda
9a168b10d1 Add _imp.exec_builtin that does nothing 2019-06-01 14:49:12 +03:00
Aviv Palivoda
1294b56cbe Add _imp.create_builtin 2019-06-01 14:32:23 +03:00
Maxim Kurnikov
bc35a64e54 fix most of clippy warnings 2019-06-01 03:19:22 +03:00
Maxim Kurnikov
1949239592 cleanups, type fixes and renames 2019-05-31 21:56:10 +03:00
stwen77
e9f3f4b89a Merge branch 'master' into binascii 2019-05-31 14:22:42 +08:00
Shitong Wen
e452d5523e use crate crc to replace crc table 2019-05-31 14:16:31 +08:00
Aviv Palivoda
9e88b808dd Add _imp.is_frozen 2019-05-30 18:50:46 +03:00
ben
d2757a2680 Fix merge issue with PyTuple::fast_getitem 2019-05-30 21:22:30 +12:00
ben
c0c531d550 Merge branch 'master' into sys_flags
# Conflicts:
#	tests/snippets/sysmod.py
#	vm/src/sysmodule.rs
2019-05-30 21:12:57 +12:00
Windel Bouwman
3f5bb517a5 Merge pull request #1001 from RustPython/coolreader18/rustpythonpath
Check RUSTPYTHONPATH as well as PYTHONPATH env variables
2019-05-30 09:53:05 +02:00
Windel Bouwman
22b4894ae6 Merge pull request #1006 from RustPython/coolreader18/weakproxy-setattr
Add __setattr__ to weakproxy
2019-05-30 09:47:01 +02:00
coolreader18
725a1e8434 Merge pull request #979 from youknowone/refactor-set
PySet/PyFrozenSet refactoring
2019-05-29 23:38:56 -05:00
coolreader18
1dc2d09713 Add __setattr__ to weakproxy 2019-05-29 22:46:12 -05:00
coolreader18
c78dc520ad Don't clone PathBufs 2019-05-29 16:53:13 -05:00
coolreader18
11892816a7 Don't check env variables on wasm 2019-05-29 16:38:04 -05:00
Yonatan Goldschmidt
80b1f545e2 Add itertools.islice 2019-05-29 23:25:49 +03:00
Windel Bouwman
d70caf7dea Merge pull request #960 from youknowone/sys-getfilesystemencode
Add sys.getfilesystemencoding, sys.getfilesystemencodeerrors
2019-05-29 15:21:19 +02:00
Windel Bouwman
121cd43932 Merge pull request #901 from youknowone/str-encode
Add str.encode for utf-8
2019-05-29 15:20:36 +02:00