[issue2278] [Py30a3] xml.parsers.expat recognizes encoding="utf-8" but not encoding="utf8"

2008-03-17 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay to close this, then?

--
nosy: +georg.brandl
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



[issue2176] Undocumented lastrowid attribute i sqlite3 cursor class

2008-03-17 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
assignee:  -> georg.brandl
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



[issue2315] TimedRotatingFileHandler does not account for daylight savings time

2008-03-17 Thread Per Cederqvist

New submission from Per Cederqvist <[EMAIL PROTECTED]>:

If TimedRotatingFileHandler is instructed to roll over the log at
midnight or on a certain weekday, it needs to consider when daylight
savings time starts and ends. The current code just blindly adds
self.interval to self.rolloverAt, totally ignoring that sometimes it
should add 23 or 25 hours instead of 24 hours.

(I suspect that the implementation would be simpler if you use the
datetime module, rather than attempt to patch the existing code.)

--
components: Library (Lib)
messages: 63622
nosy: ceder
severity: normal
status: open
title: TimedRotatingFileHandler does not account for daylight savings time
type: behavior
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



[issue2304] subprocess under windows fails to quote properly when shell=True

2008-03-17 Thread Tim Golden

Tim Golden <[EMAIL PROTECTED]> added the comment:

Gabriel Genellina wrote:
> Gabriel Genellina <[EMAIL PROTECTED]> added the comment:
> 
> You aren't testing the modified code, the Popen call should say 
> shell=True.
> 
> I think that a more PEP8-compliant style would be nice (removing the 
> spaces after open and read, and using consistent indentation)

D'oh. Thanks, Gabriel. I'll rework the test and tidy
up the patch.

--
title: subprocess under windows fails to quote properly when shell=True -> 
subprocess under windows fails to quote properly whenshell=True

__
Tracker <[EMAIL PROTECTED]>

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



[issue2316] TimedRotatingFileHandler names files incorrectly if nothing is logged during an interval

2008-03-17 Thread Per Cederqvist

New submission from Per Cederqvist <[EMAIL PROTECTED]>:

If nothing is logged during an interval, the TimedRotatingFileHandler
will give bad names to future log files.

The enclosed example program sets up a logger that rotates the log every
second.  It then logs a few messages with sleep of 1, 2, 4, 1 and 1
seconds between the messages.  The log files will have names that
increase with one second per log file, but the content for the last file
will be generated a different second.

An example run produced the message

  2008-03-17 09:16:06: 1 sec later

in a log file named badlogdir/logfile.2008-03-17_09-16-02.

This problem was likely introduced in revision 42066.  The root cause is
that self.rolloverAt is increased by self.interval in doRollover - but
if nothing was logged for a while, it should be increased by a multiple
of self.interval.

--
messages: 63624
nosy: ceder
severity: normal
status: open
title: TimedRotatingFileHandler names files incorrectly if nothing is logged 
during an interval

__
Tracker <[EMAIL PROTECTED]>

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



[issue2316] TimedRotatingFileHandler names files incorrectly if nothing is logged during an interval

2008-03-17 Thread Per Cederqvist

Per Cederqvist <[EMAIL PROTECTED]> added the comment:

The attached program will generate log messages with a timestamp that
are logged into a file with an unexpected extension.

To run:

  mkdir badlogdir
  python badlogger.py

Running the program takes about 9 seconds.

Added file: http://bugs.python.org/file9687/badlogger.py

__
Tracker <[EMAIL PROTECTED]>

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



[issue2316] TimedRotatingFileHandler names files incorrectly if nothing is logged during an interval

2008-03-17 Thread Per Cederqvist

Changes by Per Cederqvist <[EMAIL PROTECTED]>:


--
components: +Library (Lib)
type:  -> behavior
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



[issue2317] TimedRotatingFileHandler logic for removing files wrong

2008-03-17 Thread Per Cederqvist

New submission from Per Cederqvist <[EMAIL PROTECTED]>:

There are three issues with log file removal in the
TimedRotatingFileHandler class:

 - Removal will stop working in the year 2100, as the code assumes that
   timestamps start with ".20".

 - If you run an application with backupCount set to a high number, and
   then restarts it with a lower number, the code will still not remove
   as many log files as you expect.  It will never remove more than one
   file when it rotates the log.

 - It assumes that no other files matches baseFilename + ".20*", so
   make sure that you don't log to both "log" and
   "log.20th.century.fox" in the same directory!

Suggested fix: use os.listdir() instead of glob.glob(), filter all
file names using a proper regexp, sort the result, and use a while
loop to remove files until the result is small enough.  To reduce the
risk of accidentally removing an unrelated file, the filter regexp
should be based on the logging interval, just as the filename is.

My suggested fix means that old files may not be removed if you change
the interval.  I think that is an acceptable behavior, but it should
probably be documented to avoid future bug reports on this subject. :-)

--
components: Library (Lib)
messages: 63626
nosy: ceder
severity: normal
status: open
title: TimedRotatingFileHandler logic for removing files wrong
type: behavior
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



[issue2318] TimedRotatingFileHandler: rotate every month, or every year

2008-03-17 Thread Per Cederqvist

New submission from Per Cederqvist <[EMAIL PROTECTED]>:

In my curent project, I would like to rotate log files on the 1st of
every month.  The TimedRotatingFileHandler class cannot do this, even
though it tries to be very generic.

I imagine that other projects would like to rotate the log file every
year.  That can also not be done.

--
components: Library (Lib)
messages: 63627
nosy: ceder
severity: normal
status: open
title: TimedRotatingFileHandler: rotate every month, or every year
type: feature request

