[issue10879] cgi memory usage

2011-01-10 Thread Glenn Linderman
New submission from Glenn Linderman : In attempting to review issue 4953, I discovered a conundrum in handling of multipart/formdata. cgi.py has claimed for some time (at least since 2.4) that it "handles" file storage for uploading large files. I looked at the code in 2.6 that handles such,

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: This looks much simpler than the previous patch. However, I think it can be further simplified. This is my first reading of this code, however, so I might be totally missing something(s). Pierre said: Besides FieldStorage, I modified the parse() function a

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: Also, the required behavior of make_file changes, to need the right encoding, or binary, so that needs to be documented as a change for people porting from 2.x. It would be possible, even for files, which will be uploaded as binary, for a user to know the ap

[issue10784] os.getpriority() and os.setpriority()

2011-01-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Question: should Py_BEGIN/END_ALLOW_THREADS be used around getpriority() and setpriority() calls? It's still not clear to me when to use them exactly. -- ___ Python tracker __

[issue10879] cgi memory usage

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: Trying to code some of this, it would be handy if BytesFeedParser.feed would return a status, indicating if it has seen the end of the headers yet. But that would only work if it is parsing as it goes, rather than just buffering, with all the real parsing wo

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread David-Sarah Hopwood
David-Sarah Hopwood added the comment: I'll have a look at the Py3k I/O internals and see what I can do. (Reopening a bug appears to need Coordinator permissions.) -- ___ Python tracker

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread Tim Golden
Tim Golden added the comment: Reopening as there seems to be some possibility of progress -- nosy: -BreamoreBoy resolution: invalid -> status: closed -> open ___ Python tracker ___

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread Tim Golden
Changes by Tim Golden : -- versions: +Python 3.3 -Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue10875] Update Regular Expression HOWTO

2011-01-10 Thread SilentGhost
SilentGhost added the comment: > While the changes all look innocuous to me with respect to building the docs, > I am curious if you have tried to rebuild the HOWTO (if you have the tool > chain, which I do not). I did rebuild the docs with 'make html'. Build was clean every time. If you mea

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: I wrote: Additionally, if there is a CONTENT-LENGTH specified for non-binary data, the read_binary method should be used for it also, because it is much more efficient than readlines... less scanning of the data, and fewer outer iterations. This goes well w

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: It seems the choice of whether to make_file or StringIO is based on the existence of self.length... per my previous comment, content-length doesn't seem to appear in any of the multipart/ item headers, so it is unlikely that real files will be created by thi

[issue10878] asyncore does not react properly on close()

2011-01-10 Thread Teodor Georgiev
Teodor Georgiev added the comment: Sorry, I forgot to mention - I have already tried to return False, but there was no difference. def readable(self): if time.time() >= self.timeout: self.close() return False else: return True -- re

[issue10878] asyncore does not react properly on close()

2011-01-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: What if you return False also in writable method? -- ___ Python tracker ___ ___ Python-bugs-list

[issue10876] Zipfile crashes when zip password is set to 610/844/numerous other numbers

2011-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the password-checking scheme uses a one-byte check against the zip header for consistency. So there is a (near) 1/256 chance of false positives, that is of bad passwords mistakenly detected as good; then the ZipFile class proceeds with unarchiving and

[issue10878] asyncore does not react properly on close()

2011-01-10 Thread Teodor Georgiev
Teodor Georgiev added the comment: Precisely, I traced down the problem by putting a simple "breakpoint" in asyncore.py: def poll(timeout=0.0, map=None): if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items(): is_r

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The script unicode2.py uses the console STD_OUTPUT_HANDLE iff sys.stdout.fileno()==1. But is it always the case? What about pythonw.exe? Also some applications may redirect fd=1: I'm sure that py.test does this http://pytest.org/capture.html#setting-cap

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: amaury> The script unicode2.py uses the console STD_OUTPUT_HANDLE iff amaury> sys.stdout.fileno()==1 Interesting article about the Windows console: http://blogs.msdn.com/b/michkap/archive/2008/03/18/8306597.aspx There is an example which has many tests to chec

[issue4953] cgi module cannot handle POST with multipart/form-datain 3.0

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: Some comments on cgi_diff_20110109.txt, especially on FieldStorage constructor. Le dimanche 09 janvier 2011 13:26:24, vous avez écrit : > Here is the diff file for the revised version of cgi.py +import msvcrt +msvcrt.setmode (0, os.O_B

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Etienne Robillard
Etienne Robillard added the comment: On 10/01/11 05:23 AM, Glenn Linderman wrote: > I'm basing this off the use of Firefox Live HTTP headers tool. > > is sendfile() available on Windows ? i thought the Apache server could use that to upload files without having to buffer files in memory.. H

[issue10879] cgi memory usage

2011-01-10 Thread R. David Murray
R. David Murray added the comment: The email package does have a 'parser headers only' mode, but it doesn't do what you want, since it reads the remainder of the file and sets it as the payload of the single, un-nested Message object it returns. Adding a flag to tell it to stop parsing instea

[issue10879] cgi memory usage

2011-01-10 Thread R. David Murray
Changes by R. David Murray : -- versions: -Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Yuriy
New submission from Yuriy : If a value created by Py_VaBuildValue and parameter "b" is transfered - a PyLong_Type value is returned despite of the fact that it would be reasonable if PyBool_Type were returned. Are there any reasons for this? modsupport.c Ln 214 -- messages: 125903 nos

[issue10866] Add sethostname()

2011-01-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou stage: -> patch review type: -> feature request ___ Python tracker ___ ___ Python-bugs-

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: What makes you think it should be a boolean? in http://docs.python.org/py3k/c-api/arg.html#Py_BuildValue "b" means "byte" and is processed as a tiny integer. Now, that's true that Py_BuildValue could have a format for boolean values. Maybe with a "?" p

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Daniel Urban
Daniel Urban added the comment: There is another return statement earlier in the ABCMeta.register method. The patch probably should also modify that. -- nosy: +durban ___ Python tracker __

[issue10225] Fix doctest runable examples in python manual

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Jan 9, 2011 at 3:52 PM, Terry J. Reedy wrote: > .. It would be nice to get the fixes into 3.2. Yes, it would be nice, but I don't have a 3.2 patch (yet). As you can see from my last comment, I ran into a bug in the alpha version of sphinx that I

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Edoardo Spadolini
Edoardo Spadolini added the comment: Whoops, corrected that - should I add some more tests for that too? -- nosy: -benjamin.peterson, durban, eric.araujo, gvanrossum, pitrou, rhettinger Added file: http://bugs.python.org/file20335/abcmeta_register_v4.diff _

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Edoardo Spadolini
Changes by Edoardo Spadolini : -- nosy: +benjamin.peterson, durban, eric.araujo, gvanrossum, pitrou, rhettinger ___ Python tracker ___ ___

[issue10784] os.getpriority() and os.setpriority()

2011-01-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: You should use begin/end allow threads when the system call might block. To get an indication, trace through the kernel code of some system; my guess is that these are typically non-blocking (i.e. return immediately) - but I might be wrong. --

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Éric Araujo
Éric Araujo added the comment: You should, otherwise how would you prove it’s fixed? :) -- ___ Python tracker ___ ___ Python-bugs-lis

[issue2320] Race condition in subprocess using stdin

2011-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I confirm that it works reliably under 3.2, while it hangs as reliably under 2.7 and 3.1. Since fixing involves a C extension that is too heavy to backport to bugfix branches, I suggest closing. By the way: triagers, please don't set stage to "unit test neede

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Yuriy
Yuriy added the comment: Thank you, how is it possible to ask the developers to add such a flag? -- ___ Python tracker ___ ___ Python

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Edoardo Spadolini
Edoardo Spadolini added the comment: Fair enough :) -- Added file: http://bugs.python.org/file20336/abcmeta_register_v4_plus_tests.diff ___ Python tracker ___ __

[issue2568] Seconds range in time unit

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The C89 draft as available through a Wikipedia link, http://flash-gordon.me.uk/ansi.c.txt, specifies tm_sec range as [0, 60]. Although it looks like the range has been extended in the published version. A discussion on comp.std.c describes the situati

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is the right place to ask... but it will be faster if someone provides a patch. -- keywords: +easy stage: -> needs patch ___ Python tracker __

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Edoardo Spadolini
Changes by Edoardo Spadolini : Removed file: http://bugs.python.org/file20336/abcmeta_register_v4_plus_tests.diff ___ Python tracker ___ ___

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Edoardo Spadolini
Changes by Edoardo Spadolini : Added file: http://bugs.python.org/file20337/abcmeta_register_v4_plus_tests.diff ___ Python tracker ___ ___ Pyt

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Éric Araujo
Éric Araujo added the comment: -return # Already a subclass +return subclass # Already a subclass PEP 8 advises to put two spaces before inline comments, for readability. (There is no need to upload a new patch, I’ll change that before commit.) +self.assertIsIn

[issue10820] 3.2 Makefile changes for versioned scripts break OS X framework installs

2011-01-10 Thread Stephen Hansen
Stephen Hansen added the comment: FYI, The patch applied cleanly to branches/py3k; I then built a framework build (universal), installed it and ran the test-suite. I had two failures, but I don't know if either is related. The first was the tk tests didn't pass, but I'm not sure if there was

[issue10820] 3.2 Makefile changes for versioned scripts break OS X framework installs

2011-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks like an issue in test_site rather than site.py itself (which has dedicated code to add a third site directory under framework builds). The test_site failure is not enough to hold the release, IMO. Given Ronald's absence, I think Ned could start exercisi

[issue10820] 3.2 Makefile changes for versioned scripts break OS X framework installs

2011-01-10 Thread Ned Deily
Ned Deily added the comment: Thanks for trying a build. There are various tk test failures possible depending on what version of Tcl/Tk is or isn't installed, so I wouldn't be concerned about them. The test_site failure is also not new. It is documented in re-opened Issue8084. --

[issue10881] test_site and macframework builds fails

2011-01-10 Thread Stephen Hansen
New submission from Stephen Hansen : With the latest from branches/py3k, in a framework build, I get: Wimp:build pythonbuildbot$ ./python.exe -m test.regrtest test_site [1/1] test_site test test_site failed -- Traceback (most recent call last): File "/Users/pythonbuildbot/32test/build/Lib/test

[issue10881] test_site and macframework builds fails

2011-01-10 Thread Stephen Hansen
Stephen Hansen added the comment: ... oops! Apparently dupe. Forgot to search first. Ignore. -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ _

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: Victor said: Don't you think that a warning would be appropriate if sys.stdin is passed here? --- # self.fp.read() must return bytes if isinstance(fp,TextIOBase): self.fp = fp.buffer else: self.fp = fp --- Maybe

[issue10822] test_getgroups failure under Solaris

2011-01-10 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue10820] 3.2 Makefile changes for versioned scripts break OS X framework installs

2011-01-10 Thread Ned Deily
Ned Deily added the comment: (BTW, I was planning to see what we could do about Issue8084 before release anyway. I'll get on it.) -- ___ Python tracker ___ ___

[issue10784] os.getpriority() and os.setpriority()

2011-01-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10879] cgi memory usage

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: R. David said: However, I'm not clear on how that helps. Doesn't FieldStorage also load everything into memory? I say: FieldStorage in 2.x (for x <= 6, at least) copies incoming file data to a file, using limited size read/write operations. Non-file data i

[issue10882] Add os.sendfile()

