Commit Graph

78 Commits

Author SHA1 Message Date
HyeonGyu Lee (Vazrupe)
1be7cc6308 Add framework attribute in sys module
Fixes #1342
2019-09-10 20:16:11 +09:00
Aviv Palivoda
48ee96303c Convert sysmodule to new arg style 2019-08-31 22:45:22 +03:00
coolreader18
a0146c5fa6 Add site module and run it on startup 2019-08-15 15:33:36 -05:00
coolreader18
546169a5df Add sys.exit 2019-08-08 17:41:39 -05:00
coolreader18
a4ffc797bb Fix clap command line parsing of pyargs 2019-08-08 17:41:39 -05:00
Aviv Palivoda
db8de563ba Add dont_write_bytecode flag 2019-07-24 20:28:24 +03:00
coolreader18
9ec6660c09 Add argparse and gettext modules 2019-07-19 22:38:09 -05:00
Aviv Palivoda
802acf7dd5 Add sys.exc_info 2019-07-15 19:26:53 +03:00
Noah
93dfbdcaa9 Merge pull request #1144 from RustPython/env-var-processing
Move processing of PYTHONPATH out of vm.
2019-07-14 16:46:10 -05:00
Windel Bouwman
f752c93c0a Add sys.settrace and sys.setprofile functions to register profiling functions. 2019-07-14 12:33:22 +02:00
Windel Bouwman
ee8bcf4921 Move processing of PYTHONPATH out of vm. 2019-07-14 09:59:27 +02:00
Windel Bouwman
ac765a957b Add a settings struct for storage of different settings which influence the VM. 2019-07-13 12:23:53 +02:00
Dong-hee Na
2e618af4f9 sys: Fix sys.maxsize and add sys.maxunicode
Current implementation of sys.maxsize is unsigned type
but AFAIK the type of sys.maxsize should be identical with
Py_ssize_t which is known as signed type.

sys.maxunicode is hardcoded from cpython repository
https://github.com/python/cpython/blob/master/Python/sysmodule.c#L2654
2019-07-10 02:48:45 +09:00
Maxim Kurnikov
347d48198e fix remaining clippy warnings 2019-07-07 06:27:07 +03:00
Windel Bouwman
ef649be941 Add git information in sys and platform modules. 2019-07-06 17:00:03 +02:00
Dong-hee Na
103559101e sys.byteorder: Implement sys.byteorder 2019-06-29 16:16:03 +09:00
Windel Bouwman
ed63ebd0a3 Added the python zen module. 2019-06-22 13:13:34 +02:00
Aviv Palivoda
ea8e28026b Simplify objmodule 2019-06-11 13:13:32 +03:00
Aviv Palivoda
e1472f2277 Add sys.dont_write_bytecode 2019-06-10 19:18:32 +03:00
Aviv Palivoda
10828e01fb Set sys.pycache_prefix to None 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
58d9d9deeb Add sys.path_hooks 2019-06-10 19:18:32 +03:00
Aviv Palivoda
0d9a066712 Add sys.meta_path 2019-06-10 19:18:32 +03: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
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
Jeong YunWon
3675ce859a Add sys.getfilesystemencoding, sys.getfilesystemencodeerrors 2019-05-29 21:20:55 +09:00
coolreader18
770f54791e Fix ownership errors 2019-05-25 17:28:25 -05:00
coolreader18
017377061d Check RUSTPYTHONPATH as well as PYTHONPATH env variables 2019-05-25 15:52:44 -05:00
ben
60c9d5004a Add SimpleNamespace and sys.implementation 2019-05-19 15:01:22 +12:00
ben
8b657ab81e Add documentation for sys.flags 2019-05-19 10:32:07 +12:00
ben
2ca96c8ae1 Add sys.flags by creating a pystruct_sequence macro 2019-05-19 10:17:21 +12:00
Jeong YunWon
ddf676569a Add sys.builtin_module_names 2019-05-12 19:18:37 +09:00
Aviv Palivoda
152c1654d6 Add sys.platform 2019-05-11 11:43:11 +03:00
Darren Kaste
a8e064b1c0 Import TypeProtocol before use in type_check! 2019-04-14 17:19:44 -04:00
ben
d24dd170e9 Changes to RustPython to support importing and running unittest 2019-04-14 12:09:54 +12:00
Adam Kelly
7b2d92f495 Delete DictProtocol. impl ItemProtocol for PyDictRef. 2019-04-06 10:15:29 +01:00
Adam Kelly
9ed051e3b7 Module Initialisation takes VirtualMachine rather than PyContext. 2019-04-05 09:50:31 +01:00
Adam Kelly
c8eda3733d Eliminate ctx.set_attr. 2019-04-05 09:50:31 +01:00
ben
db8e648646 Make PyFunction.code a PyCodeRef, PyGenerator.frame a FrameRef, and
other improvements to increase use of specific ref types.
2019-03-24 13:41:37 +13:00
coolreader18
b0d8935731 Merge branch 'master' into coolreader18/immutable-vm-ref 2019-03-22 07:21:45 -05:00
Adam
e7eff34e13 Merge pull request #709 from RustPython/avoid_attribute_protocol
Avoid attribute protocol
2019-03-22 11:42:30 +00: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
8c0419e6b4 Put RefCell around frames member of VirtualMachine. This allows for VirtualMachine to be immutable. 2019-03-20 20:29:08 +01:00
Joey
7bfd2e6e84 Move function items out of pyobject module 2019-03-15 21:27:11 -07:00
Adam Kelly
0ff5155af9 Rename mk_module to make_module. 2019-03-10 17:10:51 +00:00
coolreader18
f364ea5943 Fix a bunch of clippy lints 2019-03-01 18:41:45 -06:00
Adam Kelly
4dd6592aad Keep a stack of frames in the VM. 2019-02-27 10:47:33 +00:00