[issue10610] Correct the float(), int() and complex() documentation

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 3, 2010 at 12:10 AM, Raymond Hettinger wrote: .. > Try not to sprawl this all over the docs.  Find the most common root and > document it there. > No need to garbage-up Fractions, Decimal etc. with something that is of zero >

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 11:49 PM, Éric Araujo wrote: .. > Whether 1+2j is a literal or an expression is debatable. > I think +1 is an expression but 1+2j is a literal; neither should have a >space. With respect to implementation there is

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 11:49 PM, Éric Araujo wrote: .. > Whether 1+2j is a literal or an expression is debatable. > I think +1 is an expression but 1+2j is a literal; neither should have a >space. With respect to implementation there is

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: And of course, roundup ate my work. The tokenize incantation was >>> pprint(list(tokenize(iter([b'1+1j']).__next__))) -- ___ Python tracker <http://bugs

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg123186 ___ Python tracker <http://bugs.python.org/issue10562> ___ ___ Python-bug

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg123187 ___ Python tracker <http://bugs.python.org/issue10562> ___ ___ Python-bug

[issue10557] Malformed error message from float()

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 3, 2010 at 4:45 AM, Marc-Andre Lemburg wrote: .. >> On Thu, Dec 2, 2010 at 4:34 PM, Marc-Andre Lemburg >> wrote: >> .. >>>  * Please change the API _PyUnicode_NormalizeDecimal() to >>>   PyUnicode_Conver

[issue10587] Document the meaning of str methods

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As discussed in issue10610, it is important to keep the gory details in one place and refer to it throughout the manual. I think the Unicode terminology is best exposed in the unicodedata module documentation. For string character-type methods, I

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 3, 2010 at 11:57 AM, Boštjan Mejak wrote: .. > Indeed. There should be spaces around all the operators. Even in my posted > example. Aim higher: we obviously want Python output look beautiful in print, so operands should be surrounde

[issue10557] Malformed error message from float()

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 9:53 PM, Alexander Belopolsky wrote: .. > .. The honest reason for the exclusion is that I gave up chasing a bug that > only shows > in full regrtest runs. I have realized where the problem was. PyUnicode_FromUnicode() &

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Alexander, is it possible to make an output like (1+2j) > be printed as (1 + 2j). Sure, and 'j' can be highlighted in red, but this is a job for a front-end or a custom display hook, not core python. You may want to take a look at

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19927/unnamed ___ Python tracker <http://bugs.python.org/issue10562> ___ ___ Python-bugs-list m

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19928/unnamed ___ Python tracker <http://bugs.python.org/issue10562> ___ ___ Python-bugs-list m

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: -belopolsky ___ Python tracker <http://bugs.python.org/issue10562> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sat, Nov 27, 2010 at 6:38 PM, Raymond Hettinger wrote: .. > I suggest Py_UNICODE_ADVANCE() to avoid false suggestion that the iterator > protocol is being used. > As a data point, ICU defines U16_NEXT() for similar purpose. I also

[issue10557] Malformed error message from float()

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Hopefully this is the last iteration before commit. As discussed, I took whitespace processing out of PyUnicode_TransformDecimalToASCII() and made it public. Whitespace conversion in int()/float()/complex() is repetitious and can be optimized by, for

[issue10557] Malformed error message from float()

2010-12-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in revision 87007. As a bug fix, this needs to be backported to 3.1, but PyUnicode_TransformDecimalToASCII() should probably be renamed to _PyUnicode_TransformDecimalToASCII() to avoid introduction of a new feature. -- resolution

[issue10557] Malformed error message from float()

2010-12-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sat, Dec 4, 2010 at 6:03 AM, Mark Dickinson wrote: .. > I don't much like the extra boilerplate that's introduced (and repeated) > in longobject.c, floatobject.c and complexobject.c, though. > Yes, that's exactly what I meant

[issue10557] Malformed error message from float()