2011-01-10 Thread Ross Lagerwall
New submission from Ross Lagerwall : Attached is a patch which implements os.sendfile for unix systems (linux, freebsd, apple, solaris, dragonfly). It takes the iov initialization code and off_t parsing from i10812. It encapsulates all the functionality from the various sendfiles which means a

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Yuriy
Yuriy added the comment: case 'g': { int n; n = va_arg(*p_va, int); if (n == 0) Py_RETURN_FALSE; else Py_RETURN_TRUE;

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Pierre Quentel
Pierre Quentel added the comment: @Glenn "Also, the use of FeedParser could be replaced by BytesFeedParser, thus eliminating the need to decode header lines in that loop." BytesFeedParser only uses the ascii codec ; if the header has non ASCII characters (filename in a multipart/form-data), t

[issue10882] Add os.sendfile()

2011-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Tested on Linux & FreeBSD - it should work on solaris but since it > needs to link with the sendfile library and I have no idea how to link > the posix module with the sendfile library only on Solaris, i couldn't > test it. Since the posix module is linked

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: Victor said: "Set sys.stdin.buffer.encoding attribute is not a good idea. Why do you modify fp, instead of using a separated attribute on FieldStorage (eg. self.fp_encoding)?" Pierre said: I set an attribute encoding to self.fp because, for each part of a m

[issue5871] email.header.Header too lax with embeded newlines

2011-01-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm inclined not to support backporting to Python 2.6. It seems like a fairly rare and narrow hole for security problem, because it would require a program to add the bogus header explicitly, as opposed to getting it after parsing some data. To me, that sm

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread R. David Murray
R. David Murray added the comment: I don't have time to review the patch or even respond in detail to the comments right now, but I do want to respond about BytesFeedParser. It is true that there is currently no interface to get the raw-bytes version of the header back out of the Message obj

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: > I set an attribute encoding to self.fp because, for each part > of a multipart/form-data, a new instance of FieldStorage is created, > and this instance needs to know how to decode bytes. Set fp.encoding may raise an error (eg. for a read-only object, or an

[issue5871] email.header.Header too lax with embeded newlines

2011-01-10 Thread R. David Murray
R. David Murray added the comment: Well, imagine a web form that has a 'subject' text entry field, and the application does Message['Subject'] = subject_from_form as it builds a Message to hand off to smtp.sendmail. If the application didn't sanitize the subject for newlines (and as a progra

[issue5871] email.header.Header too lax with embeded newlines

2011-01-10 Thread R. David Murray
R. David Murray added the comment: Ah, I should clarify. A sensible web application should be dealing with any multiline input it allows by turning it into a newline-less single line before using it as a subject, so the probability that there are exploitable applications out there is, I thin

[issue10394] subprocess Popen deadlock

2011-01-10 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: It's now fixed in py3k, FD_CLOEXEC is set atomically (using pipe2 if available, otherwise it still has the GIL protection). See http://svn.python.org/view?view=rev&revision=87207 -- nosy: +neologix, pitrou ___

[issue10881] test_site and macframework builds fails

2011-01-10 Thread Stephen Hansen
Changes by Stephen Hansen : -- superseder: -> pep-0370 on osx duplicates existing functionality ___ Python tracker ___ ___ Python-bug

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Pierre Quentel
Pierre Quentel added the comment: @Glenn " The _defined_ encoding of the original stream is irrelevant, in the same manner that if it is a text stream, that is irrelevant. The stream is binary, and latin-1, or it is non-standard" I wish it could be as simple, but I'm afraid it's not. On my P

[issue2320] Race condition in subprocess using stdin

2011-01-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: btw, I will be backporting all recent subprocess changes to http://code.google.com/p/python-subprocess32/ there have been a lot of changes recently, i was waiting for that to settle down before bring it up to current. 3.2rc1 sounds like a good time. -

[issue8084] pep-0370 on osx duplicates existing functionality

2011-01-10 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue10394] subprocess Popen deadlock

2011-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, so let's close the issue. The fix can't reasonably be backported since it involves a whole new C extension and a rather large chunk of new code. -- nosy: +gregory.p.smith resolution: -> out of date status: open -> closed versions: -Python 2.6 __

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread David-Sarah Hopwood
David-Sarah Hopwood added the comment: > The script unicode2.py uses the console STD_OUTPUT_HANDLE iff > sys.stdout.fileno()==1. You may have missed "if not_a_console(hStdout): real_stdout = False". not_a_console uses GetFileType and GetConsoleMode to check whether that handle is directed to

[issue10820] 3.2 Makefile changes for versioned scripts break OS X framework installs

2011-01-10 Thread Ned Deily
Ned Deily added the comment: Fixed in r87908. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue1697943] msgfmt cannot cope with BOM

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: Extract of the Unicode standard: "Use of a BOM is neither required nor recommended for UTF-8, but may be encountered in contexts where UTF-8 data is converted from other encoding forms that use a BOM or where the BOM is used as a UTF-8 signature". See also t

