[issue10552] Tools/unicode/gencodec.py error

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Martin, I believe you were the last to update the unicode database. (See r85371.) Did you use python2.x to generate it or you have your own private copy of these tools? I noticed that genwincodecs.bat refers to c:\python26\python in 2.7 branch and c

[issue10581] Review and document string format accepted in numeric data type constructors

2010-11-29 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : I am opening a new report to continue work on the issues raised in #10557 that are either feature requests or documentation bugs. The rest is my reply to the relevant portions of Marc's comment at msg122785. On Mon, Nov 29, 2010 at 4:41 AM,

[issue10581] Review and document string format accepted in numeric data type constructors

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See also issue 9574 for a somewhat related discussion. -- ___ Python tracker <http://bugs.python.org/issue10581> ___ ___

[issue10552] Tools/unicode/gencodec.py error

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Nov 29, 2010 at 1:21 PM, Marc-Andre Lemburg wrote: .. > BTW: You appear to have a comma appended to the constant, that doesn't > belong there: > > +# Placeholder for a missing codepoint > +MISSING_CODE = -1, > + > &g

[issue10552] Tools/unicode/gencodec.py error

2010-11-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19843/issue10552a.diff ___ Python tracker <http://bugs.python.org/issue10552> ___ ___ Python-bug

[issue10552] Tools/unicode/gencodec.py error

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Nov 29, 2010 at 1:38 PM, Marc-Andre Lemburg wrote: .. > Sure, we won't need that script anytime soon and if we do, we > can just as well use the Python2 version. That may not be true. I compared 2.7 and py3k versions and the later h

[issue10575] makeunicodedata.py does not support Unihan digit data

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Nov 29, 2010 at 1:29 PM, Marc-Andre Lemburg wrote: .. > > I consider this a bug (which is why I added Python 2.7 to the list > of versions), since those code points need to be mapped to decimal > and digit as well (see the referen

[issue10565] isinstance(x, collections.Iterator) can return True, when x isn't iterable

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: ok -- ___ Python tracker <http://bugs.python.org/issue10565> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10575] makeunicodedata.py does not support Unihan digit data

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I fail to see the relevance of gencodec to this issue ... Thanks for the explanation. I wrongly assumed that "make all" is the way to regenerate both unicodedata and the encodings and that the two are interdependent. --

[issue10565] isinstance(x, collections.Iterator) can return True, when x isn't iterable

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r86872 (3.1) and r86873 (2.7). -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10587] Document the meaning of str methods

2010-11-29 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : On Mon, Nov 29, 2010 at 4:13 PM, "Martin v. Löwis" wrote: >> - How specific should library reference manual be in defining methods >> affected by UCD such as str.upper()? > > It should specify what this actually does in Uni

[issue10587] Document the meaning of str methods

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

[issue10552] Tools/unicode/gencodec.py error

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in revision 86891. Keeping open to address Mac issue. -- assignee: -> belopolsky components: +Macintosh priority: normal -> low stage: commit review -> needs patch ___ Python track

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am going to close this as "rejected" unless someone objects. The benefit is too small to make users suffer through the deprecation process. -- resolution: -> rejected status: open -> pending __

[issue1170] shlex have problems with parsing unicode

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Adding #10587 because we need to figure out the exact meaning of str.isspace() etc. first. It is possible that for proper operation shlex should consult unicodedata directly. -- dependencies: +Document the meaning of str methods

[issue1706039] Added clearerr() to clear EOF state

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't know how to reproduce the issue and without unit tests this patch cannot be committed. -- assignee: belopolsky -> ___ Python tracker <http://bugs.python.org/i

[issue9598] untabify.py fails on files that contain non-ascii characters

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed revision 86893 that makes untabify.py respect encoding cookie in the files it processes. I don't think there is anything else that needs to be done here. -- resolution: -> fixed stage: -> committed/rejected status: ope

[issue10587] Document the meaning of str methods

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Nov 30, 2010 at 1:53 PM, Martin v. Löwis wrote: .. > What is the issue that you are reporting? that the status quo should be > documented, or that isalpha is wrong? > These are independent - don't mix them. This is a documenta

[issue7830] Flatten nested functools.partial

2010-11-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The original motivation for the patch was that if partial() objects are guaranteed to be flat, it would simplify code that deals with them. See issue4331 for one example. With a "conservative" patch, however, it will still be possible

[issue887237] Machine integers

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As far as I understand, the main concern about issue887237.diff was code duplication. There are two ways to fight it: C preprocessor tricks as in issue887237-macro.diff and code generation as done in numpy. With improved macro support in many

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> postponed versions: +Python 3.3 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue5516> ___ _

