Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
264b5dc6
Commit
264b5dc6
authored
Dec 13, 2015
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent infinite recursion when UnpickleableException occurs in a sandbox context. Fixes #440.
parent
bf833168
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
CHANGES.txt
CHANGES.txt
+9
-0
setuptools/sandbox.py
setuptools/sandbox.py
+4
-2
No files found.
CHANGES.txt
View file @
264b5dc6
...
...
@@ -3,6 +3,15 @@ CHANGES
=======
------
18.8.1
------
* Issue #440: Prevent infinite recursion when a SandboxViolation
or other UnpickleableException occurs in a sandbox context
with setuptools hidden. Fixes regression introduced in Setuptools
12.0.
----
18.8
----
...
...
setuptools/sandbox.py
View file @
264b5dc6
...
...
@@ -98,8 +98,8 @@ class UnpickleableException(Exception):
"""
An exception representing another Exception that could not be pickled.
"""
@
class
method
def
dump
(
cls
,
type
,
exc
):
@
static
method
def
dump
(
type
,
exc
):
"""
Always return a dumped (pickled) type and exc. If exc can't be pickled,
wrap it in UnpickleableException first.
...
...
@@ -107,6 +107,8 @@ class UnpickleableException(Exception):
try
:
return
pickle
.
dumps
(
type
),
pickle
.
dumps
(
exc
)
except
Exception
:
# get UnpickleableException inside the sandbox
from
setuptools.sandbox
import
UnpickleableException
as
cls
return
cls
.
dump
(
cls
,
cls
(
repr
(
exc
)))
...
...
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