[issue1091] [patch] py3k Mac installation errors

2007-09-03 Thread Humberto Diogenes

Humberto Diogenes added the comment:

One more patch, for:
 1. Writing str to binary file;
 2. Using string exceptions.

Traceback for #2:
/usr/bin/install -c -s ../python.exe 
"/Library/Frameworks/Python.framework/Versions/3.0/Resources/Python.app/
Contents/MacOS/Python"
DYLD_FRAMEWORK_PATH=/Users/humberto/src/open/py3k: ../python.exe 
./scripts/BuildApplet.py \
--destroot "" \
--python 
/Library/Frameworks/Python.framework/Versions/3.0/Resources/Python.app/C
ontents/MacOS/Python \
--output "/Applications/MacPython 3.0/Build Applet.app" \
./scripts/BuildApplet.py
./scripts/BuildApplet.py:16: DeprecationWarning: the buildtools module 
is deprecated
  import buildtools
Traceback (most recent call last):
  File "./scripts/BuildApplet.py", line 149, in 
main()
  File "./scripts/BuildApplet.py", line 34, in main
except buildtools.BuildError as detail:
TypeError: catching classes that do not inherit from BaseException is 
not allowed
make[1]: *** [install_BuildApplet] Error 1
make: *** [frameworkinstallapps] Error 2

After applying those two attached patches, I was able to succesfully run 
"make altinstall" (not without some other warnings, though).

__
Tracker <[EMAIL PROTECTED]>

__Index: Lib/plat-mac/buildtools.py
===
--- Lib/plat-mac/buildtools.py  (revision 57912)
+++ Lib/plat-mac/buildtools.py  (working copy)
@@ -17,7 +17,8 @@
 warnings.warn("the buildtools module is deprecated", DeprecationWarning, 2)
 
 
-BuildError = "BuildError"
+class BuildError(BaseException):
+pass
 
 # .pyc file (and 'PYC ' resource magic number)
 MAGIC = imp.get_magic()
Index: Lib/plat-mac/bundlebuilder.py
===
--- Lib/plat-mac/bundlebuilder.py   (revision 57912)
+++ Lib/plat-mac/bundlebuilder.py   (working copy)
@@ -180,8 +180,9 @@
 assert len(self.type) == len(self.creator) == 4, \
 "type and creator must be 4-byte strings."
 pkginfo = pathjoin(contents, "PkgInfo")
+data = bytes(self.type + self.creator, encoding='ascii')
 f = open(pkginfo, "wb")
-f.write(self.type + self.creator)
+f.write(data)
 f.close()
 #
 # Write Contents/Info.plist
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1092] Unexpected results in Tutorial about Unicode

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

Vizcaynot schrieb:
> New submission from Vizcaynot:
> 
> When trying the tutorial example about unicode  I have:
 "Äpfel".encode('utf-8')
>   File "", line 1
> SyntaxError: (unicode error) unexpected code byte

This is definitely a bug. Assigning to Martin to investigate.

--
assignee:  -> loewis
nosy: +georg.brandl, loewis

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1090] doctools/sphinx/web/application.py does not start on windows

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

Waldemar Osuch schrieb:
> New submission from Waldemar Osuch:
> 
> Loading pickles on windows without specifying 'rb' does not work in 
> http://svn.python.org/projects/doctools/trunk/sphinx/web/application.py
> A simple patch attached

Thanks, applied in rev. 57924.

If further Windows problems arise, let me know.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed
title: doctools/sphinx/web/application.py does not start on windows -> 
doctools/sphinx/web/application.py does not start on   windows

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1091] [patch] py3k Mac installation errors

2007-09-03 Thread Humberto Diogenes

Humberto Diogenes added the comment:

Patch 3: some more trivial fixes: new syntax for print() and octal 
numbers.

__
Tracker <[EMAIL PROTECTED]>

