[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

[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: > > 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.

[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

[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

[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 >>

[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

[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

[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

[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,

[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: 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

[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: > > New submission from JoeKuan : > >>>> a = (1970, 1, 1, 0, 59, 58, 0, 0, 0) >>>> time.mktime(a) > -2.0 On Windows, you get an OverflowError for this tuple as well. >>>> a = (19

[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: > > PEP 3147 says[0]: > """ > For backward compatibility, Python will still support pyc-only distributions, > however it will only do so when the pyc file li

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

2011-04-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Here's a new patch that checks that newconst is not NULL and that it's a > unicode object. > I added a test for the case where it's NULL. I don't think

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

2011-04-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Are there any cases where v[w] -- where v is a unicode object -- returns a > non-unicode object? There could be: either from subclasses or from buggy code. In any case, macros

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

2011-04-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > The attached patch skips the peepholer optimizations for BINARY_SUBSCR if the > resulting char is a surrogate on narrow builds or a non-bmp char in wide > builds. > Note

[issue11840] Improvements to c-api/unicode documentation

2011-04-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Sandro Tosi wrote: > > Sandro Tosi added the comment: > > On Tue, Apr 12, 2011 at 23:34, Marc-Andre Lemburg > wrote: >> Sandro Tosi wrote: >>> >>> Sandro Tosi added the comment: >>> >>> In additi

[issue11840] Improvements to c-api/unicode documentation

2011-04-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Sandro Tosi wrote: > > New submission from Sandro Tosi : > > Hi, > After reading tomo cocoa mail at docs@ I gave a look at c-api/unicode file > and fixed some minor editing issues.

[issue11840] Improvements to c-api/unicode documentation

2011-04-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Sandro Tosi wrote: > > Sandro Tosi added the comment: > > In addition, is there a reason for the sorting of UTF-8 UTF-32 UTF-16 and > UTF-7 sections? why not alphabetically? No particular reason. Alphabetical order would be just as g

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > MAL> Since most of the datetime module was inspired by mxDateTime, > MAL> I wonder why [ticks()/gmticks()] were left out. (msg75411) > > ""&

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Tue, Apr 5, 2011 at 4:33 AM, Marc-Andre Lemburg > wrote: > .. >> mxDateTime, which in large parts inspired the Python datetime module, >> has ha

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Marc, could you maybe write a new patching taking care of the DST and > maybe also the timezone? It looks like you have a long experience in > timestamps :-) Sorry, but no

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Just to add another data point to this discussion: mxDateTime, which in large parts inspired the Python datetime module, has had a .ticks() method (for local time) and a .gmticks() method (for UTC) for more than a decade now and so far, I haven't s

[issue11678] Add support for Arch Linux to platform.linux_distributions()

2011-04-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Westley Martínez wrote: > > Westley Martínez added the comment: > > Perhaps I wasn't clear. That release version isn't for the system. It's for > the installation disc. There's no way to get that info and it means noth

[issue6895] locale._parse_localename fails when localename does not contain encoding information

2011-04-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Stefan Krah wrote: > > Stefan Krah added the comment: > > Is there another (authoritative) source for locale aliases apart > from X.org? On Ubuntu Lucid, many aliases for installed locales > are missing: > > f = open("/var/

[issue11678] Add support for Arch Linux to platform.linux_distributions()

2011-03-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Westley Martínez wrote: > > Westley Martínez added the comment: > > ('arch', '', '') I've had a look at http://www.archlinux.org/download/ which does list a release version (currently 2010.05). Could you

[issue11678] Add support for Arch Linux to platform.linux_distributions()

2011-03-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Westley Martínez wrote: > > Westley Martínez added the comment: > > I forgot to say, Arch Linux is rolling release so it doesn't have a version > or id. Ok, but then what's the output of the function on Arch Linux (with the p

[issue11681] -b option undocumented

2011-03-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Even "from __future__ import unicode_literals" doesn't make it do anything. > > Perhaps Christian merged it by mistake in [5341b30b1812]? It looks more lik

[issue11678] Add support for Arch Linux to platform.linux_distributions()

2011-03-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please provide a patch for review. Thanks. -- ___ Python tracker <http://bugs.python.org/issue11678> ___ ___ Python-bug

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Le mardi 22 mars 2011 à 09:01 +, Marc-Andre Lemburg a écrit : >> Perhaps you could consider adding a similar approach (raising >> an exception instead of wri

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> It would be nice if it were enabled by default for fatal errors >> (and asserts perhaps?). > > That would mean that the module should be a builtin module, or tha

[issue6490] os.popen documentation in 2.6 is probably wrong

2011-03-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > r55334 removed popen2, popen3 and popen4 from the os module from Python 3 > (before the 3.0 release), but not os.popen. > > Python 3.2 has now convenience functions

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-03-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: M.-A. Lemburg wrote: > Raymond Hettinger wrote: >> >> Raymond Hettinger added the comment: >> >>> If you agree, Raymond, I'll backport the patch. >> >> Yes. That will address Antoine's legitimate con

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

2011-03-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > New patch deprecating platform.popen() and removing _popen. Patch looks good. > Marc-Andre: Do you agree to deprecate platform.popen() in favour of > subprocess? Yes

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

2011-03-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Try to use platform from within IDLE ... > > I tried subprocess.call('calc.exec'): it works. > > I tried p=subprocess.Popen('echo

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

2011-03-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Does subprocess work from inside Windows GUI applications? > > You mean: Python embedded in another program? I don't know. How can I test > that? Try to use

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

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: BTW: The _popen class can be removed as well, if the function is replaced with os.popen() or the subprocess module Popen(). -- ___ Python tracker <http://bugs.python.org/issue11

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

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > os.popen() is deprecated since Python 2.6 ("Use the subprocess module.") and > it is no more documented in Python 3. The following documentation explains >

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

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > Extract of the documentation: > > 15.14.3.1. Win95/98 specific > > platform.popen(cmd, mode='r', bufsize=None) > > Portable popen() interf

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2011-02-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > The patch turned out to be less trivial than I initially thought. > > The current algorithm checks for invalid continuation bytes in 4 places: > 1) before the switch/case

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > >> If you agree, Raymond, I'll backport the patch. > > Yes. That will address Antoine's legitimate concern about making other > backports harder, a

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > I guess you could regard the wrong encoding name use as bug - it > slows down several stdlib modules for no apparent reason. > > If you agree, Raymond, I'

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I guess you could regard the wrong encoding name use as bug - it slows down several stdlib modules for no apparent reason. If you agree, Raymond, I'll backport the patch. -- title: b'x'.decode('latin1') is much slowe

[issue11322] encoding package's normalize_encoding() function is too slow

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > We should first implement the same algorithm of the 3 normalization functions > and add tests for them (at least for the function in normalization): > > - no

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Closing the ticket again. The problem in question is solved. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issu

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> r88586: Normalized the encoding names for Latin-1 and UTF-8 to >> 'latin-1' and 'utf-8' in the stdlib. > > Why did you do that? We are trying

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > I don't know who changed the encoding's package normalize_encoding() function > (wasn't me), but it's a really slow implementation. > > The original version used the .translate() method whi

[issue11322] encoding package's normalize_encoding() function is too slow

2011-02-25 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : I don't know who changed the encoding's package normalize_encoding() function (wasn't me), but it's a really slow implementation. The original version used the .translate() method which is a lot faster and can be adapted to w

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think we should reset this whole discussion and just go with Alexander's original patch issue11303.diff. I don't know who changed the encoding's package normalize_encoding() function (wasn't me), but it's a really slow impl

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: r88586: Normalized the encoding names for Latin-1 and UTF-8 to 'latin-1' and 'utf-8' in the stdlib. -- ___ Python tracker <http://bug

[issue11313] Speed up default encode()/decode()

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > New submission from Alexander Belopolsky : > > In Python 3.x default encoding is always utf-8, but encode()/decode() still > try to look it up. Attached patch eliminates a call to normalize_encoding >

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Thu, Feb 24, 2011 at 3:54 PM, Antoine Pitrou > wrote: > .. >> I've committed the part of the patch which disallows a NULL data pointer >&

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Thu, Feb 24, 2011 at 11:31 AM, Marc-Andre Lemburg > wrote: > .. >> I think rather than removing any hyphens, spaces, etc. the >> function sho

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Ooops, I attached the wrong patch. Here is the new fixed patch. That won't work, Victor, since it makes invalid encoding names valid, e.g. 'utf(=)-8'. We

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Thu, Feb 24, 2011 at 11:01 AM, Marc-Andre Lemburg > wrote: > .. >> On this ticker, we're discussing just one application area: that >> o

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > I think that the normalization function in unicodeobject.c (only used for > internal functions) can skip any character different than a-z, A-Z and 0-9. > Something like:

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: As promised, here's the list of places where the wrong Latin-1 encoding spelling is used: Lib//test/test_cmd_line.py: -- for encoding in ('ascii', 'latin1', 'utf8'): Lib//test/test_codecs.py: -- ef = cod

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Steffen Daode Nurpmeso wrote: > > Steffen Daode Nurpmeso added the comment: > > .. i don't have actually invented this algorithm (but don't ask me where i > got the idea from years ago), i've just implemented the funct

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Thu, Feb 24, 2011 at 10:30 AM, Ezio Melotti wrote: > .. >> See also discussion on #5902. > > Mark has closed #5902 and indeed the discu

[issue11309] #include in Objects/unicodetype_db.h and Objects/unicodectype.c

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Дилян Палаузов wrote: > > New submission from Дилян Палаузов : > > As of python 2.7.1 configured with "--enable-ipv6 --enable-unicode > --with-system-expat --with-system-ffi --with-signal-module --with-threads > --with-wctype-fu

[issue5902] Stricter codec names

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > Ezio and I discussed on IRC the implementation of alias lookup and neither of > us was able to point out to the function that strips non-alphanumeric > charac

[issue5902] Stricter codec names

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > >> Accepting all common forms for >> encoding names means that you can usually give Python an encoding name >> from, e.g. a HTML page, or any other file

[issue5902] Stricter codec names

2011-02-24 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue5902> ___ ___ Python-bugs-list mailing list Unsubscri

[issue5902] Stricter codec names

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > What is the status of this. Status=open and Resolution=rejected contradict > each other. Sorry, forgot to c

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > In issue11303.diff, I add similar optimization for encode('latin1') and for > 'utf8' variant of utf-8. I don't think dash-less var

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jesús Cea Avión wrote: > > Jesús Cea Avión added the comment: > > What if we commit Antoine patch for 3.2.x, and the "correct" patch for py3k > trunk?. > > I am actually +1 to Marc-Andre. I feel in my guts that the provid

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please go with Alexander's solution of fixing the higher level code rather than silently trying to introduce a new feature in PyUnicode_Decode() that hides programming errors. Thanks. -- ___ Python tr

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> PyUnicode_Decode() et al. are conversion functions and these >> require valid content to work on. Passing in a NULL pointer >> does not fit that specificati

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Antoine Pitrou wrote: >>> >>> Antoine Pitrou added the comment: >>> >>>>> I am not sure PyUnicode_Decode() should treat NULL as a

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >>> I am not sure PyUnicode_Decode() should treat NULL as an empty string. >> >> Definitely not. That would hide programming errors. > > Well, this could b

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > I am not sure PyUnicode_Decode() should treat NULL as an empty string. Definitely not. That would hide programming errors. -- nosy: +lemburg title: Some "trivial" python 2.x pickles fails to lo

[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

[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

[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,

[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: 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

[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

[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

[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

[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." >> >>

[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: > > 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

[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

[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 &

[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

[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

[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

[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",

[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-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.

[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

[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: > >> 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

[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 &

[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 >

[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: > > 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: 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

<    6   7   8   9   10   11   12   13   14   15   >