[issue1579] logging documentation is unclear

2008-03-29 Thread Vinay Sajip
Vinay Sajip [EMAIL PROTECTED] added the comment: I don't believe that the logging documentation is particularly unclear, though of course it could always be improved, like most other documentation ;-) It certainly does not rely on prior experience of log4j; though some of the concepts are

[issue2504] Add gettext.pgettext() and variants support

2008-03-29 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Would you like to work on a patch? -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2504 __ ___

[issue2503] Replace == None/True/False with is

2008-03-29 Thread Wummel
Wummel [EMAIL PROTECTED] added the comment: Here is an updated patch, using is False to be consistent, and also replacing the != occurences. Added file: http://bugs.python.org/file9886/0001-Replace-None-True-False-with-is.patch __ Tracker [EMAIL PROTECTED]

[issue2503] Replace == None/True/False with is

2008-03-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: This patch is fine. Before applying, check the code in PyShell to see if the if response is False line can be simplified to if not response. -- nosy: +rhettinger resolution: - accepted __ Tracker

[issue2503] Replace == None/True/False with is

2008-03-29 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Benjamin, do you want to apply this? Add a Misc/NEWS item as well. -- assignee: - benjamin.peterson nosy: +benjamin.peterson __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2503

[issue2502] Add enum() example for named tuples

2008-03-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Thanks for asking. This should not go into the collections module. The concept makes more sense in statically compiled languages. In Python, we typically write something like RED, ORANGE, YELLOW = range (3) at the module level. That is

[issue2503] Replace == None/True/False with is

2008-03-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Don't think changes like this warrant a NEWS entry. It's a code clean- up, not a semantic change. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2503 __

[issue2505] Restrict attributes of _ast nodes

2008-03-29 Thread Georg Brandl
New submission from Georg Brandl [EMAIL PROTECTED]: This patch adds two things to the _ast module: * Nodes can be initialized with keyword arguments: m = _ast.Module(body=[...]) * Only attributes that are in _fields or _attributes can be set on nodes. Martin, what do you think? --

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Ned Batchelder
New submission from Ned Batchelder [EMAIL PROTECTED]: When tracing line execution with sys.settrace, a particular code structure fails to report an executed line. The line is a continue statement after an if condition in which the if condition is true every time it is executed. Attached is a

[issue2505] Restrict attributes of _ast nodes

2008-03-29 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: On second thought, restricting node attributes may prevent custom AST processing tools from adding useful information themselves... __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2505

[issue2152] make sqlite.Row hashable correctly

2008-03-29 Thread Gerhard Häring
Gerhard Häring [EMAIL PROTECTED] added the comment: Thomas, could you do me a favour and create a patch for Python 3.0, too? It seems that only tp_richcompare is supported there. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2152

[issue1579] logging documentation is unclear

2008-03-29 Thread Kylotan
Kylotan [EMAIL PROTECTED] added the comment: I think I gave some pretty clear details in my original submission. A better example on the front page is needed rather than one that could be confused with output methods. The example in 14.5.3 needs to not be one big code dump with no explanation

[issue2078] CSV Sniffer does not function properly on single column .csv files

2008-03-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: It works entirely based on chracter frequencies. Does it make sense to restrict delimiters to a reasonable set of characters? Usual punctuations, spaces, tabs... what else? -- nosy: +amaury.forgeotdarc

[issue2507] Exception state lives too long in 3.0

2008-03-29 Thread Antoine Pitrou
New submission from Antoine Pitrou [EMAIL PROTECTED]: See http://mail.python.org/pipermail/python-3000/2008-March/012830.html : the exception state can survive across thread switches if the enclosing frame is not destroyed immediately. -- components: Interpreter Core messages: 64697

[issue2507] Exception state lives too long in 3.0

2008-03-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: And this is a patch, together with a test. -- keywords: +patch Added file: http://bugs.python.org/file9889/exc_cleanup.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2507

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: This is because of a peephole optimization of the generated bytecode: a jump instruction which target is another jump instruction can be modified modified to target the final location. You gain a few opcodes, but tracing is confusing...

[issue2505] Restrict attributes of _ast nodes

2008-03-29 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: On second thought, restricting node attributes may prevent custom AST processing tools from adding useful information themselves... Indeed. If anything is to be checked, it should be whether the child nodes or attributes have the right