2010-12-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sat, Dec 4, 2010 at 3:11 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: >.. One issue is that we'd still need the char* -> double operations, partly >because > PyOS_string_to_double is part of the public API,

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: What is the status of this issue? A grep for _PyUnicode_AsString quickly revealed a crash: >>> from xml.etree.cElementTree import * >>> e = Element('a') >>> getattr(e, '\uD800') Segmentation fault I don

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Another crash: >>> from datetime import * >>> datetime.now(timezone(timedelta(0), '\uD800')).strftime('%Z') Segmentation fault -- ___ Python trac

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: One of the uses of problematic uses of PyUnicode_GetSize() is in Macintosh Gestalt interface: /* Convert a 4-char string object argument to an OSType value */ static int convert_to_OSType(PyObject *v, OSType *pr) { uint32_t tmp; if

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a patch that fixes several instances of unchecked _PyUnicode_AsString() result. Not all fixes are completely trivial, so I would appreciate a review. I did not attempt to fix Modules/_gestalt.c because I would like to hear from Ronald

[issue3446] center, ljust and rjust are inconsistent with unicode parameters

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As a feature request for 2.x, I think this should be rejected. Any objections? The "behavior" part seem to have been fixed. -- assignee: -> belopolsky nosy: +belopolsky resolution: -> rejected status: open -> pending type:

[issue2857] add codec for java modified utf-8

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > TCL only uses the codec for internal represenation. You might want to > interface to TCL at the C level and use the codec there, but is that > really a good reason to include the codec in the Python stdlib ? I wonder if tkinter should use this

[issue4610] Unicode case mappings are incorrect

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: >> .swapcase() is just ...err... dumb^h^h^h^h questionably useful. > I agree with the rest of you that Python would be better-off > without swapcase(). As long as str.upper/lower are based only on UnicodeData.txt 1-to-1 mappings,

[issue1571170] Some numeric characters are still not recognized

2010-12-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is there anything in this issue that is not addressed by #1571184? It looks like this was originally reported on SF where bug reports and patches had separate ids, so this is probably a duplicate of #1571184. -- nosy: +belopolsky

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a revised version of the patch which also includes some tests. Interestingly, the issue in syslog module is a regression from 3.1 introduced in r80401. Although it is not a crasher, I don't think it was intentional because alt

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19970/issue6697a.diff ___ Python tracker <http://bugs.python.org/issue6697> ___ ___ Python-bug

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-12-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue8654> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Daniel, While these macros should not affect ABI, I would appreciate your feedback in light of your work on issue 8654. -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue10

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Dec 7, 2010 at 12:44 PM, Marc-Andre Lemburg wrote: .. > * Rather than just patching in error handling code, please consider > removing use of those APIs and replace their calls with something > more appropriate, e.g. using a parser A

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Dec 7, 2010 at 1:11 PM, Marc-Andre Lemburg wrote: >>  I am not sure what >> you mean by "a parser API." > > PyArg_Parse() et al. See the discussion earlier on this ticket. > I've just realized that. It is th

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue6697b.diff addresses Marc's comments. Thanks for the review. -- stage: patch review -> commit review Added file: http://bugs.python.org/file19972/issue6697b.diff ___ Python tracke

[issue6632] Include more fullwidth chars in the decimal codec

2010-12-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wish I discovered this issue when I was working on #10557! Chances are I wouldn't have started a long python-dev thread rehashing the same issues as I see discussed here. In any case, in #10557, I replaced core uses of PyUnicode_EncodeDecimal()

[issue10654] test_datetime fails on Python3.2 windows binary

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Hirokazu, Please rerun the test with a -v flag like this: C:\Python32>.\python -m test.regrtest -v test_datetime This should tell us whether the failure comes from C (Fast) implementation or Python (Pure) one. The test in question simply tests t

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > ValueError: time data '2010 14 58 01 3 342 \x93\x8c\x8b\x9e > (\x95W\x8f\x80\x8e\x9e)' does not match format '%Y %H %M %S %w %j %Z' This looks like valid cp932 data to me >>> b'2010 14 58 01 3 342 \x93\x8c\x8b\

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Dec 8, 2010 at 1:12 PM, Hirokazu Yamamoto wrote: .. >>>> import time >>>> time.strftime('%Z') > '\x93\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)' Thanks. Please bear with me f

[issue10653] test_time test_strptime fails on windows

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Dec 8, 2010 at 1:50 PM, Hirokazu Yamamoto wrote: .. > I got readable result. ;-) > You mean readable to *you*. :-) >>>> import time >>>> time.tzname > ('東京 (標準時)', '東京 (標準時)') This makes sens