__
Tracker <[EMAIL PROTECTED]>

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



[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

Hello. I tracked down source code and found where err->text is set.

Index: Parser/parsetok.c
===
--- Parser/parsetok.c   (revision 61411)
+++ Parser/parsetok.c   (working copy)
@@ -218,7 +218,7 @@
assert(tok->cur - tok->buf < INT_MAX);
err_ret->offset = (int)(tok->cur - tok->buf);
len = tok->inp - tok->buf;
-   text = PyTokenizer_RestoreEncoding(tok, len, 
&err_ret->offset);
+/* text = PyTokenizer_RestoreEncoding(tok, len, 
&err_ret->offset); */
if (text == NULL) {
text = (char *) PyObject_MALLOC(len + 1);
if (text != NULL) {

It seems tok->buf is encoded with UTF-8, and
PyTokenizer_RestoreEncoding() resotores it to original encoding of
source file. So I tried above patch, output was expected on cp932/euc_jp
source files.

Maybe this function is not needed in py3k? I cannot find other place
where this function is used.

# Probably PyErr_ProgramText() needs more effort to be fixed.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2295] cPickle corner case - docs or bug?

2008-03-17 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

The following "Works for me":

>>> import imp, cPickle
>>> mymod = imp.load_module('mymod', *imp.find_module('codecs'))
>>> cPickle.dumps(mymod.Codec(), cPickle.HIGHEST_PROTOCOL)
'\x80\x02(cmymod\nCodec\nq\x01o}q\x02b.'

Do you have a short test case to reproduce your problem?
Does your code tweak sys.modules?

--
nosy: +amaury.forgeotdarc

__
Tracker <[EMAIL PROTECTED]>

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



[issue2319] abc.py:ABCMeta.__instancecheck__ broken for old style classes

2008-03-17 Thread Ralf Schmitt

New submission from Ralf Schmitt <[EMAIL PROTECTED]>:

The following short program raises an exception:

import UserList

class C:
pass
   
print isinstance(C, UserList.UserList)

-
exception:
Traceback (most recent call last):
  File "t.py", line 6, in 
print isinstance(C, UserList.UserList)
  File "/home/ralf/py26/lib/python2.6/abc.py", line 120, in
__instancecheck__
subclass = instance.__class__
AttributeError: class C has no attribute '__class__'

If I use a new style class it works.

--
components: Interpreter Core
messages: 63630
nosy: schmir
severity: normal
status: open
title: abc.py:ABCMeta.__instancecheck__ broken for old style classes
type: crash
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2319] abc.py:ABCMeta.__instancecheck__ broken for old style classes

2008-03-17 Thread Ralf Schmitt

Ralf Schmitt <[EMAIL PROTECTED]> added the comment:

I used svn revision 61433.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2264] empty specifier for float.__format__ does not always print at least one decimal digit

2008-03-17 Thread Eric Smith

Eric Smith <[EMAIL PROTECTED]> added the comment:

Fixed checked in as r61434.

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



[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

You are probably right about the source of the problem; I was confusing 
it with a regular exception, e.g.

print("年",a)

However, I also fail to reproduce the problem on OSX. I get

  File "a.py", line 3
print "�N"
 ^
SyntaxError: invalid syntax

I'm not quite sure what the N is doing in there, but the first character 
is the replacement character (hopefully, the tracker will reproduce it 
correctly); I get that because pythonrun uses the "replace" codec.

I guess you are not seeing it because then the replacement character 
cannot actually be output to your terminal. Please try

print("\ufffd")

to see what that does.

__
Tracker <[EMAIL PROTECTED]>

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



[issue448736] pydoc needs readline completion

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

This was duplicated in issue726204 and fixed in r37026.

--
nosy: +belopolsky


Tracker <[EMAIL PROTECTED]>


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



[issue416670] MatchObjects not deepcopy()able

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

A related issue419070 was closed with no resolution (or resolution did 
not survive the trip from SF), but it looks like the patch was rejected.

Some work towards this issue was done in r21437, but 7 years later it is 
still marked as work in progress.  Is there still interest is this 
feature?

--
nosy: +belopolsky


Tracker <[EMAIL PROTECTED]>


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



[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

> I was confusing it with a regular exception, e.g.
> print("年",a)

I'm now invesigating this problem. This comes from another reason.
Please look at fp_setreadl in Parser/tokenizer.c.
This function opens file using codec and doesn't seek to current
position. (fp_setreadl is used when codecs is neigher utf-8 nor 
iso-8859-1  tok->decoding_state == STATE_NORMAL)

So

# coding: ascii
# 1
# 2
# 3
raise RuntimeError("a")
# 4
# 5
# 6

outputs 

C:\Documents and Settings\WhiteRabbit>py3k ascii.py

Traceback (most recent call last):
  File "ascii.py", line 6, in 
# 4
RuntimeError: a
[22821 refs]

# One line shifted.

And

# dummy
# coding: ascii
# 1
# 2
# 3
raise RuntimeError("a")
# 4
# 5
# 6

outputs

C:\Documents and Settings\WhiteRabbit>py3k ascii.py

Traceback (most recent call last):
  File "ascii.py", line 8, in 
# 5
RuntimeError: a
[22821 refs]

# Two lines shifted.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2320] Race condition in subprocess using stdin

2008-03-17 Thread Ludwig Hähne

New submission from Ludwig Hähne <[EMAIL PROTECTED]>:

Pythons subprocess module has a race condition when stdin is used. The
problem can be reproduced with the following script (based on the script
in issue "#1731717"/"msg32210" (slightly changed to use stdin):


import sys, os, threading, subprocess, time

class X(threading.Thread):
  def __init__(self, *args, **kwargs):
super(X, self).__init__(*args, **kwargs)
self.start()

def tt():
  s = subprocess.Popen(("cat"), stdin=subprocess.PIPE)
  s.communicate(input = '#')

for i in xrange(20):
  X(target = tt)


On multi-processor (or multi-core) machines the script hangs fairly
reliably.

Protecting the Popen call with a lock solves the problem. I searched the
documentation if using stdin with subprocess.Popen was not thread-safe,
but found no indication.

Tested with Python 2.5.1, 2.5.2 and 2.6a1. The problem can be reproduced
with all mentioned versions.

--
components: Library (Lib)
messages: 63637
nosy: Pankrat
severity: normal
status: open
title: Race condition in subprocess using stdin
versions: Python 2.5, Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Any progress?

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

>However, I also fail to reproduce the problem on OSX. I get
>
>  File "a.py", line 3
>print "�N"
> ^
>SyntaxError: invalid syntax

Umm, strange... I can output correct result even if
using euc_jp (my terminal named command prompt cannot
output euc_jp string directly, AFAIK)

> print("\ufffd")

>>> print("\ufffd")
Traceback (most recent call last):
  File "", line 1, in 
  File "e:\python-dev\py3k\lib\io.py", line 1247, in write
b = encoder.encode(s)
UnicodeEncodeError: 'cp932' codec can't encode character '\ufffd' in
position 0:
 illegal multibyte sequence

__
Tracker <[EMAIL PROTECTED]>

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



[issue2320] Race condition in subprocess using stdin

2008-03-17 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Unless noted, none of Python's stdlib guarantees that it's thread safe.
So , you have to lock.

--
nosy: +benjamin.peterson

__
Tracker <[EMAIL PROTECTED]>

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



[issue2298] Patch for "string without null bytes" check in getargs.c

2008-03-17 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

Yes, that sounds like a good idea. Although I haven't reviewed this
patch yet, I find the naming of the `ustr` variable confusing -- e.g. is
it a bytes object or a unicode object? (It seems to be bytes). Anyway, I
will check this out later today, when I will get the time.

__
Tracker <[EMAIL PROTECTED]>

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



[issue416670] MatchObjects not deepcopy()able

2008-03-17 Thread Amiga Lemming

Amiga Lemming <[EMAIL PROTECTED]> added the comment:

On Mon, 17 Mar 2008, Alexander Belopolsky wrote:

> Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:
>
> A related issue419070 was closed with no resolution (or resolution did
> not survive the trip from SF), but it looks like the patch was rejected.
>
> Some work towards this issue was done in r21437, but 7 years later it is
> still marked as work in progress.  Is there still interest is this
> feature?

Not by me since I moved to Haskell. :-)


Tracker <[EMAIL PROTECTED]>


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



[issue433027] SRE: (?-flag) is not supported.

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

This depends on issue433024 (SRE: (?flag) isn't properly scoped.)

--
nosy: +belopolsky


Tracker <[EMAIL PROTECTED]>


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



[issue2314] Test issue

2008-03-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw <[EMAIL PROTECTED]>:


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



[issue433024] SRE: (?flag) isn't properly scoped

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

This is still a valid issue. (As of Python 2.6a1+ (trunk:61434, Mar 17 
2008, 08:06:54).)

>>> bool(re.match("abc(?i)","AbC"))
True

The documentation says that the behavior of a regex with (?) not 
at the beginning is undefined.

Short of implementing Java/Perl behavior, this should be made an error 
rather than undefined so that users porting their code from Java/Perl 
get an early warning.

--
nosy: +belopolsky


Tracker <[EMAIL PROTECTED]>


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



[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

>I'm now invesigating this problem. This comes from another reason.
Of course, even if this line number problem is fixed, encoding
problem still remains. Probably I'll look at it next.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9

2008-03-17 Thread Jeffrey Yasskin

Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment:

I've fixed this in r61436 with a bunch of back pointers to the previous
issues. If anyone on old versions sees problems, we can add the flags
back conditionally.

--
resolution: accepted -> fixed
status: open -> closed
type:  -> compile error

_
Tracker <[EMAIL PROTECTED]>

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



[issue2311] Update the ACKS file

2008-03-17 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

On Sun, Mar 16, 2008 at 4:27 PM, Guido van Rossum
<[EMAIL PROTECTED]> wrote:
>
>  New submission from Guido van Rossum <[EMAIL PROTECTED]>:
>
>  We should keep the ACKS files up to date. Have all the GHOP contributors
>  been added?

They have been added as their code has been committed.

Is there anything else you were thinking of for the file, or should I
go ahead and close this issue?

__
Tracker <[EMAIL PROTECTED]>

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



[issue525481] long double causes compiler warnings

2008-03-17 Thread Jeffrey Yasskin

Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment:

I reverted this in r61436 to fix issue 1779871. The long double is still
around, but the gcc bundled with OS X 10.4 doesn't warn about it anymore.

--
nosy: +jyasskin


Tracker <[EMAIL PROTECTED]>


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



[issue2314] Test issue

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

So what's the syntax for setting multiple attributes via an email subject?
[assignee=+twouters,priority=low]?

__
Tracker <[EMAIL PROTECTED]>

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



[issue775892] test_coercion failing on Panther

2008-03-17 Thread Jeffrey Yasskin

Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment:

I reverted this in r61436 to fix issue 1779871. Either the test has
changed in the mean time, or the gccs bundled since OS X 10.4 now
preserve the signs of 0.

--
nosy: +jyasskin


Tracker <[EMAIL PROTECTED]>


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



[issue868845] Need unit tests for <...> reprs

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

If any work needs to be done on this issue, it should probably be 
labeled "easy."  (At least the writing the unit tests part.  Making 
<...> reprs consistent is another story.)

The unit tests for old-style and new-style class reprs are present in 
test_repr and seem to predate the original request.

There are some more similar tests elsewhere (test_file, test_descr, 
etc.)

--
nosy: +belopolsky


Tracker <[EMAIL PROTECTED]>


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



[issue2298] Patch for "string without null bytes" check in getargs.c

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

On Mon, Mar 17, 2008 at 9:51 AM, Alexandre Vassalotti <
[EMAIL PROTECTED]> wrote:

>
> Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
>
> .. Although I haven't reviewed this
> patch yet, I find the naming of the `ustr` variable confusing -- e.g. is
> it a bytes object or a unicode object?

There is no `ustr` variable , you  probably mean  `uarg`.   If so, it  is
not introduced by the patch.   To me the patch looks straightforward and
correct, but a unit test should be added.  Some additional refactoring is
due for getargs.c (does py3k support builds without Py_USING_UNICODE?), but
the bug fix should not wait for that.

Added file: http://bugs.python.org/file9688/unnamed

__
Tracker <[EMAIL PROTECTED]>

__On Mon, Mar 17, 2008 at 9:51 AM, Alexandre 
Vassalotti [EMAIL PROTECTED]> 
wrote:

Alexandre Vassalotti [EMAIL 
PROTECTED]> added the comment:
.. Although I haven't reviewed this
patch yet, I find the naming of the `ustr` variable confusing -- e.g. is
it a bytes object or a unicode object? There is no `ustr` 
variable , you  probably mean  `uarg`.   If so, it  is 
not introduced by the patch.   To me the patch looks straightforward 
and correct, but a unit test should be added.  Some additional refactoring 
is due for getargs.c (does py3k support builds without Py_USING_UNICODE?), but 
the bug fix should not wait for that.

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



[issue2321] return more memory from unicode objects to system

2008-03-17 Thread Neal Norwitz

New submission from Neal Norwitz <[EMAIL PROTECTED]>:

This patch returns more memory to the system when doing:

  >>> x = [unicode(i) for i in xrange(100)]
  >>> del x

If the above code is done, the memory before and after is quite
different.  After this patch, the memory of the process as reported by
the system (like top/ps) should be approximately the same

--
components: Interpreter Core
files: uni.diff
keywords: patch, patch
messages: 63654
nosy: nnorwitz
severity: normal
status: open
title: return more memory from unicode objects to system
type: resource usage
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file9689/uni.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue1397] mysteriously failing test_bsddb3 threading test in other threads

2008-03-17 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

I updated the subject to better reflect what this is.

My guess is that the test code itself has issues and is asserting
something that isn't quite guaranteed to be true.

--
title: py3k-pep3137: failing unit test test_bsddb -> mysteriously failing 
test_bsddb3 threading test in other threads
versions: +Python 2.5, Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2314] Test issue

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Picky!

--
assignee: gvanrossum -> nnorwitz
nosy: +twouters
priority: immediate -> low

__
Tracker <[EMAIL PROTECTED]>

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



[issue2314] Test issue

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

[assignee=guido]

Does it also work in the body of the message?

__
Tracker <[EMAIL PROTECTED]>

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



[issue2314] Test issue

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

No.

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



[issue2314] Test issue

2008-03-17 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Guido van Rossum schrieb:
> Guido van Rossum <[EMAIL PROTECTED]> added the comment:
> 
> So what's the syntax for setting multiple attributes via an email subject?
> [assignee=+twouters,priority=low]?

assignee is not multilink, and the separator is semicolon (;); 
otherwise, that's the syntax. , is the separator multilink values.
[nosy=richard,cliff]

--
assignee: nnorwitz -> twouters

__
Tracker <[EMAIL PROTECTED]>

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



[issue2282] TextIOWrapper.seekable() always returns False

2008-03-17 Thread Jeff Balogh

Jeff Balogh <[EMAIL PROTECTED]> added the comment:

Attaching a patch that fixes this issue and adds a regression test.

--
keywords: +patch
nosy: +jbalogh
Added file: http://bugs.python.org/file9690/issue2282.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2282] TextIOWrapper.seekable() always returns False

2008-03-17 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue2305] Update What's new in 2.6

2008-03-17 Thread A.M. Kuchling

A.M. Kuchling <[EMAIL PROTECTED]> added the comment:

I intend to finish writing the 2.6 document; PyCon has been taking up
all of my free time the past few weeks, but obviously that's over now.

__
Tracker <[EMAIL PROTECTED]>

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



[issue868845] Need unit tests for <...> reprs

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

I'd rather not label this as easy yet, since there's a decision to be
made.  I would welcome a doc patch though!


Tracker <[EMAIL PROTECTED]>


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



[issue2282] TextIOWrapper.seekable() always returns False

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Confirmed.  Ping, since you're looking at io.py anyway, can you fix this
too?

--
assignee:  -> ping
nosy: +ping
priority:  -> high

__
Tracker <[EMAIL PROTECTED]>

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



[issue1202] zlib.crc32() and adler32() return value

2008-03-17 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

working on this now.  foo = 'abcdefghijklmnop'

2.x 32-bit long: zlib.crc32(foo) returns -1808088941
2.x 64-bit long: zlib.crc32(foo) returns 2486878355

This is because PyInt_FromLong() happily fits the value into a signed
long internally to the integer object on 64-bit platforms.  They are
both the same number if considered with & 0x.

I'm doing as guido suggests and leaving this slightly odd behavior for
2.x so that crc32 and adler32 always return an integer object.  in 3.0
they'll always return an unsigned value.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2322] Clean up getargs.c and its formatting possibilities

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

It was mentioned by Georg on python-3000 that getargs.c needs to be
cleaned up and worked on before Python 3.0 goes out the door.

--
assignee: georg.brandl
components: Interpreter Core
messages: 63665
nosy: brett.cannon, georg.brandl
priority: immediate
severity: normal
status: open
title: Clean up getargs.c and its formatting possibilities
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



[issue2305] Update What's new in 2.6

2008-03-17 Thread Guido van Rossum

Changes by Guido van Rossum <[EMAIL PROTECTED]>:


--
assignee: georg.brandl -> akuchling

__
Tracker <[EMAIL PROTECTED]>

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



[issue1202] zlib.crc32() and adler32() return value

2008-03-17 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

question: should I also make 64-bit 2.x return a signed value as well to
be consistent with 32bit python 2.x?

Consistency in case someone ever pickles the value and sends it to
another python instance of a different word length would be good...

__
Tracker <[EMAIL PROTECTED]>

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



[issue2323] Unify structseq and namedtuple's API

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

structseq and namedtuple should end up with a uniformed API.

--
components: Extension Modules
messages: 63667
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Unify structseq and namedtuple's API
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1202] zlib.crc32() and adler32() return value

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Sure.  (Though sending pickles to 3.0 would still cause problems. 
Consumers of pickled checksums would do wise to *always* take the CRC
mod 2**32 before doing comparisons.)

__
Tracker <[EMAIL PROTECTED]>

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



[issue2324] Document that 2.6 pickles of strings turn into pickles of unicode in 3.0

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

It turns out that unpickling a string from 2.6 leads to a Unicode string
in 3.0. That might fail since the encoding was never specified. This
should be documented probably in both 2.6 and 3.0.

--
assignee: georg.brandl
components: Documentation
messages: 63669
nosy: brett.cannon, georg.brandl
priority: immediate
severity: normal
status: open
title: Document that 2.6 pickles of strings turn into pickles of unicode in 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue2319] abc.py:ABCMeta.__instancecheck__ broken for old style classes

2008-03-17 Thread Jeffrey Yasskin

Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment:

Missed this. It's now fixed by r61438.

--
nosy: +jyasskin
status: open -> closed
type: crash -> behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False

2008-03-17 Thread Jeffrey Yasskin

New submission from Jeffrey Yasskin <[EMAIL PROTECTED]>:

>>> class Meta(type):
...   def __instancecheck__(self, other):
... return False
>>> isinstance(3, Meta)

In 2.6, this results in:

Traceback (most recent call last):
  File "", line 1, in 
RuntimeError: maximum recursion depth exceeded while calling a Python object
(That's a recursion in C, through PyObject_IsInstance and
instancemethod_call)

In 3.0, I get:

Traceback (most recent call last):
  File "", line 1, in 
TypeError: __instancecheck__() takes exactly 2 positional arguments (1
given)

--
components: Interpreter Core
messages: 63671
nosy: jyasskin
severity: normal
status: open
title: isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead 
of returning False
type: behavior
versions: Python 2.6, 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



[issue2321] return more memory from unicode objects to system

2008-03-17 Thread Armin Ronacher

Changes by Armin Ronacher <[EMAIL PROTECTED]>:


--
nosy: +aronacher

__
Tracker <[EMAIL PROTECTED]>

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



[issue2326] Doc isnumeric and isdecimal for the unicode object

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Both the isnumeric and isdecimal methods on the unicode object need to
be documented.

--
assignee: georg.brandl
components: Documentation
messages: 63672
nosy: brett.cannon, georg.brandl
priority: immediate
severity: normal
status: open
title: Doc isnumeric and isdecimal for the unicode object
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1207] Load tests from path (patch included)

2008-03-17 Thread Sean Reifschneider

Sean Reifschneider <[EMAIL PROTECTED]> added the comment:

Patch is inline.

A few notes for submitter:

This also needs to include a documentation patch before it can be accepted.

Please format the docstring for a line length of 78 characters or less.

Ideally, please submit a "diff -c" style patch as an attachment.

Please discuss this approach on python-dev and/or with Steve Purcell
(copied).

--
assignee:  -> purcell
keywords: +patch
nosy: +jafo, purcell
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue2321] return more memory from unicode objects to system

2008-03-17 Thread Alec Thomas

Alec Thomas <[EMAIL PROTECTED]> added the comment:

Hi Neal,

This seems to be a more general problem than just unicode.

eg. Tuples:

>>> x = [(1, 2, 3, 4, i) for i in xrange(80)]
>>> del x

And user-defined objects:

>>> class A(object):
...   def __init__(self):
... self.x = random.random()
>>> x = [A() for i in xrange(80)]
>>> del x

Both exhibit the same behaviour. Naively to me it seems like using the
custom allocator uniformly would fix this problem.