[issue2078] CSV Sniffer does not function properly on single column .csv files

2008-03-29 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: It works entirely based on chracter frequencies. Amaury Does it make sense to restrict delimiters to a reasonable set of Amaury characters? Usual punctuations, spaces, tabs... what else? There is an optional delimiters argument to

[issue2503] Replace == None/True/False with is

2008-03-29 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Patch was committed in r62043. Wummel, thanks for the patch! Georg, thanks for the practice. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2503

[issue2508] When you create a file using file(path, w) if the filename is illegal it throws an irrelevant error message

2008-03-29 Thread kobi
Changes by kobi [EMAIL PROTECTED]: -- nosy: kobipe3 severity: normal status: open title: When you create a file using file(path, w) if the filename is illegal it throws an irrelevant error message type: resource usage versions: Python 2.5 __ Tracker

[issue2508] When you create a file using file(path, w) if the filename is illegal it throws an irrelevant error message

2008-03-29 Thread kobi
New submission from kobi [EMAIL PROTECTED]: It throws an IOError: ... No such file or directory: %path% instead of IOError: Invalid file name. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2508 __

[issue1054434] automatic XMLRPC boxcarring via multicall for xmlrpclib

2008-03-29 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: As nobody has asked for this patch to be included, I think its probably easiest just to reject it. Thanks for offering it in the first place, though. -- resolution: - rejected status: open - closed

[issue2508] When you create a file using file(path, w) if the filename is illegal it throws an irrelevant error message

2008-03-29 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: How do you know, in a cross platform way, that the name is illegal instead that the file or directory does not exist? -- nosy: +facundobatista __ Tracker [EMAIL PROTECTED]

[issue2508] When you create a file using file(path, w) if the filename is illegal it throws an irrelevant error message

2008-03-29 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: This is not a bug in Python. The error that you get comes directly from the operating system/C library, so please complain to your system vendor. -- nosy: +loewis resolution: - wont fix status: open - closed

[issue2509] Bazaar ignore file

2008-03-29 Thread Benjamin Peterson
New submission from Benjamin Peterson [EMAIL PROTECTED]: I basically copied all the svn:ignore props into this file... -- components: None files: bzr-ignore.patch keywords: easy, patch messages: 64707 nosy: barry, benjamin.peterson, georg.brandl severity: normal status: open title:

[issue2510] Bazaar ignore file

2008-03-29 Thread Benjamin Peterson
New submission from Benjamin Peterson [EMAIL PROTECTED]: I basically copied all the svn:ignore props into this file... -- components: None files: bzr-ignore.patch keywords: easy, patch messages: 64708 nosy: barry, benjamin.peterson, georg.brandl severity: normal status: open title:

[issue2509] Bazaar ignore file

2008-03-29 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- resolution: - duplicate status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2509 __ ___

[issue2510] Bazaar ignore file

2008-03-29 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I don't know if we should pollute the SVN tree with random VCS stuff. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2510 __

[issue2510] Bazaar ignore file

2008-03-29 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven [EMAIL PROTECTED] added the comment: Given how Bazaar is not an official choice for the repository adding this kind of thing will lead to a road to add such information for Hg and other VCSes as well in order to be fair to all. -- nosy: +asmodai

[issue2507] Exception state lives too long in 3.0

2008-03-29 Thread Christian Heimes
Changes by Christian Heimes [EMAIL PROTECTED]: -- priority: - release blocker __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2507 __ ___ Python-bugs-list mailing list

[issue2510] Bazaar ignore file

2008-03-29 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: I'd like to get Barry's opinion on this, since he added the experimental Bazaar branches. I think it's reasonable as long as they're offical VCS branches. __ Tracker [EMAIL PROTECTED]

[issue2510] Bazaar ignore file

2008-03-29 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven [EMAIL PROTECTED] added the comment: But isn't that Bazaar thing totally stand-alone from the SVN repository? What experimental branches are you talking about? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2510

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: I think this is not a bug. Here is a simpler way to illustrate the issue: def f(x): for i in range(10): if x: pass continue f(True) f(False) If you run the code above under trace, you get the

[issue2511] Give AST's excepthandler proper attributes

