[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed the decimal issue in r68800 and r68799 . Still needs a fix to Fractions, preferably adding an empty __slots__ to all levels of numbers.py. ___ Python tracker _

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file12158/issue4428-io-bufwrite-gps03.diff ___ Python tracker ___ ___ Python

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Updated patch with unit tests to verify the write behavior attached in -gps04. Up for code review at http://codereview.appspot.com/12470/show -- keywords: +needs review ___ Python tracker

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : Added file: http://bugs.python.org/file12806/issue4428-io-bufwrite-gps04.diff ___ Python tracker ___ ___ Python-b

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file12157/issue4428-io-bufwrite-gps02.diff ___ Python tracker ___ ___ Python

[issue3826] Problem with SocketIO for closing the socket

2009-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: backported to release30-maint in r68796. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue5005] 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax.

2009-01-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: 3.0 sqlite doc: most refers to pysqlite2, use 2.x syntax. -> 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax. ___ Python tracker __

[issue4978] allow unicode keyword args

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Interesting, I didn't know that about _PyUnicode_AsDefaultEncodedString. Here's another patch. Added file: http://bugs.python.org/file12805/unicode_kwargs3.patch ___ Python tracker

[issue5008] Wrong tell() result for a file opened in append mode

2009-01-19 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file12804/fileio_append.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue5008] Wrong tell() result for a file opened in append mode

2009-01-19 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file12803/fileio_append.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue5008] Wrong tell() result for a file opened in append mode

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: Patch _including a test_: + if (append) + lseek(self->fd, 0, SEEK_END); -- keywords: +patch Added file: http://bugs.python.org/file12803/fileio_append.patch ___ Python tracker

[issue5008] Wrong tell() result for a file opened in append mode

2009-01-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> release blocker type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue5008] Wrong tell() result for a file opened in append mode

2009-01-19 Thread STINNER Victor
New submission from STINNER Victor : The following code must display 3 instead of 0: --- with open("x", "w") as f: f.write("xxx") with open("x", "a") as f: print(f.tell()) --- The example works with Python 2.x, because file object is implemented using the FILE structure (fopen, ftell, e

[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: r68788 on py3k -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: checked in, trunk, r68787 tests pass. Sorry about that, don't have a windows machine handy and I hadn't had a chance to check the buildbots ___ Python tracker ___

[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2009-01-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Py3.0.1 should not go out without this being fixed. -- priority: critical -> release blocker ___ Python tracker ___ _

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: For the Fractions issue, consider adding an empty __slots__ declaration to every level in numbers.py. That will preclude unintended dictionary creation for anything inheriting from the numbers abcs. We should also be an issue for the other abcs. The collec

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Arghh! Decimal is NOT supposed to inherit or register with numbers. Guido has pronounced on this and we've discussed it multiple times. See the comments in numbers.py which were supposed to serve as a reminder. Decimals are not interoperable with floats

[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-01-19 Thread ak
New submission from ak : https://www.orange.sk/ is served by an Oracle HTTPS server, and works with firefox or opera but not urllib2. code snippet: import cookiejar import urllib2 cookiejar = cookielib.LWPCookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar)

[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: Bug is reproductible with: * Python 2.5 : charset utf-8-sig and utf-16 for codecs.open() * trunk : charset utf-8-sig, utf-16 and utf-32 for codecs.open() * py3k : charset utf-8-sig, utf-16 and utf-32 for open() With utf-7 or utf-8, no BOM is written. Note:

[issue4862] utf-16 BOM is not skipped after seek(0)

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: I opened a different issue (#5006) for the duplicate BOM in append mode. ___ Python tracker ___ ___ Python-b

[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2009-01-19 Thread STINNER Victor
New submission from STINNER Victor : Copy/paste of message79330 from the issue #4862: -- >>> f = open('utf16.txt', 'w', encoding='utf-16') >>> f.write('abc') 3 >>> f.close() >>> f = open('utf16.txt', 'a', encoding='utf-16') >>> f.write('def') 3 >>> f.close() >>> open('utf16.txt', 'r'

[issue4995] sqlite3 module gives SQL logic error only in transactions

2009-01-19 Thread Muayyad Alsadi
Muayyad Alsadi added the comment: can you please tell me how to detect the version so that my application will not crash on Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38) which of these values should I use apilevel = '2.0' sqlite_version = '3.5.9' sqlite_version_info = (3, 5, 9)

[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-01-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: On Windows only, since r68768. Patch seems OK to me. -- assignee: -> jnoller nosy: +amaury.forgeotdarc, jnoller ___ Python tracker ___ __

[issue5005] 3.0 sqlite doc: most refers to pysqlite2, use 2.x syntax.

2009-01-19 Thread Terry J. Reedy
New submission from Terry J. Reedy : 1. Several examples start with >>> from pysqlite2 import dbapi2 as sqlite3 Traceback (most recent call last): File "", line 1, in from pysqlite2 import dbapi2 as sqlite3 ImportError: No module named pysqlite2 I presume that should be just 'import sqli

[issue4978] allow unicode keyword args

2009-01-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Sorry, but _PyUnicode_AsDefaultEncodedString returns either a borrowed reference (if errors==NULL) or a new reference (if errors!=NULL). In either case it's wrong to DECREF the string when you simply take the buffer's address: >>> f(**{u'someLongStrin

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2009-01-19 Thread Daniel Franke
Changes by Daniel Franke : -- components: +Extension Modules -Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2009-01-19 Thread Daniel Frnake
New submission from Daniel Frnake : On Linux and presumably on other POSIX-like systems, socket.getfqdn() doesn't work if a system resolves its own FQDN using DNS rather than /etc/hosts. My system's FQDN is 'fugue.tank.wellohorld.com'. My /etc/hosts is empty except for loopback entries, and /et

[issue4922] set.add and set.discard are not conformant to collections.MutableSet interface

2009-01-19 Thread Georg Brandl
Changes by Georg Brandl : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-19 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Ooops, ignore my last comment. (sorry, too late - I only read this after responding to the earlier one) ___ Python tracker ___ __

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-19 Thread Martin v. Löwis
Martin v. Löwis added the comment: > I understand thread-safe. This usage is safe from Python threads > because it is all done in the context of the GIL. No, it is not. See below. > In your example, T2 doesn't hold the GIL and so, this is the scenario > that I believe you are invoking. Ass

[issue4448] should socket readline() use default_bufsize instead of _rbufsize?

2009-01-19 Thread Gabriel Genellina
Changes by Gabriel Genellina : -- nosy: +gagenellina ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: The Decimal class has the same issue in py3k (but not in the trunk). ___ Python tracker ___ ___ Python-bugs-l

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Mark Dickinson
Mark Dickinson added the comment: I believe that __slots__ was used for performance (memory, speed) reasons here rather than for preventing random attribute assignments. But maybe inheriting from Rational invalidates those reasons as well... -- nosy: +marketdickinson ___

[issue4862] utf-16 BOM is not skipped after seek(0)

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I support Amaury's suggestion (actually I implemented it in the io-c branch). Resetting the decoder when seeking to the beginning of the stream is a reasonable way to deal with those incremental decoders for which the start state is something else than (b"", 0).

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jan 19, 2009 at 2:01 PM, Tarek Ziadé wrote: > > Tarek Ziadé added the comment: > >> What is the rationale for swallowing all socket exceptions except >> "Connection reset by peer" in __exit__? > > I am catching just the error that raises if the c

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Here is what I think is a better attempt at the selective-disabling. I did away with the messy macros and added a function in errors.c. This maintans a global 'level' variable, implicitly guarded by the GIL. Now only the thread that first enters a

[issue5003] Error while installing Python-3

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: setup.py is not meant to be called directly (it will be called by the Python 3 interpreter as part of the build process and is, therefore, written in Python 3 syntax). The proper command sequence to build and install Python is: ./configure --prefix=~/python3 m

[issue5003] Error while installing Python-3

2009-01-19 Thread Sravani Gogineni
New submission from Sravani Gogineni : i was trying to install python 3 using the folowing command $ python setup.py --home=~/python3 and i got the below error: File "setup.py", line 232 except (CCompilerError, DistutilsError) as why: ^ Syntax

[issue4978] allow unicode keyword args

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: This patch should fix that. Added file: http://bugs.python.org/file12801/unicode_keyword_args.patch ___ Python tracker ___ __

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread 0x666
0x666 added the comment: Thanks for quick response and for informative answers, especially thanks to Antoine Pitrou/Amaury Forgeot. p.s. By seting bigger range - range(15) and elements = 1000, I was able to get speed-up factor up to 1.8. Wow, I`m amazed :-) Good library, keep it up. BTW, abou

[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-01-19 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : I got compiler warning "conn_poll takes too many arguments". I hope the attached patch is right fix. -- components: Library (Lib) files: pipe_connection_c.patch keywords: patch messages: 80204 nosy: ocean-city severity: normal status: open title: m

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-19 Thread Tarek Ziadé
Changes by Tarek Ziadé : Added file: http://bugs.python.org/file12799/ftplib.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-19 Thread Tarek Ziadé
Tarek Ziadé added the comment: > What is the rationale for swallowing all socket exceptions except > "Connection reset by peer" in __exit__? I am catching just the error that raises if the connection is closed when calling quit() > In any case, it is better to use errno.ECONNRESET instead o

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: What is the rationale for swallowing all socket exceptions except "Connection reset by peer" in __exit__? In any case, it is better to use errno.ECONNRESET instead of literal 54. Note that SMTP.quit() calls SMTP.close(), so in the normal termination ca

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: I don't understand the motivation of having two different methods for "raw" streams: read1() and read(). I would prefer to have only a method read() (because "read" is the most common name, whereas read1() is only used on Python3), but read() will have to fol

[issue4978] allow unicode keyword args

2009-01-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch works when the unicode contains only ascii, but crashes with the following input: >>> def f(hehe): return 42 ... >>> f(**{u'hehe': 1}) 42 >>> f(**{u'héhé': 1}) Segmentation fault The two PyString_AsString(keyword) calls are now wrong and shoul

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Mon, Jan 19, 2009 at 11:59 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > Short example to reproduce the problem: > --- > import io, os > fd = os.open("/etc/issue", os.O_RDONLY) > raw = open(fd, "rb", buffering=0) > text = io.TextIOW

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: Short example to reproduce the problem: --- import io, os fd = os.open("/etc/issue", os.O_RDONLY) raw = open(fd, "rb", buffering=0) text = io.TextIOWrapper(raw, line_buffering=False) print(text.read(1)) --- Traceback (most recent call last): File "x.py", line

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ooops, ignore my last comment. I just realized the point you were making Martin, and it doesn't involve rogue threads at all. Hmm, back to the drawing board, I suppose. ___ Python tracker

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I understand thread-safe. This usage is safe from Python threads because it is all done in the context of the GIL. It is, however, unsafe if some other random thread is also modifying these settings during runtime. In your example, T2 doesn't hold t

[issue4705] python3.0 -u: unbuffered stdout

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. Added file: http://bugs.python.org/file12798/unbuffered-stdin.patch ___ Python tracker ___

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-19 Thread Gabriel Genellina
Gabriel Genellina added the comment: > I'm quite certain that the makefile is generated before > the "make" > program is launched in separated process. Follow is the > original code > where the makefile is created (line 14) and a task is put > in queue (line > 19). It's executed in the main thre

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: Usage of read1(): * _BytesIO.read1(n) (_bytesio.c): calls bytesio_read(n) * _BytesIO.read1(n) (io.py): return self.read(n) * BufferedReader._read_unlocked(n=None): - if n is None or n==-1, call self.raw.read() in a "while True: ..." until EOF - else,

[issue3093] Namespace polution from multiprocessing

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue3283] multiprocessing.connection doesn't import AuthenticationError, while using it

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue3273] multiprocessing and meaningful errors

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue3272] Multiprocessing hangs when multiprocessing.Pool methods are called

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue3807] _multiprocessing build fails when configure --without-threads

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4708] os.pipe should return inheritable descriptors (Windows)

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue5001] Remove assertion-based checking in multiprocessing

2009-01-19 Thread Jesse Noller
New submission from Jesse Noller : Right now, the multiprocessing code is littered with statements like: assert self._popen is None, 'cannot start a process twice' assert self._parent_pid == os.getpid(), \ 'can only start a process object created by current proces

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-19 Thread Martin v. Löwis
Martin v. Löwis added the comment: Kristjan, please understanding that setting the CRT error handling is not thread-safe, and trying to do it in a fine-grained way can cause all kinds of crazy races. With your patch, the following sequencce of events is possible if two threads T1 and T2 simultan

[issue4705] python3.0 -u: unbuffered stdout

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reopening, since sys.stdin is actually broken in unbuffered mode: $ ./python -u Python 3.1a0 (py3k:68756, Jan 19 2009, 01:17:26) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.stdin.read(1) T

[issue3881] IDLE won't start in custom directory.

2009-01-19 Thread Zlm
Zlm added the comment: I reinstalled Python to "C:\Program Files\Python\" (I wrote this path in the installer) and IDLE works fine. I can access the Python folder by going to "C:\Programas\Python". Then, I unninstalled and installed again to "C:\Programas\Python". IDLE doesn't work. I can still

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: IOBase doesn't even define read(), though! I think we should make it part of BufferIOBase. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Oh, I agree - I think we should update 3311 with the enhancement to move the check to connection_new ___ Python tracker ___ __

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: jnoller> issue #3311 Oh, I forgot this issue :-) But the fix doesn't solve #3311, because it is disabled on Windows and only protect poll() method. ___ Python tracker

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: That's an enhancement - not a bad idea, I just noticed that this issue is pretty close to issue http://bugs.python.org/issue3311 as well. ___ Python tracker _

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: Why don't you check the file descriptor directly in connection_new()? conn->handle is read only and so can't be changed before the call to poll(). So other methods will also be "protected" and the error will be raised earlier. ___

[issue4065] _multiprocessing doesn't build on macosx 10.3

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue4998] __slots__ on Fraction is useless

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: The problem is that Fraction inherits from a class without __slots__ (Rationale), so it's useless. I suggest that the __slots__ be removed or Rationale.register() is used instead of inheritance. -- assignee: -> jyasskin nosy: +benjamin.peterson, jya

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Closing as not an issue. -- resolution: -> invalid ___ Python tracker ___ ___ Python-bugs-list mailin

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: My results don't match yours. (8 cores, Mac OS/X): testing multiprocessing on 8 cores -- 10 elements map() time 0.0444118976593 s 10 elements pool.map() time 0.0366489887238 s 10 elements pool.apply_async() time 24.3125801086 s Now

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The multiprocessing module indeed has some overhead: - the processes are spawned when needed. Before you perform performance timings, you should "warm up" the Pool with a line like pool.map(f, range(mul.cpu_count())) (starting a process is a slowish o

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Ugh, I didn't mean to chuck your original patch, but it also wasn't correct for win32 Additionally, if you close the handle from underneath it, it behaves properly: >>> obj.poll() Traceback (most recent call last): File "", line 1, in IOError: [Errno 9] Bad

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: The save was needed for the Py_BLOCK_THREADS call. ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: @jnoller: Hey, you removed my patch! My patch used fstat() in Connection constructor, whereas your just check file descriptor bounds in the poll() method. And what is the "save" new argument? Is it related to this issue? _

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Well, the Windows bot is failing but not from test_fileio, so I'll go ahead and merge it. r68767. ___ Python tracker ___ _

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Committed patch as r68768 to python-trunk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file12795/issue_3321.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Removed raise TestSkip per code review from bpeterson Added file: http://bugs.python.org/file12797/issue_3321.patch ___ Python tracker ___ ___

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: You should try with something less trivial than your "f" function. For such a short function, it seems expectable that the dispatch overhead will dominate the actual computation time. -- nosy: +pitrou ___ Python trac

[issue4804] Python on Windows disables all C runtime library assertions

2009-01-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Okay, here is a second patch. open now verifies the 'mode' string properly, and all uses of a 'fp' turn off the CRT error handling temporarily, while holding the GIL Added file: http://bugs.python.org/file12796/crterror.patch _

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-19 Thread Javen Wang
Javen Wang added the comment: I'm quite certain that the makefile is generated before the "make" program is launched in separated process. Follow is the original code where the makefile is created (line 14) and a task is put in queue (line 19). It's executed in the main thread (no parallel execu

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file12794/issue_3321.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Curse you hard-tabs. Here's the new patch w/ fixed comment Added file: http://bugs.python.org/file12795/issue_3321.patch ___ Python tracker ___ __

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file11485/another_solution.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file11007/test_multiprocessing.patch ___ Python tracker ___ ___ Python-bugs-list

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file10861/_multiprocessing_connection.patch ___ Python tracker ___ ___ Python-bu

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Attached is a patch+test for this condition, which is not used if we're running on windows. Added file: http://bugs.python.org/file12794/issue_3321.patch ___ Python tracker

[issue4999] multiprocessing.Queue does not order objects

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5000] multiprocessing - Pool.map() slower about 5 times than map() on 2 cores machine

2009-01-19 Thread 0x666
New submission from 0x666 : I think something wrong with implementation of multiprocessing module. I`ve run this very simple test on my machine (core 2, vista): import multiprocessing as mul from time import time def f(x): return x*x if __name__ == '__main__': print " testing mu

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, read1() is not documented as a standard method of either IOBase, RawIOBase or BufferedIOBase. I suggest that it becomes a standard method of IOBase, with a default implementation simply calling read(n). It also means unbuffered stdio as it was recently

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, read1() is not documented as a standard method of either IOBase, RawIOBase or BufferedIOBase. I suggest that it becomes a standard method of IOBase, with a default implementation simply calling read(n). It also means unbuffered stdio as it was recently

  1   2   >