[issue6548] cmath documentation misleading: suggests existence of real() and imag() functions

2009-07-23 Thread Georg Brandl
Georg Brandl added the comment: Fixed the trivial stuff in r74184. Leaving open for the suggested rewrite. -- nosy: +georg.brandl ___ Python tracker ___ _

[issue6525] Problem with string.lowercase in Windows XP

2009-07-23 Thread Peter Landgren
Peter Landgren added the comment: Obviously, 2.5 and 2.6 decode the "string.lowercase" when print is used and 2.6 seems to be the correct. Yes. I get exactly the same result in both Python 2.5.2 (r252:60911, Jan 8 2009, 12:17:37) and Python 2.6.2 (r262:71600, Jul 23 2009, 09:01:02) showing

[issue6548] cmath documentation misleading: suggests existence of real() and imag() functions

2009-07-23 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a proposed rewrite, as a patch against the trunk documentation. Comments welcome! -- assignee: marketdickinson -> georg.brandl keywords: +patch Added file: http://bugs.python.org/file14551/cmath_rewrite.patch __

[issue6548] cmath documentation misleading: suggests existence of real() and imag() functions

2009-07-23 Thread Georg Brandl
Georg Brandl added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-07-23 Thread R. David Murray
R. David Murray added the comment: When the zipimport test is run, encodings.ascii is imported. Then it is removed from sys.modules by the test cleanup. When the mailbox test is run, it is reimported. However, when the codecs test tries to use it, the encodings.ascii module has been finalized

[issue6106] read_until

2009-07-23 Thread irek
irek added the comment: Hi, I head same problem on 3.0 and 3.1 versions This was because of incompatibility of types in comparison My solution is to modify Lib/telnetlib.py line 462 cmd = self.iacseq[1] to cmd = self.iacseq[1:2] Irek -- nosy: +irczan versions: +Python 3.1 __

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-07-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: A simple solution could be to import encodings.ascii in regrtest.py, before it saves the list of modules. Or, since codecs are stored in a global cache dictionary that cannot be cleared (interp->codec_search_cache), avoid unloading modules from the encodi

[issue6553] cPickle "binunicode" segmentation fault

2009-07-23 Thread Patrick Strawderman
New submission from Patrick Strawderman : When reading from a file-like object (like StringIO), cPickle uses the read_other function, which doesn't check that the number of bytes requested is the actual number of bytes read (like the read_cStringIO function does). Functions like load_binunicode

[issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging

2009-07-23 Thread jan matejek
Changes by jan matejek : -- nosy: +matejcik ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue6553] cPickle "binunicode" segmentation fault

2009-07-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Attached patch fixes the problem. -- assignee: -> amaury.forgeotdarc keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file14552/pickle_badinput.patch ___ Python tracker

[issue6106] read_until

2009-07-23 Thread Pal Subbiah
Pal Subbiah added the comment: Thanks Irek. It works so well now after I modified the telnetlib.py as you suggested. I also added decode('ascii') with read_until. Pal Subbiah -- ___ Python tracker

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Patricio Mariano Molina
New submission from Patricio Mariano Molina : I couldn't find anything like os.pid_exists() in Python 2.5/2.6, neither in bugs.python.org (this *could* be a dupe) Do we have something like that? Right now I'm doing this: try: os.kill(int(pid), 0) return True except OSError: return

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This is quite a microoptimization. Why do you think you need to avoid the exception here? -- nosy: +exarkun ___ Python tracker ___ ___

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: For what it's worth, here are some timings from my system. First, os.kill without raising an exception: exar...@boson:~$ python -m timeit -s 'import os; pid = os.getpid()' ' os.kill(pid, 0) ' 100 loops, best of 3: 0.413 usec per loop exar...@boson:~$

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-23 Thread Nir Soffer
Nir Soffer added the comment: The patch is tested with release26-maint and trunk. -- versions: +Python 2.7 ___ Python tracker ___ ___

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Patricio Mariano Molina
Patricio Mariano Molina added the comment: Hey Jean-Paul, thanks for the quick reply! You're right, but I wasn't thinking too much about optimization: I think it would be useful to have that simple function, returning True or False. I use to search for active PIDs *a lot* with Python Do you t

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It might be better to pick a better (but probably platform-specific) API for such a use-case. os.kill has a problem with false positives (on Linux it will tell you a process exists even when it doesn't). Looking in /proc/ or using a Windows API to enumera

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Patricio Mariano Molina
Patricio Mariano Molina added the comment: Sounds good. And what do you think about os.pid_exists() using /proc/ or a Windows API? -- ___ Python tracker ___ _

[issue5262] PythonLauncher considered harmfull

2009-07-23 Thread Nir Soffer
Nir Soffer added the comment: I also think it should be removed. Opening a file should run it only if it is executable. -- nosy: +nirs ___ Python tracker ___ ___

[issue5262] PythonLauncher considered harmfull

2009-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: At the very least PythonLauncher should not be the default for opening python files, and should actively warn against being the default (basicly reversing the current default). When PythonLauncher is the default application for .py files double- clicking a .

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: The os module is mostly for wrappers around native platform APIs. So at the very least, I don't think such an API belongs there. It would fit in to a general process-related module, perhaps. -- ___ Python trac

[issue6555] distutils config file should have the same name on both platforms and all scopes

2009-07-23 Thread Zooko O'Whielacronx
New submission from Zooko O'Whielacronx : Currently we have this: http://docs.python.org/install/#location-and-names-of-config-files The distutils config file can have one of four different names depending on which platform and which location. This makes it harder for people to remember the fi

[issue6556] "HOME" is not a standard environment variable on Windows

2009-07-23 Thread Zooko O'Whielacronx
New submission from Zooko O'Whielacronx : The distutils looks in an environment variable named "HOME" on Windows: http://docs.python.org/install/#location-and-names-of-config-files Windows does not by default create such a variable, so only if a user has manually configured one will it work. T

[issue6555] distutils config file should have the same name on both platforms and all scopes

2009-07-23 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: I was spurred to write this ticket today because of a conversation with J.P. Calderone: but, I have no clue where distutils.cfg goes on Windows -- ___ Python tracker ___

[issue6549] ttk.Style not translating some Tcl options

2009-07-23 Thread Guilherme Polo
Guilherme Polo added the comment: Hi Mark, I don't think I remember very well where those element options are used. For instance, where can you use the 'embossed' option ? Would it be only when using style.configure/style.map with '.' as the style name ? Knowing that would help to know if the

[issue6557] urllib.urlopen creates bad requests when location header of 301 redirects contain spaces

2009-07-23 Thread Till Maas
New submission from Till Maas : If urllib.urlopen is pointed to an url that returns a redirection with a location header that points to a url containing spaces, that are properly urlencoded, then it creates a bad request with the spaces not encoded in the url. Here is an example/test case: In [1

[issue6553] cPickle "binunicode" segmentation fault

2009-07-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Fixed in r74189 (trunk) and r74190 (2.6) Thanks for the report! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I'd love to do the same without catching an exception (they're > expensive!) Why do you say that? I don't believe that exceptions are expensive (e.g. compared to the system call) -- nosy: +loewis title: Do we have something like os.pid_exists()? ->

[issue1590864] Function-level import in os triggering an threaded import deadlock

2009-07-23 Thread Thomas Wouters
Thomas Wouters added the comment: Here's a preliminary fix (also see http://codereview.appspot.com/96125/show ) -- assignee: -> twouters keywords: +patch nosy: +twouters Added file: http://bugs.python.org/file14553/import_lock_fork_deadlock.diff ___

[issue6558] #ifdef linux is incorrect; should be #ifdef __linux__ (preferred standard)

2009-07-23 Thread Garrett Cooper
New submission from Garrett Cooper : The following files are looking for the `linux' constant, when it fact they should be looking for `__linux__' (from 2.6.2 release's sources): Modules/_ctypes/libffi/src/mips/ffitarget.h:#ifdef linux Modules/socketmodule.c:#ifdef linux Modules/socketmodule.c:#

[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-07-23 Thread Brian Curtin
Brian Curtin added the comment: Submitted a patch against trunk. Let me know if you need anything else (doc patch?). -- keywords: +patch nosy: +briancurtin Added file: http://bugs.python.org/file14554/zipfile_issue_5511.patch ___ Python tracker

[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-07-23 Thread Ezio Melotti
Ezio Melotti added the comment: It would be nice if you could provide unit tests. If you can also provide a patch for the doc, it's even better. -- keywords: +needs review nosy: +ezio.melotti priority: -> normal stage: needs patch -> test needed ___