Commit 053b5c54 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Call setupUnicode, but don't make it available yet

Not sure if it's better or not to have the "unicode"
name accessible, given that we don't support much
of its functionality at all.

For instance, sre_compile detects if "unicode" is available,
and if so, calls `type(unicode(""))` which will fail for us.
parent 17258e73
......@@ -726,7 +726,7 @@ void setupBuiltins() {
builtins_module->giveAttr("object", object_cls);
builtins_module->giveAttr("str", str_cls);
builtins_module->giveAttr("basestring", basestring_cls);
builtins_module->giveAttr("unicode", unicode_cls);
// builtins_module->giveAttr("unicode", unicode_cls);
builtins_module->giveAttr("int", int_cls);
builtins_module->giveAttr("long", long_cls);
builtins_module->giveAttr("float", float_cls);
......
......@@ -778,6 +778,7 @@ void setupRuntime() {
setupIter();
setupClassobj();
setupSuper();
setupUnicode();
function_cls->giveAttr("__name__", boxStrConstant("function"));
function_cls->giveAttr("__repr__", new BoxedFunction(boxRTFunction((void*)functionRepr, STR, 1)));
......
......@@ -62,6 +62,7 @@ void teardownFile();
void setupCAPI();
void teardownCAPI();
void setupGenerator();
void setupUnicode();
void setupSys();
void setupBuiltins();
......
# allow-warning: converting unicode literal to str
# expected: fail
# - wip
# - too slow
# - prints out poorly since we return an "attrwrapper" instead of a real dict
# Simple opt parse test, taken from the optparse.py docstring:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment