[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Do you think this should go in 3.1 too? If the problem triggers there as well: Yes. Is the problem also visible on Python 2.7 ? -- title: Unicode-width dependent

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: JoeKuan wrote: > > JoeKuan added the comment: > > I don't think it is to do with the underlying C mktime. Because it works fine > with 00:59:58 and 01:00:00, 1, Jan 1970. It is to do with some specific value > -1 in the inter

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > Isn't this a duplicate of issue1726687? Could be, but that patch is not yet in Python 2.7, since Python 2.7.1 was re

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > Alexander Belopolsky wrote: >> >> Alexander Belopolsky added the comment: >> >> Isn't this a duplicate of issue1726687? > > Could be,

[issue10665] Expand unicodedata module documentation

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Alexander suggested on IRC to use the 'unicode' directive[0], but even if > that works in the HTML (only outside code blocks), it still breaks the PDF. > Another al

[issue10665] Expand unicodedata module documentation

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > One reason is that unicodedata.lookup actually returns a unicode char, so if > we want to show a code snippet that uses unicodedata.lookup we either have to > use a unicod

[issue11895] pybench prep_times calculation error

2011-04-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Mikhail Terekhov wrote: > > New submission from Mikhail Terekhov : > > For some time now my builds of python 3.2 on x86_64 platform in SuSE OBS are > failing depending on the phase of the moon. The spec file for the > python3-base

[issue1322] platform.dist() has unpredictable result under Linux

2011-04-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Éric Araujo added the comment: > > [Zooko] >> I just read back through this ticket, but I didn't understand exactly >> what MAL wanted to have different from what this Python function >>

[issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac

2011-04-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Piotr Sikora wrote: > > Piotr Sikora added the comment: > > It's the same on OpenBSD (and I'm pretty sure it's true for other BSDs as > well). > >>>> locale.resetlocale() > Traceback (most recent cal

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-04-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Éric Araujo added the comment: > > I’m not sure how I feel about using surrogateescape. The distutils source is > very similar across 2.7, 3.1, 3.2 and default, especially after the Great > Revert and freeze la

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: David Coles wrote: > > David Coles added the comment: > > After doing some more investigation it appears that Android's wchar_t support > before android-9 is totally broken (see > http://android.git.kernel.org/?p=platform/ndk.

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: >From the document you posted: """ As documented, the Android platform did not really support wchar_t until Android 2.3. What this means in practical terms is that: - If you target platform android-9 or higher, the size of wchar_t i

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: David Coles wrote: > >> I agree that it's not worthwhile trying to port Python to those Android >> versions that have a single-byte wchar_t definition. > > Yup. Will be using Android 2.3+. If I'm forced to use an earlier

[issue12027] Optimize import this (patch to make it 10x faster)

2011-05-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > Patch to optimize this: make it 10 times faster. > > Try attached benchmark script. On a debug build I got the following results: > * original: 299.8 ms > *

[issue2857] add codec for java modified utf-8

2011-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks for the patch, Victor. Some comments on the patch: * the codec will have to be able to work with lone surrogates (see the wikipedia page explaining this detail), which the UTF-8 codec in Python 3.x no longer does, so another special case

[issue12057] HZ codec has no test

2011-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Looking at cjkencodings.py the format is pretty clear. The file consists of > one statement that creates one dict that maps encoding names to a pair of > (encoded) byte

[issue11377] Deprecate (remove?) platform.popen()

2011-05-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Éric Araujo added the comment: > > Is it on purpose that there is a doc deprecation but no > [Pending]DeprecationWarning? No, I guess just an oversight. -- ___ Python

[issue11377] Deprecate platform.popen()

2011-05-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Éric Araujo added the comment: > > haypo asked me on IRC if I’d like to make a patch for this; I will, in some > weeks. > > With respect to the recent thread about deprecations and 2.7 → 3. > migr

[issue9811] strftime strips '%' from unknown format codes on OS X

2011-05-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Santoso Wijaya wrote: > > Santoso Wijaya added the comment: > > `strftime` does not, indeed, seem to define what behaviour it is supposed to > do when given non-supported format characters. Under Windows, in fact, it > will cras

[issue8796] Deprecate codecs.open()

2011-05-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Python 3.2 has been published. Can we start deprecating StreamWriter and > StreamReader in Python 3.3 (to remove them from Python 3.4)? The doc should > explain how to

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Michele Orrù wrote: > > Michele Orrù added the comment: > > Well, actually encodings.aliases links to the encoding _module name_, as > described in the doc: > """ Encoding Aliases Support > This module is

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Michele Orrù wrote: > > Michele Orrù added the comment: > > Sorry, I was told that email the bugtracker could not work properly. > > >>> - mcbs has something broken in its imports; > >> mbcs is only available on

[issue10435] Document unicode C-API in reST

2010-11-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks for your work on this. Please see my comments below: --- Include/unicodeobject.h (revision 86478) +++ Include/unicodeobject.h (working copy) @@ -737,7 +737,7 @@ const char *errors /* error handling */ ); -/* Encodes a

[issue10459] missing character names in unicodedata (CJK...)

2010-11-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Vlastimil Brom wrote: > > New submission from Vlastimil Brom : > > I just noticed an ommision of come character names in unicodedata module. > These are some CJK - Ideographs: > > 龼 (0x9fbc) - 鿋 (0x9fcb) > (CJK Unified Ideograp

[issue10459] missing character names in unicodedata (CJK...)

2010-11-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > > Marc-Andre: Many of the characters you refer actually do have names assigned, > even if the names don't appear in the Unicode character database. Instead, > they a

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think that's a bug in the resetlocale() API. The correct way to reset the locale setting to defaults, it to use setlocale(category, "") The other issues here is that getlocale() appears to return non-ISO language codes on Windows. If th

[issue10435] Document unicode C-API in reST

2010-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Wed, Nov 17, 2010 at 5:20 PM, Marc-Andre Lemburg > wrote: > .. >> -/* Encodes a Unicode object and returns the result as Python string >> +/

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: R. David Murray wrote: > > R. David Murray added the comment: > > I had a report from a user on IRC during the bug weekend that they could not > reproduce the failure on windows. So it may be dependent on the windows > version. T

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > R. David Murray wrote: >> >> R. David Murray added the comment: >> >> I had a report from a user on IRC during the bug weekend that they co

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

2010-11-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > New submission from Alexander Belopolsky : > >>>> 'xyz'.center(20, '\U00100140') > Traceback (most recent call last): > File "", line 1, in > Type

[issue10524] Patch to add Pardus to supported dists in platform

2010-11-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Looks good. BTW: What is "pardus" ? -- ___ Python tracker <http://bugs.python.org/issue10524> ___ ___ Python-b

[issue10524] Patch to add Pardus to supported dists in platform

2010-11-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Eric Smith wrote: > > Eric Smith added the comment: > > The patch name has 2.7 in it, although "Versions" says 3.2. As this is a > feature request, it can't be added to 2.7. I consider missing distros in the list of suppor

[issue10524] Patch to add Pardus to supported dists in platform

2010-11-25 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- stage: -> commit review type: feature request -> behavior versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/i

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Mark, can you opine on this? Yes, I'll have a look later today. -- ___ Python tracker <http://bugs.p

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I like the idea and thanks for putting work into this. Some comments: * when using macro variables, always put the variables in parens in the expansion; this avoids precedence issues, weird syntax errors, etc. - even if it may not be necessary * a

[issue10552] Tools/unicode/gencodec.py error

2010-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 > sho

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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() >> >> *

[issue10557] Malformed error message from float()

2010-11-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: 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? I see it as > PyUnicode_EncodeDecimal's j

[issue10557] Malformed error message from float()

2010-11-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: >>>> float('½') > Traceback (most recent call last): > File "", line 1, in > ValueError: could not convert string to float: � > >>>> float('42½') > Traceback (most recent call last)

[issue10567] Unicode space character \u200b unrecognised a space

2010-11-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > > In 2.6, there was a manually maintained list, probably dating back to before > Unicode 4.0. That's not quite correct: Python 1.6.x - 2.5.x used tables for t

[issue10567] Unicode space character \u200b unrecognised a space

2010-11-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: It is still strange that the .isspace() property value changed, since the code point has not changed in the recent Unicode versions: 4.1.0: 200B;ZERO WIDTH SPACE;Cf;0;BN;N; 5.1.0: 200B;ZERO WIDTH SPACE;Cf;0;BN;N; 5.2.0: 200B;ZERO WIDTH

[issue10567] Unicode space character \u200b unrecognised a space

2010-11-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: 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 SPACE;Cf;0;BN;N; 4.1.0: 200B;ZERO WIDTH SPACE;Cf;0;BN;N; 5.1.0: 200B;ZERO WIDTH

[issue10557] Malformed error message from float()

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 >

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

2010-11-29 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : The script only patches numeric data into the table (field 8), but does not update the digit field (field 7). As a result, ideographs used for Chinese digits are not recognized as digits and not evaluated by int(), long() and float(): http

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

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The code point is also not listed as decimal digit (relevant for the int() decimal parsing): >>> unicodedata.decimal(unicode('三', 'utf-8')) Traceback (most recent call last): File "", line 1, in ValueError: not

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

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Here's a quick overview of the fields that are set for U+4E09: http://www.fileformat.info/info/unicode/char/4e09/index.htm -- ___ Python tracker <http://bugs.python.org/is

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

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: This is the definition of kPrimaryNumeric http://ftp.lanet.lv/ftp/mirror/unicode/5.0.0/ucd/Unihan.html#kPrimaryNumeric -- ___ Python tracker <http://bugs.python.org/issue10

[issue10552] Tools/unicode/gencodec.py error

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: gencodec.py is only rarely used, namely when adding new codecs based on Unicode mapping files. It is not run regularly on the files from ftp.unicode.org and only updated on demand. AFAIK, it was last used on Python2 and never on Python3, hence the errors

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

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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

[issue10552] Tools/unicode/gencodec.py error

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 >>

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

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 >

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

2010-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > > This is not a bug, see > > http://www.unicode.org/reports/tr44/#Numeric_Value > > Characters have a Numeric_Type property of either null, Decimal, Digit, or &

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

2010-12-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Mark Dickinson wrote: > > Mark Dickinson added the comment: > >> There should be an environment variable to make the symbol settable. > > That could work; it's a bit late to do this in 3.2, though. How about the > foll

[issue10557] Malformed error message from float()

2010-12-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 &g

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

2010-12-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Mark Dickinson wrote: > > Mark Dickinson added the comment: > > In all seriousness, the idea of accepting both 'i' and 'j' in complex() isn't > horrible. I'm personally -0.small on it, mostly because it see

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

2010-12-02 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : The Python3 documentation for these numeric constructors is wrong. Python has supported Unicode numerals specified as code points from the Unicode category "Nd" (decimal digit) since Python 1.6.0 when Unicode was first introduced in Python.

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

2010-12-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 encodin

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

2010-12-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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",

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

2010-12-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > 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 i

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

2010-12-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Maybe we need a complex analog to datetime.strptime: > > complex.strpcx('(3 + 4i)', '(%R + %Ii)') -> 3 + 4j That's a good idea. P

[issue10557] Malformed error message from float()

2010-12-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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_Co

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 &

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

2010-12-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > > As per > > http://mail.python.org/pipermail/python-dev/2010-December/106374.html > > I think this checkin should be reverted, as it's breaking the langua

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

2010-12-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 > in

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

2010-12-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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 >>

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

2010-12-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > 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." >> >>

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > I am attaching a patch for commit review. I added an underscore prefix to > all new macros. This way I am not introducing new features and we will have > a

[issue4819] Misc/cheatsheet needs updating

2011-01-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Updating the cheat sheet would be a great summer of code like project. We are considering using the cheat sheet as basis for a flyer in the PSF marketing material project. Please add it back and add a note to it, that it currently is missing a few

[issue4819] Misc/cheatsheet needs updating

2011-01-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Perhaps the cheatsheet can be transferred to a wiki page and we can put out a > comp.lang.python call for updates. Good idea. I just want to prevent the text from be

[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2011-01-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Python can be embedded into other applications and unconditionally changing the locale (esp. the LC_CTYPE) is not good practice, since it's not thread-safe and affects the entire process. An application may have set LC_CTYPE (or the locale) to some

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> upon program startup, init LibC environment: setlocale(LC_ALL, ""); > > Python 3 does something like that: Py_InitializeEx() calls > setlocale(LC_CTYPE

[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2011-01-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > >> An clean alternative would be adding LC_* variable parsing code to >> Python to avoid the setlocale() call altogether. > > That would be highly non-portable,

[issue11167] Overflow in unicode_hash

2011-02-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Could you try the same in Python 2.7 ? The overflow is intended (after all, it's a hash function), but we should probably add a cast to Py_hash_t to the hash building line in order to make the compiler aware of this. -- nosy: +le

[issue11173] Undocumented public APIs in Python 3.2

2011-02-10 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : Mark Shannon on python-dev: The following API functions were removed from 3.1.3: PyAST_Compile PyCObject_AsVoidPtr PyCObject_FromVoidPtr PyCObject_FromVoidPtrAndDesc PyCObject_GetDesc PyCObject_Import PyCObject_SetVoidPtr PyCode_CheckLineNumber

[issue1467929] %-formatting and dicts

2008-05-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Sean, why don't you just check in the patch ? Then we can close the bug. Georg, the fact that we have an alternative method for string formatting doesn't mean that it's ok for Python to hide error using the prevai

[issue1467929] %-formatting and dicts

2008-05-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: I guess the patch was just forgotten after the 2.5 release was out. I've added a 2.6 tag and assigned the patch to Sean. -- assignee: anthonybaxter -> jafo versions: +Python 2.6 ___

[issue2857] add codec for java modified utf-8

2008-05-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: What would you use such a codec for ? >From the references you gave, it is only used internally for Java object serialization, so wouldn't really be of much use in Python. -- nosy: +lemburg title: add coded for jav

[issue2857] add codec for java modified utf-8

2008-05-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> 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 ? Dito for parsing Lucene i

[issue2948] Unicode support for hashing algorithms

2008-05-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-05-23 05:38, Raymond Hettinger wrote: > Raymond Hettinger <[EMAIL PROTECTED]> added the comment: > > I don't think this is the right thing to do. The hash algorithms are > defined in terms of bytes,

[issue2949] Windows installer doesn't include OpenSSL license and notice

2008-05-23 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg <[EMAIL PROTECTED]>: The _ssl module is built against OpenSSL. Since I couldn't find any OpenSSL DLLs in my Python install dir and due to the size of the _ssl.pyd, I assume that it is statically linked against OpenSSL. That's all fi

[issue2949] Windows installer doesn't include OpenSSL license and notice

2008-05-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-05-23 14:32, Martin v. Löwis wrote: > Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > > Would you like to work on a patch? No - I don't know anything about the Windows MSI installer for Python.

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2008-05-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Only pickle protocol 0 is ASCII. The other two are binary protocols. Protocol 2 is default in Python 2.5. This should probably be made clear in the documentation, so I'd consider this a documentation bug. -- nos

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2008-05-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Actually, I was wrong: protocol 0 is the default if you don't specify the protocol. This set the binary flag to false, which should result in ASCII-only data. The Unicode save routine uses the raw-unicode-escape codec, bu

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2008-05-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: I can't follow you, Martin. How can a data format be printable ASCII and at the same time use non-ASCII characters ? __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2008-05-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-05-28 00:21, Martin v. Löwis wrote: > Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > >> How can a data format be printable ASCII and at the same time use >> non-ASCII characters ? > >

[issue3011] locale module alias table needs to be updated

2008-05-30 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg <[EMAIL PROTECTED]>: It's missing a lot of entries of the type "[EMAIL PROTECTED]" and was last updated in 2004. -- assignee: lemburg components: Library (Lib) messages: 67551 nosy: lemburg severity: normal status: open title

[issue3011] locale module alias table needs to be updated

2008-05-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Committed as r63824. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3011] locale module alias table needs to be updated

2008-05-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: It may be worth to backport the change to 2.5, since it causes problems with current Linux distributions that use the "@euro" extension as default. ___ Python tracker <[EMAI

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2008-06-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: We could add an extra step to also escape range(128, 256) code points, but I don't think it's worth the performance loss this would cause. Note that this was the first time anyone has ever noticed the fact that the pick

=?utf-8?q?[issue2799]_Remove_PyUnicode=5FAsString(), =09rework_PyUnicode=5FAsStringAndSize(), _add_PyUnicode=5FAsChar()?=

2008-06-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-05 21:14, Alexandre Vassalotti wrote: > Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: > > I now think the proposed changes wouldn't be bad thing, after all. I > have been bitten myse

[issue2799] Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()

2008-06-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-05 22:50, Martin v. Löwis wrote: >> Note that the function *must* check the UTF-8 buffer for embedded >> NUL bytes and then raise an exception if it finds one. Otherwise, >> the API would si

[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Removing 3.0 from the versions list. -- nosy: +lemburg versions: -Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-11 11:32, Nick Coghlan wrote: > Nick Coghlan <[EMAIL PROTECTED]> added the comment: > > As far as I am concerned, the implementation of PyObject_Unicode in > object.c has a bug in it: it should NEVER b

[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-11 16:15, Nick Coghlan wrote: > Nick Coghlan <[EMAIL PROTECTED]> added the comment: > > Minor cleanup of Simon's patch attached - aside from a couple of > unneeded whitespace changes, it all looks

[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-11 16:49, Nick Coghlan wrote: > Nick Coghlan <[EMAIL PROTECTED]> added the comment: > > I'm not sure adding a dedicated method slot would be worth the hassle > involved - Py3k drop backs to just th

[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-11 20:38, Antoine Pitrou wrote: > Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > > Here is a new patch against SVN trunk. Nothing changed, except that I > updated pybench to test keyword argum

[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-11 23:27, M.-A. Lemburg wrote: > On 2008-06-11 20:38, Antoine Pitrou wrote: >> Antoine Pitrou <[EMAIL PROTECTED]> added the comment: >> >> Here is a new patch against SVN trunk. Nothing changed,

[issue3092] Wrong unicode size detection in pybench

2008-06-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-12 21:50, Antoine Pitrou wrote: > New submission from Antoine Pitrou <[EMAIL PROTECTED]>: > > In py3k, pybench wrongly detects UCS2 builds as UCS4. Patch attached. Why is that ? Doesn't chr(10)

[issue3092] Wrong unicode size detection in pybench

2008-06-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-06-12 22:58, Antoine Pitrou wrote: > Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > > Le jeudi 12 juin 2008 à 20:26 +0000, Marc-Andre Lemburg a écrit : >> Doesn't chr(10) raise an ex

[issue2912] let platform.uname try harder

2008-06-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: There are two patches. Which one do you want me to look at ? Note that platform.py should stay Python 1.5.2 compatible, ie. no new builtins, no True/False. The second patch also appears to mix tabs/

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