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
57a7c077
Commit
57a7c077
authored
Mar 21, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make os, select and signal export the stdlib symbols, just like socket and ssl.
parent
7e11a123
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
6 deletions
+33
-6
changelog.rst
changelog.rst
+5
-1
gevent/os.py
gevent/os.py
+5
-1
gevent/select.py
gevent/select.py
+4
-0
gevent/signal.py
gevent/signal.py
+6
-2
greentest/test__all__.py
greentest/test__all__.py
+13
-2
No files found.
changelog.rst
View file @
57a7c077
...
...
@@ -28,7 +28,11 @@
a :exc:`ValueError` if they do. See :issue:`775`.
- Python 3: Add support for :meth:`socket.socket.sendmsg`,
:meth:`socket.socket.recvmsg` and :meth:`socket.socket.recvmsg_into`
on platforms where they are defined. Initial :pr:`773` by Jakub Klama.
on platforms where they are defined. Initial :pr:`773` by Jakub
Klama.
- The modules :mod:`gevent.os`, :mod:`gevent.signal` and
:mod:`gevent.select` export all the attributes from their
corresponding standard library counterpart.
1.1.0 (Mar 5, 2016)
===================
...
...
gevent/os.py
View file @
57a7c077
...
...
@@ -47,6 +47,7 @@ import os
import
sys
from
gevent.hub
import
get_hub
,
reinit
from
gevent._compat
import
PY3
from
gevent._util
import
copy_globals
import
errno
EAGAIN
=
getattr
(
errno
,
'EAGAIN'
,
11
)
...
...
@@ -430,5 +431,8 @@ if hasattr(os, 'fork'):
else
:
__implements__
.
remove
(
'fork'
)
__imports__
=
copy_globals
(
os
,
globals
(),
names_to_ignore
=
__implements__
+
__extensions__
,
dunder_names_to_keep
=
())
__all__
=
__implements__
+
__extensions__
__all__
=
list
(
set
(
__implements__
+
__extensions__
))
gevent/select.py
View file @
57a7c077
...
...
@@ -6,6 +6,7 @@ from __future__ import absolute_import
from
gevent.event
import
Event
from
gevent.hub
import
get_hub
from
gevent._compat
import
integer_types
from
gevent._util
import
copy_globals
try
:
...
...
@@ -22,6 +23,9 @@ import select as __select__
error
=
__select__
.
error
__imports__
=
copy_globals
(
__select__
,
globals
(),
names_to_ignore
=
__all__
,
dunder_names_to_keep
=
())
def
get_fileno
(
obj
):
try
:
...
...
gevent/signal.py
View file @
57a7c077
...
...
@@ -15,6 +15,8 @@ information on configuring this not to be the case for advanced uses.
"""
from
__future__
import
absolute_import
from
gevent._util
import
_NONE
as
_INITIAL
from
gevent._util
import
copy_globals
import
signal
as
_signal
...
...
@@ -22,8 +24,6 @@ __implements__ = []
__extensions__
=
[]
_INITIAL
=
object
()
_child_handler
=
_INITIAL
_signal_signal
=
_signal
.
signal
...
...
@@ -116,4 +116,8 @@ else:
__extensions__
.
append
(
"signal"
)
__extensions__
.
append
(
"getsignal"
)
__imports__
=
copy_globals
(
_signal
,
globals
(),
names_to_ignore
=
__implements__
+
__extensions__
,
dunder_names_to_keep
=
())
__all__
=
__implements__
+
__extensions__
greentest/test__all__.py
View file @
57a7c077
...
...
@@ -61,6 +61,13 @@ if sys.platform.startswith('win'):
class
Test
(
unittest
.
TestCase
):
stdlib_has_all
=
False
stdlib_all
=
()
stdlib_name
=
None
stdlib_module
=
None
module
=
None
__implements__
=
__extensions__
=
__imports__
=
()
def
check_all
(
self
):
"Check that __all__ is present and does not contain invalid entries"
if
not
hasattr
(
self
.
module
,
'__all__'
):
...
...
@@ -145,9 +152,13 @@ class Test(unittest.TestCase):
not_implemented
=
NOT_IMPLEMENTED
.
get
(
self
.
stdlib_name
)
if
not_implemented
is
not
None
:
result
=
[]
for
name
in
missed
[:]
:
for
name
in
missed
:
if
name
in
not_implemented
:
print
(
'IncompleteImplWarning: %s.%s'
%
(
self
.
modname
,
name
))
# We often don't want __all__ to be set because we wind up
# documenting things that we just copy in from the stdlib.
# But if we implement it, don't print a warning
if
getattr
(
self
.
module
,
name
,
self
)
is
self
:
print
(
'IncompleteImplWarning: %s.%s'
%
(
self
.
modname
,
name
))
else
:
result
.
append
(
name
)
missed
=
result
...
...
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