[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: @gvanrossum: os.unlink() and os.lstat() already accept byte filenames (but open() doesn't). Ok, here is very small patch for posixpath.join() to accept bytes strings. This patch is enough to fix my initial problem (#3616). Added file:

[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: My last patch (posix_join_bytes.patch) is also enough to fix the initial reported problem: error in posixpath.join() called by os.walk(). I tried os.walk() on a directory with invalid filenames and invalid directory name and it works well.

[issue3648] 'ascii' shoud be range(256) or just set another default encoding

2008-08-22 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Sometimes encoding problems in Python are driving me mad. The thing is, they are not encoding problems in Python, they are encoding problems in the outside world. Python cannot know magically which encoding is used in third-party data, so

[issue1777458] glob doesn't return unicode with unicode parameter

2008-08-22 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Seems fixed on 2.6. Python 2.6b3+ (trunk, Aug 22 2008, 11:27:51) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import glob glob.glob(*.py) ['iocrash.py', 'setup.py'] glob.glob(u*.py)

[issue3649] IA5 Encoding should be in the default encodings

2008-08-22 Thread Pascal Bach
New submission from Pascal Bach [EMAIL PROTECTED]: This encoding is used in the GSM standard it is a 7-bit encoding similar to ASCII. The encoding definition is found in: Short Message Service Centre EMI - UCP Interface 4.6 Specification (p. 79) as well as in: [3GPP 23.038] 3GPP TS 23.038

[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Patch glob.glob() to accept directory with invalid filename (invalid in the filesystem charset): just ignore bytes = str conversion error. Added file: http://bugs.python.org/file11216/glob1_bytes.patch ___

[issue3640] test_cpickle crash on AMD64 Windows build

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The problem comes from this local variable in batch_list() and batch_dict: PyObject *slice[BATCHSIZE]; and BATCHSIZE=1000... -- nosy: +amaury.forgeotdarc ___ Python tracker [EMAIL

[issue3595] Windows base64 Decode

2008-08-22 Thread Eric Smith
Eric Smith [EMAIL PROTECTED] added the comment: Please upload your script, or (preferably) some small test code. I suspect the problem is related to line endings and binary versus text files. -- nosy: +eric.smith ___ Python tracker [EMAIL PROTECTED]

[issue3640] test_cpickle crash on AMD64 Windows build

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Attached patch removes the big array, items are saved when they are fetched from the container. I preserved the the special case when there is only one item. The patch does not merge cleanly into py3k, but the functions batch_list and

[issue3555] Regression: nested exceptions crash (Cannot recover from stack overflow)

2008-08-22 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Antoine, All the cases I could find would be more test than use cases. Given that most ways to abort I find in 3.0 are related to undetected errors in trunk, I'm almost convinced that 3.0 is right here :) My last worry is that it'd be kinda easy

[issue3644] ``make htmlview`` for docs fails on OS X

2008-08-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: On Fri, Aug 22, 2008 at 6:12 AM, Benjamin Peterson [EMAIL PROTECTED] wrote: Benjamin Peterson [EMAIL PROTECTED] added the comment: This is probably actually a problem with the webbrowser module. Try running import webbrowser;

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: On Fri, Aug 22, 2008 at 8:03 AM, Daniel Diniz [EMAIL PROTECTED] wrote: Daniel Diniz [EMAIL PROTECTED] added the comment: Brett, I don't think I know C (and CPython) enough to fix this. I was able to get rid of this specific segfault with

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: The patch doesn't actually bother with a translation as the code causing issue is only there to prevent infinite recursion. So if the object being used is not a string, then there is no need to worry as it is not part of the infinite recursion

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Brett, is this patch ready for review? -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3639 ___

[issue3352] Deficiencies in multiprocessing/threading API

2008-08-22 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: There are still some instances of get_name() in threading.py itself, which gives errors like the following: Unhandled exception in thread started by bound method Thread.__bootstrap of Thread(reader 5, stopped daemon -1285227632) Traceback

[issue3352] Deficiencies in multiprocessing/threading API

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Here's a patch. Added file: http://bugs.python.org/file11221/get_name.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3352 ___

[issue3187] os.listdir can return byte strings

2008-08-22 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: See http://codereview.appspot.com/3055 for a code review of Victor's latest patches. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3187 ___

[issue3643] Add more checks to testcapi

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Ok. I'll apply your patches when we get to 2.7. Do ping me if a forget, though. -- assignee: - benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3643

[issue3649] IA5 Encoding should be in the default encodings

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The provided file does not work for EXTENSION characters: import ia5 u[a].encode(ia5) Traceback (most recent call last): File stdin, line 1, in module File ia5.py, line 18, in encode return

[issue3642] Objects/obmalloc.c:529: warning: comparison is always false due to limited range of data type

2008-08-22 Thread Christian Heimes
Christian Heimes [EMAIL PROTECTED] added the comment: The warning in obmalloc.c was silenced in r65975 (trunk) and r65976 (py3k) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3642 ___

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: That's why the keyword is set. =) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3639 ___ ___ Python-bugs-list

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Fri, Aug 22, 2008 at 2:59 PM, Brett Cannon [EMAIL PROTECTED] wrote: Brett Cannon [EMAIL PROTECTED] added the comment: That's why the keyword is set. =) Ah. I missed that. :) The patch looks fine.

[issue2367] Fixer to handle new places where parentheses are needed

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Thanks for the work! I reviewed the code, added support for generator expressions, and wrote a few more tests. Committed in r65981. -- resolution: - fixed status: open - closed ___ Python

[issue3649] IA5 Encoding should be in the default encodings

2008-08-22 Thread Pascal Bach
Pascal Bach [EMAIL PROTECTED] added the comment: Well I have seen the problem. I'm willing to do this to improve python, but I don't know exactly how to do it. I looked at how utf-8 and utf-7 are done but I didn't exactly understand, are they based on C code? Is there an example how this

[issue3563] fix_idioms.py generates bad code

2008-08-22 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: Why is the statement, whatever it is, even being touched? Would not the same problem arise with any following outdented line? IOW, why not delete that pair of lines from fix_idioms.py? Does that break anything else in test_fixers? --

[issue3602] Move test.test_suport.catch_warning() to the 'warnings' module

2008-08-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: I think I can clean up the code by shifting WarningMessage over to a subclass of namedtuple and moving WarningsRecorder over to a subclass of list. ___ Python tracker [EMAIL PROTECTED]

[issue3650] Memory leak in bytes.split()

2008-08-22 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]: ./python Lib/test/regrtest.py -R:: test_bytes reveals a leak in py3k. This is exactly the same as the one corrected by r65785 to bytearray. (easy) patch attached, needs approval! -- files: bytes-split.patch keywords: needs

[issue3564] making partial functions comparable

2008-08-22 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: The default equality comparison of Python objects is by id. Some classes override this, others, in particular, functions, do not. I also agree that partial functions should not either. However, you can subclass functools.partial (I checked in

[issue3650] Memory leak in bytes.split()

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Go ahead. -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3650 ___ ___

[issue3577] Interpreter name: python vs. python-3.0

2008-08-22 Thread Terry J. Reedy
Changes by Terry J. Reedy [EMAIL PROTECTED]: -- nosy: +tjreedy ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3577 ___ ___ Python-bugs-list mailing list

[issue3579] Faites Attention en Utilisant Cette Merveille!

2008-08-22 Thread Terry J. Reedy
Changes by Terry J. Reedy [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11139/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3579 ___ ___

[issue3579] Faites Attention en Utilisant Cette Merveille!

2008-08-22 Thread Terry J. Reedy
Changes by Terry J. Reedy [EMAIL PROTECTED]: ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3579 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3579] SPAM

2008-08-22 Thread Terry J. Reedy
Changes by Terry J. Reedy [EMAIL PROTECTED]: -- title: Faites Attention en Utilisant Cette Merveille! - SPAM ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3579 ___

[issue3650] Memory leak in bytes.split()

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Committed r65985 -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3650 ___

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]: version 3.0, any call to eval() leaks one reference: eval('1') 1 [42093 refs] eval('1') 1 [42094 refs] eval('1') 1 [42095 refs] eval('1') 1 [42096 refs] -- components: Interpreter Core messages: 71783 nosy:

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Christian Heimes
Christian Heimes [EMAIL PROTECTED] added the comment: The error is inside compile, not eval: compile(1, test, eval) code object module at 0x7ffe1ce2ed50, file test, line 1 [43379 refs] compile(1, test, eval) code object module at 0x7ffe1ce2e3b0, file test, line 1 [43380 refs] compile(1,

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The leaked reference refers to the bytes object which encodes the code being compiled: for x in range(1000): compile(1, test, eval) sys.getrefcount(b'1') 1004 ___ Python tracker [EMAIL PROTECTED]

[issue1396825] subprocess: wait for a period of time

2008-08-22 Thread gd2shoe
gd2shoe [EMAIL PROTECTED] added the comment: This is just common sense. I'm trying to avoid a poll() busy-wait section of code. I'll figure it out, but it would be much, much easier if wait accepted a number of seconds, and returned None if the process was still going (cf. Popen.poll() ). I'm

[issue3636] Managing dual 2.x and 3.0 installations on Windows

2008-08-22 Thread Terry J. Reedy
Changes by Terry J. Reedy [EMAIL PROTECTED]: -- nosy: +tjreedy ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3636 ___ ___ Python-bugs-list mailing list

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Could it be related to the fact that test_bytes is leaking? test_bytes leaked [129, 129, 129, 129] references, sum=516 -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED]

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Christian Heimes
Christian Heimes [EMAIL PROTECTED] added the comment: Good point! It's leaking even more on my 64bit machine: test_bytes leaked [195, 195, 195, 195] references, sum=780 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3651

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Christian Heimes
Christian Heimes [EMAIL PROTECTED] added the comment: I was already up to date. r65985 leaks 195 references in each run on my box. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3651 ___

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The attached patch corrects the eval() and compile() reference leak. The problem is in PyObject_AsReadBuffer. Needs review: view-obj seems to own the reference, but object.h say the opposite. -- keywords: +needs review, patch

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: PyObject_AsCharBuffer is affected as well. This fixes for me the last refleak in test_bytes. Added file: http://bugs.python.org/file11224/buffer-leak.patch ___ Python tracker [EMAIL PROTECTED]

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11223/buffer-leak.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3651 ___

[issue3611] invalid exception context

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Benjamin, I am testing the patch proposed earlier by Victor in http://bugs.python.org/msg71579 (who might be the correct one, after all), and I don't see the problems you mentioned. I run the test suite without problem, on winXP Linux

[issue3611] invalid exception context

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: I can't reproduce it either. I suspect that I removed the wrong lines initially and caused other problems. :) Sorry for the false alarm. ___ Python tracker [EMAIL PROTECTED]

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Of course, I forgot PyObject_AsWriteBuffer in my patch. I wonder if turning view.obj into an owned reference was a good idea. There are more calls to bf_getbuffer (in getarg.c), they leak too: test_struct leaked [5, 5, 5, 5]

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11224/buffer-leak.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3651 ___

[issue3651] eval() leaks 1 reference every time

2008-08-22 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]: -- assignee: - loewis nosy: +loewis ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3651 ___ ___

[issue3625] test issues on 64bit windows

2008-08-22 Thread Mark Hammond
Mark Hammond [EMAIL PROTECTED] added the comment: Thanks. Checked into the trunk in r65986 -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3625 ___

[issue3652] Remove DeprecationWarning in _warnings about 'line'

2008-08-22 Thread Brett Cannon
New submission from Brett Cannon [EMAIL PROTECTED]: The DeprecationWarning introduced in Python 2.6/3.0 about the 'line' argument for showwarning() can be removed in 2.7/3.1. -- assignee: brett.cannon components: Library (Lib) messages: 71797 nosy: brett.cannon priority: normal

[issue3602] Move test.test_suport.catch_warning() to the 'warnings' module

2008-08-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: The patch does a couple of things. It moves test.test_support.catch_warning() to warnings.catch_warnings() and leaves a stub behind. WarningsRecorder becomes a subclass of list to make it easier to work with. The uses of catch_warnings() in the

[issue3640] test_cpickle crash on AMD64 Windows build

2008-08-22 Thread Mark Hammond
Mark Hammond [EMAIL PROTECTED] added the comment: Sorry for the initial noise - your analysis is correct, mine was flawed :) Simple recursion to a depth of 1000 does work fine on a 64bit build. cpickle.patch does make test_cpickle pass for me. FWIW, find_recursionlimit.py now causes a

[issue3602] Move test.test_suport.catch_warning() to the 'warnings' module

2008-08-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: See my comments on Rietveld. http://codereview.appspot.com/3255 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3602 ___

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2008-08-22 Thread Mark Hammond
Changes by Mark Hammond [EMAIL PROTECTED]: -- nosy: +mhammond ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3566 ___ ___ Python-bugs-list mailing list

[issue3602] Move test.test_suport.catch_warning() to the 'warnings' module

2008-08-22 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: Added file: http://bugs.python.org/file11227/move_catch_warnings.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3602 ___

[issue3602] Move test.test_suport.catch_warning() to the 'warnings' module

2008-08-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: New patch is up with a minor change from Benjamin's review. My explicit comments on the suggestions are on Rietveld. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3602

<    1   2   3