Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
6ce76736
Commit
6ce76736
authored
Nov 12, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more param names
and disable a sqlalchemy test that was overspecific
parent
50128e6f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
13 deletions
+23
-13
src/runtime/capi.cpp
src/runtime/capi.cpp
+4
-2
src/runtime/descr.cpp
src/runtime/descr.cpp
+6
-3
src/runtime/types.cpp
src/runtime/types.cpp
+7
-5
test/extra/cheetah_test.py
test/extra/cheetah_test.py
+3
-3
test/integration/sqlalchemy_smalltest.py
test/integration/sqlalchemy_smalltest.py
+3
-0
No files found.
src/runtime/capi.cpp
View file @
6ce76736
...
...
@@ -1662,8 +1662,10 @@ void setupCAPI() {
capifunc_cls
->
giveAttr
(
"__repr__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
BoxedCApiFunction
::
__repr__
<
CXX
>
,
UNKNOWN
,
1
,
"capifunc.__repr__"
)));
auto
capi_call
=
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
BoxedCApiFunction
::
__call__
,
UNKNOWN
,
1
,
true
,
true
,
"capifunc.__call__"
));
auto
capi_call
=
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
BoxedCApiFunction
::
__call__
,
UNKNOWN
,
1
,
true
,
true
,
"capifunc.__call__"
,
""
,
ParamNames
({
"self"
},
"args"
,
"kw"
)));
capifunc_cls
->
giveAttr
(
"__call__"
,
capi_call
);
capifunc_cls
->
tpp_call
.
capi_val
=
BoxedCApiFunction
::
tppCall
<
CAPI
>
;
capifunc_cls
->
tpp_call
.
cxx_val
=
BoxedCApiFunction
::
tppCall
<
CXX
>
;
...
...
src/runtime/descr.cpp
View file @
6ce76736
...
...
@@ -598,11 +598,14 @@ void setupDescr() {
ParamNames
({
""
,
"fget"
,
"fset"
,
"fdel"
,
"doc"
},
""
,
""
)),
{
Py_None
,
Py_None
,
Py_None
,
NULL
}));
property_cls
->
giveAttr
(
"__get__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
propertyGet
,
UNKNOWN
,
3
,
"property.__get__"
)));
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
propertyGet
,
UNKNOWN
,
3
,
"property.__get__"
,
""
,
ParamNames
({
"self"
,
"obj"
,
"type"
},
""
,
""
))));
property_cls
->
giveAttr
(
"__set__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
propertySet
,
UNKNOWN
,
3
,
"property.__set__"
)));
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
propertySet
,
UNKNOWN
,
3
,
"property.__set__"
,
""
,
ParamNames
({
"self"
,
"obj"
,
"value"
},
""
,
""
))));
property_cls
->
giveAttr
(
"__delete__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
propertyDel
,
UNKNOWN
,
2
,
"property.__delete__"
)));
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
propertyDel
,
UNKNOWN
,
2
,
"property.__delete__"
,
""
,
ParamNames
({
"self"
,
"obj"
},
""
,
""
))));
property_cls
->
giveAttr
(
"getter"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
propertyGetter
,
UNKNOWN
,
2
,
"property.getter"
)));
property_cls
->
giveAttr
(
"setter"
,
...
...
src/runtime/types.cpp
View file @
6ce76736
...
...
@@ -4499,7 +4499,8 @@ void setupRuntime() {
"__get__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
functionGet
,
UNKNOWN
,
3
,
"function.__get__"
),
{
Py_None
}));
function_cls
->
giveAttr
(
"__call__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
functionCall
,
UNKNOWN
,
1
,
true
,
true
,
"function.__call__"
)));
"function.__call__"
,
""
,
ParamNames
({
"self"
},
"args"
,
"kw"
))));
function_cls
->
giveAttr
(
"__nonzero__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
functionNonzero
,
BOXED_BOOL
,
1
,
"function.__nonzero__"
)));
function_cls
->
giveAttrDescriptor
(
"func_code"
,
function_code
,
function_set_code
);
...
...
@@ -4518,7 +4519,8 @@ void setupRuntime() {
offsetof
(
BoxedBuiltinFunctionOrMethod
,
modname
));
builtin_function_or_method_cls
->
giveAttr
(
"__call__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
builtinFunctionOrMethodCall
,
UNKNOWN
,
1
,
true
,
true
,
"builtin_function_or_method.__call__"
)));
"builtin_function_or_method.__call__"
,
""
,
ParamNames
({
"self"
},
"args"
,
"kw"
))));
builtin_function_or_method_cls
->
giveAttr
(
"__repr__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
builtinFunctionOrMethodRepr
,
STR
,
1
,
...
...
@@ -4538,9 +4540,9 @@ void setupRuntime() {
instancemethod_cls
->
giveAttr
(
"__get__"
,
new
BoxedFunction
(
BoxedCode
::
create
((
void
*
)
instancemethodGet
,
UNKNOWN
,
3
,
false
,
false
,
"instancemethod.__get__"
)));
instancemethod_cls
->
giveAttr
(
"__call__"
,
new
BoxedFunction
(
BoxedCode
::
create
(
(
void
*
)
instancemethodCall
,
UNKNOWN
,
1
,
true
,
true
,
"instancemethod.__call__"
)));
instancemethod_cls
->
giveAttr
(
"__call__"
,
new
BoxedFunction
(
BoxedCode
::
create
(
(
void
*
)
instancemethodCall
,
UNKNOWN
,
1
,
true
,
true
,
"instancemethod.__call__"
,
""
,
ParamNames
({
"self"
},
"args"
,
"kw"
)
)));
instancemethod_cls
->
giveAttrMember
(
"im_func"
,
T_OBJECT
,
offsetof
(
BoxedInstanceMethod
,
func
));
instancemethod_cls
->
giveAttrBorrowed
(
"__func__"
,
instancemethod_cls
->
getattr
(
getStaticString
(
"im_func"
)));
instancemethod_cls
->
giveAttrMember
(
"im_self"
,
T_OBJECT
,
offsetof
(
BoxedInstanceMethod
,
obj
));
...
...
test/extra/cheetah_test.py
View file @
6ce76736
...
...
@@ -9,10 +9,10 @@ create_virtenv(ENV_NAME, ["cheetah==2.4.4", "Markdown==2.0.1"], force_create = T
cheetah_exe
=
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"cheetah"
)
env
=
os
.
environ
env
[
"PATH"
]
=
os
.
path
.
join
(
ENV_NAME
,
"bin"
)
expected
=
[{
'ran'
:
2138
,
'errors'
:
4
},
{
'ran'
:
2138
,
'errors'
:
232
,
'failures'
:
2
}]
expected
=
[{
'ran'
:
2138
},
{
'ran'
:
2138
,
'errors'
:
228
,
'failures'
:
2
}]
expected_log_hash
=
'''
jco
DAKUIQTpEDIDiMwAuQFEAKABjEbNAAAACgqABAAGgGsGQaQQLg/l0gIQXbEA4IKQis
BIAAlOQ
I
G4lA5AAASAqqGdMCPAAALKbAEQAYAcCEgRHAQCAAhAVJIghShwAUpAAKaEwgk0GaEUkgQI
IADgb
jco
CAIUIQTJEDoDiMwAuQFEAKABjEbMAAAACgqAAAAGgGsGAaQQKg3l0AIQWbEAwIKQmk
BIAAlOQ
I
E4kA5AAASAqiGdMCPAAALKLAEwAYAcCEgRHAQCAAhAVJIghShwAUoAAKaEwgk0EaEUkgQA
IADgb
pKTQYrIACAshhJ6Bwh0=
'''
run_test
([
cheetah_exe
,
"test"
],
cwd
=
ENV_NAME
,
expected
=
expected
,
env
=
env
,
expected_log_hash
=
expected_log_hash
)
test/integration/sqlalchemy_smalltest.py
View file @
6ce76736
...
...
@@ -247,6 +247,9 @@ for run_idx in xrange(1):
if
(
clsname
==
"SubclassGrowthTest"
and
t
==
"test_subclass"
):
continue
if
(
clsname
==
"ArgInspectionTest"
and
t
==
'test_callable_argspec_py_builtin'
):
continue
print
"Running"
,
t
n
.
setup
()
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment