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

2009-07-24 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()

2009-07-24 Thread Zhigang Wang
New submission from Zhigang Wang w1z...@gmail.com: The current subprocess.Popen() has a boolean close_fds parameter, which cannot satisfy all the requirements. Eg. want to pass specific fd to child process, but close others. This patch adds a extra parameter pass_fds to subprocess.Popen's

[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()

2009-07-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A couple of unit tests would be great, as well as a paragraph for the documentation. -- nosy: +amaury.forgeotdarc stage: - test needed ___ Python tracker rep...@bugs.python.org

[issue6236] os.popen causes illegal seek on AIX in Python 3.1rc

2009-07-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Perhaps, although I don't know where /dev/tty would be involved in os.popen(). For reference, under Linux I get: open(/dev/tty,a) Traceback (most recent call last): File stdin, line 1, in module IOError: [Errno 29] Illegal seek --

[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()

2009-07-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The reason os.closerange() is used is that it can be slow to call os.close() on lots of fds (I suppose this depends on the OS). See http://code.python.org/hg/trunk/rev/43caff85ec85 Therefore, the patch should be smart enough to continue using

[issue1436346] yday in datetime module

2009-07-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pitrou versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1436346 ___

[issue6560] socket sendmsg(), recvmsg() methods

2009-07-24 Thread Kálmán Gergely
New submission from Kálmán Gergely kalman.gerg...@duodecad.hu: This is the rewritten-from-scratch implementation of the sendmsg()/recvmsg() methods. Any comments / suggestions / flames are very welcome. Currently it supports what I need and I'm only releasing it because I don't have much time to

[issue6560] socket sendmsg(), recvmsg() methods

2009-07-24 Thread Kálmán Gergely
Kálmán Gergely kalman.gerg...@duodecad.hu added the comment: the tester application -- Added file: http://bugs.python.org/file14557/sendrecvmsgtest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560

[issue6560] socket sendmsg(), recvmsg() methods

2009-07-24 Thread Thomas Herve
Thomas Herve the...@free.fr added the comment: This is a duplicate (although updated patch) from bug #1194378. It would still need unit tests... -- nosy: +therve ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560

[issue6331] Add unicode script info to the unicode database

2009-07-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6331 ___

[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: In Python 3, or in Python 2 with the re.UNICODE flag, it appears that the regex r'\d' matches all unicode characters with category either 'Nd' (Number, Decimal Digit) or 'No' (Number, Other), but not characters in category 'Nl' (Number,

[issue6562] OverflowError in RLock.acquire()

2009-07-24 Thread David Roberts
New submission from David Roberts d...@vidr.cc: I'm getting the following error on Windows in an application I've written (the error does not occur on Linux): Exception in thread Thread-4: Traceback (most recent call last): File C:\Python26\lib\threading.py, line 525, in __bootstrap_inner

[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6561 ___ ___ Python-bugs-list mailing

[issue6516] reset owner/group to root for distutils tarballs

2009-07-24 Thread Till Maas
Till Maas opensou...@till.name added the comment: I want to create uniform tarballs, independent of which username was used to create the tarball. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6516

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

2009-07-24 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: Did my patch python-trunk-20081209-c89.patch from issue 4558 work for you ? Is the issue fixed in original libffi ? -- nosy: +rpetrov ___ Python tracker rep...@bugs.python.org

[issue6236] os.popen causes illegal seek on AIX in Python 3.1rc

2009-07-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: /dev/tty is probably similar to stdout, at least when python is started without redirection. What is the output of sys.stdout.seekable() when run from an interactive interpreter? Does it depend on the active console? (xterm, ssh...)

[issue6562] OverflowError in RLock.acquire()

2009-07-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This is strange, thread.get_ident() isn't supposed to raise this kind of error. Could you call it individually from the same thread to see what it returns? Also, could you post the code for your derived class for us to see? -- nosy:

[issue1764044] copy 2

2009-07-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The f: drive probably was a FAT32 filesystem, which has a resolution of two seconds... -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed ___ Python tracker

[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patch against py3k. -- keywords: +patch Added file: http://bugs.python.org/file14558/issue6561.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6561

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

2009-07-24 Thread jan matejek
jan matejek jmate...@suse.cz added the comment: i believe that the bug lies in bad implementation/backport of feature from 3.0 patch for issue1251. see this revision: http://svn.python.org/view/python/branches/release30-maint/Lib/ssl.py?r1=59339r2=59340 where the code was added for py3k branch.

[issue481171] Hang using files named prn.txt, etc

2009-07-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It seems that Windows has been patched... open(COM).read() does not hang: it reads from the console until you hit Ctrl-Z. Testing on Windows 2000, some device names always succeed, others fail with IOError when you open them or write to

[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: New patch; same as before, but includes clarification to the documentation. -- Added file: http://bugs.python.org/file14559/issue6561.patch ___ Python tracker rep...@bugs.python.org

[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file14558/issue6561.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6561 ___

[issue6563] inserting None into sys.modules does not raise ImportError with importlib

2009-07-24 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: When you insert None into sys.modules, the built-in import raises an ImportError, but importlib does not. See http://mail.python.org/pipermail/python-dev/2009-July/090780.html for the discussion that brought this up. -- assignee:

[issue6564] Error in Sec. 8.4 of Tutorial

2009-07-24 Thread Gaelen Marsden
New submission from Gaelen Marsden gaelen.mars...@gmail.com: In Section 8.4 of the Tutorial, Raising Exceptions, the text following the first example states Alternatively, the above could be written as raise NameError('HiThere'). Perhaps I am being dense, but I can see no difference between the

[issue6565] improper use of __setitem__ in ElementTree for Python 3.1

2009-07-24 Thread Andre Roberge
New submission from Andre Roberge andre.robe...@gmail.com: I have a function to replace the content of an ElementTree Element by that of another one which works using Python 2 but not with Python 3. I get an assertion error. It was suggested on the Python list that the problem is that in

[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-24 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Trying both 'eval' and 'exec' looks fine to me. Marking 'easy' because I expect it should be ;-) -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6507

[issue6518] Enable 'with' statement in ossaudiodev module

2009-07-24 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Seems like a sensible idea. Note: 3.0 is no longer maintained. Marking 'easy' because I expect that copying and adapting __exit__ from regular open should be. -- keywords: +easy nosy: +tjreedy versions: -Python 3.0

[issue6564] Error in Sec. 8.4 of Tutorial

2009-07-24 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Indeed :) Fixed in r74194. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6564 ___

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

2009-07-24 Thread Nir Soffer
Nir Soffer nir...@gmail.com added the comment: Tested on Ubuntu Linux 9.04. The tests will probably fail on Windows, since connection refused is detected trough handle_expt_event, and not in hadnle_read_event. I hope someone on Windows will fix this :-) --

[issue6566] json.dumps converts None to null (not null)

2009-07-24 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: In [2]: json.dumps({'a': 1, 'b': {'c': 3, None: 5}}) Out[2]: '{a: 1, b: {c: 3, null: 5}}' In [3]: j = json.dumps({'a': 1, 'b': {'c': 3, None: 5}}) In [4]: json.loads(j) Out[4]: {u'a': 1, u'b': {u'c': 3, u'null': 5}} I was

[issue6566] json.dumps converts None to null (not null)

2009-07-24 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: The simplest repro: In [6]: json.dumps({None: 3}) Out[6]: '{null: 3}' In [7]: json.loads(json.dumps({None: 3})) Out[7]: {u'null': 3} -- ___ Python tracker rep...@bugs.python.org

[issue6566] json.dumps converts None to null (not null)

2009-07-24 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - bob.ippolito nosy: +bob.ippolito status: open - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6566 ___

[issue6566] json.dumps converts None to null (not null)

2009-07-24 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Also repros on 3.0/3.1 -- versions: +Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6566 ___

[issue6566] json.dumps converts None to null (not null)

2009-07-24 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Notice what it does to other dict keys: simplejson.dumps({1: 1}) '{1: 1}' In other words, I don't think this is a bug. It's how JSON works. JSON dict keys are strings *only*. -- nosy: +exarkun

[issue6566] json.dumps converts None to null (not null)

2009-07-24 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: JSON dict keys are strings *only*. I might be helpful to point this out (along with other caveats) in the standard library documentation for JSON. An explicit mention of ``loads(dumps(x)) != x for certain structures`` would be

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

2009-07-24 Thread Nir Soffer
Nir Soffer nir...@gmail.com added the comment: The first fix reverted to 2.5 behavior, when self.connected is false when handle_connect is called. This behavior is little stupid - why call handle_connect if the socket is not really connected? This fix ensure that handle_connect is called only

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
New submission from Lucas Prado Melo lucaspradom...@gmail.com: When we use TestCase.assertAlmostEqual to compare two float('inf') objects, the result is that float('inf') is not almost equal to float('inf'). I believe this is a bug. I tested against r74195 of Python 3.2 and against Python 2.6.2.

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
Changes by Lucas Prado Melo lucaspradom...@gmail.com: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6567 ___ ___

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
Changes by Lucas Prado Melo lucaspradom...@gmail.com: -- components: +Tests ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6567 ___ ___

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
Changes by Lucas Prado Melo lucaspradom...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6567 ___ ___

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

2009-07-24 Thread Nir Soffer
Nir Soffer nir...@gmail.com added the comment: This version fix also handle_expt_event, so connection refused error should be handled in the same way also on Windows. -- Added file: http://bugs.python.org/file14562/asycore-handle-connect-event-3.patch

[issue6568] unittest test discovery improvements

2009-07-24 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: Issue to track improvements in the standalone discover.py that I need to port to the test discovery in unittest. * Failure to import a module does not halt discovery * Will not attempt to import test files whose names are not valid

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6567 ___ ___ Python-bugs-list mailing

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

2009-07-24 Thread Garrett Cooper
Garrett Cooper yaneg...@gmail.com added the comment: __linux is legitimate too, so the patch looks ok, but... 1) It won't apply cleanly against 2.4.5, most likely. 2) Why __linux instead of __linux__ ? gcoo...@orangebox ~ $ echo | gcc --std=c89 -E -dM -c - | grep linux #define __linux 1

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Uhm... they may or may not be almost equal, but probably not. Comparisons on them are defined to be undefined so you're using the wrong thing to test them. Use assertTrue and math.isinf instead. -- nosy: +michael.foord

[issue6569] unittest document bug (random.shuffle sequence)

2009-07-24 Thread Kouki Hashimoto
New submission from Kouki Hashimoto hsm...@gmail.com: Hello. I found a bug in unittest sample code. http://docs.python.org/dev/py3k/library/unittest.html#unittest-minimal-example (naming this code as test_sample.py) I got this error. $ python3.2 test_sample.py ..E

[issue6569] unittest document bug (random.shuffle sequence)

2009-07-24 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r74196. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6569

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-24 Thread Senthil
Senthil orsent...@gmail.com added the comment: Fixed for 3.2 in py3k branch revision 74198. Asked python-dev for objections on back porting changes 2.6. Shall back port changes to py2.6 and py3.1 -- ___ Python tracker rep...@bugs.python.org

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-24 Thread Senthil
Changes by Senthil orsent...@gmail.com: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list