Commit Graph

3054 Commits

Author SHA1 Message Date
Aviv Palivoda
10828e01fb Set sys.pycache_prefix to None 2019-06-10 19:18:32 +03:00
Aviv Palivoda
b567464378 Add ModuleNotFoundError to builtins 2019-06-10 19:18:32 +03:00
Aviv Palivoda
5df05d4f95 Add script dir to sys.path 2019-06-10 19:18:32 +03:00
Aviv Palivoda
d9d0ea1834 Fix os to _os in class 2019-06-10 19:18:32 +03:00
Aviv Palivoda
5584733cda Add sys.path_importer_cache 2019-06-10 19:18:32 +03:00
Aviv Palivoda
c8248c3211 Expose __name__ in __dict__ 2019-06-10 19:18:32 +03:00
Aviv Palivoda
375790e142 objmodule should have a dict 2019-06-10 19:18:32 +03:00
Aviv Palivoda
fe0284aa05 Add new to objmodule and change __name__ to property 2019-06-10 19:18:32 +03:00
Aviv Palivoda
6615e811c0 Collapse concat 2019-06-10 19:18:32 +03:00
Aviv Palivoda
5c53e58547 Print frozen import file name in stacktrace 2019-06-10 19:18:32 +03:00
Aviv Palivoda
0e76dbb749 Add needed methods to _thread 2019-06-10 19:18:32 +03:00
Aviv Palivoda
2817214c88 Remove unused imports 2019-06-10 19:18:32 +03:00
Aviv Palivoda
7f61125866 Use _bootstrap.py __import__ 2019-06-10 19:18:32 +03:00
Aviv Palivoda
58d9d9deeb Add sys.path_hooks 2019-06-10 19:18:32 +03:00
Aviv Palivoda
b0cccf35ad Change os_details 2019-06-10 19:18:32 +03:00
Aviv Palivoda
a57f38b07f Rename builtin io to _io 2019-06-10 19:18:32 +03:00
Aviv Palivoda
fbaff7fd50 Install external importers on init_importlib 2019-06-10 19:18:32 +03:00
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
1b968e9406 Merge pull request #1022 from RustPython/coolreader18/demo-repl-continuation
Add line continuation for the WASM demo terminal
2019-06-09 11:16:35 +02:00
coolreader18
d45c632f49 Add incompatibility issue template 2019-06-08 18:59:02 -05:00
coolreader18
b0db7c1096 Add RFC issue template
Structure taken from #771
2019-06-08 18:28:18 -05:00
coolreader18
cd61248635 Merge branch 'master' into coolreader18/demo-repl-continuation 2019-06-08 13:17:05 -05: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
coolreader18
d27840c11d Merge pull request #1019 from palaviv/warnings
Add _warnings
2019-06-07 11:45:48 -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
Windel Bouwman
0c9d3c8918 Merge pull request #1015 from mkurnikov/empty-exception-message
Make empty exception message format compatible with CPython
2019-06-04 15:52:47 +02: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