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

2010-01-03 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15730/stringlib_split_replace_v3.diff ___ Python tracker ___ ___ Python-b

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

2010-01-03 Thread Florent Xicluna
Florent Xicluna added the comment: added "Makefile.pre.in". -- Added file: http://bugs.python.org/file15732/stringlib_split_replace_v3b.diff ___ Python tracker ___ __

[issue6071] no longer possible to hash arrays

2010-01-03 Thread ivank
ivank added the comment: I believe this was fixed in r77252, which was fixing http://bugs.python.org/issue3745 -- ___ Python tracker ___

[issue7630] Strange behaviour of decimal.Decimal

2010-01-03 Thread parmax
New submission from parmax : >>> from decimal import Decimal >>> dec = Decimal(2 ** 1024) >>> dec Decimal('1797693134862315907729305190789024733617976978942306572734300811577326758055009631327084773224075360211201138798713933576587897688144166224928474306394741243777678934248654852763022196012460

[issue7628] round() doesn't work correctly in 3.1.1

2010-01-03 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue7628] round() doesn't work correctly in 3.1.1

2010-01-03 Thread bkovt
bkovt added the comment: All right, round() in 3.1 uses 'Round half to even' instead of 'Round half up'. In fact, now I can see this clearly explained in 3.1 documentation. Thanks for the quick reply and sorry for the erroneous bug entry! -- ___ Py

[issue7628] round() doesn't work correctly in 3.1.1

2010-01-03 Thread Tim Peters
Tim Peters added the comment: Note that round() is implemented much more carefully in Python 3.x than in Python 2.x, and 120 is actually the correct result under nearest/even rounding (125 is exactly halfway between representable values when rounded to the closest 10, and nearest/even roundin

[issue7629] Compiling with mingw32 gcc, content of variable "extra_postargs" invalid

2010-01-03 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7628] round() doesn't work correctly in 3.1.1

2010-01-03 Thread R. David Murray
Changes by R. David Murray : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue7319] Silence DeprecationWarning by default

2010-01-03 Thread Brett Cannon
Changes by Brett Cannon : Removed file: http://bugs.python.org/file15326/silence_deprecations.diff ___ Python tracker ___ ___ Python-bugs-list

[issue7319] Silence DeprecationWarning by default

2010-01-03 Thread Brett Cannon
Brett Cannon added the comment: New patch that includes proposed doc changes. -- Added file: http://bugs.python.org/file15731/silence_deprecations.diff ___ Python tracker ___ ___

[issue7629] Compiling with mingw32 gcc, content of variable "extra_postargs" invalid

2010-01-03 Thread Markus
Markus added the comment: Sorry, my fault. "/MT" was given in "setup.py" of "pylzma". I didn't search properly. Please close. -- ___ Python tracker ___ __

[issue7629] Compiling with mingw32 gcc, content of variable "extra_postargs" invalid

2010-01-03 Thread Markus
New submission from Markus : I tried to build "pylzma" with "python setup.py build -cmingw32" and got the following message. C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DWIN32=1 -DCOMPRESS_MF_MT=1 -DWITH_COMPAT=1 -IC:\work\dev\Python26\include -I. -IC:\work\dev\Python26\include -IC:\work

[issue7628] round() doesn't work correctly in 3.1.1

2010-01-03 Thread bkovt
New submission from bkovt : round(125, -1) produces 120 in Python 3.1.1. It produces 130.0 in 2.6.4. -- messages: 97186 nosy: bkovt severity: normal status: open title: round() doesn't work correctly in 3.1.1 type: behavior versions: Python 3.1 ___ Py

[issue7627] mailbox.MH.remove() lock handling is broken

2010-01-03 Thread Rob Austein
New submission from Rob Austein : .remove() method of MH class in the mailbox module of the standard library references a file object after closing it. This throws a ValueError exception (I/O operation on closed file). The f.close() call just before the os.remove() call in the innermost try:

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

2010-01-03 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15727/stringlib_split_replace_v2.diff ___ Python tracker ___ ___ Python-b

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

2010-01-03 Thread Florent Xicluna
Florent Xicluna added the comment: Mutable methods split() splitlines() and partition() fixed. And added optimization for all immutables methods. -- Added file: http://bugs.python.org/file15730/stringlib_split_replace_v3.diff ___ Python tracker

[issue7615] unicode_escape codec does not escape quotes

2010-01-03 Thread Richard Hansen
Richard Hansen added the comment: > If we change this, the encoder should quote both single and double > quotes - simply because it is not known whether the literal > will use single or double quotes. Or document that single quotes are always escaped so that the user knows he/she can safely

[issue7471] GZipFile.readline too slow

2010-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patches have been committed. Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue4635] no reference for optparse methods

2010-01-03 Thread Ezio Melotti
Ezio Melotti added the comment: Duplicate of #3340. -- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-03 Thread Salman Haq
Salman Haq added the comment: Hope everyone had a good new year's. I've attached an updated patch which adds a new unittest, test_loadTestsFromNames__badimport. Both the new unittests can use better documentation, hopefully one of you can help me with that. -- Added file: http://bug

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

2010-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue7626] Entity references without semicolon in HTMLParser

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

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

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

[issue3972] Add Option to Bind to a Local IP Address in httplib.py

2010-01-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: I took the easy route and remove the test of the hostname all together. The fact that the source port was used is sufficient indication that the bind call was made. -- ___ Python tracker

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

2010-01-03 Thread Florent Xicluna
Changes by Florent Xicluna : -- components: +Interpreter Core versions: +Python 2.6, Python 3.1, Python 3.2 ___ Python tracker ___ ___

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

2010-01-03 Thread Florent Xicluna
Florent Xicluna added the comment: And each test comes with a new bug :) >>> x = bytearray('abc') >>> x.partition('.')[0] is x True >>> x.rpartition('.')[2] is x True -- priority: low -> normal ___ Python tracker

[issue7626] Entity references without semicolon in HTMLParser

