Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
satella
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
satella
Commits
e603e35d
Unverified
Commit
e603e35d
authored
7 years ago
by
Piotr Maślanka
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into issue-20
parents
d696145b
aa8d49a9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
satella/instrumentation/trace_back.py
+7
-1
7 additions, 1 deletion
satella/instrumentation/trace_back.py
tests/test_instrumentation/test_trace_back.py
+9
-1
9 additions, 1 deletion
tests/test_instrumentation/test_trace_back.py
with
17 additions
and
2 deletions
CHANGELOG.md
+
1
−
0
View file @
e603e35d
## v2.0.22rc3
## v2.0.22rc3
*
fixes #20
*
fixes #20
*
fixes #21
## v2.0.22rc2
## v2.0.22rc2
...
...
This diff is collapsed.
Click to expand it.
satella/instrumentation/trace_back.py
+
7
−
1
View file @
e603e35d
...
@@ -232,9 +232,15 @@ class Traceback(object):
...
@@ -232,9 +232,15 @@ class Traceback(object):
self
.
formatted_traceback
=
six
.
text_type
(
traceback
.
format_exc
())
self
.
formatted_traceback
=
six
.
text_type
(
traceback
.
format_exc
())
def
pickle_to
(
self
,
stream
):
"""
Pickle self to target stream
"""
pickle
.
dump
(
self
,
stream
,
pickle
.
HIGHEST_PROTOCOL
)
def
pickle
(
self
):
def
pickle
(
self
):
"""
Returns this instance, pickled
"""
"""
Returns this instance, pickled
"""
return
pickle
.
dumps
(
self
,
pickle
.
HIGHEST_PROTOCOL
)
bio
=
io
.
BytesIO
()
self
.
pickle_to
(
bio
)
return
bio
.
getvalue
()
def
pretty_format
(
self
):
def
pretty_format
(
self
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
tests/test_instrumentation/test_trace_back.py
+
9
−
1
View file @
e603e35d
...
@@ -23,7 +23,15 @@ class TestTraceback(unittest.TestCase):
...
@@ -23,7 +23,15 @@ class TestTraceback(unittest.TestCase):
p_fmt
=
tb
.
pretty_format
()
p_fmt
=
tb
.
pretty_format
()
self
.
assertTrue
(
p_fmt
)
self
.
assertTrue
(
p_fmt
)
print
(
p_fmt
)
def
test_issue_21
(
self
):
try
:
loc
=
u
'
hello world
'
raise
ValueError
(
u
'
hello
'
)
except
ValueError
:
tb
=
Traceback
()
a
=
tb
.
pickle
()
self
.
assertIsInstance
(
pickle
.
loads
(
a
),
Traceback
)
def
test_compression_happens
(
self
):
def
test_compression_happens
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment