[issue1401] urllib2 302 POST

2007-11-07 Thread Senthil
Senthil added the comment: I agree with facundobatista here. 1) I am not sure, if what you mention that doing POST in the 302 redirect url does not carry forward the POST data. Some examples would help to verify that and if this is case, IMO its a bug in urllib2. 2) You mention solution 1 as RFC

[issue1165] Should itertools.count work for arbitrary integers?

2007-11-07 Thread Raymond Hettinger
Changes by Raymond Hettinger: -- resolution: -> fixed status: open -> closed versions: +Python 2.6 -Python 3.0 __ Tracker <[EMAIL PROTECTED]> __ __

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: On 11/7/07, Guido van Rossum wrote: > Cool. How hard do you think it would be to extend your work on > StringIO into a translation of TextIOWrapper into C? Well, StringIO and TextIOWrapper are quite different. The only part that I could reuse, from StringI

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > io3.diff does replacenl() in adjust_chunk() (trying Amaury's > suggestion). Can you see if it fixes test_mailbox failures? Unfortunately, it does not. And some tests now fail in test_io (correcting testTelling seems a good start point, since we just chan

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Cool. How hard do you think it would be to extend your work on StringIO into a translation of TextIOWrapper into C? On Nov 7, 2007 3:55 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > On 11/7/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 11/7/07

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: On 11/7/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 11/7/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > > > > Christian Heimes added the comment: > > > > By the way what happened to the SoC project related to Python's new IO > > subsystem? IIRC

[issue1401] urllib2 302 POST

2007-11-07 Thread Facundo Batista
Facundo Batista added the comment: I don't understand why after receiving a redirection, and going to a new URL, you say to NOT send the POST data. Shouldn't the HTTP request be exactly like the original one, but to another URL destination? But you said that #2 solution was more RFC compliant...

[issue1742669] "%d" format handling for long values

2007-11-07 Thread Gabriel Genellina
Gabriel Genellina added the comment: Yes, I can reformulate it. In fact my original version was quite different, but the resulting diff was hard to understand so I rewrote it trying to keep as much as the original code as possible. I'll submit a new patch next weekend.

[issue1402] Interpreter cleanup: order of _PyGILState_Fini and PyInterpreterState_Clear

2007-11-07 Thread Ronald Oussoren
New submission from Ronald Oussoren: Py_Finalize cleans up the thread state by first calling _PyGILState_Fini and then calling PyInterpreterState_Clear. The latter can cause user code to run, which could use the GILState API and this then causes a crash. The attached file 'threads.py' causes

[issue1399] XML codec

2007-11-07 Thread Guido van Rossum
Changes by Guido van Rossum: -- nosy: -gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue1399] XML codec

2007-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Leaving the module name as "xml" would remove that name from the namespace of possible encodings. "xml" as encoding name is problematic, as many people regard writing data in XML as "encoding the data in XML". I'd simply not use it at all, not even for a co

[issue1401] urllib2 302 POST

2007-11-07 Thread Andres Riancho
Changes by Andres Riancho: -- title: urllib 302 POST -> urllib2 302 POST __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Un

[issue1401] urllib 302 POST