2010-01-03 Thread Stefan Schweizer
New submission from Stefan Schweizer : HTMLParser should only handle entity references that are terminated with a semicolon. I know that the semicolon can be omitted in some cases (http://www.w3.org/TR/html4/charset.html#h-5.3) and that some browsers are more tolerant, but the following exampl

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

2010-01-03 Thread Florent Xicluna
New submission from Florent Xicluna : There's not enough tests to verify such cases: - b.split()[0] is not b - b.rsplit()[0] is not b - b.splitlines()[0] is not b - b.partition('.')[0] is not b - b.rpartition('.')[0] is not b - (other ?) However similar tests exist in Lib/test/test_bytes:

[issue7624] isinstance(... , collections.Callable) fails with oldstyle class i nstances

2010-01-03 Thread Roger Gammans
New submission from Roger Gammans : The following sequence causes isinstance to raise an exception rather than to return False. >>> class foo: ... pass ... >>> import collections >>> isinstance(foo,collections.Callable) True >>> isinstance(foo(),collections.Callable) Traceback (most recent

[issue1545] shutil fails when copying to NTFS in Linux

2010-01-03 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2010-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks wrong for bytearrays. They are mutable, so you shouldn't return the original object as an optimization. Here is the current (unpatched) behaviour: >>> a = bytearray(b"abc") >>> b, = a.split() >>> b is a False On the other hand, you aren't doi

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

2010-01-03 Thread Florent Xicluna
Florent Xicluna added the comment: You're right. Oups. -- Added file: http://bugs.python.org/file15727/stringlib_split_replace_v2.diff ___ Python tracker ___

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

2010-01-03 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15726/stringlib_split_replace.diff ___ Python tracker ___ ___ Python-bugs

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

2010-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: The "split.h" file is missing from your patch. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bu

[issue1545] shutil fails when copying to NTFS in Linux

2010-01-03 Thread Valentín
Valentín added the comment: I think this one is solved now. I recommend just to put as solved and kill it from the list ;) -- nosy: +Val ___ Python tracker ___ _

[issue7623] PropertyType missing in Lib/types.py

2010-01-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: We are not adding new types to types.py. See #1605 -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue7623] PropertyType missing in Lib/types.py

2010-01-03 Thread Winfried Plappert
New submission from Winfried Plappert : I wonder why there is not PropertyType defined in Lib/types.py. I found it out the hard way when I was xref'ing my Python files and the program died missing a key "". It can easily be defined as PropertyType = type(property()). See also Issue1327971 wh

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

2010-01-03 Thread Florent Xicluna
New submission from Florent Xicluna : Content of the patch: - removed code duplication between bytearray/string/unicode - new header "stringlib/split.h" with common methods: stringlib_split/_rsplit/_splitlines - added "maxcount" argument to "stringlib_count" - better performance for split

[issue3972] Add Option to Bind to a Local IP Address in httplib.py

2010-01-03 Thread R. David Murray
R. David Murray added the comment: Ah, and I was even the one that suggested the bind to 127.0.0.1 strategy for the test :( My buildbots run in linux-vserver virtual hosts, and they way they handle localhost (127.0.0.1) is to alias it to the IP address assigned to the virthost (otherwise mul

[issue7585] [patch] difflib should separate filename from timestamp with tab

2010-01-03 Thread anatoly techtonik
anatoly techtonik added the comment: It is the same reason as for removing recommendation from docstring to generate timestamps in the format returned by time.ctime(). See issue #7582 -- ___ Python tracker ___

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

2010-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think we can remove the "U" option from 2.6/2.7; it was certainly introduced for a reason and isn't inconsistent with the "U" option to the built-in open(). On 3.x, behaviour is indeed inconsistent with the standard IO library, so maybe we can either

[issue7585] [patch] difflib should separate filename from timestamp with tab

2010-01-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +tim_one priority: -> normal stage: -> patch review versions: -Python 2.6, Python 3.1 ___ Python tracker ___ __

[issue7585] [patch] difflib should separate filename from timestamp with tab

2010-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is there any reason why you changed some of the examples in the docstrings (e.g. 'Sat Jan 26 23:30:50 1991' -> '1991-01-26 23:30:50')? -- nosy: +pitrou ___ Python tracker

[issue3451] Asymptotically faster divmod and str(long)

2010-01-03 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue7607] stringlib fastsearch could be improved on 64-bit builds

2010-01-03 Thread Florent Xicluna
Florent Xicluna added the comment: Another place where this optimization will apply: "Objects/unicodeobject.c" for the bloom filters: #define BLOOM(mask, ch) ((mask & (1 << ((ch) & 0x1F -- ___ Python tracker

[issue7607] stringlib fastsearch could be improved on 64-bit builds

2010-01-03 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue3972] Add Option to Bind to a Local IP Address in httplib.py

2010-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems to break at least one buildbot: == ERROR: testSourceAddress (test.test_socket.NetworkConnectionAttributesTest) -- Tr

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here is the corrected patch for caching the 301 redirections. > > * It caches only the redirection not the response. > * It retains cacheable=True kwarg for http_error_301 method. ( I feel, it > should be useful) > * Have made the cached dict as private. I'

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2010-01-03 Thread Mark Dickinson
Mark Dickinson added the comment: Will close this unless there's an outcry of support for exp2 and log2. nirinA, if you're still interested in adding the euler constant, please open another issue. -- status: open -> pending ___ Python tracker

[issue4294] Macros for PyLong: sign, number of digits, fits in an int

2010-01-03 Thread Mark Dickinson
Mark Dickinson added the comment: Closing this. I like the PyLong_IS_NEGATIVE and PyLong_IS_ZERO macros, but I can't find anywhere outside longobject.c where they'd actually be useful (with the possible exception of marshal.c, but that currently depends on knowing lots about the long impleme

[issue3871] cross and native build of python for mingw32 with distutils

2010-01-03 Thread Roumen Petrov
Changes by Roumen Petrov : Added file: http://bugs.python.org/file15725/python-trunk-20100103-MINGW.patch ___ Python tracker <http://bugs.python.org/issue3871> ___ ___

[issue3754] minimal cross-compilation support for configure

2010-01-03 Thread Roumen Petrov
Changes by Roumen Petrov : -- versions: +Python 2.7 Added file: http://bugs.python.org/file15724/python-trunk-20100103-CROSS.patch ___ Python tracker <http://bugs.python.org/issue3

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

2010-01-03 Thread Nir Aides
Nir Aides added the comment: I uploaded a possible patch for Python 2.7. The patch converts ZipExtFile into subclass of io.BufferedIOBase and drops most of the original implementation. However, the patch breaks current newline behavior of ZipExtFile. I figured this was reasonable because zip

[issue7532] Extended slicing with classic class behaves strangely

2010-01-03 Thread Mark Dickinson
Mark Dickinson added the comment: Closing as won't fix. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___

[issue7618] optparse library documentation has an insignificant formatting issue

2010-01-03 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r77267 (trunk), r77268 (release26-maint), r77269 (py3k), r77270 (release31-maint), thanks! -- priority: -> normal resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.6, Python 2.7, Python 3.2