2008-03-29 Thread Georg Brandl
New submission from Georg Brandl [EMAIL PROTECTED]: The ASDL file has an XXX comment about excepthandler's lineno and col_offset -- they are not attributes but fields which gets confusing when this is exported to Python code. I think the only way to solve this is to make it a trivial Sum with

[issue2505] Easier creation of _ast nodes

2008-03-29 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Okay, I'm dropping the attribute restriction part. Attaching new patch that allows creating nodes with fields (not attributes) as positional arguments, and setting all keyword arguments as attributes on self. -- title: Restrict

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-29 Thread Gerhard Häring
Changes by Gerhard Häring [EMAIL PROTECTED]: -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2215 __ ___ Python-bugs-list

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Ned Batchelder
Ned Batchelder [EMAIL PROTECTED] added the comment: I see that the cause of the problem is the peephole optimizer. That doesn't mean this isn't a problem. I am measuring the code coverage of a set of tests, and one of my lines is being marked as not executed. This is not the fault of the

[issue2441] Mac build_install.py script fetches unavailable SQLite version

2008-03-29 Thread Gerhard Häring
Changes by Gerhard Häring [EMAIL PROTECTED]: -- assignee: - ghaering nosy: +ghaering __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2441 __ ___ Python-bugs-list

[issue2176] Undocumented lastrowid attribute i sqlite3 cursor class

2008-03-29 Thread Gerhard Häring
Changes by Gerhard Häring [EMAIL PROTECTED]: -- assignee: georg.brandl - ghaering nosy: +ghaering __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2176 __ ___

[issue2510] Bazaar ignore file

2008-03-29 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: http://www.python.org/dev/bazaar/ __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2510 __ ___ Python-bugs-list mailing list

[issue2176] Undocumented lastrowid attribute i sqlite3 cursor class

2008-03-29 Thread Gerhard Häring
Gerhard Häring [EMAIL PROTECTED] added the comment: The lastrowid attribute is now documented in r62044. Thanks for bringing this up. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2176

[issue815646] thread unsafe file objects cause crash

2008-03-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Actually, my approach was not 100% correct, it failed in some rare cases. I've come to the conclusion that using an unlock count on the PyFileObject is the correct way to proceed. I'm now attaching a working and complete patch which protects

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: On Sat, Mar 29, 2008 at 2:51 PM, Ned Batchelder [EMAIL PROTECTED] wrote: Ned Batchelder [EMAIL PROTECTED] added the comment: I am measuring the code coverage of a set of tests, and one of my lines is being marked as not executed.

[issue2511] Give AST's excepthandler proper attributes

2008-03-29 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Sounds fine to me. -- assignee: loewis - georg.brandl resolution: - accepted __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2511 __

[issue2505] Easier creation of _ast nodes

2008-03-29 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Looks fine to me. It might be reasonable to further restrict the constructor to either 0 or len(_fields) arguments. -- assignee: loewis - georg.brandl resolution: - accepted __ Tracker [EMAIL

[issue2473] logging.LogRecord should know how to handle dict-like args

2008-03-29 Thread Vinay Sajip
Vinay Sajip [EMAIL PROTECTED] added the comment: You don't need to change the logging package for this. Simply generate a bona-fide dict from your UserDict or DictMixin subclass as follows: dict(userDict_or_mixIn_instance) and pass that into the logging call instead of

[issue815646] thread unsafe file objects cause crash

2008-03-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Ah, I had forgotten to protect the print statement as well. Here is a new patch :-) Added file: http://bugs.python.org/file9895/filethread4.patch Tracker [EMAIL PROTECTED]

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Unfortunately -O0 will be confusingly similar to -OO. On my browser, both are shown identically at the pixel level. Microsoft compilers use -Od to disable optimization... __ Tracker [EMAIL PROTECTED]

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: This has basically almost never been a problem in the real world. No need to complicate the world further by adding yet another option and the accompanying implementation-specific knowledge of why you would ever want to use it. Also,

[issue2510] Bazaar ignore file

2008-03-29 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: it should be no problem to add this to the bzr repository. this is where it belongs. -- nosy: +schmir __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2510 __

[issue2510] Bazaar ignore file