--
nosy: +alecthomas

__
Tracker <[EMAIL PROTECTED]>

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



[issue1230] Tix HList class missing method implementation for info_bbox

2008-03-17 Thread Sean Reifschneider

New submission from Sean Reifschneider <[EMAIL PROTECTED]>:

No body included in original message.

--
assignee:  -> loewis
nosy: +jafo, loewis
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1250] Building external modules using Sun Studio 12

2008-03-17 Thread Sean Reifschneider

Changes by Sean Reifschneider <[EMAIL PROTECTED]>:


--
assignee:  -> niemeyer
nosy: +niemeyer
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1230] Tix HList class missing method implementation for info_bbox

2008-03-17 Thread Sean Reifschneider

Changes by Sean Reifschneider <[EMAIL PROTECTED]>:


--
type: behavior -> feature request

__
Tracker <[EMAIL PROTECTED]>

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



[issue1202] zlib.crc32() and adler32() return value

2008-03-17 Thread Jesús Cea Avión

Jesús Cea Avión <[EMAIL PROTECTED]> added the comment:

I store CRC in reed-solomon schema of mine. I compare with equality, so,
I think we should enforce "CRC(python 32 bits) == CRC(python 64 bits)".

I will need to touch my code in python 3.0, but that will be inevitable
anyway...

