Aaron Brady castiro...@gmail.com added the comment:
This is currently accomplished in 'multiprocessing.forking' with a
'duplicate' function.
Use (line #213):
rfd, wfd = os.pipe()
# get handle for read end of the pipe and make it inheritable
rhandle =
Marc-Andre Lemburg m...@egenix.com added the comment:
On 2009-01-13 14:14, Antoine Pitrou wrote:
Antoine Pitrou pit...@free.fr added the comment:
The patch is probably fine, but it would be nice to add some unit tests
for the new behaviour.
+1 from my side.
Thanks for the patch, Viktor.
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The problem has two causes:
- IOError is raised when no compiler is found. DistutilsPlatformError
should be used instead, this was fixed by #4702.
- the distutils.util.grok_environment_error function transforms a
IOError(Unable to find
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Indeed, Timer is designed to run the function once.
--
nosy: +amaury.forgeotdarc
resolution: - works for me
status: open - closed
___
Python tracker rep...@bugs.python.org
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4929
___
Antoine Pitrou pit...@free.fr added the comment:
Your change to the LOAD_CONST trueconst JUMP_IF_FALSE xx POP_TOP
optimization doesn't preserve the optimization to:
def f():
return 1 and a
I suspect we don't care since 0 or a wasn't optimized.
Yes, this optimization seems meant for
New submission from Steven D'Aprano st...@pearwood.info:
Documentation for files states that when writing to a file, unicode
strings are converted to byte strings using the encoding specified by
file.encoding.
http://docs.python.org/library/stdtypes.html#file.encoding
sys.stdout is a file,
New submission from Maciek Fijalkowski fi...@genesilico.pl:
this is at least a bad practice. It also might break silently at any point.
--
components: Library (Lib), Tests
files: out.diff
keywords: patch
messages: 79846
nosy: fijal
severity: normal
status: open
title:
Antoine Pitrou pit...@free.fr added the comment:
Le mercredi 14 janvier 2009 à 02:48 +, Jeffrey Yasskin a écrit :
Looking through the patch...
I don't really like the names for JUMP_OR_POP and POP_OR_JUMP.
I don't like them either, they're the only relatively short ones I could
come up
Bobby Xiao nneon...@gmail.com added the comment:
Well, in this example the group (ar) is unmatched, so sre throws the
error, and because of the alternation, the workaround you mentioned
doesn't seem to directly apply.
A better example is probably
re.sub(foo(?:b(ar)|foo),\\1,foofoo)
because this
Javen Wang jave...@gmail.com added the comment:
gagenellina,
My application is a little bit different from your test code. It won't
wait for the exit of new process and there're file writing operations
during makefile running. I changed the test code to be real
multi-process and tried many file
Jason Tishler ja...@tishler.net added the comment:
Your latest patch is on the right track, but see my latest one,
Makefile.pre.in.v2.diff, for an optimization. I tested make install
with and without DESTDIR defined on the command line and both cases
behaved as expected.
Added file:
Javen Wang jave...@gmail.com added the comment:
The created files are on local drive. I saw the problem on the laptop
(XP-SP2), desktop(XP-SP3) and server (Win2003). But there's no such
problem on the Linux and Mac boxes.
I tried to use fopen/fwrite in my extension according to your
suggestion.
Javen Wang jave...@gmail.com added the comment:
There would be more chances to see the problem by doing this:
C:\test\edk2 python.exe C:\test\tools\Source\Python\build\build.py
-n 2 -p IntelFrameworkModulePkg\IntelFrameworkModulePkg.dsc -a IA32 -s
___
Python
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
I really tried, but I can't run your script. first PYTHONPATH must be
set to some value (I tried with tools\Source\Python); Also the tool is
complaining about missing WORKSPACE and EDK_TOOLS_PATH env vars, and a
missing file
New submission from Benoit Boissinot bboissin+pythonb...@gmail.com:
Generalize heapq to work with all kind of mutable sequences. It should
be investigated PySequence_SetItem is a lot slower than PyList_SET_ITEM
(same for GET_ITEM and GET_SIZE).
--
components: Extension Modules
messages:
Andres Moreira elkpich...@gmail.com added the comment:
Hi haypo,
Ok I've been testing with python 2.6 and I put the results here:
optimizedurlparse is the file with my patch
First test optimizedurlparse, second urlparse:
#:/opt/python2.6/release26-maint$ ./python mio/profile_urlparse.py
STINNER Victor victor.stin...@haypocalc.com added the comment:
Please, attach patches instead of the full file.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4932
___
Andres Moreira elkpich...@gmail.com added the comment:
Hi haypo,
sorry for submit all the file, it's my first time here and I'm not very
used to this process yet. :)
Now I attach the patch.
--
keywords: +patch
Added file: http://bugs.python.org/file12744/urlparse.patch
STINNER Victor victor.stin...@haypocalc.com added the comment:
Now I attach the patch.
Your first patch for Python 2.5 was interesting, and looked close to the
python 2.6 version. But your second patch (for 2.6) contains only
micro-optimisations:
- inline the one-line clear_cache() function
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This was discussed at the outset and the decision was a conscious one.
Do you have any particular use cases in mind (what other mutable
sequences do you reach for when you need a heap)? Or is this just a
general discussion
Benoit Boissinot bboissin+pythonb...@gmail.com added the comment:
I was thinking about array.array. I don't know if it would be faster
than using a list, but it seemed elegant to be able to do a heap on it
anyway.
___
Python tracker rep...@bugs.python.org
Andres Moreira elkpich...@gmail.com added the comment:
Yes are micro-optimizations, but when I parsed a lot of url(10.000 or
more) that 10% or 8% or 5% is very well for me :). It was little
contribution to that module, anyway, i think that there are more
optimizatoins to do but I will try to do
New submission from Andreas Kloeckner inf...@tiker.net:
The name argument to PyErr_NewException() should be changed from char
* to const char *. Since the rest of pyerrors.h is const-correct,
this seems like an omission.
--
components: Interpreter Core
messages: 79868
nosy: inducer
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
array.array is terribly slow. It is optimized for space, not speed.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4948
___
New submission from Floris Bruynooghe floris.bruynoo...@gmail.com:
When compiling with -Wredundant-decls gcc spots a redundant declaration:
f...@laurie:sandbox$ cat test.c
#include Python.h
#include stdio.h
int main(void)
{
printf(hello\n);
return 0;
}
f...@laurie:sandbox$ gcc
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
It's not just that function, at least not in trunk. There are also
PyErr_SetFromErrnoWithFilename, PyErr_SetFromErrnoWithUnicodeFilename
and _PyErr_BadInternalCall which should be made const correct, see
attached patch for trunk.
Scott McCreary scott...@gmail.com added the comment:
On Tue, Jan 13, 2009 at 10:38 PM, Martin v. Löwis
rep...@bugs.python.org wrote:
Martin v. Löwis mar...@v.loewis.de added the comment:
I don't have any particular interest in BeOS variants, but this comes as
a surprise given that
Nick Coghlan ncogh...@gmail.com added the comment:
Reassigning to Raymond (as per the thread at
http://mail.python.org/pipermail/python-dev/2009-January/085030.html)
--
assignee: georg.brandl - rhettinger
nosy: +ncoghlan
___
Python tracker
Roumen Petrov bugtr...@roumenpetrov.info added the comment:
Hi Jason,
quick review without tests - I expect $${DESTDIR:-/} to work without :
in expression, i.e. just $${DESTDIR-/}.
The : in expression is not so portable (some shells fail on this).
Please see Shell Substitutions in autoconf
Martin v. Löwis mar...@v.loewis.de added the comment:
Ok, I'm closing this patch as rejected. If the discussion on python-dev
turns out that Haiku support should be added, then please create a new
issue (with a patch for 2.7 - clearly, for 2.6, no new features can be
added).
--
Changes by Tarek Ziadé ziade.ta...@gmail.com:
Added file: http://bugs.python.org/file12746/get_metadata.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4908
___
Changes by Tarek Ziadé ziade.ta...@gmail.com:
Removed file: http://bugs.python.org/file12692/get_metadata.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4908
___
Tarek Ziadé ziade.ta...@gmail.com added the comment:
I have improved the patch (uploaded here) (some cases are not done yet,
still work in progress)
Ray, it should work with egg generated by setuptools now, (zipped as well)
Andi, right ! - fixed in the current patch
Jason Tishler ja...@tishler.net added the comment:
I guess you mean the following:
${var:-value}
Old BSD shells, including the Ultrix sh, don't accept the colon for
any shell substitution, and complain and die.
If so, should we just go forward without the colon? The bash manpage
indicates
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
FWIW, I've launched a discussion on python-dev. If the OP is willing to
maintain the deltas over a long period of time (and perhaps provide a
buildbot for Haiku), then I fully support his effort.
--
nosy: +rhettinger
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
Yes, checking object identity is wrong in this case. Your patch looks
fine to me.
I've found several other is comparisons that should not be there --
working on a patch right now.
--
nosy: +gagenellina
Guido van Rossum gu...@python.org added the comment:
[Copy of a post I just made to python-dev]
I'm with Martin. In these days of distributed version control systems, I
would think that the effort for the Haiku folks to maintain a branch of
Python in their own version control would be minimal.
New submission from Antoine Pitrou pit...@free.fr:
This one seems to pop up rather frequently on the buildbots:
==
FAIL: test_post (test.test_httpservers.CGIHTTPServerTestCase)
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
On Windows, if you exit a process abnormally (using e.g. os._exit() in
Python) while it still has open connections, the other side receives a
WSAECONNRESET (error 10054).
So, you could write a test case using a dumb server (running
Javen Wang jave...@gmail.com added the comment:
I agree multithread programming is kind of difficult and tricky. But I
don't think there's a race condition in _MultiThreadBuildPlatform
method, because I do have only one producer. And the consumer consumes
the product only when it's done (i.e.
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
It probably uses sys.getdefaultencoding() instead.
That would be wrong too, according to the cited documentation.
file.encoding is a read only attribute; it can be set in C code using
PyFile_SetEncoding. Apart from its definition in
New submission from Gil mathnasium...@gmail.com:
Attached you will find my attachment testdll.zip, my dilemma was how
to run the attached C++ program using python scripts. Please advise.
Thanks,
Gil
--
components: IDLE
files: testdll.zip
messages: 79888
nosy: dominade27
severity:
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
Please post your question to the Python users mailing list: python-
l...@python.org -- mirrored as the comp.lang.python newsgroup too.
Also, gmane.org provides a web interfase: http://dir.gmane.org/
gmane.comp.python.general
Back to
Martin v. Löwis mar...@v.loewis.de added the comment:
The bug tracker is not a place to obtain help, but to offer help (e.g.
by proposing patches to Python). As Gabriel explains, there are better
places to get help with Python. Closing the report as invalid.
--
nosy: +loewis
resolution:
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Here's a patch that fixes-up length_hint and it's internal callers.
I think there are plenty of other places that also swallow exceptions
but will leave those for someone who wants to look at every instance of
PyErr_Clear()
46 matches
Mail list logo