[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Interesting! If you are motivated, a further approach would be to expose the compressor and decompressor objects from the C extension, and write the file object in Python (as in Lib/gzip.py). > One thing I was unsure of is how to handle exceptions that oc

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > How would I go about doing this? Would it be sufficient to raise a > DeprecationWarning if the argument is provided by the caller, and add > a note to the docstring and documentation? Yes, totally. -- _

[issue11006] warnings with subprocess and pipe2

2011-01-25 Thread Antoine Pitrou
New submission from Antoine Pitrou : Since r87651, subprocess can raise a RuntimeWarning if pipe2() fails. I'm not sure there's any point in that, since it's very low-level and it's nothing the user can do about anyway. Ironically, there is no warning if pipe2() is

[issue11006] warnings with subprocess and pipe2

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: This can be seen on the sparc Debian buildbot by the way: /home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/subprocess.py:1085: RuntimeWarning: pipe2 set errno ENOSYS; falling back to non-atomic pipe+fcntl. c2pread, c2pwrite = _create_pipe() /home

[issue10994] implementation details in sys module

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > The expectation is that it returns the memory footprint of the given > > object, and only it (not taking into account sharing, caching, > > dependencies or anything else). > > It would be nice if this was a well-defined definition

[issue10994] implementation details in sys module

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Which experts you had in mind? People who know how the Python implementation works. -- ___ Python tracker <http://bugs.python.org/issu

[issue10994] implementation details in sys module

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Even if you know implementation quite well a single number per object > does not provide enough information. Enough information for what? It can certainly provide information about the overhead of that particular object (again, regardless of s

[issue11007] stack tracebacks should give the relevant class name

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, given you have the line number at which the method is defined, it is easy to know which class it belongs to. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue11

[issue10826] pass_fds sometimes fails

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: So, I added some debug info to test_pass_fds: -- fds that should have been closed: {5, 6, 7, 8, 9, 10, 11, 12, 13} -- fds that remained open: {0, 1, 2, 3, 5} -- debug info: 0 8194 posix.stat_result(st_mode=8592, st_ino=12582920, st_dev=82051072, st_nlink=1

[issue10826] pass_fds sometimes fails

2011-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I managed to get further debug info from the OpenIndiana buildbot: -- maxfd = 65536 -- fds that should have been closed: {5, 6, 7, 8, 9, 10, 11, 12, 13} -- fds that remained open: {0, 1, 2, 3, 5} -- debug info: 0 2 posix.stat_result(st_mode=4096, st_ino

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2011-01-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue6926> ___ ___ Python-

[issue10826] pass_fds sometimes fails

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 'D' denotes a door file. There are several of them in the system; the > following ones (from /var/run) match the time stamp: Thanks for the explanation! > It's common for library routines to open a door and keep it open for >

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
New submission from Antoine Pitrou : Solaris has an additional kind of special files named doors. The standard headers define the following macro: #define S_ISDOOR(mode) (((mode)&0xF000) == 0xd000) Perhaps it would be nice to include the equivalent in the stat module. (although fun

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Thanks for the feature request. It seems trivial to implement, but not > trivial to test :). You can test against an existing file, such as "/var/run/syslog_door" (given its name, it is unlikely to be anything o

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I do know, but when you are working inside a zone, I am not sure you > can count of that file being always present. Syslog even could be > disabled or not available inside a zone. Then you can just skip the test. > I am thinking about how to

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But now I am wondering... Which organization defines flags like > S_IFSOCK or S_IFIFO?. Posix members?. I am worried about flag > collision between OSs. They are defined unconditionally in Lib/stat.py. > For instance, if DOORS were a real fla

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > * The read*() methods are implemented very inefficiently. Since they > have to deal with the bytes objects returned by > BZ2Decompressor.decompress(), a large read results in lots of > allocations that weren't necessary in the C implementat

[issue11018] typo in test_bz2

2011-01-26 Thread Antoine Pitrou
New submission from Antoine Pitrou : This was found by Nadeem in issue5863. Index: Lib/test/test_bz2.py === --- Lib/test/test_bz2.py(révision 88199) +++ Lib/test/test_bz2.py(copie de travail) @@ -86,7 +86,7

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's a missing conversion in mailbox.patch. Running with -bb shows the issue. Here is an updated patch. -- Added file: http://bugs.python.org/file20532/mailbox2.patch ___ Python tracker <http://bugs.py

[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Would it be possible to add a test case to the patch? -- nosy: +georg.brandl, pitrou stage: -> patch review type: behavior -> crash versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker

[issue11018] typo in test_bz2

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r88204 (3.2), r88205 (3.1) and r88206 (2.7). -- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 2.7 ___ Python track

[issue6584] gzip module has no custom exception

2011-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue8914] Run clang's static analyzer

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, you don't have to use pax, recent GNU tar handles xz fine (use the -J option). -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/i

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Both cases indicate the users desire to change a specific locale > setting and thus - of course - all the changes which that implies! > So why should there be a difference? I don't think it's intentional. I would be +1 on changing to g

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > >> Both cases indicate the users desire to change a specific locale > >> setting and thus - of course - all the changes which that implies! > >> So why should there be a difference? > > > > I don't think it

[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. -- resolution: -> accepted stage: needs patch -> commit review ___ Python tracker <http://bugs.python.org/i

[issue11051] system calls per import

2011-01-28 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here are the system calls when importing a single pure Python module: stat("/home/antoine/py3k/py3k/Lib/copyreg", 0x7fff1ed1f740) = -1 ENOENT (No such file or directory) open("/home/antoine/py3k/py3k/Lib/copyreg.cpython-32m.so", O_RDON

[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, I think you can commit. -- ___ Python tracker <http://bugs.python.org/issue10989> ___ ___ Python-bugs-list mailin

[issue10826] pass_fds sometimes fails

2011-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch to ignore door files when running the fd_status script. It seems to eradicate the intermittent failures on the solaris buildbots. -- keywords: +patch Added file: http://bugs.python.org/file20600/spdoors.patch

[issue11049] add tests for test.support

2011-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: +os.mkdir(os.path.join(TESTFN, TESTFN)) Please don't. This will break the day TESTFN becomes a non-trivial path. +def test_make_bad_fd(self): +fd = support.make_bad_fd() +self.assertRaises(OSError, os.write, fd, b"foo&quo

[issue11059] code.python.org repo failures introduced!

2011-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Works fine here. -- nosy: +pitrou resolution: -> works for me ___ Python tracker <http://bugs.python.org/issue11059> ___ _

[issue10845] test_multiprocessing failure under Windows

2011-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nick, a more problematic issue is that __main__ is always called __main__, regardless of whether it is actually imported as the real "main module" or through a regular import. This means that it is impossible to discriminate between both uses by

[issue10845] test_multiprocessing failure under Windows

2011-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, forget that (!). The following patch seems to work: Index: Lib/multiprocessing/forking.py === --- Lib/multiprocessing/forking.py (révision 88224) +++ Lib/multiprocessing/forking.py

[issue10845] test_multiprocessing failure under Windows

2011-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > (Replaced patch file to fix a typo in a comment) Does that patch still work if the objects marshalled between parent and child refer to classes living in the __main__.py module? -- ___ Python tracker &l

[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-01-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Interpreter Core -None nosy: +loewis type: -> behavior ___ Python tracker <http://bugs.python.org/issue11067> ___ _

[issue11063] uuid.py module import has heavy side effects

2011-01-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +easy stage: -> needs patch versions: +Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issu

[issue11051] system calls per import

2011-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Something has gone out of control here. Why do we need to check so many > > alternative locations? > > What change do you propose? First, I don't understand why we need to check both "foo.so" and "foomodule.so"

[issue11059] Mercurial fails on code.python.org repo

2011-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 'Had to look on a sunday once again, and it is still impossible to > clone branches/release2.7-maint. It failed here on one attempt and succeeded on others. "hg verify" ran fine too, including on the server. I'm closing the issu

[issue7502] All DocTestCase instances compare and hash equal to each other

2011-01-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker <http://bugs.python.org/iss

[issue9973] Sometimes buildbot fails to cleanup working copy

2011-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: As far as I can tell, the same change also needs to be done in build-amd64.bat and clean-amd64.bat. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue9

[issue9973] Sometimes buildbot fails to cleanup working copy

2011-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, the order of these lines in clean-amd64.bat looks wrong: cd PCbuild @echo Deleting .pyc/.pyo files ... del /s Lib\*.pyc Lib\*.pyo -- ___ Python tracker <http://bugs.python.org/issue9

[issue9973] Sometimes buildbot fails to cleanup working copy

2011-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, and the regrtest command line in test-amd64.bat lacks some options ("-rwW -n") compared to test.bat. -- ___ Python tracker <http://bugs.python.

[issue11073] threading.Thread documentation can be improved

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: You don't have to use any staticmethod here (actually, staticmethod is an anti-pattern in Python). Just write: class Foo(): def __init__(self): self.thread = Thread(target=self.runner) self.thread.start() def runner(self): #

[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch verified to work under Linux and win32. It looks good, except for tab characters in the Modules/_ctypes/_ctypes_test.c (indentation of C files should use 4 spaces); that's a detail that we can fix ourselves. -- assignee: th

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Let's reopen until then. -- assignee: pitrou -> resolution: fixed -> accepted stage: -> committed/rejected status: closed -> open versions: -Python 3.2 ___ Python tracker <http://bugs.p

[issue7358] cStringIO not 64-bit safe

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: The issue looks quite clear: cStringIO.write() asserts that the required storage size is less than INT_MAX. Therefore, in all likelihood, the pickle dump is simply larger than 2GB. Now, the cStringIO structures seem 64-bit safe, so the comparison to INT_MAX

[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wouldn't be surprised if the crash was related to some concurrency issues during shutdown. Other (Python or not Python) threads can continue running while the main thread is running Py_Finalize; this might be the reason; or perhaps some extension mo

[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, committed in r88284 (3.2), r88285 (3.1) and r88286 (2.7). Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue11086] add lib2to3/__main__.py

2011-01-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue11086> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11016] Add S_ISDOOR to the stat module

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Apparently, contributor have the illusion that the values they put > into the file are somehow standardized, when they are actually not. Are there actual bugs with that or is it merely a theoretical c

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ does

2011-01-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue11022> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11089] ConfigParser 50x slower in 2.7

2011-02-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> lukasz.langa nosy: +lukasz.langa ___ Python tracker <http://bugs.python.org/issue11089> ___ ___ Python-bugs-lis

[issue11089] ConfigParser 50x slower in 2.7

2011-02-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue11089> ___ ___ Python-bugs-list mailing list Unsub

[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Any benchmark numbers for the slice cache? Also, is the call to PyObject_INIT necessary? -- ___ Python tracker <http://bugs.python.org/issue10

[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I ran the list tests in pybench and got this: > > Test minimum run-timeaverage run-time > thisother diffthis

[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2011-02-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open type: crash -> behavior ___ Python tracker <http://bugs.pytho

[issue10227] Improve performance of MemoryView slicing

2011-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I find it interesting that the base line is way below the other > timings. That makes me think it's actually worth caching constant > slice instances, as CPython already does for tuples. Indeed. I have never touched it, but I suppose it needs

[issue11087] Speeding up the interpreter with a few lines of code

2011-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, things are at best 3-4% faster here (often unchanged). -- versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue11

[issue7111] abort when stderr is closed

2011-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That's an interesting point. > > Do you know of places where we use fd 2 instead of sys.stderr? We normally don't. One reason is that buffering inside sys.stderr can make ordering of output incorrect. There are some places in C code w

[issue11107] Cache constant "slice" instances

2011-02-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue11107> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7111] abort when stderr is closed

2011-02-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +exarkun, loewis ___ Python tracker <http://bugs.python.org/issue7111> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7111] abort when stderr is closed

2011-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > We normally don't. One reason is that buffering inside sys.stderr can > > make ordering of output incorrect. There are some places in C code where > > we do "fprintf(stderr, ...)" but that's for specialized debugging &g

[issue7111] abort when stderr is closed

2011-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le jeudi 03 février 2011 à 19:59 +, Alexander Belopolsky a écrit : > Alexander Belopolsky added the comment: > > > On Thu, Feb 3, 2011 at 2:44 PM, Antoine Pitrou > > wrote: > > .. > >> Do you know of places where

[issue7111] abort when stderr is closed

2011-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't think so. One more important use case is when running a Unix > daemon, which has (AFAIK) to close all std handles. I just took a look at http://pypi.python.org/pypi/python-daemon/, and it uses dup2() to redirect standard streams, which i

[issue11107] Cache constant "slice" instances

2011-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hmm, ok, but AFAICT, your patch was rejected rather because of the way > it approached the problem, not so much because of the issue itself. I would be rather for the patch myself. The bytecode currently generated for sliced indexing is awfully subo

[issue11114] file.tell extremely slow

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's expected. seek() and tell() on text (unicode) files are slow by construction. You should open your file in binary mode instead, if you want to do any seeking. Maybe I should add a note in http://docs.python.org/dev/library/io.html#perfor

[issue11117] Implementing Async IO

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: >From the python-dev thread: http://mail.python.org/pipermail/python-dev/2010-October/104782.html “os._exit is useful. os.open is useful. aio_* are *not* useful. For anything. If there's anything you think you want to use them for, you're wro

[issue11114] TextIOWrapper.tell extremely slow

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: That said, I think it is possible to make algorithmic improvements to TextIOWrapper.tell() so that at least performance becomes acceptable. -- stage: -> needs patch title: file.tell extremely slow -> TextIOWrapper.tell extremely slo

[issue11114] TextIOWrapper.tell extremely slow

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > opening file binary has a dramatic effect as well, I would say. After 2 > minutes I stopped execution of the program Hint: b'' is not equal to '' ;) -- ___ Python tracker <http

[issue11114] TextIOWrapper.tell extremely slow

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a proof-of-concept patch for the pure Python version of TextIOWrapper.tell(). It turns the O(CHUNK_SIZE) operation into an O(1) operation most of time (still O(CHUNK_SIZE) worst-case - weird decoders and/or crazy input). -- keywords: +patch

[issue11114] TextIOWrapper.tell extremely slow

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here is a proof-of-concept patch for the pure Python version of > TextIOWrapper.tell(). It turns the O(CHUNK_SIZE) operation into an > O(1) operation most of time (still O(CHUNK_SIZE) worst-case - weird > decoders and/or crazy input). Actually,

[issue11114] TextIOWrapper.tell extremely slow

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch also optimizing the C version. tell() can be more than 100x faster now (still much slower than binary tell()). -- stage: needs patch -> patch review Added file: http://bugs.python.org/file20680/textiotell2.pa

[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The doc needs a versionadded attribute. Otherwise, looks good to me. -- nosy: +pitrou resolution: -> accepted stage: -> commit review ___ Python tracker <http://bugs.python.org/i

[issue11121] libpython3.so support with --enable-shared

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue11121> ___ ___ Python-bugs-list mailin

[issue11124] test_posix failure on the Leopard buildbot

2011-02-04 Thread Antoine Pitrou
New submission from Antoine Pitrou : test_posix has started failing deterministically on the Leopard buildbot. Stephen, did you change something in its configuration? http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.x/builds/786/steps/test/logs/stdio

[issue9504] signal.signal/signal.alarm not working as expected

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems that my patch for issue10956 also fixes this issue (although it doesn't try to fix FileIO). It also has tests and fixes read() as well as write(). I'm sorry for not noticing that the two issues were so similar. Suggest closing thi

[issue10956] file.write and file.read don't handle EINTR

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I hadn't noticed that issue9504 is similar. The patch there does less things, although it also touches FileIO.readall(). -- ___ Python tracker <http://bugs.python.org/is

[issue9504] signal.signal/signal.alarm not working as expected

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry, bad analysis. The patch in issue10956 only seemed to work because my system is too fast and "find /" in the script returned in less than 5 seconds. Replacing it with "yes" shows that the two issued are actually independent. -

[issue10956] file.write and file.read don't handle EINTR

2011-02-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> pitrou nosy: +neologix ___ Python tracker <http://bugs.python.org/issue10956> ___ ___ Python-bugs-list mai

[issue11085] expose _abcoll as collections.abc

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Regarding the implementation, knowing your reluctance to turn modules > into packages, I guess you’re talking about exposing collections.abc in > a similar manner to os.path, which is fine IMO. That makes things confusing: >>> import o

[issue7108] test_commands.py failing on OS X 10.5.7 due to '@' in ls output

2011-02-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ned.deily ___ Python tracker <http://bugs.python.org/issue7108> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11109] socketserver.ForkingMixIn leaves zombies

2011-02-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gregory.p.smith stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.3 -Python 3.1 ___ Python tracker <http://bugs.python.org/issu

[issue11119] Passing a socket to a process (multiprocessing module)

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, sockets cannot be pickled on any platform: >>> sock = socket.create_connection(("www.python.org", 80)) __main__:1: ResourceWarning: unclosed >>> s = pickle.loads(pickle.dumps(sock)) >>> s.getpeername() Traceback (mo

[issue11127] sockets should not be pickleable

2011-02-05 Thread Antoine Pitrou
New submission from Antoine Pitrou : Like already done for file objects, sockets should refuse pickling by raising a TypeError. -- components: Library (Lib) messages: 127976 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: sockets should not be

[issue11119] Passing a socket to a process (multiprocessing module)

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Opened issue11127 for raising a TypeError when trying to pickle any socket. -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issu

[issue11077] Tkinter is not thread safe

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't reproduce either, but the latest traceback posted in msg127985 seems to hint at a parameter marshalling problem. "create" is one of the parameters to the called Tk function, but it seemed to be mistaken for another. Since it'

[issue11077] Tkinter is not thread safe

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The "UpdateStringProc should not be invoked for type cmdName" message (as quoted above in the traceback) apparently can mean that there's a mismanagement of Tcl reference counts. >From >http://sourceforge.net/tracker/?func=detail&am

[issue11077] Tkinter is not thread safe

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > As a side note, if Tkinter is intended to be thread safe, the > documentation should say so. Clearly, and in the first paragraph. I'm no Tkinter specialist but, judging by its source code, Tkinter (the Python module) *is* intended to be thread

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for posting a patch! I have two comments: - Have you run test_uuid? When I run it, it seems to go into an infinite loop somewhere and I need to kill the process. - uuid should work even when ctypes is not available, so you can't just put an i

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > A bit of offtopic: why can't we assume that ctypes is available? Because ctypes (or, actually, the libffi it relies on) needs specific low-level code for each platform it runs on, and not all platforms have such code. Another reason is that c

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Maybe I understood and ctypes ImportError simply must be handled and > fallbacked to something else. Indeed. > But there are only 3 ways of getting MAC address: > 1. using popen > 2. using ctypes and native calls > 3. using C API and perfo

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm thinking Python could use a general purpose ifconfig/mac-layer > module that uuid.py could then just use. Perhaps, but that's really out of scope for this issue. Feel free to open another issue. -- __

[issue7108] test_commands.py failing on OS X 10.5.7 due to '@' in ls output

2011-02-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: ronaldoussoren -> ___ Python tracker <http://bugs.python.org/issue7108> ___ ___ Python-bugs-list mailing list Un

[issue969718] BASECFLAGS are not passed to module build line

2011-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why is OPT duplicated in get_config_vars(...)? Why do OPT and BASECFLAGS environ vars override their Makefile values instead of accumulating with them? Why is EXTRA_CFLAGS not configurable through environ

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue10971> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue969718] BASECFLAGS are not passed to module build line

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I am not convinced that the minimal patch would work for my original > issue. I wanted to be able to override the -march option which shows > up in OPT on Fedora. I was cross-compiling to a target architecture > that does not support the -march

[issue11134] Add missing type slots

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Given the recent multiple additions of "forgotten things" in the ABI, wouldn't it be better to mark the ABI experimental so that things can get ironed out in 3.2.1? (especially with user feedback after the release) -

[issue11134] Add missing type slots

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Given the recent multiple additions of "forgotten things" in the ABI, > > wouldn't it be better to mark the ABI experimental so that things can > > get ironed out in 3.2.1? (especially with user feedback after the > >

[issue11136] imaplib IMAP4_SSL shutdown gets socket error in py 3.2

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > IMAP4_SSL.close() > IMAP4_SSL.logout() > IMAP4_SSL.shutdown() logout() already calls shutdown() for you and closes the socket, so you don't have to do it yourself. -- nosy: +pitrou resolution: -> invalid status

[issue10882] Add os.sendfile()

2011-02-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please leave open until a patch is actually committed ;) -- status: pending -> open ___ Python tracker <http://bugs.python.org/issu

<    32   33   34   35   36   37   38   39   40   41   >