[issue1697943] msgfmt cannot cope with BOM

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: See also issue #7651: "Python3: guess text file charset using the BOM". -- ___ Python tracker ___ ___

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread David-Sarah Hopwood
David-Sarah Hopwood added the comment: Note: Michael Kaplan's code checks whether GetConsoleMode failed due to ERROR_INVALID_HANDLE. My code intentionally doesn't do that, because it is correct and conservative to fall back to the non-console behaviour when there is *any* error from GetConsol

[issue9742] Python 2.7: math module fails to build on Solaris 9

2011-01-10 Thread Reid Madsen
Reid Madsen added the comment: Python support, This issue with not being able to build on Solaris 9 is easily fixed. I have attached a patch with the fix for Python 2.7. When linking with libpython-2.7.a, the linker will only extract modules that satisfy dependencies emanating from python.o

[issue10883] urllib: socket is not closed explicitly

2011-01-10 Thread STINNER Victor
New submission from STINNER Victor : test_urllibnet.py and test_urllibnet2.py emit ResourceWarning: == $ ./python Lib/test/test_urllibnet.py testURLread (__main__.URLTimeoutTest) ... ok test_bad_address (__main__.urlopenNetworkTests) ... ok test_basic (__main__.urlopenNetworkTests) .

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: I opened a separated issue for test_urllib and test_urllib2net: #10883. -- ___ Python tracker ___ _

[issue10875] Update Regular Expression HOWTO

2011-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I applied patch to 3.2, 3.1 in r87904, r87905. Thanks. I had to re-edit for 2.7: r87909. I made a separate small patch for my suggested addition to Matching Characters. Could someone check that it is correct, given that re.rst contains the target directive (o

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Even if python.exe starts normally, py.test for example uses os.dup2() to redirect the file descriptors 1 and 2 to temporary files. sys.stdout.fileno() is still 1, the STD_OUTPUT_HANDLE did not change, but normal print() now goes to a file; but the prop

[issue5924] When setting complete PYTHONPATH on Python 3.x, paths in the PYTHONPATH are ignored

2011-01-10 Thread David-Sarah Hopwood
David-Sarah Hopwood added the comment: Looking at http://svn.python.org/view/python/branches/py3k/PC/getpathp.c?r1=73322&r2=73321&pathrev=73322 , wouldn't it be better to add a Py_WGETENV function? There are likely to be other cases where that would be the correct thing to use. -- no

[issue2568] Seconds range in time unit

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in revision 87910. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue10875] Update Regular Expression HOWTO