[issue10654] test_datetime fails on Python3.2 windows binary

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Dec 8, 2010 at 2:21 PM, Hirokazu Yamamoto wrote: .. > / > > from datetime import datetime > > class SubclassDatetime(datetime): >    sub_var = 1 > > a = SubclassDatetime(2002,

[issue10654] test_datetime fails on Python3.2 windows binary

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > + "NotImplemented" was printed Hmm, looks like a compiler bug to me. Can anyone reproduce this on a debug build? In any case, someone with a Windows setup will have to troubleshoot this further. Note that the code in abstract.c i

[issue10546] UTF-16-LE and UTF-16-BE support non-BMP characters

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: If Victor says so ... Someone needs to check that it works on a UCS4 build, but on a narrow build I don't think UTF-16-XX encodings need to do anything special - they just encode the surrogates as ordinary code units. >>> '\U00010

[issue10546] UTF-16-LE and UTF-16-BE support non-BMP characters

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have verified that UTF-16-XX encodings work on wide build. The doc change LGTM. Bonus points for checking that we have unit tests for these encodings that include non-BMP characters. -- ___ Python

[issue10546] UTF-16-LE and UTF-16-BE support non-BMP characters

2010-12-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Unicode ___ Python tracker <http://bugs.python.org/issue10546> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9738] Document the encoding of functions bytes arguments of the C API

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > A (probably crazy) idea that just occurred to me: > typedef char utf8_bytes; > typedef char iso8859_1_bytes; > typedef char fsenc_bytes; I like it! Let's see how far we can get without iso8859_1_bytes, though. (It is likely t

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed revision 87137. Needs backporting. Also as Victor suggested, _lsprof.c code can be refactored to avoid roundtrips of unicode through utf8 char*. -- ___ Python tracker <http://bugs.python.

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching an untested rewrite of normalizeUserObj() in _lsprof.c for comments on whether it is worth the effort. There might be other places where PyModule_GetName() can be profitably replaced with PyModule_GetNameObject(). -- Added file

[issue1706039] Added clearerr() to clear EOF state

2010-12-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The tests need to be cleaned up a little. The setup code should go to setUp() method and instead of calling different methods in a loop with a switch over method names, it should just have a separate test_ method for each method tested. A "

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2010-12-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: With Georg's approval, I am reopening this issue until a decision is made on whether {str,bytes,bytearray}.{transform,untransform} methods should go into 3.2. I am adding Guido to "nosy" because the decision may turn on the interpretati

[issue10665] Update and expand unicodedata module documentation

2010-12-09 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : unicodedata module documentation has not been updated to reflect transition to 6.0. Attached patch fixes the version and unicode.org links and starts making the documentation rely less on the unicode.org pages for basic understanding of the provided

[issue10665] Update and expand unicodedata module documentation

2010-12-09 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Unicode ___ Python tracker <http://bugs.python.org/issue10665> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10665] Update and expand unicodedata module documentation

2010-12-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Added more tables semi-automatically produced from http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- Added file: http://bugs.python.org/file19991/unicodedata-doc.diff ___ Python tracker <h

[issue10665] Update and expand unicodedata module documentation

2010-12-09 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19990/unicodedata-doc.diff ___ Python tracker <http://bugs.python.org/issue10665> ___ ___ Pytho

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 9, 2010 at 6:10 PM, Martin v. Löwis wrote: .. > Please, one issue per report and checkin, The s/5.2/6.0/ issue is hardly worth a tracker ticket. I've committed these changes in r87159. (Sorry for the unrelated changes - reverte

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +ezio.melotti, haypo, lemburg ___ Python tracker <http://bugs.python.org/issue10665> ___ ___ Python-bugs-list mailin

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In issue10665.diff, I completed the character examples in the general categories table. -- Added file: http://bugs.python.org/file20002/issue10665.diff ___ Python tracker <http://bugs.python.org/issue10

[issue10665] Expand unicodedata module documentation

2010-12-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 10, 2010 at 6:04 PM, Martin v. Löwis wrote: .. >> Why?  I thought "release early, release often" was a good thing. > > Create a branch for that, or post an issue on Rietveld. Martin, This is a documentation patch a

[issue9012] Separate compilation of time and datetime modules

2010-12-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > it sounds like the patch is ready for commit. there are two pending patches here: time.diff - a hack that makes _time.c look like a module while it is not. add_time_to_vc8_build.diff - a patch for VC 8.0 project file. I don't like time.diff

[issue9232] Allow trailing comma in any function argument list.

2010-12-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > In #10682, several committers indicated that they would prefer > not to change this. Issue #10682 has been open for less than 24 hours before it was rejected. In contrast, this issue was open after an almost week-long discussion on python-dev

[issue10700] python pickle.dumps AssertionError

2010-12-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This looks like another duplicate of issue1062277. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue10

[issue10700] python pickle.dumps AssertionError

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is a known problem. See issues #1062277 and #9269. You can work around the issue by using a dict. I am attaching two test files. First, set-graph.py, reproduces the issue in 3.x and the second, dict-graph.py, contains a workaround

[issue10700] python pickle.dumps AssertionError

2010-12-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file20037/dict-graph.py ___ Python tracker <http://bugs.python.org/issue10700> ___ ___ Python-bug

[issue10701] Error pickling a dict

2010-12-14 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : The work-around that I proposed for issue10700 does not work with Python 2.x: $ python2.7 dict-graph.py Vertex 0 -> 2, 1 Vertex 1 -> Vertex 2 -> Traceback (most recent call last): File "dict-graph.py", line 74, in

[issue10700] python pickle.dumps AssertionError

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It turns out that dict-graph.py does not work with python2.x, but that is a different problem, so I opened a separate issue for it. See issue10701. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10541] regrtest.py -T broken

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is a simpler invocation that produces a similar error: $ ./python.exe -m test.regrtest -T test_trace test_pkg ... IOError: [Errno 2] No such file or directory: '/var/folders/qs/qsqFUI2xFUKG+9CTf4z7pU+++TI/-Tmp-/tmpy1iyp7/t4/sub/__init

