[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Nov 24, 2010 at 3:37 PM, Marc-Andre Lemburg wrote: .. > I don't think we should change that for the formatting methods. That's a reasonable position. What about >>> unicodedata.category('\N{OLD ITALIC LETTER A}'

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg122313 ___ Python tracker <http://bugs.python.org/issue10521> ___ ___ Python-bug

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is another str method not ready for non-BMP chars: >>> u = '\U00010140' >>> u.translate({ord(u):ord('A')}) '𐅀' (expected 'A') >>> u = 'B' >>> u.translate({ord

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is another proof of concept patch for the isalpha issue that introduces a higher level abstraction macro - Py_UNICODE_NEXT. It should be possible to reuse this macro in all isxyz methods and other places where surrogates are currently processed

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : As discussed in issue 10521 and the sprawling "len(chr(i)) = 2?" thread [1] on python-dev, many functions in python library behave differently on narrow and wide builds. While there are unavoidable differences such as the length of string

[issue9200] str.isprintable() is always False for large code points

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: AFAICT, all ctype methods (isalpha, isdigit, etc.) have the same problem. I posted a patch at issue10542 that introduces a Py_UNICODE_NEXT() macro that can help fixing all these methods. I am adding #10542 as a dependency and if there are no

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +haypo, loewis ___ Python tracker <http://bugs.python.org/issue10542> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 6:37 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > As a practical matter, I think that for at least the next decade, people are > at least as likely to > want to fill with a composed, m

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 7:27 PM, Eric Smith wrote: .. > > In addition to the proposed Py_UNICODE_NEXT and Py_UNICODE_PUT_NEXT, > > str.__format__ would also need a function that tells it how many Py_UNICODEs > are needed to store a give

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 7:45 PM, Eric Smith wrote: .. > For my use I'd really need it to take the result of Py_UNICODE_NEXT. > Something like: > Py_ssize_t > Py_UNICODE_NUM_NEEDED(Py_UCS4 c) > and it would always return 1 or 2. Alway

[issue9200] str.isprintable() is always False for large code points

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch fixes isprintable and other ctype-like methods. I left isspace() out for now because I could not find a test character outside of BMP to test with, but I think we should fix that for completeness as well. At this point the goal is

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 8:41 PM, STINNER Victor wrote: .. > I don't like macro having a result and using multiple instructions using the > evil > magic trick (the ","). It's harder to maintain the code and harder to debug

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 9:22 PM, Eric Smith wrote: .. > But I definitely agree that we should get the abstraction right first and > worry about > the implementation later. I am fairly happy with Py_UNICODE_NEXT() abstraction. It's seman

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Raymond, I wonder if you would like to comment on the iterator analogy and/or on adding public names to C API. -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue10

[issue10541] regrtest.py -T broken

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Apparently something in the test changes the cwd. Both of the following invocations work: $ ./python.exe `pwd`/Lib/test/regrtest.py -T -N test_urllib $ ./python.exe -m test.regrtest -T -N test_urllib I would suggest changing the coverage target in the

[issue10549] help(cls1) breaks when cls1 has staticmethod(cls2) attribute

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Confirmed in py3k. -- assignee: -> belopolsky nosy: +belopolsky stage: -> needs patch type: -> behavior ___ Python tracker <http://bugs.python.or

[issue10549] help(cls1) breaks when cls1 has staticmethod(cls2) attribute

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The fix is simple: --- Lib/pydoc.py(revision 86824) +++ Lib/pydoc.py(working copy) @@ -1110,7 +1110,7 @@ result = result + self.section('FILE', file) return result -def docclass(self, object, name=None

[issue10541] regrtest.py -T broken

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to investigate this some more. In theory, regrtest should restore cwd before coverage results are written. -- status: pending -> open ___ Python tracker <http://bugs.python.org/issu

[issue10552] Tools/unicode/gencodec.py error

2010-11-27 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : $ ../../python.exe gencodec.py MAPPINGS/VENDORS/MISC/ build/ converting APL-ISO-IR-68.TXT to build/apl_iso_ir_68.py and build/apl_iso_ir_68.mapping converting ATARIST.TXT to build/atarist.py and build/atarist.mapping converting CP1006.TXT to build

[issue7962] Demo and Tools need to be tested and pruned

2010-11-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +Tools/unicode/gencodec.py error ___ Python tracker <http://bugs.python.org/issue7962> ___ ___ Python-bug

[issue10552] Tools/unicode/gencodec.py error

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch addresses the issue by using -1 instead of None for missing codes. Comparison of generated encoding files to those in Lib/encodings shows only whitespace changes except one which appears to be a change on the unicode.org side: diff -b

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sat, Nov 27, 2010 at 5:03 PM, Marc-Andre Lemburg wrote: .. [I'll respond to skipped when I update the patch] > In any case, we should clearly document where these macros are used and > warn about the implications of using them in the w

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sat, Nov 27, 2010 at 5:03 PM, Marc-Andre Lemburg wrote: .. >  * same for the Py_UNICODE_NEXT() macro, i.e. Py_UCS4_NEXT() > >  * in order to make the macro easier to understand, please rename it to > Py_UCS4_READ_CODE_POINT(); that

[issue10552] Tools/unicode/gencodec.py error

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch uses MISSING_CODE as Mark suggested. There are still errors apparently because parsecodes() may return either an int or a tuple. I think only mac encodings are affected, so I would like to commit the current patch before tackling this

[issue10552] Tools/unicode/gencodec.py error

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please ignore Makefile changes in the patch. -- ___ Python tracker <http://bugs.python.org/issue10552> ___ ___ Python-bug

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sat, Nov 27, 2010 at 5:41 PM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > >> * the Py_UNICODE_JOIN_SURROGATES() macro should use Py_UCS4 as prefix since >> it returns Py_UCS4 values, i.e. Py_UCS4_JOIN_SURROGATE

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a patch that defines Py_UNICODE_PUT_NEXT() macro (tentative name) and uses it to fix str.upper method. The implementation of surrogate-aware str.upper shows that NEXT/PUT_NEXT abstractions may lead to somewhat inefficient code for &qu

[issue10557] Malformed error message from float()

2010-11-27 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : >>> float('½') Traceback (most recent call last): File "", line 1, in ValueError: could not convert string to float: � >>> float('42½') Traceback (most recent call last): File "", line 1,

[issue10318] "make altinstall" installs many files with incorrect shebangs

2010-11-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: UTF-8 -*- Not strictly related to this issue, but do we want to recommend redundant encoding cookie in the docs? -- ___ Python tracker

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 11:37 AM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > >> I am not sure, whether support for non-ascii digits in float() >> constructor is worth maintaining. > > I'd be very hap

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 12:00 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > About Alexander's solution:  might it make more sense to have > PyUnicode_EncodeDecimal raise > for inputs like this? No, I thin

[issue10567] Unicode space character \u200b unrecognised a space

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

[issue10567] Unicode space character \u200b unrecognised a space

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The category of U-200B was changed in Unicode 4.0.1: """ The main new features in Unicode 4.0.1 are the following: ... * Changed: general category of U+200B ZERO WIDTH SPACE """ http://unicode.org/versions/Unicod

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Issue #10567 demonstrated the problem of relying on the Unicode database in Python builtins. Apparently, Unicode does not guarantee stability of the character categories. On the other hand, we are already tied to UCD for the language definition. Maybe

[issue10567] Unicode space character \u200b unrecognised a space

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 2:07 PM, Marc-Andre Lemburg wrote: .. > The tables were never manually maintained, but we also did not update > Python for each new Unicode version: > > Python 1.6: Unicode 3.0 > Python 2.0: Unicode 3.0 > Pytho

[issue10567] Unicode space character \u200b unrecognised a space

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 2:40 PM, Marc-Andre Lemburg wrote: .. > Going back further shows the change: > > 3.0.1: 200B;ZERO WIDTH SPACE;Zs;0;BN;N; > 3.2.0: 200B;ZERO WIDTH SPACE;Zs;0;BN;N; > 4.0.1: 200B;ZERO WIDTH SPAC

[issue10568] Python and the Unicode Character Database

2010-11-28 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Two recently reported issues brought into light the fact that Python language definition is closely tied to character properties maintained by the Unicode Consortium. [1,2] For example, when Python switches to Unicode 6.0.0 (planned for the upcoming

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 3:09 PM, Stefan Krah wrote: .. > Decimal point: U+066B Well, not so fast: Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'decimal' codec can't encode character &#x

[issue10568] Python and the Unicode Character Database

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This was meant as python-dev post, not an issue. (Sent to wrong address by mistake.) -- nosy: +belopolsky resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 3:30 PM, Stefan Krah wrote: .. >> UnicodeEncodeError: 'decimal' codec can't encode character '\u066b' > > Hmm, looks like a bug? I think U+066B is correct. > Really? What about Traceback

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sending this by e-mail was not a good idea ... On Sun, Nov 28, 2010 at 3:30 PM, Stefan Krah wrote: .. >> UnicodeEncodeError: 'decimal' codec can't encode character '\u066b' > > Hmm, looks like a bug? I think U+0

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg122725 ___ Python tracker <http://bugs.python.org/issue10557> ___ ___ Python-bug

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

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Why not allow complex('1i')? (Tongue in cheek: I am really looking for arguments against lax parsing in number builtins. See issue 10557.) -- nosy: +belopolsky ___ Python tracker <http://bu

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

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 3:58 PM, Mark Dickinson wrote: .. > I'd expect to allow complex('3 + 4i') as well. And with spaces surrounding '+' too. -- ___ Python tracker <ht

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This looks like a bug in the underlying platform. POSIX requires [1] that the output of ctime() fits in a 26-character buffer. Note that a change has been recently made to time.asctime() to reject year > . See r85137 and issue6608. I think

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky stage: unit test needed -> needs patch type: -> feature request versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.or

[issue10544] yield expression inside generator expression does nothing

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

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Isn't this the same issue as #3267? -- ___ Python tracker <http://bugs.python.org/issue10544> ___ ___ Python-bugs-l

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: After a bit of svn archeology, it does appear that Arabic-Indic digits' support was deliberate at least in the sense that the feature was tested for when the code was first committed. See r15000. The test migrated from file to file over the la

[issue10557] Malformed error message from float()

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Nov 29, 2010 at 4:41 AM, Marc-Andre Lemburg wrote: .. > It would be better to copy and iterate over the Unicode string first, > replacing any decimal code points with ASCII ones and then call the > UTF-8 encoder. > Good idea. >

[issue10572] Move unittest test package to Lib/test

2010-11-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +0, and I think we should hear from the maintainers of the affected packages first. For packages that are also externally maintained moving tests out may cause inconvenience to the maintainer. -- nosy: +barry, belopolsky, brett.cannon

[issue10572] Move unittest test package to Lib/test

2010-11-29 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +gpolo ___ Python tracker <http://bugs.python.org/issue10572> ___ ___ 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 am adding #10552 as a dependency because I think we should fix unicode data generation in 3.x before adding new features to the scripts. I am also not sure whether this is a bug or a feature request. Martin? -- dependencies: +Tools/unicode

[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

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