[issue7634] next/previous links in documentation skip some sections

2010-01-04 Thread Ezio Melotti
Ezio Melotti added the comment: I think the purpose of the 'next' and 'previous' is to move to the next/previous page (i.e. file) and not another section in the same page. If you read a page till the end and then you press 'next' you probably want to go to the next page, not to next section t

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15741/issue7622_test_splitlines.diff ___ Python tracker ___ ___ Python-bu

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Added file: http://bugs.python.org/file15744/issue7622_test_splitlines.diff ___ Python tracker ___ ___ Python-bugs

[issue7638] Counterintuitive str.splitlines() inconsistency.

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: IMHO this code will do the trick: while not request_buffer.endswith(('\r', '\n')): request_buffer += self.conn.recv(1024) print("Got a line!") print("Got an empty line!") self.handleRequest(request_buffer) -- nosy: +flox

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-04 Thread Nir Aides
Nir Aides added the comment: > Thank you. Are you sure the "Shortcut common case" in readline() > is useful? BufferedIOBase.readline() in itself should be rather fast. On my dataset the shortcut speeds up readline() 400% on top of the default C implementation. I can take a look to why the C

[issue7636] Add a set update action to optparse

2010-01-04 Thread Brian Curtin
Brian Curtin added the comment: The name should probably be "add" rather than "update", sticking with the name of the action being done on the underlying set (as update takes an iterable). Agree/disagree? I need to add tests and docs to the patch I wrote up - I'll put it up here tomorrow. -

[issue7638] Counterintuitive str.splitlines() inconsistency.

2010-01-04 Thread David
David added the comment: Thank you for the clarification, David. I thought that it might have been a calculated decision beyond my understanding, and I can rest easy knowing that this behavior isn't accidental. I was thinking that I might have to do something like a regular expression, and I

[issue7638] Counterintuitive str.splitlines() inconsistency.

2010-01-04 Thread R. David Murray
R. David Murray added the comment: No apologies needed, but you probably aren't going to like the answer :) First of all, a change like you propose would be unlikely to be accepted since it would create considerable backward-compatibility pain. That aside, however, splitlines and split are no

[issue1495229] W3C <-> Python DOM type mapping docs need updating

2010-01-04 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: I presume you're referring to the documentation for the xml.dom package (as found at http://docs.python.org/library/xml.dom.html#type-mapping) rather than the Python <--> OMG IDL mapping (the link for which appears to have gone stale). I'd support the chang

[issue7638] Counterintuitive str.splitlines() inconsistency.

2010-01-04 Thread David
David added the comment: I typoed when copying my second snippet. while request_buffer.splitlines[-1] != "" or request_buffer == "": It should be: while request_buffer.splitlines()[-1] != "" or request_buffer == "": This code has the problem that I'm complaining of. I only failed at copyin

[issue7638] Counterintuitive str.splitlines() inconsistency.

2010-01-04 Thread David
New submission from David : Qualifier: This is the first issue that I've raised, so I apologise before-hand for any protocol flubs. str.splitlines()'s implementation jives unexpectedly with str.split(). In this code snippet, a server buffers input until it receives a blank line, and then it p

[issue7637] Improve 19.5. xml.dom.minidom doc

2010-01-04 Thread Terry J. Reedy
New submission from Terry J. Reedy : 1. "When you are finished with a DOM, you should clean it up. This is necessary because some versions of Python do not support garbage collection of objects that refer to each other in a cycle. Until this restriction is removed from all versions of Python,

[issue7319] Silence DeprecationWarning by default

2010-01-04 Thread Brian Curtin
Brian Curtin added the comment: warnings_rst_reword.diff proposes slightly different wording on the "Updating Code..." section of documentation. -- nosy: +brian.curtin Added file: http://bugs.python.org/file15743/warnings_rst_reword.diff ___ Python

[issue7636] Add a set update action to optparse

2010-01-04 Thread steven Michalske
New submission from steven Michalske : As a complement to the append action, an update action would update a set with new values. "update" update a set with this option’s argument justification: adding email addresses at the command line, makes it less code to have a unique list. --

[issue1495229] W3C <-> Python DOM type mapping docs need updating