[issue10587] Document the meaning of str methods

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a patch that expands the documentation of isalnum, isalpha, isdecimal, isdigit, isnumeric, islower, isupper, and isspace. I did not change isidentifier or isprintable because their docs were already complete. I also left out istitle

[issue10702] bytes and bytearray methods are not documented

2010-12-14 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Library reference manual has a section dedicated to string methods [1], but similar methods of bytes and bytearray types are not documented. Adding two new sections would probably be too repetitious, so I wonder if it would make sense to add notes

[issue10703] Regex 0.1.20101210

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Regex 0.1.20101210 is not part of the standard Python distribution, so this bug report is invalid. -- nosy: +belopolsky resolution: -> invalid status: open -> closed superseder: -> Regexp 2.7 (modifications to current

[issue10704] Regex 0.1.20101210 Python 3.1 install problem Mac OS X 10.6.5

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Regex 0.1.20101210 is not part of the standard Python distribution, so this bug report is invalid. See issue2636 for the development status of regex. -- nosy: +belopolsky resolution: -> invalid status: open -> closed superseder: -> R

[issue10704] Regex 0.1.20101210 Python 3.1 install problem Mac OS X 10.6.5

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Dec 14, 2010 at 1:27 PM, Steve Moran wrote: .. > Yeah, it's not immediately clear how to bring this up at > > http://bugs.python.org/issue2636 > This is the URL listed as the home page for regex 0.1.20101210 on PyPI [1], so I as

[issue10704] Regex 0.1.20101210 Python 3.1 install problem Mac OS X 10.6.5

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: FWIW, I was able to install Regex 0.1.20101210 on OSX 10.6.4, Developer Information: Version: 3.2 (10M2003) Location: /Developer Applications: Xcode:3.2.1 (1613) Interface Builder:3.2.1 (740) Instruments: 2.0.1 (1096

[issue10704] Regex 0.1.20101210 Python 3.1 install problem Mac OS X 10.6.5

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > If you build it yourself, you have other options. Yes, my python3.1 is from MacPorts. -- ___ Python tracker <http://bugs.python.org/issu

[issue10541] regrtest.py -T broken

2010-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a patch that fixes write_results() and makes test_trace tests restore the tracefunc after they run. This fixes generation off the coverage files, but many tests still fail when traced. -- keywords: +patch stage: needs patch

[issue10541] regrtest.py -T broken

2010-12-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +eli.bendersky, terry.reedy ___ Python tracker <http://bugs.python.org/issue10541> ___ ___ Python-bugs-list mailin

[issue3446] center, ljust and rjust are inconsistent with unicode parameters

2010-12-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue3446> ___ ___ Python-bugs-list mailing list Un

[issue10702] bytes and bytearray methods are not documented

2010-12-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I was persuaded there was already a bug open with a patch adding > bytes and bytearray in the sequence methods table, but I can’t find it. I can't find it either, but this issue is different. I propose renaming "String Methods"

[issue10718] Idle crashes on OSX when source is saved

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > After entering my code What code did you enter? Which window did you enter it to? > I am prompted to save what exactly did you do before you were "prompted"? What did the "prompt" look like. Can you post the screen sh

[issue10718] Idle crashes on OSX when source is saved

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Same behavior when starting /Applications/Python 2.7/IDLE.app in finder. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10716] Modernize pydoc to use CSS

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I believe Ron has done something along these lines already. See issue2001. Committed css file is empty, (see r86971) but I am adding Ron to "nosy" in case he has something in the pipeline. -- nosy: +belopolsky

[issue10716] Modernize pydoc to use CSS

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See also the calendar module for an example of a "modern" html. -- ___ Python tracker <http://bugs.python.o

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Adding an assert as shown in the diff below, makes it easy to reproduce the crash in py3k branch: $ ./python.exe crash.py Assertion failed: (cskipped < 20), function nfc_nfkc, file Modules/unicodedata.c, line 714. Abort trap I am attaching jhalcro

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The logic suggested by Martin in msg120018 looks right to me, but the whole code seems to be unnecessarily complex. (And comb1==comb may need to be changed to comb1>=comb.) I don't understand why linear search through "skipped" ar

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +doerwalter ___ Python tracker <http://bugs.python.org/issue10542> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 10, 2010 at 6:09 PM, Daniel Stutzbach wrote: .. > The second check for surrogates in Py_UNICODE_PUT_NEXT is necessary, unless > you can prove that > Py_UNICODE_SOME_TRANSFORMATION will never transform characters < 0x1 into

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch, issue10254.diff, is essentially Martin's code from msg120018 and Part3 tests from NormalizationTest.txt. Since this bug exposes a buffer overflow condition, I think it qualifies as a security issue, so I am adding 2.6 to ver

[issue2736] datetime needs an "epoch" method

2010-12-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 17, 2010 at 9:18 AM, R. David Murray wrote: > > R. David Murray added the comment: > > Alexander, I agree with Velko in that it isn't obvious to me how the addition > of localtime > would answer the desire

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 17, 2010 at 3:47 AM, Martin v. Löwis wrote: .. > The worst case (wrt. cskipped) is the maximum number of characters that > can get combined into a single base character. It used to be (and I > hope still is) 20 (decomposition

[issue2736] datetime needs an "epoch" method

2010-12-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 17, 2010 at 12:17 PM, Antoine Pitrou wrote: .. >> 1. Different application may need different epoch and retained >> precision depends on the choice of the epoch. > > But then why does fromtimestamp() exist? A bett

[issue2736] datetime needs an "epoch" method

2010-12-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 17, 2010 at 1:17 PM, Antoine Pitrou wrote: .. >> A better question is why datetime.utcfromtimestamp(s) exists given >> that it is actually longer than equivalent EPOCH + timedelta(0, s)? > > ??? EPOCH is not even a consta

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 17, 2010 at 2:08 PM, Martin v. Löwis wrote: .. >> As far as I (and a two-line script) can tell >> the maximum length of a canonical decomposition of a character is 4. > > Even better - so allowing for 20 characters should

[issue2736] datetime needs an "epoch" method

2010-12-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 17, 2010 at 2:35 PM, Antoine Pitrou wrote: .. > I don't think the "time" module can be named "higher level", and it > still handles such timestamps. > >> datetime(1970, 1, 1) + timedelta(seconds=s) >

[issue2736] datetime needs an "epoch" method

2010-12-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: -Alexander.Belopolsky versions: +Python 3.3 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue2736> ___ ___

[issue2736] datetime needs an "epoch" method

2010-12-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 17, 2010 at 3:26 PM, Antoine Pitrou wrote: .. > >> Yes, UTC not being a proper acronym in any human language is one >> problem, > > Ok. Too bad you don't live on the same planet than most of us. I bail > out. S

[issue10557] Malformed error message from float()

2010-12-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.1 ___ Python tracker <http://bugs.python.org/issue10557> ___ ___ Python-bugs-list mailing list Unsub

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch, issue10254a.diff, adds the OP's cases to test_unicodedata and changes the code as I suggested in msg124173 because ISTM that comb >= comb1 matches the pr-29 definition: """ D2'. In any character sequence b

[issue10715] uninformative error message

2010-12-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file20125/unnamed ___ Python tracker <http://bugs.python.org/issue10715> ___ ___ Python-bugs-list m

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Dec 20, 2010 at 2:50 PM, Alexander Belopolsky wrote: .. > Unfortunately, all tests pass with either comb >= comb1 or comb == comb1, so > before > I commit, I would like to figure out the test case that would properly > exe

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In the new patch, issue10254b.diff, I've added a test that would crash unpatched code: >>> unicodedata.normalize('NFC', 'C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸Ç') Segmentation fault Martin, I still feel uneasy a

[issue10754] os.path.isfile doesn't work with some greek characters

2010-12-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Just a random thought (no, I don't know anything about Windows): there are two "mu" characters: GREEK SMALL LETTER MU (μ) and MICRO SIGN (µ). Normalization turns one into the other: >>> from unicodedata import * >>>

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Stephen, I wonder if you would have comments on this. As far as I know emacs installs SEGV handlers similar to the ones proposed here. How well do they work? Does it really help users to produce meaningful bug reports? -- nosy: +belopolsky

<    3   4   5   6   7   8   9   10   11   12   >