__
Tracker <[EMAIL PROTECTED]>

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



[issue2324] Document that 2.6 pickles of strings turn into pickles of unicode in 3.0

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

The issue is different; there is already a bug open for this (bug 2307).

--
nosy: +gvanrossum
resolution:  -> invalid
status: open -> closed
superseder:  -> Decide what to do with bytes/str when transferring pickles 
between 2.6 and 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue2307] Decide what to do with bytes/str when transferring pickles between 2.6 and 3.0

2008-03-17 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

We have a proposed solution for 2.x -> 3.x.  In 3.x, an (8-bit) str
instance received from 2.x will be decoded into a (Unicode) str
instance.  The encoding defaults to ASCII; you can specify a different
encoding and also an error value on the load() or loads() call.

This of course doesn't solve all problems; str instances representing
binary data will be unpickled as strings.  The app will have to deal
with this.

By default 3.x will *write* pickles using a new version number which is
incompatible with 2.x.  I'm not sure yet if we should allow writing
pickles in 3.x that can be read in 2.x; we need use cases for that.

--
resolution:  -> accepted

__
Tracker <[EMAIL PROTECTED]>

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



[issue2327] Backport keyword-only arguments to 2.6

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Keyword-only arguments have not been backported to 2.6 from 3.0.

--
components: Interpreter Core
keywords: 26backport
messages: 63679
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport keyword-only arguments to 2.6
type: behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue868845] Need unit tests for <...> reprs

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

I think the attached patch captures the most of what can currently be 
said  about <...> reprs.

I think the biggest offender in terms of inconsistency in the 2.x series 
is the file object with the repr which does not even start with the name 
of the type.

For 3.0, I think it is feasible to standardize on the <{type} object 
['{name}'] ... at 0x{addr}> pattern.

--
keywords: +patch
Added file: http://bugs.python.org/file9691/doc-repr.diff


Tracker <[EMAIL PROTECTED]>


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



[issue2328] Class **kwds broken (PEP 3115)

2008-03-17 Thread Jack Diederich

New submission from Jack Diederich <[EMAIL PROTECTED]>:

typeobject.c:type_new only allows 0 or 1 keyword arg in class creation
instead of an arbitrary number as per PEP3115.

I'm working on a patch.

--
assignee: jackdied
components: Interpreter Core
messages: 63681
nosy: jackdied
priority: normal
severity: normal
status: open
title: Class **kwds broken (PEP 3115)
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



[issue2329] ImportError: No module named _bsddb

2008-03-17 Thread dd

New submission from dd <[EMAIL PROTECTED]>:

Installation from source, python.2.4.5.tgz.
It seems that severals *.so from bsddb are missing:
>>> import bsddb
Traceback (most recent call last):
  File "", line 1, in ?
  File "/tmp/Python-2.4.5/Lib/bsddb/__init__.py", line 47, in ?
import _bsddb
ImportError: No module named _bsddb

--
components: Library (Lib)
messages: 63682
nosy: ddk
severity: normal
status: open
title: ImportError: No module named _bsddb
versions: Python 2.4

__
Tracker <[EMAIL PROTECTED]>

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



[issue2326] Doc isnumeric and isdecimal for the unicode object

2008-03-17 Thread Steven Bethard

Steven Bethard <[EMAIL PROTECTED]> added the comment:

I'll take care of this, adding a bit to section 3.6.1, String Methods.

--
nosy: +bethard

__
Tracker <[EMAIL PROTECTED]>

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



[issue2298] Patch for "string without null bytes" check in getargs.c

2008-03-17 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

There is now issue2322 (Clean up getargs.c and its formatting 
possibilities) related to this.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-03-17 Thread Paul Winkler

Paul Winkler <[EMAIL PROTECTED]> added the comment:

I'm working on this (at the pycon sprint).

--
nosy: +slinkp

__
Tracker <[EMAIL PROTECTED]>

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



[issue2330] Update PEP 3000 with new release schedule

2008-03-17 Thread Guido van Rossum

New submission from Guido van Rossum <[EMAIL PROTECTED]>:

Barry, can you update the PEP with a discussion of the schedule, so we
can refer to it?

--
assignee: barry
components: Documentation
messages: 63686
nosy: barry, gvanrossum
priority: urgent
severity: normal
status: open
title: Update PEP 3000 with new release schedule
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



[issue1366] popen spawned process may not write to stdout under windows

2008-03-17 Thread Sean Reifschneider

Sean Reifschneider <[EMAIL PROTECTED]> added the comment:

We've discussed this at the PyCon sprints, and here's the concensus:

os.popen inherits the parents stderr, and on Windows there is not an
existing valid stderr by default.  So the parent should, to be
compatible with the Windows environment, create stderr or use popen2.

However, popen is deprecated.  The best solution would be to use
subprocess module which is defined to do the right thing in this case. 
popen is not.

Because popen is deprecated, we are going to leave this behavior and
documentation as it is.

--
nosy: +jafo
priority:  -> normal
resolution:  -> wont fix

__
Tracker <[EMAIL PROTECTED]>

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



[issue2331] Backport parameter annotations

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Parameter annotations (e.g., ``def fxn(a:int) -> str: pass`` need to be
backported.

--
components: Interpreter Core
keywords: 26backport
messages: 63688
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport parameter annotations
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2332] Renaming of attributes on functions need to be backported.

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

It should be double-checked that the renaming of attributes from
functions has been completed.

--
assignee: nnorwitz
components: Interpreter Core
keywords: 26backport
messages: 63689
nosy: brett.cannon, nnorwitz
priority: immediate
severity: normal
status: open
title: Renaming of attributes on functions need to be backported.
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2333] Backport dict comprehensions

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Dict comprehensions need to be backported.

--
components: Interpreter Core
keywords: 26backport
messages: 63690
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport dict comprehensions
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2334] Backport set comprehensions

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Set comprehensions need to be backported.

--
components: Interpreter Core
keywords: 26backport
messages: 63691
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport set comprehensions
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2335] Backport set literals

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Set literals need to be backported.

--
components: Interpreter Core
keywords: 26backport
messages: 63692
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport set literals
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2321] return more memory from unicode objects to system

2008-03-17 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

On Mon, Mar 17, 2008 at 11:55 AM, Alec Thomas <[EMAIL PROTECTED]> wrote:
>
>  Alec Thomas <[EMAIL PROTECTED]> added the comment:
>
>  Hi Neal,
>
>  This seems to be a more general problem than just unicode.

Kinda, sorta. The general issue is the pattern of memory
allocation/deallocation.  In the case of

>>> x = [(1, 2, 3, 4, i) for i in xrange(80)]

The memory that is not returned is in the integer free list.  If this
code is changed to:

>>> for x in ((1, 2, 3, 4, i) for i in xrange(80)): pass

That doesn't hold on to any extra memory.  The problem is that holes
are left in memory and a lot of it can't always be returned to the
O/S.  It can still be re-used by python.

>  Both exhibit the same behaviour. Naively to me it seems like using the
>  custom allocator uniformly would fix this problem.

In general, we should find places (like unicode) that use PyMem_* (ie,
system malloc) and replace them with PyObject_* (pymalloc).  That
should improve the behaviour, but there will always be some allocation
patterns that will be suboptimal.  Note that using pymalloc will only
help for objects < 256 bytes.  Larger objects are delegated to the
system malloc and will still exhibit some of the bad problems.

Alec, can you find places that are using the PyMem_* interface and
create a patch to fix them.  That would be great!

__
Tracker <[EMAIL PROTECTED]>

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



[issue2337] Backport oct() and hex() to use __index__

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

oct() and hex() need to use __index__ when available and then emit a
Py3K warning when they fall back on __oct__ and __hex__.

--
components: Interpreter Core
keywords: 26backport
messages: 63695
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport oct() and hex() to use __index__
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1399] XML codec

2008-03-17 Thread Sean Reifschneider

Sean Reifschneider <[EMAIL PROTECTED]> added the comment:

Marc-Andre: Is this good to be committed, or does it need to be reviewed
further?

--
assignee:  -> lemburg
nosy: +jafo
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue2338] Backport reload() moving to imp.reload()

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

A fixer to change calls from reload() to imp.reload() needs to happen.
Plus imp.reload() should come into existence.

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
keywords: 26backport
messages: 63697
nosy: brett.cannon, collinwinter
priority: immediate
severity: normal
status: open
title: Backport reload() moving to imp.reload()
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2339] Backport intern() -> sys.intern()

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

intern() needs to be added as sys.intern(). Then a 2to3 fixer needs to
be written.

--
components: Interpreter Core
keywords: 26backport
messages: 63698
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport intern() -> sys.intern()
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2338] Backport reload() moving to imp.reload()

2008-03-17 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
components: +Interpreter Core -2to3 (2.x to 3.0 conversion tool)

__
Tracker <[EMAIL PROTECTED]>

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



[issue2340] Backport PEP 3132 (extended iterable unpacking)

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

PEP 3132 (extended iterable unpacking) needs to be backported.

--
components: Interpreter Core
keywords: 26backport
messages: 63699
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport PEP 3132 (extended iterable unpacking)
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2336] Backport PEP 3114 (__next__)

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

PEP 3114 needs to be backported. Most likely the best approach is to
backport the next() built-in but to have it call next() on the iterator
instead of __next__(). That should hopefully minimize breakage while
allowing for moving over to the new built-in.

--
keywords: 26backport
messages: 63694
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Backport PEP 3114 (__next__)
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2291] Raise a Py3K warning for catching non-BaseException exceptions

2008-03-17 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
priority:  -> immediate
title: Catching all exceptions with 'object' -> Raise a Py3K warning for 
catching non-BaseException exceptions

__
Tracker <[EMAIL PROTECTED]>

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



[issue2341] Raise a Py3K warning when raise non-BaseException exceptions

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Raising exceptions that do not inherit from BaseException (e.g., classic
classes) should raise a Py3K warning.

