[issue4958] email/header.py ecre regular expression issue

2009-01-15 Thread Gabriel Genellina
Gabriel Genellina added the comment: Your example header is invalid. Excerpt from RFC2047 section 5: + An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured field body except within a 'comment' or 'phrase'. Even

[issue4960] askdirectory from tkinter.filedialog does not work

2009-01-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: Ah. That's a duplicate of issue 4406. -- resolution: -> duplicate status: open -> closed superseder: -> In Lib\tkinter\filedialog.py, class Directory define loss a"_" ___ Python tracker

[issue4960] askdirectory from tkinter.filedialog does not work

2009-01-15 Thread Martin Saturka
Martin Saturka added the comment: When I do in Python 2.x (e.g. 2.6) next: import Tkinter as T import tkFileDialog as F t = T.Tk() dn = F.askdirectory() It pop-ups the dialog, it is OK. Analogical case for Python 3.0 does not work, at le

[issue4960] askdirectory from tkinter.filedialog does not work

2009-01-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: Please be more explicit: what does "not work" mean? What do you do, what happens, what do you expect to happen instead? -- nosy: +loewis ___ Python tracker ___

[issue4960] askdirectory from tkinter.filedialog does not work

2009-01-15 Thread Martin Saturka
New submission from Martin Saturka : Directory selection from Tkinter part of Python 3.0, i.e. "askdirectory" function from tkinter.filedialog does not work. It works for 2.x Python, other Tkinter functions (askopenfilename, asksaveasfilename) work well at both 2.x and 3.0 versions. -- c

[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-15 Thread Gabriel Genellina
Gabriel Genellina added the comment: what is WEIRD_DEBUG? why do you remove a test from string_tests.py? why do you modify a command in setup.py? What do you mean "the file contents cannot be read under msys+wine"? What specific error you have? The right thing to do would be to analize that

[issue4959] inspect.formatargspec fails for keyword args without defaults, affects help and likely pydoc

2009-01-15 Thread dariusp
New submission from dariusp : Hi, Suggested log message: formatargspec now handles keyword only args that don't have defaults. Previously it expected an empty dict but was being given None. Patch: The patch contains a suggested fix to inspect.py and a new test in test_inspect.py and inspect_f

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

2009-01-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Ported to py3k in r68630 and 3.0 in r68631. -- nosy: +benjamin.peterson ___ Python tracker ___ __

[issue4950] Redundant declaration in pyerrors.h

2009-01-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r68629. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4946] Lib/test/test__locale uses is to compare strings

2009-01-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r68628. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4957] os.ftruncate raises IOError instead of OSError

2009-01-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: +1 for renaming. Although it looks like it has been this way since the beginning, the examples of os.ftruncate I found didn't seem to rely on this behavior. In addition, I think this is a small price to pay for good consistency. [1] [1] http://google.com/cod

[issue4958] email/header.py ecre regular expression issue

2009-01-15 Thread Jan Malakhovski
New submission from Jan Malakhovski : Hello. I have dedicated mail server at home and it holds about 1G of mail. Most of mail is in non UTF-8 codepage, so today I wrote little script that should recode all letters to UTF. But I found that email.header.decode_header parses some headers wrong. Fo

[issue4927] Inconsistent unicode repr for fileobject

2009-01-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: > I think the testsuite just exposed a design fault in python or a bug, if > you will. I disagree. The feature is intentional as-is, and well-designed. > It is customary when producing a > repr() of an object, to have it contain a repr() of the any inner >

[issue4957] os.ftruncate raises IOError instead of OSError

2009-01-15 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : I stumbled upon this. Of all the errors in the posixmodule.c, ftruncate alone raises an IOError upon failure. All the others raise OSError. This behaviour is not documented. However, the os module documentation says> Note All functions in this

