[issue12200] bdist_wininst install_script not run on uninstall

2011-05-27 Thread Mark Hammond
Changes by Mark Hammond : Added file: http://bugs.python.org/file22162/hello-install.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12200] bdist_wininst install_script not run on uninstall

2011-05-27 Thread Mark Hammond
Changes by Mark Hammond : Added file: http://bugs.python.org/file22161/hello.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue12200] bdist_wininst install_script not run on uninstall

2011-05-27 Thread Mark Hammond
New submission from Mark Hammond : Probably in all versions, but certainly in 2.7. If you create an installer with bdist_wininst and specify an install_script, that script is not run on uninstallation. See attached test case: setup.py specifies an install_script which just appends argv to %TE

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-27 Thread library.engine
library.engine added the comment: I second request for tag names not prefixed with a root namespace in python, mostly because of ugly code, as performance degradation is negligible on relatively small files. But this ubiquitous repeating (even in the case if you're appending a variable to ever

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-27 Thread Brian Curtin
Brian Curtin added the comment: It turns out DeviceIoControl/FSCTL_GET_REPARSE_POINT (in win32_read_link) will only work for us as long as the symlink was created with a full path. Starting at the top level of a source checkout, if I create `os.symlink("README", "README.lnk")` and then do `os

[issue1189811] pydoc may hide non-private doc strings.

2011-05-27 Thread Nick Coghlan
Nick Coghlan added the comment: In the time since 2.3, pydoc.visiblename() has been updated to use the correct definition of visibility. A "developer" mode that exposes internal details doesn't make sense. When you're developing something and want to see internal details, *look at the code*.

[issue12190] intern filenames in bytecode

2011-05-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay, I'll close. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pyt

[issue12190] intern filenames in bytecode

2011-05-27 Thread Mike Solomon
Mike Solomon added the comment: The in-memory fix is really the most important - the disk space was a bonus and an easy metric to gather. Unfortunately, our app won't be upgrading to python 3.x. On Fri, May 27, 2011 at 7:10 AM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment

[issue11653] Problems with some tests using -j2

2011-05-27 Thread Ned Deily
Changes by Ned Deily : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue11689] sqlite: Incorrect unit test fails to detect failure

2011-05-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ghaering ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord
Michael Foord added the comment: > it should run interactively as documented. Where is it documented that all tests will run from the IDLE prompt? I have *never* heard this claim before. I have nothing against tests supporting this, but those who want it to happen will have to do the work. -

[issue1625] bz2.BZ2File doesn't support multiple streams

2011-05-27 Thread Nadeem Vawda
Nadeem Vawda added the comment: I seem to be unable to log in to rietveld, so I'll reply here. >> result += decomp.decompress(data) > Is this efficient? I understood that other Python implementations > had poorly performing str.__iadd__, and therefore that using a list > was the common idiom (

[issue12199] Unify TryExcept and TryFinally

2011-05-27 Thread Benjamin Peterson
New submission from Benjamin Peterson : You can write them as one compound statement in Python, so there's no point in having two ast classes. -- components: Interpreter Core files: try.patch keywords: patch messages: 137097 nosy: benjamin.peterson, ncoghlan priority: normal severity: n

[issue12192] Doc that collection mutation methods return item or None

2011-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Darn, I knew there might be an exception I was overlooking ;-). Anyway, I considered the general statements to be drafts, to be rewritten after comments. As to the footnote (9) suggestion: the set and dict sections list each method separately with normal entr

[issue12106] reflect syntatic sugar in with ast

2011-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9b11cc4e2918 by Benjamin Peterson in branch 'default': reflect with statements with multiple items in the AST (closes #12106) http://hg.python.org/cpython/rev/9b11cc4e2918 -- nosy: +python-dev resolution: -> fixed stage: -> committed/reje

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Unless the doc for a module explicitly diclaims interactive mode (as does multiproccessing), it should run interactively as documented. Batch and interactive are not mutually exclusive; python -i runs a file in batch mode and switches to interactive mode. IDL

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

2011-05-27 Thread Greg Steuck
New submission from Greg Steuck : zipfile.py displays warning when trying to write files timestamped before 1980. % cat /tmp/a.py import zipfile import os z = zipfile.ZipFile('/tmp/a.zip', 'w') open("/tmp/a", "w") os.utime("/tmp/a", (0,0)) z.write("/tmp/a", "a") % python -V Python 2.6.5 % uname

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-05-27 Thread David Siroky
New submission from David Siroky : Trying to send large bulk of data in MS Windows via non-blocking SSLSocket raises an exception but part of the data is delivered. E.g. ssl_socket.write(b"a" * 20) raises ssl.SSLError: [Errno 3] _ssl.c:1126: The operation did not complete (write) There

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

2011-05-27 Thread Oleg Oshmyan
Oleg Oshmyan added the comment: I've added passing __init__ an undeclared keyword argument as an example to the comment following your suggestion. I've also reworded the comment to make it sound better to me and added a full stop. :-) -- Added file: http://bugs.python.org/file22156/_c

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

2011-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: After looking at the doc chapter, I get that 'if __name__' block is needed on Windows. OK. batch mode with if __name__ block: testmp.py - print('Top of Module') class C: def f(s): print('Method C.f') if __name__ == '__main__': print('Start of

[issue10424] better error message from argparse when positionals missing

2011-05-27 Thread Michele Orrù
Changes by Michele Orrù : Added file: http://bugs.python.org/file22155/issue10424.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6717] Some problem with recursion handling

2011-05-27 Thread Emmanuel Decitre
Emmanuel Decitre added the comment: Issue reproduceable on 3.2 (r32:88445) with drag_bug_is_nesting_events.py -- nosy: +Emmanuel.Decitre ___ Python tracker ___ __

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord
Michael Foord added the comment: > Interactive mode is an approved method of running Python code, along with > batch mode. That is not guaranteed for any particular piece of Python code in the standard library. In particular it is not amenable to test automation, so it is certainly not a re

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: > Interactive mode is an approved method of running Python code, along > with batch mode. The core interpreter and stdlib modules should run > correctly in both modes. So the entire test suite should pass in both > modes too. You are right. > That aside, the doc f

[issue10424] better error message from argparse when positionals missing

2011-05-27 Thread R. David Murray
R. David Murray added the comment: What I had in mind for the second test was something that did this (which I think is legal from reading the docs): parser.add_argument('foo') parser.add_argument('bar', nargs='?', default='eggs') with assertRaisesRegex(ArgumentParseError) as cm:

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ahem. Interactive mode is an approved method of running Python code, along with batch mode. The core interpreter and stdlib modules should run correctly in both modes. So the entire test suite should pass in both modes too. If the tests are written correctly,

[issue12191] Add shutil.chown to allow to use user and group name (and not only uid/gid)

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: As a general rule, rewrapping is not done in patches, it can make review less easy. The committer can do it, sometimes in a second commit. I commented on the review page. -- nosy: +eric.araujo title: Shutil - add chown() in order to allow to use user an

[issue12192] Doc that collection mutation methods return item or None

2011-05-27 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Comment: This rule applies to special methods like __getitem__ > and __setitem__. 'lis.append(item)' is equivalent to > lis.__setitem__(len(lis):len(lis), item), so it should not be so > surprising that it has the same return. It's not true for all special

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread R. David Murray
R. David Murray added the comment: Not in email5. The RFC says that if the charset parameter isn't known you just pass it through. In email6 we will be making a more careful distinction between errors that should be passed silently per the RFC, and ones that should be noisy because the API

[issue12196] add pipe2() to the os module

2011-05-27 Thread Charles-François Natali
Charles-François Natali added the comment: > +# A constant likely larger than the underlying OS pipe buffer size. > +# Windows limit seems to be around 512B, and most Unix kernels have a 64K > pipe > +# buffer size: take 1MB to be sure. > +PIPE_MAX_SIZE = 1024 * 1024 > > Hum, I am not sure that

[issue12042] What's New multiprocessing example error

2011-05-27 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file22141/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue10424] better error message from argparse when positionals missing

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: FYI, you can upload versions of the same patch with the same name and remove old versions. The code review tool will remember versions, and it’s easier for human if there’s only one patch. -- versions: +Python 3.3 -Python 3.2 __

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

2011-05-27 Thread R. David Murray
R. David Murray added the comment: REPL is the Python interactive prompt in this case (REPL is Read Eval Print Loop). So Jesse is saying that using multiprocessing from the REPL (at least on Windows) isn't supported. This is because on Windows multiprocessing needs to re-import the main pro

[issue12196] add pipe2() to the os module

2011-05-27 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file22154/posix_pipe2.diff ___ Python tracker ___ ___ Python-bugs-list

[issue12196] add pipe2() to the os module

2011-05-27 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file22152/posix_pipe2.diff ___ Python tracker ___ ___ Python-bugs-li

[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, May 27, 2011 at 12:23 PM, Éric Araujo wrote: > .. I’ll add tests and see if I can reproduce what you’re hinting at (it would > be helpful > if you could give examples of invalid names: full dotted names, method names, > class names?). I did not

[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: > Since *parts* is a list, the above can be replaced with simply "if parts:" Heh, I always use implied truth values and one disagreed with Tarek about this, but here if felt more natural to spell out my mind with an explicit > 0 comparison :) > Also, it seems t

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord
Michael Foord added the comment: Unless Terry wants to contribute a fix I suggest closing this. -- ___ Python tracker ___ ___ Python-

[issue11610] Improving property to accept abstract methods

2011-05-27 Thread Darren Dale
Darren Dale added the comment: Thank you for the suggestion. I will follow up at python-dev, but it will probably be a few weeks before I have time to do a proper job of it. -- ___ Python tracker

[issue1625] bz2.BZ2File doesn't support multiple streams

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: I made a few comments and asked two questions on the review page. (I should have said so here.) -- nosy: +eric.araujo ___ Python tracker ___

[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch looks good. A nit-pick: +if len(parts) > 0: Since *parts* is a list, the above can be replaced with simply "if parts:". Also, it seems to me that the new code may produce an AttributeError when given invalid name, but locate() functi

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: > email (silently) failed to encode a string Is this silent error another bug to fix? -- ___ Python tracker ___ __

[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: Oh, sigwait() doesn't accept a timeout! I would be nice to have also sigwaitinfo().. and maybe also its friend, sigwaitinfo() (if we implement the former, it's trivial to implement the latter). Python 3.3 adds optional timeout to subprocess.wait(), subpro

[issue12196] add pipe2() to the os module

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: +# A constant likely larger than the underlying OS pipe buffer size. +# Windows limit seems to be around 512B, and most Unix kernels have a 64K pipe +# buffer size: take 1MB to be sure. +PIPE_MAX_SIZE = 1024 * 1024 Hum, I am not sure that the comment is correct

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread Michele Orrù
Changes by Michele Orrù : Added file: http://bugs.python.org/file22153/issue8898_3.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: I think I’d better leave this one to Terry or Raymond. -- ___ Python tracker ___ ___ Python-bugs-list

[issue12196] add pipe2() to the os module

2011-05-27 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file22152/posix_pipe2.diff ___ Python tracker ___ ___ Python-bugs-list

[issue12196] add pipe2() to the os module

2011-05-27 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file22147/posix_pipe2.diff ___ Python tracker ___ ___ Python-bugs-li

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: I don’t know if we should go out of our way to support running tests in interactive mode. Running them from regrtest is the recommended way. -- title: Test_argparse failure but only in interactive mode -> test_argparse failure in interactive mode _

[issue12196] add pipe2() to the os module

2011-05-27 Thread Charles-François Natali
Charles-François Natali added the comment: > Do you want to call the function with two arguments or one tuple with 2 > items? You may test both :-) The former. Fixed. > Hum, I'm not sure that it's revelant to test the time I didn't like it either, I just reused what's done in test_socket. Fi

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

2011-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Jesse, I do not understand your comment, including 'REPL' -- components: +Windows versions: +Python 3.2 -Python 3.4 ___ Python tracker ___

[issue12019] Dead or buggy code in importlib.test.__main__

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: I read again the part of the PEP about __file__ and decided the code is a dead branch, so I removed it. -- keywords: +needs review, patch stage: -> commit review Added file: http://bugs.python.org/file22150/dead-code-importlib-test-main-3.3.diff __

[issue8887] “pydoc str” works but not “pydoc str.translate”

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: Turns out the fix is very simple. Please review. -- keywords: +needs review, patch nosy: +ysj.ray stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.3 Added file: http://bugs.python.org/file22149/fix-pydoc-str.translate-3.1.diff

[issue12042] What's New multiprocessing example error

2011-05-27 Thread Jordan Stadler
Jordan Stadler added the comment: Alright, thanks for the clarification, that's pretty much how I thought it worked. Patches supplied should be good then. -- ___ Python tracker ___

[issue10449] “os.environ was modified by test_httpservers”

2011-05-27 Thread Éric Araujo
Éric Araujo added the comment: Stealing two lines from 3.2 fixes this. See attached patch. -- keywords: +patch stage: needs patch -> commit review Added file: http://bugs.python.org/file22148/fix-environ-test_httpservers-3.1.diff ___ Python tracker

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

2011-05-27 Thread Ram Rachum
Ram Rachum added the comment: Thanks for the `-u` tip and the correction to the code, Petri. I removed my previous files since yours is the definite one. And yeah, it's a Windows issue. -- ___ Python tracker

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread R. David Murray
R. David Murray added the comment: The second line in that try: block should have been: mime_name = ALIASES.get(python_name, python_name) -- ___ Python tracker ___ ___

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

2011-05-27 Thread Ram Rachum
Changes by Ram Rachum : Removed file: http://bugs.python.org/file22027/test.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

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

2011-05-27 Thread Ram Rachum
Changes by Ram Rachum : Removed file: http://bugs.python.org/file22144/patch.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

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

2011-05-27 Thread Josh Triplett
Josh Triplett added the comment: GRUB's filesystem drivers don't support reading mtime. And no, no form of stat() function exists, f or otherwise. On a related note, without HAVE_STAT, import.c can't import package modules at all, since it uses stat to check in advance for a directory. In t

[issue12194] Fix LDFLAGS on Ubuntu 11.04+

2011-05-27 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> duplicate status: open -> closed superseder: -> Building Python on multiarch Debian and Ubuntu ___ Python tracker ___ ___

[issue8796] Deprecate codecs.open()

2011-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d2ddd86b531 by Victor Stinner in branch 'default': Revert my commit 3555cf6f9c98: "Issue #8796: codecs.open() calls the builtin http://hg.python.org/cpython/rev/4d2ddd86b531 -- ___ Python tracker

[issue12196] add pipe2() to the os module

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: +self.assertRaises(TypeError, os.pipe2, (0, 0)) Do you want to call the function with two arguments or one tuple with 2 items? You may test both :-) +# try a write big enough to fill-up the pipe (64K on most kernels): this +# should p

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread R. David Murray
R. David Murray added the comment: Prompted on IRC, I see I missed the file because it was so short. This still isn't what I'm looking for. We are assuming that email is going to use the codec eventually so that it is not a bad thing to have charset pre-populate the codec cache. So what I'm

[issue11610] Improving property to accept abstract methods

2011-05-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: FWIW, if you still want to advance this, you could bring it up on Python-dev. I still feel uncomfortable with the API but could be convinced with others thought it was the best solution. -- ___ Python tracker <

[issue12196] add pipe2() to the os module

2011-05-27 Thread Charles-François Natali
New submission from Charles-François Natali : pipe2() makes it possible to create a pipe O_CLOEXEC or O_NONBLOCK atomically, which can be quite useful, especially in multi-threaded code. It would be nice to expose it in the os module. Patch attached. -- components: Library (Lib) files:

[issue12190] intern filenames in bytecode

2011-05-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: As you can see, I've implemented a similar solution in 3.3. It should have the same memory savings but not disk space saving. (This would require reintroducing the marshal feature for interned strings.) -- ___ P

[issue12190] intern filenames in bytecode

2011-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27359a4e0f8c by Benjamin Peterson in branch 'default': try to use the same str object for all code filenames when compiling or unmarshalling (#12190) http://hg.python.org/cpython/rev/27359a4e0f8c -- nosy: +python-dev _

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread R. David Murray
R. David Murray added the comment: Your new file isn't in the patch. I'm imagining it is a table and a couple methods, so I think perhaps putting it either in charset or in utils would be better than creating a new file. As for testing it, what I'd love to see is a test that downloads the cu

[issue12195] Little documentation of annotations

2011-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: We could beef this up a little bit, but it was intentional that we leave it completely open on how to use it. -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Michele Orrù wrote: > > Michele Orrù added the comment: > > Any idea about how to unittest mime.aliases? Test the APIs you probably created for accessing it. > Also, since I've just created a new file, are there some buracratic issues? I > mean, do I h

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-27 Thread Michele Orrù
Michele Orrù added the comment: Any idea about how to unittest mime.aliases? Also, since I've just created a new file, are there some buracratic issues? I mean, do I have to add something at the top of the file? (I'm just signing the Contributor Agreement) -- Added file: http://bugs.p

[issue12195] Little documentation of annotations

2011-05-27 Thread JJeffries
New submission from JJeffries : There are very few pages relating to annotations in the documentation. Making it very unclear how they work and what they could be used for other than the original PEP. -- assignee: docs@python components: Documentation messages: 137047 nosy: JJeffries,

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

2011-05-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

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

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen 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. I attached a co

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

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen 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: +petri.lehtinen ___

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

2011-05-27 Thread Ram Rachum
Ram Rachum added the comment: Diff attached, is it good? I'm not very experienced with diffs, I usually work with pull requests. -- keywords: +patch Added file: http://bugs.python.org/file22144/patch.diff ___ Python tracker

[issue12021] mmap.read requires an argument

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen 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 ___

[issue12021] mmap.read requires an argument

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen 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

[issue12192] Doc that collection mutation methods return item or None

2011-05-27 Thread Ezio Melotti
Ezio Melotti added the comment: I find this wording a little confusing: "For lists, sets, and dicts, methods that change the contents or order never return the instance. Instead, they return an item from the instance or, more commonly, None.". I would suggest to drop the second part because we

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: If there are only two versions of the structure on all operating systems, we can add a check in configure (e.g. test the size of the ident attribute, =int or >=void*?) to define a macro (e.g. HAVE_OPENBSD_KEVENT_STRUCT). You might be able to change the type o

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-27 Thread Nicholas Marriott
Nicholas Marriott added the comment: Well "they do it that way" is not a justification that necessarily works for OpenBSD :-). I'll see if I can come up with a diff to fix this in Python. Not this weekend though, maybe next week. Unless Remi do you want to have a go? --

[issue12006] strptime should implement %V or %u directive from libc

2011-05-27 Thread Erik Cederstrand
Erik Cederstrand added the comment: Reading you comment again, I see the ambiguity now, if %Y is interpreted as "The resulting date MUST be in 2001". I think the safest way would be to implement %G and fail if %Y is used in combination with %V. Maybe even fail if %V and %u aren't used in comb

[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 and Python 2.7 succeed

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: The bug is specific to compile(), the import machinery supports Windows newlines on Linux for example. marge$ python2.6 Type "help", "copyright", "credits" or "license" for more information. >>> code=open("win.py", "rb").read() >>> exec compile(code, "win.py",

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-27 Thread Charles-François Natali
Charles-François Natali added the comment: Concerning the differences between platforms, as noted, FreeBSD, NetBSD and OS-X are all consistent and I don't think it'll change tomorrow, so for now it's not a problem. Arbitrarily changing such structures definition - event though they're not sta

[issue12193] Argparse does not work together with gettext and non-ASCII help text

2011-05-27 Thread Thorsten Kampe
Thorsten Kampe added the comment: "LANG=de_De" - should've been "LANG=de_DE". Sorry for wasting someone's time. I shouldn't write bug reports in the middle of the night. Sorry and thanks, Thorsten -- resolution: -> invalid status: open -> closed _

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-27 Thread Nicholas Marriott
Nicholas Marriott added the comment: Not that I'm unsympathetic but this is really only a concern if you depend on the internal structure layout and I think if you do that, you need to take account of differences between platforms. We don't guarantee we aren't going to change the struct betwe

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-27 Thread Nicholas Marriott
Nicholas Marriott added the comment: Hi The second one is correct - OpenBSD -current has this in event.h: struct kevent { u_int ident; /* identifier for this event */ short filter; /* filter for event */ u_short flags;

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-27 Thread Charles-François Natali
Charles-François Natali added the comment: Hello Nicholas, > kqueue is not standardized. You're probably right, but depending on the version of your manpages, the definition changes: http://www.openbsd.org/cgi-bin/man.cgi?query=kevent&apropos=0&sektion=0&manpath=OpenBSD+3.8&arch=i386&format=

[issue8796] Deprecate codecs.open()

2011-05-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Roundup Robot wrote: > > Roundup Robot added the comment: > > New changeset 3555cf6f9c98 by Victor Stinner in branch 'default': > Issue #8796: codecs.open() calls the builtin open() function instead of using > http://hg.python.org/cpython/rev/3555cf6f9c98

[issue12006] strptime should implement %V or %u directive from libc

2011-05-27 Thread Erik Cederstrand
Erik Cederstrand added the comment: I respectfully disagree. I take strptime('2002 01 1', '%Y %V %u') as mening "first day of first week in the year 2002" There is only one date that corresponds to the first day of the first week of 2002, i.e. Dec. 31, 2001. If you specify the first day of th

[issue12192] Doc that collection mutation methods return item or None

2011-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 on the doc suggestions -1 on any hope that casual users will have read or remembered them. ISTM that a common theme among the post of people getting tripped-up by this is that they aren't doing more than a quick skim of the docs anyway. -- nos

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

2011-05-27 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2011-05-27 Thread Petri Lehtinen
Petri Lehtinen 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 the input to be able to