__Index: Mac/PythonLauncher/Makefile.in
===
--- Mac/PythonLauncher/Makefile.in  (revision 57912)
+++ Mac/PythonLauncher/Makefile.in  (working copy)
@@ -78,4 +78,4 @@
$(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit 
-framework Carbon
 
 Info.plist: $(srcdir)/Info.plist.in
-   sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; 
print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist
+   sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; 
print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist
Index: Mac/IDLE/Makefile.in
===
--- Mac/IDLE/Makefile.in(revision 57912)
+++ Mac/IDLE/Makefile.in(working copy)
@@ -55,5 +55,5 @@
 
 
 Info.plist: $(srcdir)/Info.plist.in
-   sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; 
print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist
+   sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; 
print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist
 
Index: Mac/Tools/fixapplepython23.py
===
--- Mac/Tools/fixapplepython23.py   (revision 57912)
+++ Mac/Tools/fixapplepython23.py   (working copy)
@@ -80,11 +80,11 @@
 """Create a wrapper script for a compiler"""
 dirname = os.path.split(filename)[0]
 if not os.access(dirname, os.X_OK):
-os.mkdir(dirname, 0755)
+os.mkdir(dirname, 0o755)
 fp = open(filename, 'w')
 fp.write(SCRIPT % compiler)
 fp.close()
-os.chmod(filename, 0755)
+os.chmod(filename, 0o755)
 print('fixapplepython23: Created', filename)
 
 def main():
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue883466] quopri encoding & Unicode

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

Okay, changed in rev. 57925. Closing this as fixed.

--
resolution:  -> fixed
status: open -> closed


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1078] cachersrc.py using tuple unpacking args

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

Superseded by #1091 patches.

--
nosy: +georg.brandl
resolution:  -> duplicate
status: open -> closed
superseder:  -> [patch] py3k Mac installation errors

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1043] test_builtin failure on Windows

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

This was apparently fixed by Thomas with rev. 57828.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1091] py3k Mac installation errors

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

Thanks for the patches, I've applied them as rev. 57926.

--
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed
title: [patch] py3k Mac installation errors -> py3k Mac installation errors

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1045] Performance regression in 2.5

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

May this be a byproduct of the new generator features in 2.5?

--
nosy: +georg.brandl

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1077] itertools missing, causes interactive help to break

2007-09-03 Thread Georg Brandl

New submission from Georg Brandl:

Python 3.0a1 includes itertools and normally builds it, so the
interesting thing would be why it isn't present on your system :)

Have you built Python yourself? If so, can you provide build logs and/or
error messages?

--
nosy: +georg.brandl

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1075] py3k: Unicode error in os.stat on Windows

2007-09-03 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I could not quite reproduce this on the German version (the error text
reads " Das System kann die angegebene Datei nicht finden" on XP),
however, the patch looks good and it fixes the same problem for the
registry functions (where I get "Das Handle ist ungültig"), so I
committed it as r57927.

--
nosy: +loewis
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1071] unicode.translate() doesn't error out on invalid translation table

2007-09-03 Thread Georg Brandl

Georg Brandl added the comment:

Yes, that makes sense.
New patch attached, copying the dict and using PyDict_Next.

__
Tracker <[EMAIL PROTECTED]>

__Index: Doc/library/stdtypes.rst
===
--- Doc/library/stdtypes.rst(Revision 57875)
+++ Doc/library/stdtypes.rst(Arbeitskopie)
@@ -948,9 +948,10 @@
 .. method:: str.translate(map)
 
Return a copy of the *s* where all characters have been mapped through the
-   *map* which must be a mapping of Unicode ordinals (integers) to Unicode
-   ordinals, strings or ``None``.  Unmapped characters are left
-   untouched. Characters mapped to ``None`` are deleted.
+   *map* which must be a dictionary of characters (strings of length 1) or
+   Unicode ordinals (integers) to Unicode ordinals, strings or ``None``.
+   Unmapped characters are left untouched. Characters mapped to ``None`` are
+   deleted.
 
.. note::
 