[issue9268] Document annotation option to pickletools.dis

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: fixed -> stage: committed/rejected -> needs patch title: Add annotation option to pickletools.dis -> Document annotation option to pickletools.dis ___ Python tracker <http://bug

[issue9528] Add pure Python implementation of time module to CPython

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: BDFL and python-dev were opposed to this idea. -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Travis, feel free to close this without further action or use the information here to open a numpy issue. -- assignee: belopolsky -> teoliphant status: open -> pending ___ Python tracker

[issue8902] add datetime.time.now() for consistency

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> postponed versions: +Python 3.3 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue8902> ___ _

[issue766910] fix one or two bugs in trace.py

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

[issue766910] fix one or two bugs in trace.py

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

[issue766910] fix one or two bugs in trace.py

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Eli, Would you like to review this patch? -- nosy: +eli.bendersky -BreamoreBoy ___ Python tracker <http://bugs.python.org/issue766

[issue4113] Add custom __repr__ to functools.partial

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I simplified the partial_repr() code in issue4113b.diff and committed as r86916. I wonder, however, if for the common case of func being a named function, displaying func.__name__ or func.__module__ + '.' + func.__name__ in repr(partial) m

[issue4113] Add custom __repr__ to functools.partial

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Let me close this issue before any serious bikeshedding begins. We can always reconsider when users complain that eval(repr(x)) does not work for their partial objects. -- status: open -> closed ___ Pyt

[issue1598083] Top-level exception handler writes to stdout unsafely

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't see anything "easy" in this issue. Error handling in exception or signal handlers is quite tricky. I don't see this as a high priority either, but will leave this for others to decide. -- keywords: -ea

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Boštjan, Please don't add comments to closed issues. If you believe there is a remaining issue, please file a new report. Issue numbers are in good supply! This issue was fixed in r85728. It is best when this information is the last message

[issue10092] calendar does not restore locale properly

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

[issue4335] inspect.getsourcelines ignores last line in module

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: 3.2 and 2.7 don't exhibit this issue. I added a test in r86922. -- nosy: -BreamoreBoy resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed ___ Python

[issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue2380.diff does not apply anymore. -- assignee: -> belopolsky stage: -> needs patch ___ Python tracker <http://bugs.python.org/

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am submitting a patch (issue10557b.diff) for commit review. As Marc suggested, decimal conversion is now performed on Py_UNICODE characters. For this purpose, I introduced _PyUnicode_NormalizeDecimal() function that takes Py_UNICODE and returns a

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19907/issue10557b.diff ___ Python tracker <http://bugs.python.org/issue10557> ___ ___ Python-bug

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 12:54 PM, Mark Dickinson wrote: .. > The classes of whitespace accepted in each position are the same.  IIUC, with > your patch, > that consistency would be lost---is that right? Good point. I thought The PyUnicode_Enco

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 1:28 PM, Alexander Belopolsky wrote: .. > Can you suggest a test case? I mean for complex(). -- ___ Python tracker <http://bugs.python.org/issu

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 4:34 PM, Marc-Andre Lemburg wrote: .. >  * Please change the API _PyUnicode_NormalizeDecimal() to >   PyUnicode_ConvertToASCIIDecimal() - that's closer to what >   it does. > Are you sure it is a good idea to give

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Marc, I don't want to further sprawl the python-dev thread, but it would be great if you could help with issue10587 as well. That is a documentation-only issue, but there is some disagreement about how specific the docs should be. Some of

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 6:32 PM, Stefan Krah wrote: .. > I like the public name. Extension authors can use it and be sure that > their programs accept exactly the same numeric strings as the rest of > Python. > > Are you worried that the

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am probably a bit late to this discussion, but why these things should be called "codecs" and why should they share the registry with the encodings? It looks like the proper term would be "transformations" or "tran

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Should we also review the documentation for fractions and decimals? For example, fractions are documented as accepting "strings of decimal digits", but given that we have presumably non-identical str.isdigit() and str.isdecimal() methods,

[issue10554] Context management support for subprocess.Popen

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- title: Context managerment support for subprocess.Popen -> Context management support for subprocess.Popen ___ Python tracker <http://bugs.python.org/issu

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am submitting a new patch that excludes int() changes. The honest reason for the exclusion is that I gave up chasing a bug that only shows in full regrtest runs. (Marc, I don't think it is related to what you thought was a missing norm decref:

[issue8525] Display exception's subclasses in help()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 9:56 PM, Éric Araujo wrote: .. > Didn’t the first message ask for the feature to be extended to non-exceptions > classes?  “Built-in” > subclasses is a red herring, to me the feature is: display subclasses.  In > the

[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

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