Martin Richard added the comment:
FWIW, PyOpenSSL allows to load certificates and keys from a memory buffer and
much more. It's also fairly easy to switch from ssl to PyOpenSSL.
It's probably a viable alternative in many cases.
--
Martin Richard added the comment:
Yes, the goal is to isolate the blocking IO in __init__ into other methods so
Popen can be subclassed in asyncio.
The end goal is to ensure that when asyncio calls Popen(), it doesn't block the
process. In the context of asyncio, there's no need to
Martin Richard added the comment:
Thank you all for fixing this so quickly, it's been done amazingly fast!
--
___
Python tracker
<http://bugs.python.org/is
New submission from Martin Richard:
Hi,
I stumbled upon a SEGFAULT while trying Python 3.6.0 on a project using
asyncio. I can't really figure out what's happening, so I reduced the original
code triggering the bug down to a reproducible case (which looks a bit clunky,
sorry). The cas
New submission from Martin Richard:
Hi,
Currently, subprocess.Popen performs blocking IO in its constructor (at least
on Unix): it reads on a pipe in order to detect outcome of the pre-exec and
exec phase in the new child. There is no way yet to modify this behavior as
this blocking call is
New submission from Martin Richard:
An exception can be raised in SubprocessTransport.__init__() from
SubprocessTransport._start() - for instance because an exception is raised in
the preexec_fn callback.
In this case, the calling function never gets a reference to the transport
object, and
Martin Richard added the comment:
I'm not sure I know how to do this correctly: I lack of experience both
with openssl C API and writing python modules in C.
It may be more flexible, but unless the key is protected/crypted somehow,
one would need a string or bytes buffer to hold the key
Martin Richard added the comment:
You are right.
And if certfile and keyfile (args of load_cert_chain()) accept file-like
objects, we agree that cafile (load_verify_location()) should accept them too?
--
___
Python tracker
<http://bugs.python.
Martin Richard added the comment:
Hi,
I would like to update this patch so it can finally land in cpython, hopefully
3.6.
tl;dr of the thread:
In a nutshell, the latest patch from Kristján Valur Jónsson updates
SSLContext.load_cert_chain(certfile, keyfile=None, password=None) and
Martin Richard added the comment:
015-05-26 20:40 GMT+02:00 Yury Selivanov :
>
> Yury Selivanov added the comment:
> The only solution to safely fork a process is to fix loop.close() to
> check if it's called from a forked process and to close the loop in
> a safe way (t
Martin Richard added the comment:
Hi,
My patch was a variation of haypo's patch. The goal was to duplicate the
loop and its internal objects (loop and self pipes) without changing much
to its state from the outside (keeping callbacks and active tasks). I
wanted to be conservative with
New submission from Martin Richard:
I would like to add a detach() method to base_suprocess.BaseSuprocessTransport,
which would release the underlying Popen object to the user, pretty much like
socket.detach() detaches a socket object and returns the fd.
The rationale is the following: the
New submission from Martin Richard:
base_subprocess.BaseSuprocessTransport implements
_make_write_subprocess_pipe_proto and _make_read_subprocess_pipe_proto.
Both are private and both raise NotImplementedError. However, when I grep in
tulip sources for those methods, they are never called nor
Martin Richard added the comment:
The goal of the patch is to create a duplicate selector (a new epoll()
structure with the same watched fds as the original epoll). It allows to remove
fds watched in the child's loop without impacting the parent process.
Actually, it's true tha
Martin Richard added the comment:
In that case, I suggest a small addition to your patch that would do the trick:
in unix_events.py:
+def _at_fork(self):
+super()._at_fork()
+self._selector._at_fork()
+self._close_self_pipe()
+self._make_self_pipe
Martin Richard added the comment:
I read the patch, it looks good to me for python 3.5. It will (obviously) not
work with python 3.4 since self._selector won't have an _at_fork() method.
I ran the tests on my project with python 3.5a1 and the patch, it seems to work
as expected: ie. w
Changes by Martin Richard :
--
nosy: +martius
___
Python tracker
<http://bugs.python.org/issue17911>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Richard added the comment:
I updated the selector patch so BaseSelector.get_key() raises KeyError if the
mapping is None. All the (non skipped) tests in test_selectors.py passed.
Anyway, if there is an other problem with freeing the mapping object (I don't
know, maybe "re
Changes by Martin Richard :
--
components: +asyncio
nosy: +gvanrossum, haypo, yselivanov
type: -> performance
versions: +Python 3.4
___
Python tracker
<http://bugs.python.org/issu
New submission from Martin Richard:
Hi,
I would like to submit 3 trivial modifications which break a cycle each. It is
not much, but those three cycles caused a lot of objects to be garbage
collected. They can now be freed using the reference counting mechanism, and
therefore, reduce the
Martin Richard added the comment:
Currently, this is what I do in the child after the fork:
>>> selector = loop._selector
>>> parent_class = selector.__class__.__bases__[0]
>>> selector.unregister = lambda fd: parent_class.unregister(selector, fd)
Martin Richard added the comment:
I said something wrong in my previous comment: removing and re-adding the
reader callback right after the fork() is obviously subject to a race condition.
I'll go for the monkey patching.
--
___
Python tr
Martin Richard added the comment:
Guido,
Currently in my program, I manually remove and then re-adds the reader to the
loop in the parent process right after the fork(). I also considered a dirty
monkey-patching of remove_reader() and remove_writer() which would act as the
original versions
Martin Richard added the comment:
Hi,
Actually, closing and creating a new loop in the child doesn't work either, at
least on Linux.
When, in the child, we call loop.close(), it performs:
self.remove_reader(self._ssock)
(in selector_events.py, _close_self_pipe() around line 85)
Bot
Changes by Martin Richard :
--
nosy: +martius
___
Python tracker
<http://bugs.python.org/issue22638>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Richard added the comment:
Here is an other patch which mentions high and low water limits. I think it's
better to talk about it, since it tells extactly what a "full buffer" and
"partially drained" means.
On the other hand, StreamWriter wraps the transport but
Changes by Martin Richard :
--
hgrepos: -273
___
Python tracker
<http://bugs.python.org/issue22348>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Martin Richard:
Hi,
Following the discussion on the python-tulip group, I'd like to propose a patch
for the documentation of StreamWriter.drain().
This patch aims to give a better description of what drain() is intended to do,
and when to use it. In particula
28 matches
Mail list logo