[issue12599] Use 'is not None' where appropriate in importlib

2011-07-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12599 ___ ___ Python-bugs-list

[issue12604] VTRACE macro in _sre.c should use do {} while (0)

2011-07-22 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Attached a patch against 2.7 that adds the suggested fix. -- keywords: +patch nosy: +petri.lehtinen Added file: http://bugs.python.org/file22718/fix_empty_macro.patch ___ Python tracker rep

[issue12604] VTRACE macro in _sre.c should use do {} while (0)

2011-07-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- components: +Build, Library (Lib) keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12604

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2011-07-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12606 ___ ___ Python-bugs-list

[issue12614] Allow to explicitly set the method of urllib.request.Request

2011-07-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12614

[issue12170] index() and count() methods of bytes and bytearray should accept byte ints

2011-07-22 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: This affects bytearray as well as bytes. What comes to supporting integer argument to str methods, I'm -1 on that. str's contained items are strings of length 1. -- title: Bytes.index() and bytes.count() should accept byte ints - index

[issue12524] change httplib docs POST example

2011-07-15 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: There's also http://httpstat.us/. You can send any request (also POST) to http://httpstat.us/200 and it gives you a 200 OK response. I recall seeing other similar services, but didn't find them quickly. -- nosy: +petri.lehtinen

[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-07-15 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Attached a patch against 2.7. It adds Ben's example as a test case, and his one-line change to the _parseparam helper function to fix the issue. -- components: +Library (Lib) keywords: +needs review, patch nosy: +petri.lehtinen stage

[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth

2011-07-15 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12541 ___ ___ Python-bugs-list

[issue12570] BaseHTTPServer.shutdown() locks if the last request 404'd

2011-07-15 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12570 ___ ___ Python-bugs-list

[issue12555] PEP 3151 implementation

2011-07-14 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12555 ___ ___ Python-bugs-list

[issue11969] Can't launch multiproccessing.Process on methods

2011-07-08 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- stage: test needed - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11969 ___ ___ Python

[issue12486] tokenize module should have a unicode API

2011-07-08 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12486 ___ ___ Python-bugs-list

[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-07-07 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Shouldn't at least shutil.copytree() use lutimes in Python 3.3 to copy symlink metadata if symlinks=True? -- versions: -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http

[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-07-07 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Attached a patch that documents the behavior of copy2() and copytree() for symlinks. -- keywords: +needs review, patch stage: - patch review Added file: http://bugs.python.org/file22607/copy2_copytree_symlinks_2.7.patch

[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-07-07 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12183 ___ ___ Python-bugs-list mailing

[issue6090] zipfile: Bad error message when zipping a with timestamp before 1980

2011-07-06 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Retitled to reflect that the error message should be enhanced. Attached a patch for 2.7 that raises ValueError for timestamps before 1980, documents that 1980 or later is required, and adds some tests. -- keywords: +needs review, patch

[issue6090] zipfile: Bad error message when zipping a file with timestamp before 1980

2011-07-06 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- title: zipfile: Bad error message when zipping a with timestamp before 1980 - zipfile: Bad error message when zipping a file with timestamp before 1980 ___ Python tracker rep...@bugs.python.org http

[issue12198] zipfile.py:1047: DeprecationWarning: 'H' format requires 0 = number = 65535

2011-07-06 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Setting as duplicate of #6090. -- resolution: - duplicate status: open - closed superseder: - zipfile: Bad error message when zipping a file with timestamp before 1980 ___ Python tracker rep

[issue12439] BaseHTTPServer's send_reponse adds extra \r\n when using HTTPMessage in input

2011-07-03 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: It seems to me that you're indeed misusing it. The correct way would be something like this (assuming response is a HTTPResponse object from httplib): self.send_response(response.status) for name, value in response.getheaders

[issue12448] smtplib's __main__ doesn't flush when prompting

2011-07-03 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Behaves incorrectly for me, too. Attached a patch with the suggested fix. -- keywords: +needs review, patch nosy: +petri.lehtinen Added file: http://bugs.python.org/file22555/smtplib_main_prompt.patch

[issue12458] Tracebacks should contain the first line of continuation lines

2011-07-03 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12458 ___ ___ Python-bugs-list

[issue12461] it's not clear how the shutil.copystat() should work on symlinks

2011-07-03 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12461 ___ ___ Python-bugs-list

[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang

2011-07-03 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12463 ___ ___ Python-bugs-list

[issue12464] tempfile.TemporaryDirectory.cleanup follows symbolic links

2011-07-03 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12464 ___ ___ Python-bugs-list

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2011-07-02 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1054041

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-06-26 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list

[issue10206] python program starting with unmatched quote spews spaces to stdout

2011-06-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I'm unable to reproduce this. I checked out the commit 65614:18989ad44636 (corresponding to r85814, right?), built and ran python -c ', but didn't get a space flood on my face. Just a normal SyntaxError. -- nosy: +petri.lehtinen

[issue10206] python program starting with unmatched quote spews spaces to stdout

2011-06-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: By checking out the parent of r85904 I now can reproduce this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10206

[issue10206] python program starting with unmatched quote spews spaces to stdout

2011-06-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Attached a test case. The patch is against the current default tip. -- Added file: http://bugs.python.org/file22427/issues10206_test.patch ___ Python tracker rep...@bugs.python.org http

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list

[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character

2011-06-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12380 ___ ___ Python-bugs-list

[issue12379] build outside source fail in head

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: In which file there's an error? Could you elaborate a bit? -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12379

[issue12296] Minor clarification in devguide

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: New semantics may also be something else than new classes or functions. New optional function arguments exposing new functionality, for example. -- nosy: +petri.lehtinen ___ Python tracker rep

[issue11909] Doctest sees directives in strings when it should only see them in comments

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The patch looks good to me. It passes the old doctests tests and adds a new test case for what it's fixing. -- nosy: +petri.lehtinen, tim_one ___ Python tracker rep...@bugs.python.org http

[issue11869] Include information about the bug tracker Rietveld code review tool

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11869 ___ ___ Python-bugs-list

[issue11708] argparse: suggestion for formatting optional positional args

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11708 ___ ___ Python-bugs-list

[issue11708] argparse: suggestion for formatting optional positional args

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11708 ___ ___ Python-bugs-list mailing

[issue11695] Improve argparse usage/help customization

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11695 ___ ___ Python-bugs-list

[issue11694] xdrlib raises ConversionError in inconsistent way

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: This seems like a bug worth fixing. The ConversionError exception has been documented, an there's an example in the docs that suggest that at least all packing fails with a ConversionError. -- nosy: +petri.lehtinen

[issue12381] bytearray methods count, find, index don't support None as in slice notation

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12381 ___ ___ Python-bugs-list

[issue12379] build outside source fail in head

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Benjamin: The mentioned commit is yours, so you probably have the best understanding of this change. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue11934] build with --prefix=/dev/null and zlib enabled in Modules/Setup failed

2011-06-15 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: FWIW, I recall that I built 2.7 a while back with --prefix=/home/user/something and it also failed to find zlib. Due to lack of time, I didn't debug it very deeply then, though. -- ___ Python

[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2011-06-14 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: harobed wrote: I use http.client in WebDAV client. Mac OS X Finder WebDAV client perform all his request in chunk mode : PUT and GET. Here, I use http.client to simulate Mac OS X Finder WebDAV client. Now I'm confused. Per the HTTP

[issue11934] build with --prefix=/dev/null and zlib enabled in Modules/Setup failed

2011-06-14 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11934 ___ ___ Python-bugs-list

[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2011-06-13 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: What's the use case? Do you have an iterable that yields data whose size is unknown? AFAIK, most web servers don't even support chunked uploads. (Removing Python 2.7 from versions as this is clearly a feature request.) -- nosy

[issue12294] multiprocessing.Pool: Need a way to find out if work are finished.

2011-06-13 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12294

[issue12174] Multiprocessing logging levels unclear

2011-06-13 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: R. David Murray wrote: I think it would be good to mention the numeric levels in the text as well (in parenthesis, perhaps), unless the rest of the logging docs no longer refer to the numeric levels. AFAICS, there are no numbers

[issue12277] Missing comma in os.walk docs

2011-06-07 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Here's a patch. -- keywords: +patch nosy: +petri.lehtinen Added file: http://bugs.python.org/file22272/docs_os_walk_add_comma.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12277] Missing comma in os.walk docs

2011-06-07 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- versions: -Python 2.6, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12277

[issue12277] Missing comma in os.walk docs

2011-06-07 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12277 ___ ___ Python-bugs-list

[issue11669] Clarify Lang Ref Compound statements footnote

2011-06-07 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Keywords suggest that there should to be a patch here. Where is it? -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11669

[issue11784] multiprocessing.Process.join: timeout argument doesn't specify time unit.

2011-06-07 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The patch looks good to me and applies cleanly on top of 3.3 and 2.7. -- nosy: +petri.lehtinen versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12021] mmap.read requires an argument

2011-06-07 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: It seems I did. Attached now for real :) -- Added file: http://bugs.python.org/file22275/mmap_read_all_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12021

[issue12021] mmap.read requires an argument

2011-06-06 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I think duplicating it is fine, since the code is probably simple anyway Added a new patch. I duplicated the None converting logic in _io/_iomodule.c to mmapmodule.c, changed the doc to say read([n]), and expanded the test cases a bit

[issue12021] mmap.read requires an argument

2011-06-05 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Antoine Pitrou wrote: I'm not sure about the original reason, but I find None as the default omitted value prettier than -1 myself, so I think it's a good thing :) Yeah, and it's also good for consistency with other file-like objects. Can I

[issue12014] str.format parses replacement field incorrectly

2011-06-04 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: PEP 3101 defines format strings as intermingled character data and markup. Markup defines replacement fields and is delimited by braces. Only after markup is extracted does the PEP talk about interpreting the contents of the markup. So

[issue12164] str.translate docstring doesn't mention that 'table' can be None

2011-06-04 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: What do you think? Sounds very good to my native Finnish ears :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12164

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I've played around with the str.format() code for a few weeks now, to investigate its poor performance compared to the % operator. Having written a few parsers before, I would change it to parse each part separately: 1. field_name 2a

[issue12021] mmap.read requires an argument

2011-05-31 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I noticed that RawIOBase.read, TextIOBase.read, etc also accept None as the argument, treating it as -1. Should this be implemented, too? -- ___ Python tracker rep...@bugs.python.org http

[issue12164] str.translate docstring doesn't mention that 'table' can be None

2011-05-31 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I added a patch a few days ago. How does it look? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12164

[issue12164] str.translate docstring doesn't mention that 'table' can be None

2011-05-31 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: After discussing with Ezio Melotti, I attached another patch with a different wording. Mark: As a native English speaker, which one you prefer? -- Added file: http://bugs.python.org/file22206/str_translate_docstring_2.patch

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-05-31 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I tried to compile Python 3.3 (from default branch) with DONT_HAVE_FSTAT and DONT_HAVE_STAT. It seems to depend even more heavily on stat() being available, in other files than Python/import.c. With 2.7, it was quite easy to disable the .pyc

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-05-31 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The NullImporter is documented to raise ImportError on directories, not directories containing __init__.py: http://docs.python.org/library/imp.html#imp.NullImporter Checking for __init__.py{,c,o} seems doable to me without having stat

[issue12206] Documentation Std. Library 15.7.5 LogRecord objects: Parameters: level(currently wrong) - levelno (correct)

2011-05-30 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The name of the level parameter to LogRecord constructor is correct in the documentation (I checked the code). The only inconsitency that I see is that the corresponding attribute name of LogRecord is levelno. -- nosy: +petri.lehtinen

[issue12206] Documentation Std. Library 15.7.5 LogRecord objects: Parameters: level(currently wrong) - levelno (correct)

2011-05-30 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Martin Ponweiser wrote: I guess mentioning the inconsistency in the documentation is out of the question. No, not at all. If you have a good wording in your mind, please share it :) Or even better, write a patch

[issue12198] zipfile.py:1047: DeprecationWarning: 'H' format requires 0 = number = 65535

2011-05-30 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: On 2.7, your example raises an error: Traceback (most recent call last): File a.py, line 7, in module z.write(a, a) File /home/petri/tmp/cpython/cpython/Lib/zipfile.py, line 1071, in write self.fp.write(zinfo.FileHeader()) File

[issue12014] str.format parses replacement field incorrectly

2011-05-30 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12014 ___ ___ Python-bugs-list

[issue12021] mmap.read requires an argument

2011-05-30 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Thanks for the comments. I attached a new patch that uses self.addCleanup(m.close), and also adds a versionchanged directive to the docs. -- Added file: http://bugs.python.org/file22199/mmap_read_all_3.patch

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-05-30 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: STINNER Victor wrote: If we cannot get the file modification time, .pyc/.pyo writing must be disabled. If your OS/libc/filesystem doesn't have fstat(), you don't have file modification, so no .pyc/.pyo write. Should I go on and write

[issue12063] tokenize module appears to treat unterminated single and double-quoted strings inconsistently

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: tokenize processes a line at a time, and noticing that an ending triple quote is missing would mean reading the whole file in the worst case. As tokenize seems to work in a generator-like fashion, it's probably not desired to cache all

[issue12063] tokenize module appears to treat unterminated single and double-quoted strings inconsistently

2011-05-27 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12063

[issue12021] mmap.read requires an argument

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Added a patch. It was only a matter of making the size parameter optional. -- keywords: +patch nosy: +petri.lehtinen Added file: http://bugs.python.org/file22142/mmap_read_all.patch ___ Python tracker

[issue12021] mmap.read requires an argument

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Updated the patch to also update the documentation of mmap.read(). -- Added file: http://bugs.python.org/file22143/mmap_read_all_2.patch ___ Python tracker rep...@bugs.python.org http

[issue11969] Can't launch multiproccessing.Process on methods

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Your patch is good in this case, as the person who applies the patch knows which file is affected. In the future, use diff -u original_file modified_file to get a unified diff. It's the de facto format for patches. -- nosy

[issue11969] Can't launch multiproccessing.Process on methods

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Actually, I only commented on the patch format and not on the actual contents of the patch, sorry :) Your test method missed the self parameter, and the test case needed to be added to the testcases_other list for the test to be actually run

[issue12164] str.translate docstring doesn't mention that 'table' can be None

2011-05-26 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- keywords: +patch nosy: +petri.lehtinen Added file: http://bugs.python.org/file22122/str_translate_docstring.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12164

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-05-26 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12157 ___ ___ Python-bugs-list

[issue12161] StringIO AttributeError instead of ValueError after close..

2011-05-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I tested the patch on current 2.7 tip. It works and looks good to me. -- nosy: +benjamin.peterson, petri.lehtinen, pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-05-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Should the .pyc/.pyo file writing be disabled altogether if stat() and/or fstat() is not available. In this case, there's no way to check mtimes, right? -- nosy: +brett.cannon, ncoghlan, petri.lehtinen versions: +Python 3.1, Python 3.2

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: IMO it should be explained in a comment why getattr is used instead of just self._child_created. Otherwise the patch looks good and useful. -- nosy: +petri.lehtinen ___ Python tracker rep

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: STINNER Victor wrote: We can use a class attribute to set the attribute before calling __init__: True, this is clever. Will you commit? -- ___ Python tracker rep...@bugs.python.org http

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I'm not sure that it's the pythonic way to solve such problem. Can you work on a patch including a test? Yeah, getattr() might be more Pythonic indeed. How can this be tested? According to the initial report, exceptions raised in __del__

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Oleg Oshmyan wrote: Should I attempt to modify my patch to include a comment and a test? Absolutely, go ahead if it's not too much trouble. -- ___ Python tracker rep...@bugs.python.org http

[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12191 ___ ___ Python-bugs-list

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I don't think you should remove the old patch, as it's a part of the discussion. For the new patch, I'd explicitly state what can go wrong, e.g. add (e.g. invalid parameters passed to __init__) or something like that. Otherwise, looks good

[issue12174] Multiprocessing logging levels unclear

2011-05-25 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: It seems that the documentation of logging no longer gives a table with numeric values for levels (I remember seeing it before). Maybe it would be most useful to remove the table from multiprocessing documentation and state it explicitly

[issue12174] Multiprocessing logging levels unclear

2011-05-25 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The patch is in an invalid format. See http://docs.python.org/devguide/patch.html for instructions on working with patches. If you cannot/won't use Mercurial, use two separate directories for original and modified cpython source tree

[issue12174] Multiprocessing logging levels unclear

2011-05-25 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Converted the patch by JJeffries to a valid format. -- Added file: http://bugs.python.org/file22110/multiprocessing_logging_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12168] SysLogHandler incorrectly appends \000 to messages

2011-05-25 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: FWIW, I once stumbled on this problem, and solved it by making my own log handler that uses functions from the syslog module. -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http

[issue12168] SysLogHandler incorrectly appends \000 to messages

2011-05-25 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Vinay Sajip wrote: @Petri: It's great that it worked for you, but IIRC the syslog module has had thread-safety issues at least on some platforms, which is why it's not used in the SysLogHandler implementation (disclaimer: this was a while

[issue12176] Compiling Python 2.7.1 on Ubuntu 11.04 (Natty Narwhale)

2011-05-25 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Are you on a 64-bit Ubuntu? Could you attach or copy/paste the error message? -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12176

[issue12170] Bytes objects do not accept integers to many functions

2011-05-25 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12170 ___ ___ Python-bugs-list

[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-05-25 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12183 ___ ___ Python-bugs-list

[issue12182] pydoc.py integer division problem

2011-05-25 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12182 ___ ___ Python-bugs-list

[issue8796] Deprecate codecs.open(), codecs.StreamReader and codecs.StreamWriter

2011-05-24 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8796 ___ ___ Python-bugs-list

[issue11512] adding test suite for cgitb

2011-05-24 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11512 ___ ___ Python-bugs-list

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2011-05-20 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1054041 ___ ___ Python-bugs-list

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-20 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list

[issue12127] Inconsistent leading zero treatment

2011-05-19 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: There's a good rationale against supporting leading zeros in integer literals in PEP 3127: http://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax -- nosy: +petri.lehtinen versions: +Python 3.2

<    1   2   3   4   5   6   7   >