Change by Gustavo J. A. M. Carneiro :
--
nosy: +gustavo
___
Python tracker
<https://bugs.python.org/issue4>
___
___
Python-bugs-list mailing list
Unsub
Gustavo J. A. M. Carneiro added the comment:
What a shame, I've seen this error many times as well.
Surely making it BaseException will not break that much code?...
--
nosy: +gustavo
___
Python tracker
<https://bugs.python.org/issue32
Gustavo J. A. M. Carneiro added the comment:
New patch that:
1. adds assert(sizeof(uuid_t) == 16); to the extension module;
2. fixes the code path when ctypes has to be used instead of the extension
module (needed a bit more refactoring, apologies if it makes the diff harder to
read);
3
Gustavo J. A. M. Carneiro added the comment:
One issue of note is regarding generate_time(). Originally I found ctypes
bindings for this function, so I wrapped it as well in the extension module.
However, it doesn't appear to be used
Gustavo J. A. M. Carneiro added the comment:
This patch fixes the Mac OS X issue @haypo pointed out.
--
Added file: http://bugs.python.org/file40865/issue20519_10941v2.diff
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
Gustavo J. A. M. Carneiro added the comment:
I am not using hg anymore, since asyncio migrated to git.
Here's a github PR, does that help?
https://github.com/python/asyncio/pull/260
--
___
Python tracker rep...@bugs.python.org
http
Gustavo J. A. M. Carneiro added the comment:
I was wrong, there still needs to be some cleanup in cancellation, even with
the new approach. But it does solve the out-of-order problem.
I don't know if it should be applied to rc1. I wish I had more time to test.
Up to you guys
Gustavo J. A. M. Carneiro added the comment:
I don't think the order for multiple concurrent getters matters that much.
With analogy with the threading case, if multiple threads are blocked get()ing
an item from the same queue, I would not presume to expect anything about the
ordering which
Gustavo J. A. M. Carneiro added the comment:
Sure, just give me a couple of days.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23812
Gustavo J. A. M. Carneiro added the comment:
Don't know if it helps, but I made a github pull request for this:
https://github.com/python/asyncio/pull/256
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23812
Gustavo J. A. M. Carneiro added the comment:
So I uploaded a new patch version fixing a similar problem in put().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23812
Changes by Gustavo J. A. M. Carneiro gjcarne...@gmail.com:
Added file: http://bugs.python.org/file38741/Issue23812.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23812
New submission from Gustavo J. A. M. Carneiro:
I have a pattern where I read from a queue with a timeout, generally like this:
while True:
reader = asyncio.async(wait_for(queue.get(), 0.1))
try:
item = (yield from reader)
except asyncio.TimeoutError:
reader.cancel()
continue
Gustavo J. A. M. Carneiro added the comment:
- Are there other places where a cancellation can have a similar effect?
Maybe the same logic in put()?
Hm.. I didn't look, but yes, it does look like it might be affected by the same
issue. I'll try to create a test for that to confirm.
how
Gustavo J. A. M. Carneiro added the comment:
I created a codereview issue: https://codereview.appspot.com/222930043
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23812
New submission from Gustavo J. A. M. Carneiro:
If you try the attached program, you will find that for every iteration the
uuid.uuid4() call generates objects that contain reference cycles and need the
help of the garbage collector. This is not nice. If I make the ctypes module
not able
Gustavo J. A. M. Carneiro added the comment:
Well, this isn't a big problem, but I have an application that needs to run
with the GC disabled, since it causes pauses of a couple of seconds each time a
full collection runs (we have a few million objects allocated). I will run the
GC only once
Gustavo J. A. M. Carneiro added the comment:
I have narrowed it down to one line of code:
ctypes.create_string_buffer(16)
That is enough to create 7 objects that have reference cycles.
[class 'ctypes.c_char_Array_16', {'__module__': 'ctypes', '__doc__': None,
'__weakref__': attribute
Gustavo J. A. M. Carneiro added the comment:
Regardless, if you don't mind, take this patch for Python 3.5 to avoid ctypes,
at least in the Linux case (I don't have Windows to test). Creating a proper
extension module is safer and really not that hard...
--
keywords: +patch
Added
Gustavo J. A. M. Carneiro gjcarne...@gmail.com added the comment:
If this problem does not apply to Python 3.x, by all means go ahead and
close it. It probably is a bug, but probably not worth fixing;
workaround is simple enough, and affected extensions have already
adapted
Changes by Gustavo J. A. M. Carneiro [EMAIL PROTECTED]:
--
nosy: +gustavo
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Python-bugs-list mailing list
New submission from Gustavo J. A. M. Carneiro:
Often python extension modules define submodules like this:
static PyObject *
initfoo_xpto(void)
{
PyObject *m;
m = Py_InitModule3(foo.xpto, foo_xpto_functions, NULL);
[...]
return m;
}
PyMODINIT_FUNC
initfoo(void)
{
PyObject
Gustavo J. A. M. Carneiro added the comment:
The patch looks great.
But I was wondering if there is any chance to export a C API in addition
to the Python one? That is because PyGTK is mostly C, the code that
needs this is C, it would be easier to call a C API.
--
nosy: +gustavo
Changes by Gustavo J. A. M. Carneiro:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1583
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman
Gustavo J. A. M. Carneiro added the comment:
Minimal patch that just adds the pipe but does not attempt to fix
anything else.
Added file: http://bugs.python.org/file8898/python-signals-minimal.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Gustavo J. A. M. Carneiro added the comment:
The minimal patch doesn't initialize dummy_char or dummy_c. It's
harmless here, but please fix it. ;)
The variable is called 'dummy' for a reason. The value written or read
is irrevelant...
_
Tracker [EMAIL
Gustavo J. A. M. Carneiro added the comment:
My understanding is that there are some things that the current patch
does not address.
Well, I don't know what those things are, so it's hard for me to address
them. :-)
_
Tracker [EMAIL PROTECTED]
http
27 matches
Mail list logo