[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-15 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton : this is a _very_ strange case where the file contents cannot be read, under msys+wine, but under _just_ wine (cmd.exe) everything goes absolutely fine. by moving Py_Initialize() to _before_ the file load, it works! -- components: Build

[issue4927] Inconsistent unicode repr for fileobject

2009-01-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I think the testsuite just exposed a design fault in python or a bug, if you will. When we by accident had a backslash in the filename, I noticed the inconsistency between 't...@test' and u'tm...@test'. One is a valid repr, the other isn't. It is cus

[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-01-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In _PyObject_LengthHint() code, at the line: if (ro == NULL && PyErr_Occurred()) { It seems that PyErr_Occurred() is not useful and is always true when the previous PyObject_CallMethodObjArgs() returned NULL. Otherwise the patch is fine to me. -

[issue4927] Inconsistent unicode repr for fileobject

2009-01-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: > I thought I'd explained it in detail [...] Well, so far, you didn't say that it was testUnicodeOpen that failed. Now that I see that, I can understand the problem. In your original message, I failed to see a problem. Yes, the repr is inconsistent - but why

[issue4955] inconsistent, perhaps incorrect, behavior with respect to entities parsed by xml.sax

2009-01-15 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : The attached program demonstrates that the ContentHandler.skippedEntity callback is not invoked for all skipped entities. Specifically, it is not invoked for those in attribute values. Additionally, it demonstrates that when parsing a document with no D

[issue4927] Inconsistent unicode repr for fileobject

2009-01-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I thought I'd explained it in detail without having to invoke the testsuite. If TEMPFN is "tm...@test" you get the following failure: FAILED (failures=1) test test_file failed -- Traceback (most recent call last): File "D:\pydev\python\trunk\lib\test

[issue4910] Remove uses of nb_long slot, and rename to nb_reserved.

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Second patch applied in r68619 (py3k) and r68620 (3.0 maintenance branch). Here's the third and final patch: rename the nb_long slot to nb_reserved, and change its type to (void *). Added file: http://bugs.python.org/file12756/issue4910_3.patch

[issue4954] native build of python win32 using msys under wine.

2009-01-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: Are you seriously requesting inclusion of the file f into Python? It contains many changes that are unsuitable for inclusion, such as the removal of graminit.c and the removal of configure. (besides, I personally think that the ability to compile Python with m

[issue4954] native build of python win32 using msys under wine.

2009-01-15 Thread Luke Kenneth Casson Leighton
Changes by Luke Kenneth Casson Leighton : -- type: -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue4954] native build of python win32 using msys under wine.

2009-01-15 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton : this patch uses work from #3871 to get a build of python for win32 by running msys under Wine, the windows emulator, on linux. no proprietary operating system or proprietary software was used. /bin/sh.exe is so ing unbelievably slow on msys

[issue3871] cross and native build of python for mingw32 with distutils

2009-01-15 Thread Luke Kenneth Casson Leighton
Changes by Luke Kenneth Casson Leighton : -- nosy: +lkcl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue4860] js_output wrong for cookies with " characters

2009-01-15 Thread STINNER Victor
STINNER Victor added the comment: > What's wrong with < and >? >>> c=Cookie.Cookie('Customer="";'); print c.js_output() It allows HTML/Javascript injection. Well, Python 2.5 already

[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Anyone else want to pick this up from here? ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue4910] Remove uses of nb_long slot, and rename to nb_reserved.

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: > I wonder if we should mark > PyNumber_Long as deprecated in the docs, though. It would be nice to standardize on one of (PyNumber_Long, PyNumber_Int) and document the other as deprecated. Maybe it would make more sense to stick with PyNumber_Long and deprec

[issue1700288] Armin's method cache optimization updated for Python 2.6

2009-01-15 Thread Collin Winter
Collin Winter added the comment: Looks like this was re-applied in r59943 and r59944. Thanks for taking care of this, Amaury. -- nosy: +collinwinter, jyasskin resolution: accepted -> fixed status: open -> closed ___ Python tracker

[issue4930] Small optimization in type construction

2009-01-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Looks good to me. -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing

[issue4927] Inconsistent unicode repr for fileobject

2009-01-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Any thoughts? I still hadn't time to reproduce the problem, so I still don't understand it. What specific failure (file and line number) occurs, and what specific strings get compared? test_file.py has 600 lines, and I can't guess which test is failing. (als

[issue4860] js_output wrong for cookies with " characters

2009-01-15 Thread Noufal
Noufal added the comment: What's wrong with < and >? I can see the issues with ; though. ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue4842] int('3L') still valid in Python 3.0

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Does anyone have time to review these patches? I think the first is straightforward, and I'm reasonably sure of the correctness of the second patch. I'm less sure that it's the right thing to do. The question is what should happen when pickling an integer

[issue4910] Remove uses of nb_long slot, and rename to nb_reserved.

2009-01-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Thu, Jan 15, 2009 at 10:48 AM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Thanks, Benjamin! Checked in in r68553, backported to 3.0 in r68556. > > Here's the second patch, which fixes almost all remaining uses of nb_long > but stops

[issue1530559] struct.pack raises TypeError where it used to convert

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Some more strange results: Python 2.6.1+ (release26-maint:68613, Jan 15 2009, 15:19:54) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from struct import pack >>> from decimal import Dec

[issue4927] Inconsistent unicode repr for fileobject

2009-01-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Just to clarify, Ascii files and unicode files will repr() as respectively. In the former, the backslash isn't escaped, but in the latter it is. The single quotes certainly imply repr, and if this were a list, it would repr as: ['tmp\\foo'] and so

[issue4929] smptlib.py can raise socket.error

2009-01-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Submitted as r68618 -- resolution: -> accepted status: open -> closed ___ Python tracker ___ __

[issue1530559] struct.pack raises TypeError where it used to convert

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Retargeting, now that 2.5 is in security-fix-only mode. Bob, can you clarify what *should* be happening in 2.6, 2.7, 3.0 and 3.1 for things like: struct.pack('L', 2009.1) struct.pack('L', Decimal('3.14')) ? It also seems that 'L' and 'Q behave differently.

[issue4910] Remove uses of nb_long slot, and rename to nb_reserved.

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Benjamin! Checked in in r68553, backported to 3.0 in r68556. Here's the second patch, which fixes almost all remaining uses of nb_long but stops short of actually removing/renaming the nb_long slot. Notes: (1) I haven't tested the change to PC/winre

[issue4953] Cannot upload binary file from form ?

2009-01-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Thanks for the test case. I reproduced it easily. There is indeed a real problem in CGI streams. The first thing to do is to start python with the -u option (add it to the end of the first #! line), so that stdin yields bytes instead of unicode chars, and

[issue4397] test_socket fails occassionaly in teardown: AssertionError: [Errno 57] Socket is not connected

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed in 2.6, 3.0, 3.1. -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue4397] test_socket fails occassionaly in teardown: AssertionError: [Errno 57] Socket is not connected

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Found a better (one-line) fix. Fixed in the trunk in r68611. Will port to 2.6, 3.0, 3.1. -- resolution: -> fixed versions: -Python 2.7 ___ Python tracker ___

[issue4953] Cannot upload binary file from form ?

2009-01-15 Thread oopos
oopos added the comment: Thank you for time. Now,I try with you saied.Bu it is taken wrong as before. See the files: Added file: http://bugs.python.org/file12753/full_source_and_error.zip ___ Python tracker __

[issue4397] test_socket fails occassionaly in teardown: AssertionError: [Errno 57] Socket is not connected

2009-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. I take it back: this *does* appear to be OS X specific. I've attached a small (17-line) example that fails with the Errno 57 error on OS X, but passes on the Linux machines I tested. In this example, it appears that when 'conn.close()' is called by the

[issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10

2009-01-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> high stage: -> test needed versions: +Python 2.6, Python 2.7 -Python 2.5 ___ Python tracker ___ _

[issue4953] Cannot upload binary file from form ?

2009-01-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: OK, another try. Please replace the previous version with these 3 lines: encoding = os.environ.get('HTTP_TRANSFER_ENCODING') stdin = open(sys.stdin.fileno(), 'r', encoding=encoding) opsform = cgi.FieldStorage(stdin)

[issue4242] Classify language vs. impl-detail tests, step 1

2009-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks nice to me. (I'm curious why you call gc.collect() several times in a row, though) However, since it is an important change in the long run, perhaps the specifics could be further discussed on python-dev before taking a decision? -- nos

[issue4953] Cannot upload binary file from form ?

2009-01-15 Thread oopos
oopos added the comment: To Amaury Forgeot d'Arc : Thank you. That error have sloved with your way: [quote]Does it work if you change your script like this: opsform = cgi.FieldStorage(open(sys.stdin.fileno(), 'rb'))[/quote] Now,The new problem come out: [code] 97 """Push some new

[issue4953] Cannot upload binary file from form ?

2009-01-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Does it work if you change your script like this: opsform = cgi.FieldStorage(open(sys.stdin.fileno(), 'rb')) -- nosy: +amaury.forgeotdarc ___ Python tracker __

[issue4953] Cannot upload binary file from form ?

2009-01-15 Thread oopos
New submission from oopos : Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win32 - Hi,I user Python! UnicodeDecodeError Python 3.0: G:\cgi\python\python.exe Thu Jan 15 16:46:34 2009 A problem occurred in a Python