[issue5127] UnicodeEncodeError - I can't even see license

2009-09-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- priority: -> normal stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue6991] logging encoding failes some situation

2009-09-24 Thread Naoki INADA
Changes by Naoki INADA : -- versions: +Python 3.0, Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue6988] shlex.split() converts unicode input to UCS-4 output

2009-09-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue6991] logging encoding failes some situation

2009-09-24 Thread Naoki INADA
New submission from Naoki INADA : When stream is codecs.writer object, stream.write(string) does string.decode() internally and it may cause UnicodeDecodeError. Then, fallback to utf-8 is not good. I think good fallback logic is: * When message is unicode, message.encode(stream.encoding or 'asci

[issue5380] pty.read raises IOError when slave pty device is closed

2009-09-24 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue6990] threading.local subclasses don't cleanup their state and it gets recycled

2009-09-24 Thread Ben Bangert
Changes by Ben Bangert : -- nosy: +bbangert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue6990] threading.local subclasses don't cleanup their state and it gets recycled

2009-09-24 Thread Philip Jenvey
New submission from Philip Jenvey : When threading.local subclasses are cleared during a reference cycle the local's internal key is nulled before the local is deallocated. That's a problem because local only deletes its state (ldicts) from threads during deallocation, and doesn't do so at all

[issue6454] Add "example" keyword argument to optparse constructor

2009-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems like a reasonable request. -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ __

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> skip.montanaro nosy: +skip.montanaro ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6722] collections.namedtuple: confusing example

2009-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue6989] Compile error for Python-2.6.2 on Solaris

2009-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- title: Python-2.6.2 -> Compile error for Python-2.6.2 on Solaris ___ Python tracker ___ ___ Python-b

[issue6983] Add specific get_platform() for freebsd

2009-09-24 Thread Stef Walter
Stef Walter added the comment: About FreeBSD ABI compatibility between minor versions: Julian Elischer wrote: > It is a policy of the project but I don't think our policies are > written down as such. I think you will find it referenced in > many places in a sideways manner rather than directl

[issue6989] Python-2.6.2

2009-09-24 Thread Ashish
Ashish added the comment: I added vaiable as export CXX="gcc -q64" then run sudo ./configure --with-universal-archs="64 bit" --prefix=/opt/Python-2.6.2/ After completion of configure I removed "O3" from makefile, then run sudo make It seems to be run fine. But after make install i get error as

[issue6985] range() fails with long integers

2009-09-24 Thread Brett Cannon
Brett Cannon added the comment: Both range and xrange were mucked with so much just before and during py3k development that I am sure odd inconsistencies of what they use internally are oversights. -- nosy: +brett.cannon ___ Python tracker

[issue6983] Add specific get_platform() for freebsd

2009-09-24 Thread Stef Walter
Stef Walter added the comment: Marc-Andre Lemburg wrote: > Is that binary compatibility scheme documented somewhere ? Not sure, it's been referred to and adhered to many times in the FreeBSD community, but I'm not sure where it's documented. I'll ask around on the FreeBSD mailing lists and post

[issue6872] Support system readline on OS X 10.6

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for working on this, Ronald. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue1766304] improve xrange.__contains__

2009-09-24 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: mark.dickinson -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue1766304] improve xrange.__contains__

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Unassigning myself since I don't intend to do anything myself about xrange.__contains__ in 2.x. (But I'll happily review patches.) -- ___ Python tracker __

[issue1766304] improve xrange.__contains__

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Just to be on the safe side, I changed the PyLong_Check(ob) check to PyLong_CheckExact(ob) || PyBool_Check(ob), in r75051. Without this, one can get different results for 'x in range(10)' and 'x in list(range(10))' if x is an instance of a subclass of int:

[issue6989] Python-2.6.2

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: If you do a Google search for that particular error message ('There are only 32 single ...'), the results suggest that this is a known problem with gcc and/or gas on Solaris. Does removing the -O3 optimization flag make any difference? (Try removing all occ

[issue6982] make clean does not remove pickle files

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Committed in r75047 (trunk). Merged in r75048 (release26-maint), r75049 (py3k) and r75050 (release31-maint). -- assignee: -> mark.dickinson stage: patch review -> committed/rejected status: open -> closed ___ Pyth

[issue6989] Python-2.6.2

2009-09-24 Thread Ashish
New submission from Ashish : I am getting error while compiling python-2.6.2 OS - Solaris 10 8/07 s10s_u4wos_12b SPARC bash-3.00$ isainfo -v 64-bit sparcv9 applications asi_blk_init 32-bit sparc applications asi_blk_init v8plus div32 mul32 Paths and defined PATH=/usr/local/bin:/op

[issue6970] Redundant calls made to comparison methods.

2009-09-24 Thread Mark Dickinson
Changes by Mark Dickinson : -- keywords: +needs review -patch stage: needs patch -> commit review ___ Python tracker ___ ___ Python-bug

[issue6970] Redundant calls made to comparison methods.

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch for py3k. I'd appreciate it if some other committer could check it for sanity. -- keywords: +patch Added file: http://bugs.python.org/file14967/issue6970.patch ___ Python tracker

[issue6983] Add specific get_platform() for freebsd

2009-09-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Stef Walter wrote: > Other OSs have special cases in get_platform() to specifically limit the > amount of code, and make proper decisions with regard to package > compatibility. > > Here's an example this commit for Mac OS X: http://svn.python.org/view? >

[issue4947] sys.stdout fails to use default encoding as advertised

2009-09-24 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- nosy: +srid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue6988] shlex.split() converts unicode input to UCS-4 output

2009-09-24 Thread Bill Fenner
Bill Fenner added the comment: Sorry, I didn't read the web documentation, only the module documentation, which doesn't mention Unicode. I'd agree that since it's a documented behavior, this bug can become: - an RFE for shlex to handle Unicode - meanwhile, if there will be any releases before

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > (Presented this way, "my opinion" becomes difficult to stand... > OTOH the docs say that the module does not support Unicode, so it's not > strictly a bug) > http://docs.python.or

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: (Presented this way, "my opinion" becomes difficult to stand... OTOH the docs say that the module does not support Unicode, so it's not strictly a bug) http://docs.python.org/library/shlex.html Yes, shlex could be improved and encode unicode strings to as

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hm, while the StringIO behaviour supposedly cannot be changed for backwards-compatibility reasons, we can probably improve shlex behaviour with unicode strings. -- nosy: +pitrou ___ Python tracker

[issue6983] Add specific get_platform() for freebsd

2009-09-24 Thread Stef Walter
Stef Walter added the comment: Other OSs have special cases in get_platform() to specifically limit the amount of code, and make proper decisions with regard to package compatibility. Here's an example this commit for Mac OS X: http://svn.python.org/view? view=rev&revision=67988 It was disc

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Bill Fenner
Bill Fenner added the comment: so, just to be clear, your position is that the output of shlex.split( u'Hello, World!' ) is *supposed* to be ['H\x00\x00\x00e\x00\x00\x00l\x00\x00\x00l\x00\x00\x00o\x00\x00\x00,\x00\x00\x00', '\x00\x00\x00W\x00\x00\x00o\x00\x00\x00r\x00\x00\x00l\x00\x00\x00d\x00\x

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I'll take the opposite point of view: the bad behavior was introduced with 2.5.1 (issue1548891, r52302), and reverted for 2.5.2 because "it broke backwards compatibility with arbitrary read buffers" (issue1730114, r53831) The difference is in cStringIO:

[issue6983] Add specific get_platform() for freebsd

2009-09-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Stef Walter wrote: > > Stef Walter added the comment: > > I agree with your comments, and the solution you're proposing solves the > problem (and several others) for the long term. > > However in the short term, could this patch be committed? Most othe

[issue6986] _json crash on scanner/encoder initialization error

2009-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Unit tests are definitely desireable! I would also like the "alternate approach" fix, it would probably be cleaner. -- nosy: +pitrou ___ Python tracker

[issue6983] Add specific get_platform() for freebsd

2009-09-24 Thread Stef Walter
Stef Walter added the comment: I agree with your comments, and the solution you're proposing solves the problem (and several others) for the long term. However in the short term, could this patch be committed? Most other OS's (including openbsd and netbsd) have OS specific code in get_platfo

[issue6986] _json crash on scanner/encoder initialization error

2009-09-24 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> bob.ippolito nosy: +bob.ippolito ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Bill Fenner
Bill Fenner added the comment: A colleague pointed out that the bad behavior was introduced in 2.5.2: Python 2.5.2 (r252:60911, Sep 30 2008, 15:42:03) [GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import shlex >>> sh

[issue6988] shlex.split() converts unicode input to UCS-4 output with varying byte order

2009-09-24 Thread Bill Fenner
New submission from Bill Fenner : In python 2.5, shlex handled unicode input fine: Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import shlex >>> shlex.split( u'Hello,

[issue6987] Idle not start

2009-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is a duplicate of issue5528. The fix is to remove the TCL_LIBRARY environment variable. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Unable to launch IDLE on Windows __

[issue6987] Idle not start

2009-09-24 Thread dorina
New submission from dorina : Hello! I installed Python31 on WinXp,but IDLE doesn't start. I tried at command prompt python Lib\idlelib\idle.py the result is in attachement. please help... thanks. -- components: IDLE files: err1.JPG messages: 93072 nosy: dorina_n2005 severity: normal st

[issue6985] range() fails with long integers

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Mark] > I *think* range uses long internally Aargh! Sorry, Eric. I take it back. *xrange* uses longs internally (and used to use ints once upon a time, IIRC), but there's a weird mix of int and long in builtin_range that doesn't make any sense to me. I susp

[issue6985] range() fails with long integers

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Might it make more sense for this range call to return a MemoryError rather than an OverflowError, on 64-bit machines? -- ___ Python tracker ___

[issue6986] _json crash on scanner/encoder initialization error

2009-09-24 Thread STINNER Victor
STINNER Victor added the comment: About _json_encoder_init.patch, an alternative patch is to write arguments references (addresses) in local variables, and only copy them on success. Something like: PyObject *arg; if (!PyTuple_ParseArgs(..., &arg)) return NULL; Py_INCREF(arg); self->arg

[issue6986] _json crash on scanner/encoder initialization error

2009-09-24 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file14965/_json_scanner_init.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue6986] _json crash on scanner/encoder initialization error

2009-09-24 Thread STINNER Victor
New submission from STINNER Victor : scanner_init() and encoder_init() don't manage errors correctly. scanner_init() gets context.encoding argument without checking context type, nor GetAttrString() error. It should check for NULL result... which is done in the same function for other attributes

[issue6982] make clean does not remove pickle files

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks! I'll apply this later today, unless Benjamin gets there first. :) -- resolution: -> accepted ___ Python tracker ___ __

[issue6985] range() fails with long integers

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: I *think* range uses long internally, so 99 should be okay on an LP64 machine. Except that of course the range() result must also fit in memory: on a 64-bit machine range(99) would need more than 300 Gb of memory. (That's 32 bytes per entry: 2

[issue5395] array.fromfile not checking I/O errors

2009-09-24 Thread Jan Hosang
Jan Hosang added the comment: I attached a path for raising IOErrors in fromfile. I also added a testcase which failed before. The test opens a file and closes the file with os.close(fd) without telling the file object, so fromfile doesn't notice it's reading from a file that is actually clo

[issue6985] range() fails with long integers

2009-09-24 Thread Eric Smith
Eric Smith added the comment: This doesn't crash the interpreter, so I'm changing it to "behavior". The number of items in a range() must fit into a native int. What are you doing with the range? Could you use xrange instead? -- nosy: +eric.smith resolution: -> wont fix status: open

[issue6985] range() fails with long integers

2009-09-24 Thread Krzysztof Szawala
New submission from Krzysztof Szawala : range() method fails with the following error message: " Traceback (most recent call last): File "", line 1, in OverflowError: range() result has too many items " when passing a valid integer value of 99. This value is obtained from OptParse co

[issue6982] make clean does not remove pickle files

2009-09-24 Thread egreen
egreen added the comment: You are right. Guess I was being a little too dogmatic. :-) I hadn't found those .pck files, because I was only looking for binary files. Here's a new patch proposal. -- Added file: http://bugs.python.org/file14962/clean-grammar-pickles.patch ___

[issue6982] make clean does not remove pickle files

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: > IMHO, though it may be preferable to remove just the pickle files in > Lib/lib2to3, Sounds reasonable. > it should never be required for tests to have pickle files > already available in the source tree. Well, I don't know about 'should', but the current te

[issue6983] Add specific get_platform() for freebsd

2009-09-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Stef Walter wrote: > > New submission from Stef Walter : > > In Lib/distutils/util.py in the get_platform() function there's OS > specific code to create a string which describes the current platform. > This usually includes the OS + version + arch. >

[issue6632] Include more fullwidth chars in the decimal codec

2009-09-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > >> The codec currently doesn't look at the base at all - and shouldn't >> need to: >> >> It simply converts input characters that have a decimal digit value >> associated with them, to the us

[issue6982] make clean does not remove pickle files

2009-09-24 Thread egreen
egreen added the comment: These .pickle files aren't created by the tests themselves, but they do show up after running 'make test', or more specifically after running './python Lib/test/regrtest.py -v test_lib2to3'. This is because a grammar generated from a .txt grammar file is cached as a pi

[issue6834] use different mechanism for pythonw on osx

2009-09-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > This version uses posix_spawn rather than execv to start the real > interpreter. In what way is that better? It creates a new process (IIUC); therefore, I think that using it is worse than using execv. Anybody killing the pythonw process would only kill th

[issue6632] Include more fullwidth chars in the decimal codec

2009-09-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > The codec currently doesn't look at the base at all - and shouldn't > need to: > > It simply converts input characters that have a decimal digit value > associated with them, to the usual ASCII digits in preparation > for parsing them using the standard numb

[issue6982] make clean does not remove pickle files

2009-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think it is safe to remove all *.pickle files in the source directory; even if there aren't any other useful .pickle files right now, there could be in the future (e.g. for pickle testing). I'd prefer something more targeted. Are these .pickle files