Index: Objects/unicodeobject.c
===
--- Objects/unicodeobject.c (Revision 57871)
+++ Objects/unicodeobject.c (Arbeitskopie)
@@ -7763,10 +7763,54 @@
 static PyObject*
 unicode_translate(PyUnicodeObject *self, PyObject *table)
 {
-return PyUnicode_TranslateCharmap(self->str,
- self->length,
- table,
- "ignore");
+PyObject *newtable = NULL;
+Py_ssize_t i = 0;
+PyObject *key, *value, *result;
+
+if (!PyDict_Check(table)) {
+PyErr_SetString(PyExc_TypeError, "translate argument must be a dict");
+return NULL;
+}
+/* fixup the table -- allow size-1 string keys instead of only int keys */
+newtable = PyDict_Copy(table);
+if (!newtable) return NULL;
+while (PyDict_Next(table, &i, &key, &value)) {
+if (PyUnicode_Check(key)) {
+/* convert string keys to integer keys */
+PyObject *newkey;
+int res;
+if (PyUnicode_GET_SIZE(key) != 1) {
+PyErr_SetString(PyExc_ValueError, "string items in translate "
+"table must be 1 element long");
+goto err;
+}
+newkey = PyInt_FromLong(PyUnicode_AS_UNICODE(key)[0]);
+if (!newkey)
+goto err;
+res = PyDict_SetItem(newtable, newkey, value);
+Py_DECREF(newkey);
+if (res < 0)
+goto err;
+} else if (PyInt_Check(key)) {
+/* just keep integer keys */
+if (PyDict_SetItem(newtable, key, value) < 0)
+goto err;
+} else {
+PyErr_SetString(PyExc_TypeError, "items in translate table must be 
"
+"strings or integers");
+goto err;
+}
+}
+
+result = PyUnicode_TranslateCharmap(self->str,
+self->length,
+newtable,
+"ignore");
+Py_DECREF(newtable);
+return result;
+  err:
+Py_DECREF(newtable);
+return NULL;
 }
 
 PyDoc_STRVAR(upper__doc__,
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1076] py3 patch: full Unicode version for winreg module

2007-09-03 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Thanks for the patch. Committed as r57928

--
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1089] ever considered adding static typing to python?

2007-09-03 Thread Martin v. Löwis

New submission from Martin v. Löwis:

Yes.

--
nosy: +loewis
resolution:  -> wont fix
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1091] py3k Mac installation errors

2007-09-03 Thread Humberto Diogenes

Humberto Diogenes added the comment:

And thanks for accepting them! (without complaining about my errors :-)

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1094] TypeError in poplib.py

2007-09-03 Thread Serge Julien

New submission from Serge Julien:

In poplib.py, lines 137-138, bytes and str are compared, leading to a
TypeError:

[...]
137while line != '.':
138if line[:2] == '..':
[...]

where type(line) = 

--
components: Library (Lib)
messages: 55617
nosy: serge.julien
severity: normal
status: open
title: TypeError in poplib.py
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1094] TypeError in poplib.py

2007-09-03 Thread Serge Julien

Serge Julien added the comment:

Patch proposal.

Tell me if it's right to submit it here: this is the first patch I submit

__
Tracker <[EMAIL PROTECTED]>

__

poplib.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1094] TypeError in poplib.py

2007-09-03 Thread Martin v. Löwis

Changes by Martin v. Löwis:


--
keywords: +patch

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1114345] Add SSL certificate validation

2007-09-03 Thread vila-sf


vila-sf
 added the comment:

Using CERT_NONE or adding the cert covers my needs, thanks.

Any hope this will be backported to python 2.5 ?

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1114345] Add SSL certificate validation

2007-09-03 Thread Martin v. Löwis

Martin v. Löwis added the comment:

There definitely won't be any new features in 2.5.x. However, I think
Bill said he might make this available separately.

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1777530] ctypes on Solaris

2007-09-03 Thread Thomas Heller

Thomas Heller added the comment:

This is an experimental patch (solaris.patch).  Can you please proofread
it and try it out on the solaris machine?

_
Tracker <[EMAIL PROTECTED]>

_Index: util.py
===
--- util.py	(revision 57552)
+++ util.py	(working copy)
@@ -70,11 +70,18 @@
 # assuming GNU binutils / ELF
 if not f:
 return None
-cmd = "objdump -p -j .dynamic 2>/dev/null " + f
-res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
-if not res:
-return None
-return res.group(1)
+if sys.platform.startswith("solaris"):
+cmd = "elfdump -d 2>/dev/null " + f
+res = re.search(r'\sSONAME\s+([^\s]+)\s+([^\s]+)', os.popen(cmd).read())
+if not res:
+return None
+return res.group(2)
+else:
+cmd = "objdump -p -j .dynamic 2>/dev/null " + f
+res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
+if not res:
+return None
+return res.group(1)
 
 if (sys.platform.startswith("freebsd")
 or sys.platform.startswith("openbsd")
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1114345] Add SSL certificate validation

2007-09-03 Thread Bill Janssen

Bill Janssen added the comment:

I'm planning to do a package for 2.3...

Sent from my iPhone

On Sep 3, 2007, at 5:32 AM,
vila-sf
<[EMAIL PROTECTED]> wrote:

>
>
>vila-sf
> added the comment:
>
> Using CERT_NONE or adding the cert covers my needs, thanks.
>
> Any hope this will be backported to python 2.5 ?
>
> _
> Tracker <[EMAIL PROTECTED]>
> 
> _

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1777530] ctypes on Solaris

2007-09-03 Thread Aki

Aki added the comment:

Hello Thomas,

Thank you for creating the patch.
Unfortunately, it didn't work.
(I rerun the whole installation process)

You used the following to check if the os is Solaris:

if sys.platform.startswith("solaris"):

Under Solaris 2.x sys.platform returns "sunos5".
You could use ...startswith("sunos") but things may be different under
"sunos6" so I usually prefer to use sys.platform == "sunos5".

After fixing this, my application with ctypes works okay.

I'm happy to try out if you create another patch.

Thank you,
Aki-

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1095] make install failed

2007-09-03 Thread Aki

New submission from Aki:

I thought this was already reported but I didn't see it in the list.
If this issue is already addressed, please discard.

The 'make install' failed if I re-run the installation again because
python-config under /usr/local/bin was already there.

Removing /usr/local/lib/python2.5/lib-dynload/Python-2.5.1-py2.5.egg-info
Writing /usr/local/lib/python2.5/lib-dynload/Python-2.5.1-py2.5.egg-info
if test -f /usr/local/bin/python -o -h /usr/local/bin/python; \
then rm -f /usr/local/bin/python; \
else true; \
fi
(cd /usr/local/bin; ln python2.5 python)
(cd /usr/local/bin; ln -sf python2.5-config python-config)
ln: cannot create python-config: File exists
make: *** [bininstall] Error 2

I didn't see such problem under 2.4.

Aki-

--
components: Installation
messages: 55624
nosy: akineko
severity: normal
status: open
title: make install failed
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue852532] ^$ won't split on empty line

2007-09-03 Thread Mike Coleman

Mike Coleman added the comment:

Well, I think we can conclude that it's expected by *them*.  :-)  I
still find it surprising, and it somewhat lessens the utility of
re.split for my use cases.  (I think re.finditer may also suffer from
the same problem, but I don't recall.)

If you look at the comments attached to the patch for this bug, it
looks like akuchling and rhettinger more or less saw this as being a bug 
worth fixing, though there were questions about exactly what the
correct fix should be.

http://bugs.python.org/issue988761

One comment about the your doc fix: You highlight a fairly useless
zero-character match (e.g., "x*") to demonstrate the behavior, which
might leave the user scratching his head.  (I think this case was
originally mentioned as a corner case, not one that would be useful.) 
It'd be nice to highlight a
more useful case like '^(?=S)' or perhaps a little more generically
something like '^(?=HEADER)' or '^(?=BEGIN)' which is a usage that
tripped me up in the first place.

Thanks for working on this!


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1097] input() should respect sys.stdin.encoding when in interactive mode

2007-09-03 Thread Sangpil Yoon

New submission from Sangpil Yoon:

Currently in interactive mode, when you try to input non-ascii
characters using input() builtin function, you get UnicodeDecodeError.

>>> print(input())
윤상필
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
illegal encoding

The error says that input() function is trying to decode the byte string
using the utf8 codec, when sys.stdin.encoding is not 'utf8'.

>>> import sys; print(sys.stdin.encoding)
cp949

In non-interactive mode, input() works just fine.

--
components: Unicode
messages: 55627
nosy: philyoon
severity: normal
status: open
title: input() should respect sys.stdin.encoding when in interactive mode
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2007-09-03 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I'm not sure like the naming of the format. "mixed-endian" could mean
anything. I doubt IEEE specifies this as a possible byte representation
(but then, I'm uncertain whether IEEE specifies big-endian and
little-endian, either).

One option would be to call it "ARM, mixed-endian", assuming this can be
only found on ARM.

Another option would be to call it "IEEE,
bytes-big-words-little-endian", describing precisely how the format
works (IIUC).

Tim, any opinion?

--
assignee:  -> tim_one
nosy: +loewis, tim_one

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1097] input() should respect sys.stdin.encoding when in interactive mode

2007-09-03 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Thanks for the report. This is now fixed in r57947

--
nosy: +loewis
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1098] decode_unicode doesn't nul-terminate

2007-09-03 Thread Adam Olsen

New submission from Adam Olsen:

In the large else branch in decode_unicode (if encoding is not NULL or
"iso-8859-1"), the new string it produces is not nul-terminated.  This
then hits PyUnicode_DecodeUnicodeEscape's octal escape case, which reads
past the end of the string (but would stop if there was a nul there.)

I found this via valgrind.

--
messages: 55630
nosy: rhamphoryncus
severity: normal
status: open
title: decode_unicode doesn't nul-terminate

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1099] Mac compile fails with pydebug and framework enabled

2007-09-03 Thread Humberto Diogenes

New submission from Humberto Diogenes:

Running this on Mac OS X:
$ ./configure --with-pydebug --enable-framework
$ make

I get this:
(...)
ar cr libpython3.0.a Modules/config.o Modules/getpath.o Modules/main.o 
Modules/gcmodule.o 
ar cr libpython3.0.a Modules/threadmodule.o  Modules/signalmodule.o  
Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  
Modules/_sre.o  
Modules/_codecsmodule.o  Modules/_fileio.o  Modules/zipimport.o  
Modules/symtablemodule.o  Modules/xxsubtype.o
ranlib libpython3.0.a
/usr/bin/install -c -d -m 755 Python.framework/Versions/3.0
if test ""; then \
gcc -o Python.framework/Versions/3.0/Python -arch i386 -arch ppc 
-dynamiclib 
\
-isysroot "" \
-all_load libpython3.0.a -Wl,-single_module \
-install_name 
/Library/Frameworks/Python.framework/Versions/3.0/Python \
-compatibility_version 3.0 \
-current_version 3.0; \
else \
/usr/bin/libtool -o Python.framework/Versions/3.0/Python -dynamic  
libpython3.0.a \
 -lSystem -lSystemStubs -arch_only i386 -install_name 
/Library/Frameworks/Python.framework/Versions/3.0/Python -compatibility_version 
3.0 -
current_version 3.0 ;\
fi
ld: Undefined symbols:
___eprintf
/usr/bin/libtool: internal link edit command failed
make: *** [Python.framework/Versions/3.0/Python] Error 1

If using only --with-pydebug it works fine.

--
components: Build, Macintosh
messages: 55631
nosy: hdiogenes
severity: normal
status: open
title: Mac compile fails with pydebug and framework enabled
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100] Can't input non-ascii characters in interactive mode

2007-09-03 Thread Sangpil Yoon

New submission from Sangpil Yoon:

I'm not sure if this is a bug or a designed behavior, but I think it
would be nice for beginners to be able to enter his/her local characters
from an interactive prompt. As interactive mode lacks source code
encoding declaration, the interpreter seems to assume that its input is
encoded in UTF-8, when the actual characters you enter are not. Fix for
issue #1097 doesn't seem to help. I'm using Microsoft Windows XP Korean.

>>> print('윤상필')
  File "", line 1
SyntaxError: (unicode error) illegal encoding

--
components: Unicode
messages: 55632
nosy: philyoon
severity: normal
status: open
title: Can't input non-ascii characters in interactive mode
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100] Can't input non-ascii characters in interactive mode

2007-09-03 Thread Sangpil Yoon

Changes by Sangpil Yoon:


--
type:  -> behavior

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com