2010-01-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'IntType' refers to the 2.x alias types.IntType for int. Such aliases were removed in the 3.x types module, so 'IntType' is a meaningless term in 3.x docs and should be changed to 'int' therein. If the Python type for IDL boolean cannot be changed to 'bool', t

[issue7635] 19.6 xml.dom.pulldom doc: stub?

2010-01-04 Thread Terry J. Reedy
New submission from Terry J. Reedy : The short doc for 19.6. xml.dom.pulldom has lots of ...s that appear to indicate missing text. If so, this issue is a flag for a future project for someone who knows what to fill in. If nothing is missing and the section is intended to be understood in its

[issue7634] next/previous links in documentation skip some sections

2010-01-04 Thread Gabriel Genellina
New submission from Gabriel Genellina : The next/previous links in the documentation skip some sections. This happens both in HTML format and the CHM Windows help file. e.g.: in the Library Reference, section "8.5 StringIO" [next] points to "8.7 textwrap", skipping section "8.6 cStringIO". And

[issue6071] no longer possible to hash arrays

2010-01-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: Done in r77313. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue7615] unicode_escape codec does not escape quotes

2010-01-04 Thread Richard Hansen
Richard Hansen added the comment: I thought about raw_unicode_escape more, and there's a way to escape quotes: use unicode escape sequences (e.g., ur'\u0027'). I've attached a new patch that does the following: * backslash-escapes single quotes when encoding with the unicode_escape codec

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also, I'm not sure what happens in readline() in universal mode when the chunk ends with a '\r' and there's a '\n' in the following chunk (see the "ugly check" that your patch removes). Is there a test for that? -- _

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I updated the patch. This time universal newlines are supported. Thank you. Are you sure the "Shortcut common case" in readline() is useful? BufferedIOBase.readline() in itself should be rather fast. -- ___ Python

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Both patches have been committed in r77310. -- stage: commit review -> committed/rejected status: open -> pending ___ Python tracker ___ ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good, thank you. -- resolution: -> accepted stage: -> commit review ___ Python tracker ___ _

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: The test case for the previous issue. -- Added file: http://bugs.python.org/file15741/issue7622_test_splitlines.diff ___ Python tracker ___ ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: I learned something. -- Added file: http://bugs.python.org/file15740/issue7092_lib_many_fixes_v3.diff ___ Python tracker ___ __

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15738/issue7092_lib_many_fixes_v2.diff ___ Python tracker ___ ___ Python-

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-04 Thread Nir Aides
Nir Aides added the comment: Right, I was reading the 3.1 docs by mistake. I updated the patch. This time universal newlines are supported. On my dataset (75MB 650K lines log file) the readline() speedup is x40 for 'r' mode and x8 for 'rU' mode, and you can get an extra bump by using the io m

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: One thing: "lambda k: k in selfdata" can be replaced with "selfdata.__contains__". It may have better performance characteristics too. -- ___ Python tracker ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15629/issue7092_pprint.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15627/issue7092_lib_many_fixes.diff ___ Python tracker ___ ___ Python-bug

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: Updated "lib_many_fixes" patch: * added filterwarning for pprint * added fixes for Lib/sunau.py and Lib/unittest/case.py Ready for review and merge: * issue7092_lib_many_fixes_v2.diff * issue7092_compiler.diff -- Added file: http://bugs.python.org

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15735/stringlib_split_replace_v4.diff ___ Python tracker ___ ___ Python-b

[issue7319] Silence DeprecationWarning by default

2010-01-04 Thread Ezio Melotti
Ezio Melotti added the comment: The second paragraph ("There is also the issue...") is IMO redundant, especially the third sentence ("But because Python is an interpreted language..."). -- nosy: +ezio.melotti ___ Python tracker

[issue7632] dtoa.c: oversize b in quorem

2010-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: The bug is present in the current version of dtoa.c from http://www.netlib.org/fp, so I'll report it upstream. As far as I can tell, though, it's benign, in the sense that if the check is disabled then nothing bad happens, and the correct result is eventuall

[issue3340] optparse print_usage(),.. methods are not documented

