Use better workaround for Transcrypt bug 387
Avoid modifying Transcrypt compiler code
This commit is contained in:
parent
85c8f4638f
commit
41c588d0bf
@ -39,6 +39,10 @@ for f in eos.js_tests; do
|
|||||||
# Transcrypt bug #407
|
# Transcrypt bug #407
|
||||||
perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__impl__(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js
|
perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__impl__(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js
|
||||||
perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__implpy_(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js
|
perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__implpy_(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js
|
||||||
|
|
||||||
|
# Transcrypt bug #387
|
||||||
|
perl -0777 -pi -e 's/var __nest__ = function \(headObject, tailNames, value\) \{/var __nest__ = function (headObject, tailNames, value) { if (headObject === __all__ && value.__all__) { value.__all__.__module__ = tailNames; }/g' eos/__javascript__/$f.js
|
||||||
|
perl -0777 -pi -e "s/var (.*?) = __class__ \('\g1', \[(.*?)\], \{/var "'$1'" = __class__ ('"'$1'"', ["'$2'"], { __module__: __all__.__module__,/g" eos/__javascript__/$f.js
|
||||||
done
|
done
|
||||||
|
|
||||||
cp eos/__javascript__/eos.js_tests.js eosweb/core/static/js/eosjs.js
|
cp eos/__javascript__/eos.js_tests.js eosweb/core/static/js/eosjs.js
|
||||||
|
@ -170,7 +170,7 @@ class DateTimeField(Field):
|
|||||||
class EosObjectType(type):
|
class EosObjectType(type):
|
||||||
def __new__(meta, name, bases, attrs):
|
def __new__(meta, name, bases, attrs):
|
||||||
cls = type.__new__(meta, name, bases, attrs)
|
cls = type.__new__(meta, name, bases, attrs)
|
||||||
cls._name = ((cls.__module__ if is_python else meta.__next_class_module__) + '.' + cls.__name__).replace('.js.', '.').replace('.python.', '.') #TNYI: module and qualname
|
cls._name = (cls.__module__ + '.' + cls.__name__).replace('.js.', '.').replace('.python.', '.') #TNYI: qualname
|
||||||
if name != 'EosObject':
|
if name != 'EosObject':
|
||||||
EosObject.objects[cls._name] = cls
|
EosObject.objects[cls._name] = cls
|
||||||
if '_db_name' not in attrs:
|
if '_db_name' not in attrs:
|
||||||
|
Loading…
Reference in New Issue
Block a user