Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
deee39f4
Commit
deee39f4
authored
Jul 09, 2023
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tblib to 2.0
parent
85a6d079
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
185 additions
and
257 deletions
+185
-257
docs/changes/old_py.removal
docs/changes/old_py.removal
+2
-0
src/gevent/_tblib.py
src/gevent/_tblib.py
+152
-252
src/gevent/util.py
src/gevent/util.py
+31
-5
No files found.
docs/changes/old_py.removal
View file @
deee39f4
...
...
@@ -11,3 +11,5 @@ Related changes include:
- ``setup.py`` no longer includes the ``setup_requires`` keyword.
Installation with a tool that understands ``pyproject.toml`` is
recommended.
- The bundled tblib has been updated to version 2.0.
- On Python 3.12b3, dumping tracebacks of greenlets is not available.
src/gevent/_tblib.py
View file @
deee39f4
This diff is collapsed.
Click to expand it.
src/gevent/util.py
View file @
deee39f4
...
...
@@ -374,16 +374,42 @@ class GreenletTree(object):
@
staticmethod
def
__render_tb
(
tree
,
label
,
frame
,
limit
):
tree
.
child_data
(
label
)
# XXX: Issues with tblib?
# 3.12b3 is crashing walking the stack on macOS;
# on Linux CI, it is failing with a nice attribute error
# XXX: Issues with tblib? Seen with tblib 1.3 and 2.0.
# More likely, it's something wrong in greenlet and the way it's
# keeping track of the frames?
#
# In a test like this:
#
# g = gevent.spawn(util.print_run_info, file=io)
# g.join() (test__util.py, line 53)
#
# 3.12b3 is crashing walking the stack on macOS:
# It's a simple segfault on line 340, ``f = f.f_back``.
# I have confirmed that the object is a real frame object.
#
# It seems unlikely to be a greenlet thing though, because the frame we're
# crashing on is the root frame:
#
# <frame at 0x.., file '/gevent/tests/test__util.py', line 53, code root>
#
# Interestingly, we see the test case dump the stack of the greenlet (successfully),
# then dump the stack of the main thread (successfully) --- this ends in line 53 --,
# and then get _another_ frame for line 53, and this is where it crashes.
# The difference? The successful dump does not list it as a root frame,
# where the failed one does.
#
#
# on Linux CI (not sure what frame), it is failing with a nice attribute error
# (which watches where the macOS is failing, inside a call to
# Py_GetAttr):
#
# File "/
opt/hostedtoolcache/Python/3.12.0-beta.3/x64/lib
/python3.12/traceback.py", line 339, in walk_stack
# File "//python3.12/traceback.py", line 339, in walk_stack
# yield f, f.f_lineno
# AttributeError: 'dict' object has no attribute 'f_lineno'
#
# A workaround on macOS is to not dump the root frame, but that only fixes
# test__util. test__threadpool:test_greenlet_class crashes similarly, but
# not 100% of the time.
if
sys
.
version_info
!=
(
3
,
12
,
0
,
'beta'
,
3
):
tb
=
''
.
join
(
traceback
.
format_stack
(
frame
,
limit
))
else
:
...
...
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