2007-11-07 Thread Andres Riancho
New submission from Andres Riancho: There is an error in urllib2 when doing a POST request to a URI that responds with a 302 redirection. The problem is in urllib2.py:536, where the HTTPRedirectHandler creates the new Request based on the original one: newurl = newurl.replace(' ', '%

[issue1399] XML codec

2007-11-07 Thread Walter Dörwald
Walter Dörwald added the comment: "xml-auto-detect" sounds OK to me, it even makes sense for the encoder, because it normally detects the encoding to use for writing from the XML declaration. We could put "xml-auto-detect" into the alias mapping and keep xml as the module name. But I noticed I

[issue1399] XML codec

2007-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Nice codec ! The only nit I have is the name: "xml" isn't intuitive enough. I had to read the code to figure out what the codec actually does. "xml" used a encoding usually refers to having Unicode text converted to ASCII with XML entity escapes for all no

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Christian Heimes
Christian Heimes added the comment: I take it back. I accidentally run the unit tests on the trunk instead of the py3k branch. mailbox and csv are still breaking with your test, netrc is doing fine. Added file: http://bugs.python.org/file8709/py3k_windows.log.gz

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Christian Heimes
Christian Heimes added the comment: Good work! The tests for mailbox, netrc and csv are passing with your test. I'm going to run the entire suite now. __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Christian Heimes
Changes by Christian Heimes: -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: h

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Christian Heimes
Changes by Christian Heimes: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/py

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Hi Amaury and Christian, io3.diff does replacenl() in adjust_chunk() (trying Amaury's suggestion). Can you see if it fixes test_mailbox failures? Added file: http://bugs.python.org/file8708/io3.diff __ Tracker <[EMAIL PROT

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: On 11/7/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > By the way what happened to the SoC project related to Python's new IO > subsystem? IIRC somebody was working on a C optimization of the io lib. > >

[issue1704621] interpreter crash when multiplying large lists

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Shouldn't this be fixed before 2.5.2 goes out? -- assignee: -> nnorwitz nosy: +gvanrossum priority: normal -> high _ Tracker <[EMAIL PROTECTED]> ___

[issue1400] Py3k's print() flushing problem

2007-11-07 Thread Wojciech Walczak
New submission from Wojciech Walczak: py3k's print() is not flushing when the string's length is 1 byte long and 'end' parameter is set to ''. Example: >>> print('x',end='') # it should print 'x' but it does nothing >>> print('') # we have to call second print() to get buffers flushed x >>> The

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Christian Heimes
Christian Heimes added the comment: By the way what happened to the SoC project related to Python's new IO subsystem? IIRC somebody was working on a C optimization of the io lib. __ Tracker <[EMAIL PROTECTED]> ___

[issue1399] XML codec

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's good to add this; I don't have time to review though. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> __ __

[issue1291] test_resource fails on recent linux systems (

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: It's fine to fix this in 2.5.2, as it is just a test. (IMO you can just copy the 2.6 test_resource.py into 2.5.2, assuming that works.) __ Tracker <[EMAIL PROTECTED]> _

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Somebody needs to reverse-engineer the invariants applying to the various instance variables and add comments explaining them, and showing how they are maintained by each call. __ Tracker <[EMAIL PROTECTED]>

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > The new patch fixes test_netrc for me but test_csv and test_mailbox are > still broken. For test_mailbox at least, I think I have a clue: the _pending member now contains translated newlines. But in tell(), we use its length and compare it with the lengt

[issue1293] Trailing slash in sys.path cause import failure

2007-11-07 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: This looks promising, but my head hurts when I try to understand the code that's already there and think about whether your patch will always do the right thing... I'll look more later. Regarding "universal newlines without translation:" that means that \r\n

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: > The new patch fixes test_netrc for me but test_csv and test_mailbox are > still broken. Unfortunately, I am not able to build python on windows so I can not test there. Can you post the exact errors? You can send me private email as well if you think the

[issue1293] Trailing slash in sys.path cause import failure

2007-11-07 Thread Christian Heimes
Christian Heimes added the comment: I've checked in a fix in r58903 (py3k branch). __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list U

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Christian Heimes
Christian Heimes added the comment: The new patch fixes test_netrc for me but test_csv and test_mailbox are still broken. -- components: +Library (Lib), Windows keywords: +py3k __ Tracker <[EMAIL PROTECTED]>

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I am attaching another patch (io2.diff). Please review. I am not sure whether _adjust_chunk() should also adjust "readahead". BTW, PEP 3116 says: "If universal newlines without translation are requested on input (i.e. newline=''), if a system read operat

[issue1293] Trailing slash in sys.path cause import failure

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Works for me! On Nov 7, 2007 6:08 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > Brett Cannon wrote: > > Modules/getpath.c:joinpath() I think does what you want in C. > > I don't see how it is going to help us. > >

[issue1366] popen spawned process may not write to stdout under windows

2007-11-07 Thread Gabriel Genellina
Gabriel Genellina added the comment: (I think the title you meant was "popen spawned process may not write to stderr under windows") The child is dying with IOError: [Errno 22] Invalid argument at the sys.stderr.flush() call. Neither the docs for os.popen nor the Linux man page for popen(3)

[issue1343] XMLGenerator: nice elements

2007-11-07 Thread Gabriel Genellina
Gabriel Genellina added the comment: Some (ugly) parsers insist on when the element is not declared to be empty, so this should be optional (the default being generate ) -- nosy: +gagenellina __ Tracker <[EMAIL PROTECTED]>

[issue1398] Can't pickle partial functions

2007-11-07 Thread Daniel
New submission from Daniel: Creating a function using functools.partial results in a function which cannot be pickled. Attached is a small testcase. -- components: Library (Lib) files: partial_bug.py messages: 57200 nosy: danhs severity: normal status: open title: Can't pickle partial f

[issue1293] Trailing slash in sys.path cause import failure

2007-11-07 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > Modules/getpath.c:joinpath() I think does what you want in C. I don't see how it is going to help us. I've a final offer before I declare the bug as SEP (someone else's problem): pseudo code #ifdef MS_WINDOWS rv = stat(...) if

[issue1291] test_resource fails on recent linux systems (

2007-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: I just compared the 2.5 test_resource with the trunk test_resource - the latter has been modified to remove the file size limitation before it attempts to close the file, eliminating the test failure without changing the underlying behaviour of f.close. __

[issue1705170] contextmanager eats StopIteration

2007-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Done in rev 58901 -- resolution: accepted -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> _ ___

[issue1291] test_resource fails on recent linux systems (

2007-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: I just hit this as well when rerunning the 2.5 tests before checking something else in. The test itself appears to be fine, but the call to f.close() outside the try/except block attempting to flush the file to disk and raising an IOError. Didn't something like th

[issue1390] toxml generates output that is not well formed

2007-11-07 Thread Martin v. Löwis
Martin v. Löwis added the comment: The standard procedure for an incompatible change would be to add such a parameter to 2.6, and then change the default behavior in 2.7 (or rather 3.1). Of course, people will not notice the change in 2.6, and then be surprised as much about the default change in

[issue1234] semaphore errors on AIX 5.2

2007-11-07 Thread Sébastien Sablé
Sébastien Sablé added the comment: The bug is still present in Python 2.5.1. The same patch applies. The patch is rather trivival, could someone please integrate it in trunk? Thanks in advance __ Tracker <[EMAIL PROTECTED]> _