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
c6cb4a41
Commit
c6cb4a41
authored
Mar 21, 2019
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
https://bugs.python.org/issue32270
to get Python 3.7.2 test_subprocess working.
parent
9ba08abb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
+21
-7
CHANGES.rst
CHANGES.rst
+5
-0
src/gevent/_sslgte279.py
src/gevent/_sslgte279.py
+2
-2
src/gevent/subprocess.py
src/gevent/subprocess.py
+14
-5
No files found.
CHANGES.rst
View file @
c6cb4a41
...
...
@@ -25,6 +25,11 @@
- The result of ``gevent.ssl.SSLSocket.makefile()`` can be used as a
context manager on Python 2.
- subprocess: No longer close redirected FDs if they are in
``pass_fds``. This is `a bugfix from Python 3.7
<https://bugs.python.org/issue32270>`_ applied to all versions
gevent runs on.
1.4.0 (2019-01-04)
==================
...
...
src/gevent/_sslgte279.py
View file @
c6cb4a41
...
...
@@ -56,9 +56,9 @@ if 'namedtuple' in __all__:
# See notes in _socket2.py. Python 3 returns much nicer
# `io` object wrapped around a SocketIO class.
assert
not
hasattr
(
__ssl__
.
_fileobject
,
'__enter__'
)
# pylint:disable=
used-before-assignment
assert
not
hasattr
(
__ssl__
.
_fileobject
,
'__enter__'
)
# pylint:disable=
no-member
class
_fileobject
(
__ssl__
.
_fileobject
):
# pylint:no-member
class
_fileobject
(
__ssl__
.
_fileobject
):
# pylint:
disable=
no-member
def
__enter__
(
self
):
return
self
...
...
src/gevent/subprocess.py
View file @
c6cb4a41
...
...
@@ -1376,8 +1376,10 @@ class Popen(object):
# is possible that it is overwritten (#12607).
if
c2pwrite
==
0
:
c2pwrite
=
os
.
dup
(
c2pwrite
)
_set_inheritable
(
c2pwrite
,
False
)
while
errwrite
in
(
0
,
1
):
errwrite
=
os
.
dup
(
errwrite
)
_set_inheritable
(
errwrite
,
False
)
# Dup fds for child
def
_dup2
(
existing
,
desired
):
...
...
@@ -1401,12 +1403,19 @@ class Popen(object):
# Close pipe fds. Make sure we don't close the
# same fd more than once, or standard fds.
if
not
PY3
:
closed
=
set
([
None
])
for
fd
in
[
p2cread
,
c2pwrite
,
errwrite
]:
if
fd
not
in
closed
and
fd
>
2
:
os
.
close
(
fd
)
closed
.
add
(
fd
)
# Python 3 (with a working set_inheritable):
# We no longer manually close p2cread,
# c2pwrite, and errwrite here as
# _close_open_fds takes care when it is
# not already non-inheritable.
if
cwd
is
not
None
:
try
:
os
.
chdir
(
cwd
)
...
...
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