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
8effb5a4
Commit
8effb5a4
authored
Mar 27, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #416 from undingen/fix_pip_search4
Misc fixes for virtualenv / pip
parents
9098ccf1
bbe39d40
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
21 deletions
+15
-21
from_cpython/Lib/distutils/command/install.py
from_cpython/Lib/distutils/command/install.py
+5
-2
from_cpython/Modules/zipimport.c
from_cpython/Modules/zipimport.c
+1
-2
libpypa
libpypa
+1
-1
src/analysis/scoping_analysis.cpp
src/analysis/scoping_analysis.cpp
+4
-1
src/runtime/capi.cpp
src/runtime/capi.cpp
+2
-2
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+2
-12
src/runtime/objmodel.h
src/runtime/objmodel.h
+0
-1
No files found.
from_cpython/Lib/distutils/command/install.py
View file @
8effb5a4
...
...
@@ -41,8 +41,11 @@ else:
INSTALL_SCHEMES
=
{
'unix_prefix'
:
{
'purelib'
:
'$base/lib/python$py_version_short/site-packages'
,
'platlib'
:
'$platbase/lib/python$py_version_short/site-packages'
,
# Pyston change
# 'purelib': '$base/lib/python$py_version_short/site-packages',
# 'platlib': '$platbase/lib/python$py_version_short/site-packages',
'purelib'
:
'$base/site-packages'
,
'platlib'
:
'$base/site-packages'
,
'headers'
:
'$base/include/python$py_version_short/$dist_name'
,
'scripts'
:
'$base/bin'
,
'data'
:
'$base'
,
...
...
from_cpython/Modules/zipimport.c
View file @
8effb5a4
...
...
@@ -1177,8 +1177,7 @@ get_module_code(ZipImporter *self, char *fullname,
if
(
isbytecode
)
{
// Pyston change: We don't support bytecode archives currently
// mtime = get_mtime_of_source(self, path);
PyErr_Format
(
ZipImportError
,
"Pyston can't load bytecode from archives yet. ' '%.200s'"
,
fullname
);
return
NULL
;
continue
;
}
if
(
p_ispackage
!=
NULL
)
...
...
libpypa
@
98d769dc
Subproject commit
0a2bbff17a4f8e0270c64423004b5613457e59db
Subproject commit
98d769dcd3a792f70b5e9c9bb9afa7544a50ae4a
src/analysis/scoping_analysis.cpp
View file @
8effb5a4
...
...
@@ -622,7 +622,10 @@ static void raiseNameForcingSyntaxError(const char* msg, ScopingAnalysis::ScopeN
syntaxElemMsg
=
"import * is not allowed in function '%s' because it %s"
;
lineno
=
usage
->
nameForcingNodeImportStar
->
lineno
;
}
else
{
if
(
PYTHON_VERSION_MAJOR
==
2
&&
PYTHON_VERSION_MINOR
==
7
&&
PYTHON_VERSION_MICRO
<
8
)
syntaxElemMsg
=
"unqualified exec is not allowed in function '%.100s' it %s"
;
else
syntaxElemMsg
=
"unqualified exec is not allowed in function '%.100s' because it %s"
;
lineno
=
usage
->
nameForcingNodeBareExec
->
lineno
;
}
...
...
src/runtime/capi.cpp
View file @
8effb5a4
...
...
@@ -669,7 +669,7 @@ void checkAndThrowCAPIException() {
if
(
_type
)
{
BoxedClass
*
type
=
static_cast
<
BoxedClass
*>
(
_type
);
assert
(
is
Instance
(
_type
,
type_cls
)
&&
isSubclass
(
static_cast
<
BoxedClass
*>
(
type
),
BaseException
)
assert
(
is
Subclass
(
_type
->
cls
,
type_cls
)
&&
isSubclass
(
static_cast
<
BoxedClass
*>
(
type
),
BaseException
)
&&
"Only support throwing subclass of BaseException for now"
);
Box
*
value
=
cur_thread_state
.
curexc_value
;
...
...
@@ -686,7 +686,7 @@ void checkAndThrowCAPIException() {
PyErr_Clear
();
// This is similar to PyErr_NormalizeException:
if
(
!
is
Instance
(
value
,
type
))
{
if
(
!
is
Subclass
(
value
->
cls
,
type
))
{
if
(
value
->
cls
==
tuple_cls
)
{
value
=
runtimeCall
(
type
,
ArgPassSpec
(
0
,
0
,
true
,
false
),
value
,
NULL
,
NULL
,
NULL
,
NULL
);
}
else
if
(
value
==
None
)
{
...
...
src/runtime/objmodel.cpp
View file @
8effb5a4
...
...
@@ -211,18 +211,8 @@ extern "C" void my_assert(bool b) {
assert
(
b
);
}
bool
isInstance
(
Box
*
obj
,
BoxedClass
*
cls
)
{
int
rtn
=
_PyObject_RealIsInstance
(
obj
,
cls
);
if
(
rtn
<
0
)
checkAndThrowCAPIException
();
return
rtn
;
}
extern
"C"
bool
isSubclass
(
BoxedClass
*
child
,
BoxedClass
*
parent
)
{
int
rtn
=
_PyObject_RealIsSubclass
(
child
,
parent
);
if
(
rtn
<
0
)
checkAndThrowCAPIException
();
return
rtn
;
return
PyType_IsSubtype
(
child
,
parent
);
}
extern
"C"
void
assertFail
(
BoxedModule
*
inModule
,
Box
*
msg
)
{
...
...
@@ -4465,7 +4455,7 @@ extern "C" Box* boxedLocalsGet(Box* boxedLocals, const char* attr, BoxedModule*
// TODO should check the exact semantic here but it's something like:
// If it throws a KeyError, then the variable doesn't exist so move on
// and check the globals (below); otherwise, just propogate the exception.
if
(
!
is
Instance
(
e
.
value
,
KeyError
))
{
if
(
!
is
Subclass
(
e
.
value
->
cls
,
KeyError
))
{
throw
;
}
}
...
...
src/runtime/objmodel.h
View file @
8effb5a4
...
...
@@ -84,7 +84,6 @@ extern "C" Box* importStar(Box* from_module, BoxedModule* to_module);
extern
"C"
Box
**
unpackIntoArray
(
Box
*
obj
,
int64_t
expected_size
);
extern
"C"
void
assertNameDefined
(
bool
b
,
const
char
*
name
,
BoxedClass
*
exc_cls
,
bool
local_var_msg
);
extern
"C"
void
assertFail
(
BoxedModule
*
inModule
,
Box
*
msg
);
extern
"C"
bool
isInstance
(
Box
*
obj
,
BoxedClass
*
parent
);
extern
"C"
bool
isSubclass
(
BoxedClass
*
child
,
BoxedClass
*
parent
);
extern
"C"
BoxedClosure
*
createClosure
(
BoxedClosure
*
parent_closure
);
...
...
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