2011-01-10 Thread Éric Araujo
Éric Araujo added the comment: Looks good, builds without warnings. Note that you can use :ref:`re-syntax` and Sphinx will substitute the heading for you. The :role:`some special text ` form is used when you want to control the text of the link. (That thing is called an hyperlink target: h

[issue9566] Compilation warnings under x64 Windows

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: > [readinst) should return a negative value on error, whereas it > returns the string length which is always positive Fixed by r87911. -- ___ Python tracker _

[issue10628] Typos in 3.2 what’s new

2011-01-10 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file20333/whatsnew-3.2-typos.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-10 Thread Glenn Linderman
Glenn Linderman added the comment: Victor said: I mean: you should pass sys.stdin.buffer instead of sys.stdin. I say: That would be possible, but it is hard to leave it at default, in that case, because sys.stdin will, by default, not be a binary stream. It is a convenience for FieldStorage

[issue10628] Typos in 3.2 what’s new

2011-01-10 Thread Éric Araujo
Éric Araujo added the comment: Remaining fixes and nitpicks, in separate patches to avoid missing fixes when cherry-picking nits. -- Added file: http://bugs.python.org/file20341/whatsnew-3.2-typos.diff ___ Python tracker

[issue10628] Typos in 3.2 what’s new

2011-01-10 Thread Éric Araujo
Changes by Éric Araujo : Added file: http://bugs.python.org/file20342/whatsnew-3.2-nitpicks.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue10875] Update Regular Expression HOWTO

2011-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. r87911,r87912 -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[issue5434] datetime.monthdelta

2011-01-10 Thread AdamN
AdamN added the comment: For future reference, python-dateutil seems like the maintained way to deal with "human" dates outside of the stdlib. http://pypi.python.org/pypi/python-dateutil -- nosy: +adamnelson ___ Python tracker

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread David-Sarah Hopwood
David-Sarah Hopwood added the comment: "... os.dup2() ..." Good point, thanks. It would work to change os.dup2 so that if its second argument is 0, 1, or 2, it calls _get_osfhandle to get the Windows handle for that fd, and then reruns the console-detection logic. That would even allow Unico

[issue5979] strptime() gives inconsistent exceptions

2011-01-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: unit test needed -> needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker ___ __

[issue1667546] Time zone-capable variant of time.localtime

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am going to close this as superseded by #9527. In order to properly implement #9527 in datetime.py, some kind of tm_gmtoff support will need to be added to the time module, but I don't want this to become a feature that is exclusively available from

[issue8915] Use locale.nl_langinfo in _strptime

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would also like to consider using OS strptime on platforms with a decent implementation. -- stage: -> needs patch type: -> feature request versions: +Python 3.3 -Python 3.2 ___ Python tracker

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-01-10 Thread Dave Malcolm
Dave Malcolm added the comment: Attaching updated version of the patch. I've added a selftest which (in a sacrificial subprocess) abuses ctypes to break an ob_refcnt, and then triggers a garbage collection. I also changed the printing to stderr to directly use fprintf and fflush to ensure th

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-01-10 Thread Dave Malcolm
Dave Malcolm added the comment: As above, but I added an extra call to fflush in case the call to _PyObject_Dump leads to a segfault. -- Added file: http://bugs.python.org/file20344/py3k-objdump-on-gcmodule-assertions-2011-01-10-002.patch ___ Pytho

[issue1109963] bdist_wininst ignores build_lib from build command

2011-01-10 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue9611] FileIO not 64-bit safe under Windows

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: r87917 removes (useless and dangerous) conversion to size_t. -- ___ Python tracker ___ ___ Python-bu

[issue9566] Compilation warnings under x64 Windows

2011-01-10 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20263/pyexpat.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue10875] Update Regular Expression HOWTO

2011-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: and r87918 for 2.7, with bytes -> byte string -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue9566] Compilation warnings under x64 Windows

2011-01-10 Thread STINNER Victor
STINNER Victor added the comment: socketmodule_int.patch: Fix similar to the fix for #9611: clamp length to INT_MAX on Windows for recv(), recvfrom(), send() and sendto(). -- Added file: http://bugs.python.org/file20345/socketmodule_int.patch ___ Py

[issue7739] time.strftime may hung while trying to open /etc/localtime but does not release GIL

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: -1 on releasing the GIL around strftime(). Until we have an implementation that can support multiple locales and multiple timezones, people will work around this limitation by messing up with the TZ environment variable or global locale settings.

[issue10848] Move test.regrtest from getopt to argparse

2011-01-10 Thread Sandro Tosi
Sandro Tosi added the comment: > R. David Murray added the comment: > > Note that based on my experience with the conversion of compileall to > argparse,it is important to have good tests.  Of course, regrtest itself has > no tests... Indeed that's quite funny :) anyhow, any suggestions on h

[issue8957] strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Adding #8915 as a dependency because deducing D_T_FMT locale setting from strftime output seems impossible: >>> locale.nl_langinfo(locale.D_T_FMT) '%a %b %e %H:%M:%S %Y' -- dependencies: +Use locale.nl_langinfo in _strptime versions: +Python 3.3

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-10 Thread Nadeem Vawda
Nadeem Vawda added the comment: Good idea; they look like more work to fix than the warnings so far. Aside from those two, it looks like test_cgi is all that's left. Just to clarify, did you manage to reproduce the test_cgi warning? -- ___ Python t

  1   2   >