--
components: Interpreter Core
keywords: 26backport
messages: 63700
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Raise a Py3K warning when raise non-BaseException exceptions
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2336] Backport PEP 3114 (__next__)

2008-03-17 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

I don't think this should be backported.  It leaves Py2.6 with a
confused mess of protocols.  The 2-to-3 transformation is simple. 
Backporting doesn't add value.

--
nosy: +rhettinger

__
Tracker <[EMAIL PROTECTED]>

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



[issue2342] Comparing between disparate types should raise a Py3K warning

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

When you compare disparate types through something other than == and !=
a Py3K warning should be raised.

--
components: Interpreter Core
keywords: 26backport
messages: 63702
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Comparing between disparate types should raise a Py3K warning
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1399] XML codec

2008-03-17 Thread Walter Dörwald

Walter Dörwald <[EMAIL PROTECTED]> added the comment:

There was resistance in python-dev against this patch (see the thread at
http://mail.python.org/pipermail/python-dev/2007-November/075138.html),
so this issue should probably closed as rejected.

However there was consensus, that a detect_xml_encoding() function might
be usefull.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2343] Raise a Py3K warning when using a float where an int is expected

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

Using a float where an int should only be used (e.g., ``[].insert(.5,
0)``) should raise a Py3K warning.

--
components: Interpreter Core
keywords: 26backport
messages: 63704
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Raise a Py3K warning when using a float where an int is expected
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1328] Force BOM option in UTF output.

2008-03-17 Thread Sean Reifschneider

Sean Reifschneider <[EMAIL PROTECTED]> added the comment:

It sounds like the Unicode FAQ has an authoritative statement on this,
is this a "wontfix", or does this need more discussion?  Perhaps on
python-dev or at the sprints this week?

--
assignee:  -> doerwalter
nosy: +jafo
priority:  -> normal
title: feature request: force BOM option -> Force BOM option in UTF output.
type: behavior -> feature request

__
Tracker <[EMAIL PROTECTED]>

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



[issue2344] Using an iteration variable outside a list comprehension needs a Py3K warning

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

If you use a iteration variable from a list comprehension from outside
the list comprehension itself should raise a Py3K warning.

--
components: Interpreter Core
keywords: 26backport
messages: 63706
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Using an iteration variable outside a list comprehension needs a Py3K 
warning
type: behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue2054] add ftp-tls support to ftplib - RFC 4217

2008-03-17 Thread Domen

Domen <[EMAIL PROTECTED]> added the comment:

The lib should give programmer choice wether to send login through TLS
or not. (as it is described in RFC 4217).

Also, there should be an optional parameter to specify port for ftp
connection.

--
nosy: +iElectric

__
Tracker <[EMAIL PROTECTED]>

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



[issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning

2008-03-17 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

If one tries to use an exception bound to a variable in an 'except'
clause  it should raise a Py3K warning.

--
components: Interpreter Core
keywords: 26backport
messages: 63708
nosy: brett.cannon
priority: immediate
severity: normal
status: open
title: Using an exception variable outside an 'except' clause should raise a 
Py3K warning
type: behavior
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2326] Doc isnumeric and isdecimal for the unicode object

2008-03-17 Thread Steven Bethard

Steven Bethard <[EMAIL PROTECTED]> added the comment:

I've got a patch against 2.6, and the docs seem to build fine. Since
I've never committed a doc patch before, I'd appreciate it if someone
could glance at this and make sure there's nothing obviously wrong.

--
keywords: +patch
Added file: http://bugs.python.org/file9692/unicode_methods.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2321] return more memory from unicode objects to system

2008-03-17 Thread Alec Thomas

Alec Thomas <[EMAIL PROTECTED]> added the comment:

> Alec, can you find places that are using the PyMem_* interface and
> create a patch to fix them.  That would be great!

Sure thing! I'll see if I can finish it today, but if not I'll work on
it during the flight to Zurich tonight.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1513695] new turtle module

2008-03-17 Thread Gregor Lingl

Gregor Lingl <[EMAIL PROTECTED]> added the comment:

This version runs under Python 2.5 and should run under python 2.6 It
still needs some amendments and polishing concerning the code as well as
the docstrings. Here it can serve as a starting point for a discussion
about necessary and/or desirable modifications.

A version for Python-3000 is under construction

For the new features please consult xturtle-docs.

Remarks on Martin's 10 points (msg 50550):

1) Should be discussed. I think a few demos would be fine, the whole
package perhaps would be to large. (I'll prepare a selection and upload
it in due time)
2) decision about replacement or supllement has still to be done. This
update will be easy ;-)
3) Who is that somebody?
4) Still has to be done
5) I for my part don't like Point, because this name refers more to the
geometrical than to the computational aspects of the object. What about
_Vec2 or _Vec2D? In this version an alias without the leading underscore
can be created via an entry in the xturtle.cfg file.
6) camelCase methodnames are changed to lowercase (at least the public ones)
7) Docstrings has still to be checked
8) n argument of clear has been dropped.
9) checkargs has been dropped (for now). It's purpose was intended to be
to check the types of the arguments and construct appropriate error
messages useful for programming beginners. I deferred it until I
eventually be able to come up with some intelligent solution using
decorators ;-) Would be fine but is not urgent.
10) Maybe there are still a few. These will be changed.

--
nosy: +glingl
versions: +Python 2.6 -Python 2.4
Added file: http://bugs.python.org/file9693/xturtle.py

_
Tracker <[EMAIL PROTECTED]>

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



  1   2   3   4   >