Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I've stumbled upon further cases of this problem, and a possible serious bug in
python 3.
the _PyIOBase_finalize() will invoke a close method on the object if the
object isn't closed. This is the same as the object having
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a patch with the suggested change.
I put _PyObject_ResurrectFromDealloc into typeobject.c since it seems more at
home there than in object.c, but I'm not sure.
Also note that other types, that were calling
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
You are creating a 10 level nested structure of iterators. It is no wonder
that you exhaust the stack space of the interpreter. You would get the same
with any iterator combination, nothing special with zip and starmap here
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
(fixed wsock32.lib in revision ab0aff639cfb)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11750
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I think this needs serious consideration. There needs to be an socket error
case cleanup path that releases resources but ignores further socket errors.
--
___
Python tracker rep
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10576
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a patch that rectifies this situation, albeit in a somewhat 'hacky'
manner.
It works by injecting a monitoring 'tp_free' call into the type during the
basedealloc call, which sets a flag if it was called with the object
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Another, less hacky but more intrusive, way would be to change the signature of
tp_dealloc in a backwards compatible way:
typedef void (*destructor)(PyObject *, int *destroyed);
The destructor can then set the flag pointed
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
a = map(add, a, b) also crashes this.
a = chain(a, b) also.
If, by provisions you speak of sys.max_recursion_depth, that is only invoked
when executing python code. What's happening here is just simple c recursion
trough
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
On the other hand, Antoine is correct in that we _could_ use the existing
infrastructure and count PyIter_Next() as a recursion in the same way as
entering the ceval loop is a recursion. Extra checking in there would hardly
slow
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
at some point it became the Windows API.
You are right: http://en.wikipedia.org/wiki/Windows_API
How about _windowsapi or _winapi then, to ensure there are no clashes?
--
___
Python
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
There are other crashers we choose to ignore (involving gc.getreferrers,
bytecode hacks, ctypes, etc). I think this should go in that category
and I would be happy to add a note to that effect in the docs for tertools.
Yes
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
nosy: +kristjan.jonsson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11750
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
nosy: +kristjan.jonsson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14574
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
+1, we already have such decorators for individual test cases. Code should be
obvious, particularly testing code and mixins often aren't. Magic such as
identifying classes to run by their type should be over rideable. All magic
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
It shouldn't. I noticed this and fixed this at CCP a while back but I wasn't in
Python Committer mode at the time. _select needs fixing.
--
___
Python tracker rep...@bugs.python.org
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
A few comments:
1)
with cv:
make_an_item_available()
+ cv.notify()
2) one of the benefits of wait_for() is that it automates the tricky
timekeeping needed if one wants an somewhat accurate timeout, you may want
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
But, once again, the condition may not yet hold true is false.
In our current implementation, yes. But it is intentionally left undefined in
the specification of the condition variable protocol, for very good reasons.
While I'm
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
We shouldn't be testing implementation details. The Condition variables are
canonically prone to spurious wakeups and stolen wakeups. The fact that
the current implementation doesn't have them shouldn't place that burden
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Stolen wakeups are a fact of life though, even in cpython's implementation of
condition variables. And for the user of a condition variable the difference
is so subtle as to not warrant special mention.
This is, btw, not just
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
possibly, multiprocessing.Connection uses handles, which can be socket handles
on windows, and that code also uses DuplicateHandle. I think a generic
solution must be found for multiprocessing, so I'll create a separate issue
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a new patch.
1) I´ve simplified and relaxed test_notify() for Condition objects. Condition
variables don't guarantee that there won't be any spurious wakeups so the test
must maintain internal bookkeeping so
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
nosy: +kristjan.jonsson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4892
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I just want to point out that each time socket.share() is called, the resulting
data can only be used once by socket.fromshare(). I'm mentioning this because
I know there is some caching mechanism in reduction.py
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
A new patch, taking Antoine's review and comments into account.
--
Added file: http://bugs.python.org/file25158/gccallback.patch
___
Python tracker rep...@bugs.python.org
http
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
multiprocessing.reduction still appears to use DuplicateHandle to copy sockets.
I propose adding a pair of custom functions to _multiprocessing, that pickles
and unpickles handles. It can detect socket handles as being different
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14288
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Jim: The edge case of collecting an object that is alone in a cycle is
something that isn't handled. I'm also not sure that it is worth doing or even
safe or possible. but that is beside the point and not the topic of this patch
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Btw. tangentially related to this discussion, issue 10576 aims to make the
situation with uncollectable objects a little more bearable. An application
can listen for garbage collection, visit gc.garbage and deal with its
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is an updated patch, taking Jim's and Antoine's comments into account.
Jim, I´d like to comment that I think the reason __del__ objects are
uncollectable is more subtle than there being no defined order of calling
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
New patch with explicit mutually exclusive flags and better comments.
--
Added file: http://bugs.python.org/file25142/ob_is_gc.patch
___
Python tracker rep...@bugs.python.org
http
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Thanks for your comments Jim.
They made me realize that the patch was incomplete. What is needed are two
mutually exclusive flags that override the presence of the tp_del slot. This
addresses your 1) point and is the case
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
You are right, I was thinking more of pyobject attributes. I'll fix this then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10576
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
Removed message: http://bugs.python.org/msg157189
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Not much happening on python-dev.
Perhaps this is not so controversial.
http://www.mail-archive.com/python-dev@python.org/msg66206.html
--
___
Python tracker rep...@bugs.python.org
http
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
The binary copy:
This is a winsock2 feature. There is no difference in layout between 32 bits
and 64 bits. I also don't think there is a difference between SDK versions.
However, strangely, there is a difference between unicode
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Right Daniel, but currently an exception is made for Generator objects. The
generator can tell that the finalizer won't do anything and then allow
collection regardless. It knows the finalizer and that in its state
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
typeobject.c:
TPSLOT(__del__, tp_del, slot_tp_del, NULL, ),
I'm not super-familiar with how typeobjects and slots work, but I imagine that
if a type is defined with a __del__ member, then the tp_del slot is
automatically filled
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a new patch, with more tests.
Note that the process worker function can't be a member function because of how
multiprocessing works on Windows.
--
Added file: http://bugs.python.org/file25143/duplicate.patch
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
by memberfunction I mean a member of the class. I tried staticmethod and it
didn't work:
I tried a staticmethod and it didn't work:
==
ERROR: testShare
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
Removed file: http://bugs.python.org/file25145/duplicate.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
Removed file: http://bugs.python.org/file25143/duplicate.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
But changing it to staticmethod strangely fixes it. Interesting.
Sorry?
Don't be, probably not your fault. Today we have learned that we can spawn
multipropcessing targets with classmethods, but not staticmethods.
Your patch
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Could you possibly be any more specific? It works for me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
Removed file: http://bugs.python.org/file25146/duplicate.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Well, I think I have all of the merge errors out now. You´ll forgive me if I
didn't notice them all at first, but this is why we review code and you would
have helped me by giving me specifics, since after a time, the eyes tend
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a completely new patch. This approach uses the already existing
tp_is_gc enquiry slot to signal garbage collection.
The patch modifies the generator object to use this new mechanism.
The patch keeps the old
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I just noticed that PyTypeObjects have a gc slot already:
inquiry tp_is_gc; /* For PyObject_IS_GC */
Now, this is used in only one place in 2.7, for type objects:
return type-tp_flags Py_TPFLAGS_HEAPTYPE;
This is thus used
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Good idea Antoine.
So, I'll with your suggested fix to the unittests I'll commit this and then
look on while Rome burns.
--
___
Python tracker rep...@bugs.python.org
http
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Thanks.
Martin, what constitutes a security fix for Python? For example, isn't it
conceivable that one could place a long key into some registry setting used by
python and thus interfere with its stack? Aren't stack buffer
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Thanks for the your info/insight, Martin. I'll update 3.2 and 3.3. as you
suggest then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14471
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14471
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I already included this fix in my socket share patch, see issue 14310.
I think this was a bug that should be checked in to all relevant branches. The
reason is this text from msdn documentation for WsaDuplicateSocket:
Both
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Also, see this: http://support.microsoft.com/kb/179942/EN-US
applies to windows 2000 only, as far as I can tell, though. Don't know if we
still support that.
I have scoured the docs, but found yet no reason to _not_ use
New submission from Kristján Valur Jónsson krist...@ccpgames.com:
I found this issue with code analyzer in VS2010.
The problem applies to all 3.x versions, but there is no corresponding winreg.c
file in 2.x.
Since I'm not sure of the maintenance state of the individual branches, I'm
creating
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
title: Buffer oferrun in winreg.c - Buffer overrun in winreg.c
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14471
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Still no responses? I'll submit this then, unless someone objects.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Thanks, Jim.
Unless anyone objects, I'll commit this then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10576
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Closing this since it applies only to our custom tls implementation. Most
platforms use native tls now.
--
resolution: - wont fix
status: open - closed
___
Python tracker rep
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Thank you Antoine. Your points:
- Yes, I can robustify this.
- I think I worried that the actual contents might be too complex to test for
it. I'll see if I can't just simplify it as you suggest.
- right, thanks.
- gc.callbacks
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
You are right, I was thinking more of pyobject attributes. I'll fix this then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Why should python compiled with VS2010 have different error codes than one
compiled with the older compilers? We could revisit this in a new python
version, but for now, we should maintain compatibility across compilers
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
All done.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14435
New submission from Kristján Valur Jónsson krist...@ccpgames.com:
floatobject.c has its own block allocator. This appears to be ancient, from
before the time when obmalloc.c was invented.
This patch removes this allocator and puts an upper limit on the freelist of
floats. The purpose
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Yes, it is supposed to, but no one is actually looking at that value. It was
used in debugging information during PyFloat_Fini() which is no longer relevant
if this block information is removed.
Sure, 100 or 10 does not matter
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Correction: The number returned was the number of floats in existence, not the
size of the freelist. Do you think I should add a counter to support that
functionality? I´d rather change it to be the size of the old freelist
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a new patch, with the suggested changes. The variable names and macros
are similarly named as those for other objects such as lists.
--
Added file: http://bugs.python.org/file25071/nofreelist.patch
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Okay, I'll go ahead, fix the 'iter()' trick api name and apply the patch. Then
we'll see what happens :).
Any suggestion towards what documentation changes are needed? I don't think
the list of pickleable objects is made
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Raymond had already reviewed it, and sbt. I wasn't aware of any more pending
reviews, but I'll wait for yours, of course.
--
___
Python tracker rep...@bugs.python.org
http
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Btw, regarding compatibility: The docs say The pickle serialization format
is guaranteed to be backwards compatible across Python releases.
I take this to mean the serialization format itself. I don't think there is a
broader
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I've incorporated antoine's comments and the proposed internal function name
into a new patch.
A lot of the changes concerned thecking the type() of the unpickled iterator.
Now, it wasn't a specific design goal to get the exact
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I don't quite understand what you're saying about line mismatch Victor.
Anyway, if you look at it, it is clear that:
1) sys_update_path() can be called with argc==0 (main.c line 647)
2) 1742 was always setting arg0 to argv[0
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I'm sure you didn't intend to use words such as wrong and useless Victor.
Perhaps n must be 0 even for argc0, but I did that as an afterthought. Which
is the reason I asked you to take a look rather than committing this right
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
You are right, Stefan, argv[argc] is defined to be NULL by the standard. Jolly
good.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3367
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I've presented the patch, but no one has voiced an opinion on it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9609
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Why do you think it isn't safe, Antoine?
We only support IEEE platforms, and IEEE defines positive 0.0 to be all bits
cleared.
I personally don't think that even a small measurable performance degradation
in creating new floats
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
So, what is the consensus, does this go in or out?
What about the share() and fromshare() functions, are people ok with that?
--
versions: +Python 3.3 -Python 3.4
___
Python tracker rep
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
sbt, I will fix the api name. Any other objections then? Leave it as it is
with the iter() trick?
--
versions: +Python 3.3 -Python 3.4
___
Python tracker rep...@bugs.python.org
http
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Adding a patch to disable Side by Side assemblies in VS2010 (MS saw the light)
--
keywords: +patch
Added file: http://bugs.python.org/file25003/sxs.patch
___
Python tracker rep
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a comprehensive patch to errnomodule.c, as used in production at CCP
--
Added file: http://bugs.python.org/file25004/errnomodule.diff
___
Python tracker rep...@bugs.python.org
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Adding a patch containing a proposed PCBuild10 folder.
This consists of:
1) automatically updated .vcxproj and .sol files, provessed by 3) below
2) manually edited and new .props files to edit TargetName and Extension
attributes
3
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
superseder: - Intern certain integral floats for memory savings and
performance
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4024
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Yes, there is a measurable performance decrease in pybench arithmetic tests.
Integers don't fall out of arithmetic that often, true. But integral floats
are incredibly common in tabular data. In a game such as Eve Online
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
The -10..11 range was determined empirically. As you see from the values,
only -10 shows up as significant... In fact, just storing 0 to 5 would capture
the bulk of the savings.
Right, I'll do some test with the hardcoded
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
PyFloat_FromString() is very restrictive. In our case, for example, the floats
in question don't come from text files.
I'm adding a new file with changes suggested by Antoine. only 0.0 and 1.0 are
interned. It turns out
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Adding a patch here.
--
keywords: +patch
Added file: http://bugs.python.org/file24995/#10538.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10538
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
What's wrong with making functionality overridable, Antoine? By all means,
let's keep the select() but allow subclasses to elect not to use it.
As for the wakeup fd, there isn't such a thing. Why object on the basis
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10538
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Victor, could you check out the last patch here for sysmodule? I gather that
you are familiar with it.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Now unicodedata.c does not compile with VS2010, because somewhere, small is
defined.
Do you mind if I change the _PyAccu.small member to 'smalls'?
--
nosy: +krisvale
___
Python tracker
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Sure, that's simpler. I'll submit a fix.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14387
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
nosy: -krisvale
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10142
___
___
Python
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Making this low priority since it applies only to platforms without Windows and
pthread support.
--
priority: normal - low
versions: +Python 3.3 -Python 3.2
___
Python tracker rep
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Here is a patch for the sysmodule.c problem
--
Added file: http://bugs.python.org/file24983/sysmodule.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3367
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3367
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Added a patch as used by CCP in production. Covers more WSA cases.
--
nosy: +krisvale
Added file: http://bugs.python.org/file24985/cpython_75849_to_75851.diff
___
Python tracker rep
New submission from Kristján Valur Jónsson krist...@ccpgames.com:
Michael Foord reminded me of this issue recently. It was discussed on pydev a
few years back and met with limited enthusiasm. I speak from experience in
live production with EVE that this simple change saved us a lot of memory
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
bump, what is the status of this? Was it fixed?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3367
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Stefan, I just want to point out this issue, if you are touching 2.7:
http://bugs.python.org/issue10538
Do you think it merits being fixed?
--
nosy: +krisvale
___
Python tracker rep
401 - 500 of 924 matches
Mail list logo