2008-03-29 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: I don't think that will work (at the moment.) The Bazaar repo is an exact copy (on a cron job) of the Subversion one, so we can't add files. Also, those using bzr-svn would miss out on the .bzrignore file. __

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Ned Batchelder
Ned Batchelder [EMAIL PROTECTED] added the comment: I recognize that this is an unusual case, but it did come up in the real world. I found this while measuring test coverage, and the continue line was marked as not executed, when it was. I don't understand when the peepholer is moved, so

[issue2510] Bazaar ignore file

2008-03-29 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Wouldn't it be the job of the synchronisation job to automatically create a .bzrignore file from the SVN ignore properties? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2510

[issue2510] Bazaar ignore file

2008-03-29 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Automation would be wonderful, but that still doesn't solve bzr-svn problem. In the future, bzr-svn should be able to deal with svn:ignore props, but it can't now. Should the Bazaar experiment fail, I'd just like to remind you that

[issue2510] Bazaar ignore file

2008-03-29 Thread Barry A. Warsaw
Barry A. Warsaw [EMAIL PROTECTED] added the comment: Personally, I think it would be fine to add one .bzrignore file at the top of the tree. I would also have no problem adding one for hg if some Mercurial fan asks for it. As you say, cleaning up afterward is a simple 'rm' away.

[issue2512] decide what to do with gettext API

2008-03-29 Thread Benjamin Peterson
New submission from Benjamin Peterson [EMAIL PROTECTED]: The gettext module currently has functions and methods beginning with u to designate functions which return unicode objects. The install function/method also has a unicode parameter. These are obviously useless in Py3k. The attached patch

[issue2512] decide what to do with gettext API

2008-03-29 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: Added file: http://bugs.python.org/file9896/gettext_api.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2512 __ ___

[issue2507] Exception state lives too long in 3.0

2008-03-29 Thread Jeffrey Yasskin
Jeffrey Yasskin [EMAIL PROTECTED] added the comment: Thanks for the patch. This isn't specific to threads at all, so the test doesn't need to spawn a thread, just raise an exception from a nested function with a parameter, catch it, delete the object the parameter referred to, and then check

[issue433030] SRE: Atomic Grouping (?...) is not supported

2008-03-29 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: I'm digging into the sre_parse.py at the moment and this I have all the changes I need for that now. The rest of the changes I believe are in either sre_compile.py or more likely directly in _sre.c, so I will examine those files next. I

[issue2507] Exception state lives too long in 3.0

2008-03-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: You are right, threads aren't needed. So, attaching an updated patch. Added file: http://bugs.python.org/file9898/exc_cleanup2.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2507

[issue1731717] race condition in subprocess module

2008-03-29 Thread Robert Siemer
Robert Siemer [EMAIL PROTECTED] added the comment: Update for my comment: python2.5.2 does not show that problem. python2.4.5 did. I repeat, 2.5.2 does not clean up processes which are still referenced, but it does clean unreferenced ones. _ Tracker [EMAIL

[issue1579] logging documentation is unclear

2008-03-29 Thread Vinay Sajip
Vinay Sajip [EMAIL PROTECTED] added the comment: In your original submission, you said: ... the front page has a rather confusing example of the named hierarchy system, which might mislead the reader by making them think it's about file types (perhaps for log output) rather than just arbitrary

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: From a quick glance: I may be wrong, but it looks like in bytesio_writelines(), you'll have some reference leaks if the `while` loop exits early because bytesio_write() returns NULL; `item` and `it` should be decred'ed before returning.

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread ajaksu
Changes by ajaksu [EMAIL PROTECTED]: -- nosy: +ajaksu2 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2506 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2275] urllib2 header capitalization

2008-03-29 Thread Senthil
Senthil [EMAIL PROTECTED] added the comment: I understand your implementation of _cap_header_key function. But should not this patch be handled in a way wherein. key.capitalize() is just replaced by key.upper()? Should not that suffice? What is the difference between _cap_header_key and

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9084/_bytesio.c __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9085/add-bytesio-setup.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9088/remove-old-stringio-test.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9089/truncate-semantic-change.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9090/io-misc-fixes.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Yes, that was a leak. It should be fixed now. Merci Antoine! Added file: http://bugs.python.org/file9899/bytesio+misc-fixes-4.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751