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
e018c0bc
Commit
e018c0bc
authored
Jan 07, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gevent.monkey: add get_unpatched() function
parent
8c2d5487
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
gevent/monkey.py
gevent/monkey.py
+15
-0
No files found.
gevent/monkey.py
View file @
e018c0bc
...
...
@@ -67,6 +67,21 @@ __all__ = ['patch_all',
'patch_thread'
]
def
get_unpatched
(
name
,
items
):
# QQQ would prefer to avoid importing gevent.xxx module just to get __target__
source
=
getattr
(
__import__
(
'gevent.'
+
name
),
name
)
target
=
getattr
(
source
,
'__target__'
,
name
)
dest
=
__import__
(
target
)
original
=
getattr
(
dest
,
'monkey_original'
,
dest
)
if
isinstance
(
items
,
basestring
):
return
getattr
(
original
,
items
)
else
:
results
=
[]
for
item
in
items
:
results
.
append
(
getattr
(
original
,
item
))
return
results
class
original
(
object
):
pass
...
...
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