2010-01-04 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r77306 (trunk), r77307 (release26-maint), r77308 (py3k) and r77309 (release31-maint). -- assignee: georg.brandl -> ezio.melotti nosy: +ezio.melotti priority: -> normal resolution: -> fixed stage: -> committed/rejected status: open -> closed v

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: Fixed a problem with the splitlines optimization: use PyList_Append instead of PyList_SET_ITEM because there's no preallocated list in this case. -- Added file: http://bugs.python.org/file15737/stringlib_split_replace_v4b.diff ___

[issue6071] no longer possible to hash arrays

2010-01-04 Thread Ezio Melotti
Ezio Melotti added the comment: Even if it's fixed a patch with tests should be submitted before closing this issue. -- nosy: +ezio.melotti priority: deferred blocker -> normal stage: needs patch -> test needed ___ Python tracker

[issue7631] undefined label: bltin-file-objects

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in r77300. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-b

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: In issue7092_lib_many_fixes.diff: why did you change some of the warning messages? In issue7092_pprint.diff: I'm not sure these changes are right, because they could modify existing behaviour. Raymond, what do you think? -- nosy: +rhettinger ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: deferred blocker -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Eric Smith wrote: > > > > Eric Smith added the comment: > > > > I think we should use whatever style is currently being used in the code. > > If we want to go back through this code (or any other code) and PEP7-ify > > it, that should be a separate task

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Eric Smith
Eric Smith added the comment: I think we should use whatever style is currently being used in the code. If we want to go back through this code (or any other code) and PEP7-ify it, that should be a separate task. Alternately, we could PEP7-ify it first, then apply these changes. --

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Florent Xicluna wrote: > > > > Florent Xicluna added the comment: > > >> >> * function declarations should not put parameters on new lines: >> >> >> >> +stringlib_splitlines( >> >> +PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, >

[issue7319] Silence DeprecationWarning by default

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just FYI, there are tabs in your spaces in _warnings.c. -- nosy: +pitrou ___ Python tracker ___ ___

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think you should remove such blocks: -/* - Local variables: - c-basic-offset: 4 - indent-tabs-mode: nil - End: -*/ There probably are people relying on them :-) -- ___ Python tracker

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: And now, the figures. There's no gain for the string methods. Some unicode methods are faster: split/rsplit/replace: Most significant results: --- bench_slow.log Trunk +++ bench_fast.log Patched string unicode (ms) (ms)comment == late m

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15734/stringlib_split_replace_v3c.diff ___ Python tracker ___ ___ Python-

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: Patch updated: * coding style * added macros BLOOM_ADD to unicodeobject.c and fastsearch.h (and removed LONG_BITMASK) -- Added file: http://bugs.python.org/file15735/stringlib_split_replace_v4.diff ___ Python t

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I copied the style of "stringlib/partition.h" for this part. > Should I update style of "partition.h" too? No, it's ok for stringlib to have its own consistent style and there's no reason to change it IMO. More interesting would be benchmark results showing

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: > * function declarations should not put parameters on new lines: > > +stringlib_splitlines( > +PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, > +int keepends > +) > +{ I copied the style of "stringlib/partition.h" for this

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: > A few comments on coding style: Thank you for your remarks. I will update the patch accordingly. > * make sure that the name of a symbol matches the value, e.g. > > #define LONG_BITMASK (LONG_BIT-1) > #define BLOOM(mask, ch) ((mask & (1 << ((ch) & LONG_

[issue7632] dtoa.c: oversize b in quorem

2010-01-04 Thread Eric Smith
Eric Smith added the comment: I'm testing on a Fedora Core 6 i386 box and an Intel Mac 32-bit 10.5 box. I only see this on debug builds. I've tested trunk, py3k, release31-maint, and release26-maint (just for giggles). The error shows up in debug builds of trunk, py3k, and release31-maint on

[issue7632] dtoa.c: oversize b in quorem

2010-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: I can reproduce this on OS X 10.6 (64-bit), both in py3k and trunk debug builds. In non-debug builds it appears to return the correct result (0.0), so the oversize b appears to have no ill effects. So this may just be an overeager assert; it may be a sympt

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: A few comments on coding style: * please keep the existing argument formats as they are, e.g. count = countstring(self_s, self_len, from_s, from_len, 0, self_len, FORWARD, maxcount); or /* helper

[issue7633] decimal.py: type conversion in context methods

2010-01-04 Thread Stefan Krah
New submission from Stefan Krah : I think that context methods should convert arguments regardless of position: Python 2.7a0 (trunk:76132M, Nov 6 2009, 15:20:35) [GCC 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-23ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more infor

[issue7632] dtoa.c: oversize b in quorem

2010-01-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- components: +Interpreter Core stage: -> needs patch type: -> crash ___ Python tracker ___ ___ Python-b

[issue7632] dtoa.c: oversize b in quorem

2010-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: Nice catch! I'll take a look. We should find out whether this is something that happens with Gay's original code, or whether it was introduced in the process of adapting that code for Python. -- assignee: -> mark.dickinson priority: -> critical ve

[issue7632] dtoa.c: oversize b in quorem

2010-01-04 Thread Stefan Krah
New submission from Stefan Krah : In a debug build: Python 3.2a0 (py3k:76671M, Dec 22 2009, 19:41:08) [GCC 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-23ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> s = "2183167012312112312312.23538020374420446192e

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15732/stringlib_split_replace_v3b.diff ___ Python tracker ___ ___ Python-

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: Refleak fixed in PyUnicode_Splitlines. -- stage: -> patch review Added file: http://bugs.python.org/file15734/stringlib_split_replace_v3c.diff ___ Python tracker

[issue3745] _sha256 et al. encode to UTF-8 by default

2010-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Gregory P. Smith wrote: > > Gregory P. Smith added the comment: > > In order to get a -3 PyErr_WarnPy3k warning for unicode being passed to > hashlib objects (a nice idea) I suggest creating an additonal 's*' like thing > ('s3' perhaps?) in Python/getar

[issue3745] _sha256 et al. encode to UTF-8 by default

2010-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Gregory P. Smith wrote: > > Gregory P. Smith added the comment: > > trunk r77252 switches python 2.7 to use 's*' for argument parsing. unicodes > can be hashed (encoded to the system default encoding by s*) again. > > This change has been blocked from

[issue7631] undefined label: bltin-file-objects

2010-01-04 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: georg.brandl -> pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue7631] undefined label: bltin-file-objects

2010-01-04 Thread Ezio Melotti
New submission from Ezio Melotti : ~/dev/py3k-wide/Doc$ make html [...] /home/wolf/dev/py3k-wide/Doc/library/filesys.rst:30: WARNING: undefined label: bltin-file-objects -- if you don't give a link caption the label must precede a section header.

[issue7462] Implement fastsearch algorithm for rfind/rindex

2010-01-04 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7462] Implement fastsearch algorithm for rfind/rindex

2010-01-04 Thread Fredrik Lundh
Fredrik Lundh added the comment: Thanks Florent! > Are there any simple, common cases that are made slower by this patch? The original fastsearch implementation has a couple of special cases to make sure it's faster than the original code in all cases. The reason it wasn't implemented for

[issue7630] Strange behaviour of decimal.Decimal

2010-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: It might also help to note that, with decimal, what you see (from repr() of a Decimal instance) is *exactly* what you get. So when you see >>> dec Decimal('1.797693134862315907729305191E+308') that number really is exactly what's stored in dec: there are no

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-01-04 Thread Daniel
Daniel added the comment: Thanks for your response! I'm back after holidays :) Yappy new year everybody!!! Conserning our problem: .../... adding base module named weakref running build running build_py running build_ext Traceback (most recent call last): File "setup.py", line 240, in l

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: There's some reference leaking somewhere... Will investigate. ~ $ ./python Lib/test/regrtest.py -R 2:3: test_unicode test_unicode leaked [7, 7, 7] references, sum=21 -- ___ Python tracker

[issue7630] Strange behaviour of decimal.Decimal

2010-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: You don't say what behaviour you were expecting! :) By design, almost all Decimal operations (but not creation of a Decimal from an integer or string) round to the precision given by the current context. By default that precision is 28 significant digits.

[issue7625] bytearray needs more tests for "b.some_method()[0] is not b"

2010-01-04 Thread Florent Xicluna
Florent Xicluna added the comment: Patch for some additional test cases attached. The bug "b.partition('.')[0] is b" is fixed with the patch proposed on issue7622. -- keywords: +patch Added file: http://bugs.python.org/file15733/issue7625_tests.diff __