[issue8939] Use C type names (PyUnicode etc;) in the C API docs

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Le mercredi 09 juin 2010 11:06:25, vous avez écrit : >>> - replace Python types by C Python types (eg. str => PyUnicodeObject* >>> and None =>

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: "z" should not accept bytes... why not ? "z" is the same as "s" with the addition that passing None as parameter will result in the pointer to get set to NULL. "s" accepts bytes via the buffer interface, so w

[issue8923] Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString()

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Since Python3 fixes the UTF-8 default encoding, it's better >> to enhance PyUnicode_AsUTF8String() to cache the UTF-8 >> string in the Unicode object >

[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > The following code at the beginning of PyUnicode_DecodeUTF32Stateful is buggy > when codec endianness doesn't match the native endianness (not to mention it >

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Le mercredi 09 juin 2010 13:06:53, vous avez écrit : >> "s" accepts bytes via the buffer interface > > No. "s*" and "s#" do ac

[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Here is a new patch with tests. > >> I wonder whether it wouldn't be better to preallocate >> a Unicode object with size of e.g. size/4 + 16 and >>

[issue8784] tarfile/Windows: Don't use mbcs as the default encoding

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > I created a TAR archive with the 7-zip archiver of file with diacritics in > their name (eg. "é" and "à"). Then I opened the archive with WinRAR: t

[issue8784] tarfile/Windows: Don't use mbcs as the default encoding

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > STINNER Victor wrote: >> >> STINNER Victor added the comment: >> >> I created a TAR archive with the 7-zip archiver of file with diacritics in &

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> t# was meant to provide access to text data, so replacing it with a >> parser code that is meant for binary data is not correct. The >> closes Python3 gets to

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Brett Cannon wrote: > > Brett Cannon added the comment: > > So yes, cPickle/pickle, cStringIO/StringIO, heapq, etc. are all examples of > the approach. One could choose to write the pure Python version first, > profile the co

[issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString()

2010-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Note that these shortcut bypass the codec registry logic. > > Yes, but it's already the case without my patch. I don't think that it's > really u

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > I like the idea of a pure Python implementation of the datetime module, for > different reasons: > - it will become the reference implementation > - other Python in

[issue8784] tarfile/Windows: Don't use mbcs as the default encoding

2010-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > My tests with 7-zip and WinRAR conviced me that it's not a good idea to use > utf-8 *by default* on Windows. But since mbcs doesn't support surrogateescape &

[issue8964] Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version

2010-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Frederic Torres wrote: > > New submission from Frederic Torres : > > Method _sys_version() module Lib\platform.py does parse correctly IronPython > 2.x version > > The format of sys.version now start with a version number and ( >

[issue8997] Write documentation for codecs.readbuffer_encode()

2010-06-14 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : See #8838 for details. -- assignee: lemburg components: Documentation messages: 107809 nosy: lemburg priority: normal severity: normal status: open title: Write documentation for codecs.readbuffer_encode() versions: Python 3.2, Python 3.3

[issue8997] Write documentation for codecs.readbuffer_encode()

2010-06-14 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- components: +Unicode ___ Python tracker <http://bugs.python.org/issue8997> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Here's a patch fixing the problem. -- keywords: +patch versions: +Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file17687/msvc9compiler.patch ___ Python tracker <http://bugs.py

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: If possible, the patch should go into Python 2.7 rc2, since without it, you can't build Python extensions on Windows x64 platforms. -- assignee: tarek -> benjamin.peterson nosy: +benjamin.peterson __

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > I would like to move this forward. The PyPy implementation at > > http://codespeak.net/pypy/dist/pypy/lib/datetime.py > > claims to be based on the o

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Thu, Jun 17, 2010 at 10:31 AM, Marc-Andre Lemburg > wrote: > .. >> To avoid the wasted memory and import time, it's better to use: >>

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > >> To avoid the wasted memory and import time, it's better to use: >> >> try: >>from _cmodule import * >> except ImportError: >&g

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Tarek Ziadé wrote: > > Tarek Ziadé added the comment: > > The patch looks good but I am not comfortable with this change until it's > tested under other windows/VC flavors. The patch is really trivial, but I'll test it on a Wi

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Konstantin Zemlyak wrote: > > Konstantin Zemlyak added the comment: > > Win2003 x64, VS2008, vanilla python 2.7rc1 amd64 from python.org. > Building python packages with C extensions works fine. Tested on simplejson, > jinja2 (with ena

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I checked this again using Python 2.7rc1 AMD64 on Windows Vista x64 using VS2008 and get the same error: error: Unable to find vcvarsall.bat Here's an updated patch for Python 2.7rc1. -- Added file: http://bugs.python.org/file17727/msvc9com

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Konstantin Zemlyak wrote: > > Konstantin Zemlyak added the comment: > > 64-bit Windows, 64-bit cmd.exe, 64-bit python, not patched:: > > D:\>"c:\Program Files\Python27\python.exe" > Python 2.7rc1 (r27rc1:81

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Konstantin Zemlyak wrote: > > Konstantin Zemlyak added the comment: > > Tried msvc9compiler-py27.patch. find_vcvarsall() still works with the same > result, while distutils.msvc9compiler.VS_BASE h

[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Applied patch in r82130. Thanks! Thanks, Benjamin. -- ___ Python tracker <http://bugs.pytho

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : The RC2 builds fine on Mac OS X 10.6 (Snow Leopard), but fails to build any of the required extension modules on 10.3: Python build finished, but the necessary bits to build these modules were not found: _bsddb gdbm

[issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line

2010-06-21 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : A typical build line looks like this: gcc-4.0 -c -fno-strict-aliasing -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -isysroot /Developer/SDKs

[issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Note that the duplicate insertion of -isysroot happens because CPPFLAGS was changed to include this extra option. Since PY_CFLAGS includes both CFLAGS and CPPFLAGS, you get the duplicate occurrence. In Python 2.6, the extra option did appear in

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue9046> ___ ___ Python-bugs-list mailing list Unsub

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Some debugging shows that the ext.sources list in setup.py does not include the "Modules/" prefix for the source files: *** moddirlist=['/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Modules', '/usr/local/src/egenix

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Turns out that find_file() always returns None for the shared mods: *** module _struct.c in ['/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Modules', '/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Mac/Module

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Instrumenting find_file() a bit: if sys.platform == 'darwin': # Honor the MacOSX SDK setting when one was specified. # An SDK is a directory with the same structure as a real # system, but with only header files and

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Note that I've not checked whether an SDK build works on Mac OS X 10.6. The regular build does work. The problem appears to be related to SDK builds only, e.g. if you plan to build Universal binary on Mac OS X

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > @lemburg: So what is your opinion on this issue? You're probably right: it's too late to change "s" to accept buffer interface compatible objects as well.

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Sorry, my bad. The system in question is a 10.4 Tiger system. -- title: Python 2.7rc2 doesn't build on Mac OS X 10.3 -> Python 2.7rc2 doesn't build on Mac OS X 10.4 ___ Python tracker <http:/

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > Marc-Andre: what version of Xcode do you use? (the version in the About menu > of Xcode.app). We have Xcode 2.5 and all updates on the machine. Python 2.6 and older versio

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > What I don't quite understand is why the build fails for you but passes for > me. What configure flags did you use? I posted the configure options in the first me

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > The search code must look in the SDK and not fall back on looking into the > system to avoid finding new headers and libraries when trying to build using > an older SDK

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > I don't agree that there must be an option to fall back to system provided > libs. The point of using an SDK is to avoid doing that because you might end > up w

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > That (/usr/local/src) explains why I haven't been able to reproduce the > problem, that worried me a little. > > W.r.t. to the SDK: > > 1) Y

[issue9036] Simplify Py_CHARMASK

2010-06-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Stefan Krah wrote: > > Stefan Krah added the comment: > > Antoine Pitrou wrote: >>> Thus, >>> ((unsigned char)((c) & 0xff)) and ((unsigned char)(c)) should produce >>> the same results. >> >>

[issue9076] Remove PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode?

2010-06-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > The following 4 functions are public but not documented and not used in > Python3: > - PyUnicode_AsDecodedObject(), PyUnicode_AsEncodedObject() > - PyUni

[issue9076] Remove PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode?

2010-06-25 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- assignee: -> d...@python components: +Documentation -Unicode nosy: +d...@python ___ Python tracker <http://bugs.python.org/iss

[issue9076] Add C-API documentation for PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode

2010-06-25 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- title: Remove PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode? -> Add C-API documentation for PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode ___ Python trac

[issue5180] 3.1 cannot unpickle 2.7-created pickle

2010-06-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please keep the Python3 version of pybench compatible to Python 2.6 and 2.7. -- ___ Python tracker <http://bugs.python.org/issue5

[issue5180] 3.1 cannot unpickle 2.7-created pickle

2010-06-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > I am attaching a patch which makes python3 read 27.bench without errors. I > think this should be applied while a complete solution for unpickling old > sty

[issue5180] 3.1 cannot unpickle 2.7-created pickle

2010-06-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > The bytes/string issu was a red herring: with pickle.load(open('27.bench', > 'b')), I get the same stack trace as from command line pybench

[issue8998] add crypto routines to stdlib

2010-06-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Apart from the question of API, please also include a section on the legal implications this move would have on Python in the PEP. We currently only include OpenSSL in the Windows installers and (for some reason) don't pay much attention t

[issue8998] add crypto routines to stdlib

2010-06-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> If we are to require OpenSSL or some other crypto lib, > > We already depend on OpenSSL for both hashlib and ssl, this proposal > wouldn't change anything

[issue9119] Python download page needs to mention crypto code in Windows installer

2010-06-29 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg : This needs to be done to protect our users (importing crypto code or using it may be illegal in their home country, see http://rechten.uvt.nl/koops/cryptolaw/ for a survey) and to satisfy an attribution requirement in the OpenSSL license and code base

[issue9119] Python download page needs to mention crypto code in Windows installer

2010-06-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: See the OpenSSL license for details on the notice requirement: http://www.openssl.org/source/license.html -- ___ Python tracker <http://bugs.python.org/issue9

[issue8998] add crypto routines to stdlib

2010-06-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > We currently only include OpenSSL in the Windows installers and (for some > reason) don't pay much attention to the implications this has (the fact is > not mentioned on the download page and the Windows

[issue9133] Invalid UTF8 Byte sequence not raising exception/being substituted

2010-06-30 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- resolution: -> wont fix status: pending -> closed ___ Python tracker <http://bugs.python.org/issue9133> ___ ___ Pyth

[issue9133] Invalid UTF8 Byte sequence not raising exception/being substituted

2010-06-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > I think this can be closed as wontfix. Agreed. I've already closed the ticket. -- ___ Python tracker <http://bugs.python

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Fri, Jul 2, 2010 at 6:00 PM, Tim Peters wrote: >> >> Tim Peters added the comment: >> >>> Do you remember why it was a good idea to &

[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X

2010-07-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: sorted() and set() were introduced in Python 2.4. If your code will not run in Python 2.3 anyway, then using those should be fine. The only other place currently using set() is the MSVC9 compiler code. sorted() is not used at all in distutils. list.sort

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jeffrey Yasskin wrote: > > New submission from Jeffrey Yasskin : > > Patch at http://codereview.appspot.com/1749042. > > The idea here is to let the user set CFLAGS on either configure or make (or > both), and have later settings ap

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Given that '\U0001'.isprintable() returns True, I would say yes. If > someone needs to print this char and has an appropriate font to do it, I > don't see

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > [This should probably be discussed on python-dev or in another issue, so feel > free to move the conversation there.] > > The current implementation considers printable

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > I suggest to go ahead and apply this patch, at least it correctly selects > "printable" characters, whatever this means. > I filed i

[issue9198] Should repr() print unicode characters outside the BMP?

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: [Adding some bits from the discussion on #5127 for better context] """ Ezio Melotti wrote: > > > > Ezio Melotti added the comment: > > > > [This should probably be discussed on python-dev or in another issue, so

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > Marc-Andre Lemburg wrote: >> I was never a fan of the Unicode repr() change to begin with. The >> repr() of an object should work in almost all cases. > > I still think that #5110 should be fixed (there'

[issue9203] Use computed gotos by default

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > New submission from Antoine Pitrou : > > Now that the option has probably been extensively tested, it would be nice to > enable computed gotos by default on systems that support them. > Perhaps this needs a ded

[issue9203] Use computed gotos by default

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > Antoine Pitrou wrote: >> >> New submission from Antoine Pitrou : >> >> Now that the option has probably been extensively tested, it would be

[issue9203] Use computed gotos by default

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> gcc 4.4.2 on AMD processors ... >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42621 > > So? Compilers have all kinds of optimization bugs, it's not our

[issue7766] sys.getwindowsversion as PyStructSequence

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Brian Curtin wrote: > > Brian Curtin added the comment: > > The previously mentioned comments about backwards incompatibility with the > number of items in the sequence are now a problem, since structseq now > inherits from tu

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > A new patch, generated on top of r82662 Could you explain what this bit is about ? @@ -349,7 +313,7 @@ configure Python using --with-wctype-functi

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > >> Could you explain what this bit is about ? >> -#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS) >

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

2010-07-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > This can no longer be a 2.5 issue but I am not sure how to update it. > > OP apparently opened it as a feature request, so I did update it to 3.2. > > But OP th

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > A new patch that doesn't remove an important check, avoids a crash when the C > macro is called with a huge number. thanks Ezio. Could you pleas

[issue9203] Use computed gotos by default

2010-07-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > >> No, but we do need to make sure that the casual user does not >> run into such issues by using the default compiler on a typical >> Unix system with Python def

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > The 'if' in 'gettyperecord'. (I would also rewrite that as "if (code > > 0x10)", it looks more readable to me.) Ah, good catch ! > Th

[issue9210] remove --with-wctype-functions configure option

2010-07-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > Patch attached. Thanks. The patch looks good and I'd be +1 on applying it. The only problem I see is that we may have to follow the deprecation pr

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

2010-07-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > >> I would like to know what happened with hex_codec and what is the new py3 >> for this. > > If you had read this bug report, you'd know that the code

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

2010-07-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Georg Brandl wrote: > > Georg Brandl added the comment: > > ... but don't wait to long to add them! I plan to work on that after EuroPython. Florent already provided the patch for the codecs, so what's left is adding the .tra

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

2010-07-10 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- versions: -Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/issue7475> ___ ___ Python-bugs-list mailin

[issue6668] locale.py: can't parse sr...@latin locale

2010-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: This should be fixed in Python 2.7. It added a few more aliases: 'sr_rs':'sr_RS.UTF-8', 'sr_rs.u...@latn': 'sr_rs.ut...@latin', 'sr...@latin&

[issue1076790] test test_codecs failed

2010-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > The OP compiled python with --with-wctype-functions, and the libc wctype > functions work differently depending on the locale. > I suggest closing th

[issue9242] unicodeobject.c: use of uninitialized values

2010-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Stefan Krah wrote: > > New submission from Stefan Krah : > > Not sure if this is valid or if there is some internal trickery that Valgrind > isn't aware of. If it's the latter, perhaps an entry to > Misc/

[issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32?

2010-07-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I'm interested in getting this into 3.2. Thanks for bringing the issue back on my radar. -- ___ Python tracker <http://bugs.python.org/i

[issue7330] PyUnicode_FromFormat segfault

2010-07-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ray.Allen wrote: > > Ray.Allen added the comment: > > I feel it's not proper to allow the width restrict on types %S, %R, %A. These > types correspond to PyObject_Str(), PyObject_Repr, PyObject_ASCII() > respectively, the result

[issue8776] Bytes version of sys.argv

2010-07-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Using that approach would work on POSIX systems. > > As os.environb, I think that sys.argv should not exist on Windows. > >> Another problem I see is synchro

[issue7615] unicode_escape codec does not escape quotes

2010-07-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Mark Lawrence wrote: > > Mark Lawrence added the comment: > > Could we please have some responses to msg98327 as there are some very > positive comments there. A patch implementing the suggestions would

[issue8603] Create a bytes version of os.environ and getenvb()

2010-07-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > A quick search[0] also shows that environ.data is used by several projects. > Changing it from str to bytes will most likely break these programs, so I'm > not sure i

[issue9276] pickle should support methods

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Note that pickle deliberately does not support serializing code objects. This is a security feature and should not be broken ! If you need to pickle such objects, you can easily register handlers that take care of this. -- nosy: +lemburg

[issue8821] Range check on unicode repr

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Well, the patch was technically useless since, as mentioned, unicode strings > are terminated by a NUL character by design. There are two things to keep in mind: * Unic

[issue8821] Range check on unicode repr

2010-08-02 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- resolution: fixed -> status: closed -> open ___ Python tracker <http://bugs.python.org/issue8821> ___ ___ Python-bugs-

[issue1180267] expanding platform module and making it work as it should

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: You appear to be requesting two things: 1. Determine the Windows version by looking at sys.getwindowsversion() rather than relying on the ver command line tool. 2. Use lsb_release to fetch the release name on Linux systems that support it. The first

[issue8821] Range check on unicode repr

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> * Unicode objects are NUL-terminated, but only very external APIs >>rely on this (e.g. code using the Windows Unicode API). Please >>don't make th

[issue9276] pickle should support methods

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > >> This is a security feature and should not be broken ! > > Can you explain this? > > I don't think I agree, since an attacker can always seri

[issue9276] pickle should support methods

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > >> By adding default support for unpickling code objects, you can trick > the unpickling code into executing serialized code: > > This doesn't soun

[issue1581182] Definition of a "character" is wrong

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Without patch, I don't see how this issue can be moved forward. Adding a list of such Unicode term definitions would at best cause additional confusion and only address people knowledgable in the Unicode field. Note that Python's use of code

[issue9276] pickle should support methods

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > > For example: > > exar...@boson:~$ python > Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) > [GCC 4.4.1] on linux2 > Type "help", "c

[issue9276] pickle should support methods

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: M.-A. Lemburg wrote: > Jean-Paul Calderone wrote: >> >> Jean-Paul Calderone added the comment: >> >> For example: >> >> exar...@boson:~$ python >> Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) >&g

[issue9276] pickle should support methods

2010-08-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Mon, Aug 2, 2010 at 10:11 AM, Marc-Andre Lemburg > wrote: > .. >> Hmm, I just tried the code and it seems that you're right: >> >

[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2010-08-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think we'll start to use the lsb_release command if available and as suggested in issue1322. Note that if you test the API, make sure that you use a Python build from sources available on python.org - the Debian and Ubuntu packagers tend to

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

2010-08-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: > I believe _time module should become the home of the gettimeofday() method > and pure python implementation of time.time() will be > > def time() >s, us = _time.gettimeofday() >return s + 1e-6 * us > > > Si

[issue9418] Move _formatter_* methods from string type into _string module

2010-08-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Mark Dickinson wrote: > > > > Mark Dickinson added the comment: > > > > The idea seems fine to me. Hiding the _string module in > > Objects/unicodeobject.c is a little odd, though: why not a new > > Modules/_string

<    11   12   13   14   15   16   17   18   19   20   >