[issue6829] Frendly error message when inheriting from function

2009-09-03 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

It is an error to try to inherit from function and the error message in 
this case is:
{{{
Traceback (most recent call last):
  File stdin, line 1, in module
  File m:\p\pb.py, line 4, in module
class PostgreSQLConnection(DatabaseConnection):
TypeError: Error when calling the metaclass bases
function() argument 1 must be code, not str
}}}

Something like 'Impossible to inherit from function' will clear 
confusion state from users unfamiliar with metaclasses.
{{{
def DatabaseConnection(object):
pass

class PostgreSQLConnection(DatabaseConnection):
pass
}}}

--
components: Interpreter Core
messages: 92191
nosy: techtonik
severity: normal
status: open
title: Frendly error message when inheriting from function
type: behavior
versions: Python 2.6

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



[issue6828] wrongly highlighted blocks in the Tutorial

2009-09-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r74632.

--
resolution:  - fixed
status: open - closed

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



[issue6830] Some uniformness in defaultdict

2009-09-03 Thread Toshihiro Kamiya

New submission from Toshihiro Kamiya t-kam...@aist.go.jp:

I found the syntax of collections.defaultdict is confusing, at least to 
me.

When I need a defaultdict of int, that is, a defaultdict which contains 
int objects, I can write simply:
a = defaultdict(int)

However, when I want a defaultdict of defaultdict of something, I can't 
write:
d = defaultdict(defaultdict(int))

This raises TypeError.

I understand the argument of defaultdict is not a type (or class), but 
a factory by definition. So I should to write:
d = defaultdict(lambda: defaultdict(int))

But this syntax is somehow confusing to me.
Am I missing some important feature of defaultdict?

The workaround that I've found is:

import collections
class __Helper(object):
  def __getitem__(self, ctor):
return lambda: collections.defaultdict(lambda: ctor())
genericdefaultdict = __Helper()

This helper introduce some generics flavor in defaultdict.
The above cases can be spelt out:

a = genericdefaultdict[int]()
d = genericdefaultdict[genericdefaultdict[int]]()

--
components: Library (Lib)
files: ddh.py
messages: 92193
nosy: t-kamiya
severity: normal
status: open
title: Some uniformness in defaultdict
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file14824/ddh.py

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



[issue6831] 2to3 assignment division conversion

2009-09-03 Thread Jonas Byström

New submission from Jonas Byström highfest...@gmail.com:

Code from 2.x containing __idiv__ does not translate into

def __floordiv__(self, x): self.__truediv__(x)
def __truediv__(self, x): ...

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 92194
nosy: highfestiva
severity: normal
status: open
title: 2to3 assignment division conversion
type: behavior
versions: Python 3.1

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



[issue1766304] improve xrange.__contains__

2009-09-03 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

The py3k patch no longer works:  it makes use of PyObject_Cmp, which no
longer exists.

--

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



[issue6832] Outputting unicode crushes when printing to file on Linux

2009-09-03 Thread Jerzy

New submission from Jerzy jer...@genesilico.pl:

Hi

When I am outputting unicode strings to terminal my script works OK, but
when I redirect it to file I get a crash:

$ python mailing/message_sender.py -l Bia
Białystok

$ python mailing/message_sender.py -l Bia  ~/tmp/aaa.txt 
Traceback (most recent call last):
  File mailing/message_sender.py, line 71, in module
list_groups(unicode(args[0],'utf-8'))
  File mailing/message_sender.py, line 53, in list_groups
print group[1].name
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in
position 3: ordinal not in range(128)

--
components: Unicode
messages: 92196
nosy: Orlowski
severity: normal
status: open
title: Outputting unicode crushes when printing to file on Linux
type: crash
versions: Python 2.6

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



[issue1766304] improve xrange.__contains__

2009-09-03 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

The trunk patch is also unacceptable in its current form:

 1. there are no docs or tests
 2. keyval, start, step and end should have type long, not type int
(as Antoine already mentioned)
 3. the expression ((keyval - start) % step) can overflow, leading to
undefined behaviour (e.g., wrong results, segfaults, strange
effects from gcc optimizations that assume no overflow).  For
example, with the patch, on Linux/x86-64, I get:

   x = xrange(-20, 20, 5)
   10 in x
  False

This should be relatively easy to fix:  e.g., if you already
know that step  0 and start = keyval and keyval  stop, then
'(unsigned long)keyval - (unsigned long)start'  is safe from
overflow.

 4. the containment check only works for ints:  with the patch, I get:

   x = xrange(10)
   4 in x
  True
   4L in x
  False
   4.0 in x
  False

but without the patch applied, all these return True.  It's possible
that it's worth special-casing integer inputs for the sake of
speed, but I don't think the behaviour should change like this for
other types.

--

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



[issue1766304] improve xrange.__contains__

2009-09-03 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

[Joseph Thomson]
 Also, as I said in my closed duplicate issue, 'if value in range(lower,
 upper)' to me looks far more Pythonic than 'if value = lower and value
  upper'.

Note that the Pythonic spelling would be:  'if lower = value  upper'.
 (Though that's not quite the same thing if value is not an integer.)

--

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



[issue6833] incorrect: failed local variable referenced before assignment

2009-09-03 Thread Paul van der Linden

New submission from Paul van der Linden p...@soulbase.nl:

The attached python file will give the following output, which is 
incorrect behavior as far as I know:

this will fail
failed local variable 'in_std' referenced before assignment

this won't fail
Not failed
this won't fail either
Not failed


This is tested on windows with python2.6(standard msi) and on centos 
5.3 with python2.6 (custom rpm), python2.4 (system rpm), freebsd with 
python2.5 (system package), python2.6 (hand compiled) and python3.0 
(hand compiled).

The attached code is stripped down to the bare minimum and therefore 
won't do anything usefull.

--
components: None
files: bug.py
messages: 92199
nosy: paultjuhatwork
severity: normal
status: open
title: incorrect: failed local variable referenced before assignment
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0
Added file: http://bugs.python.org/file14825/bug.py

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



[issue6827] deepcopy erroneously doesn't call __setstate__ if __getstate__ returns empty dict

2009-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

This is precisely documented here:
http://docs.python.org/library/pickle.html#object.__setstate__
Note: For new-style classes, if __getstate__() returns a false value,
the __setstate__() method will not be called.

If you want some default value even when the state is empty, you could
set it in the __new__ method:
[__new__ is always called, but __init__ is skipped by the copy protocol]

class A(object):
def __new__(cls):
self = super(cls, A).__new__(cls)
self.a = 1
return self
def __setstate__(self, d):
self.__dict__.update(d)
def __getstate__(self):
d = self.__dict__.copy()
d.pop('a')
return d

The __setstate__ is even not necessary here, since it implements the
default behaviour.

--
nosy: +amaury.forgeotdarc
resolution:  - works for me
status: open - pending

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



[issue6833] incorrect: failed local variable referenced before assignment

2009-09-03 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

This is not a bug.  The behaviour you're seeing is described here:

http://docs.python.org/reference/executionmodel.html#naming-and-binding

If a name binding operation occurs anywhere within a code block, all
uses of the name within the block are treated as references to the
current block. This can lead to errors when a name is used within a
block before it is bound. This rule is subtle. Python lacks declarations
and allows name binding operations to occur anywhere within a code
block. The local variables of a code block can be determined by scanning
the entire text of the block for name binding operations.

In the failing example, the registerdecorator function contains an
assignment to in_std, so by the rules above in_std is local to the
function.  The 'if in_std' line therefore tries to lookup 'in_std' in
the local namespace;  it doesn't exist (yet), so an UnboundLocalError
exception occurs.

--
nosy: +marketdickinson
resolution:  - invalid
status: open - closed

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



[issue6832] Outputting unicode crushes when printing to file on Linux

2009-09-03 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

You have to use an encoding that's not ascii then.

--
nosy: +benjamin.peterson
resolution:  - works for me
status: open - closed

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



[issue6832] Outputting unicode crushes when printing to file on Linux

2009-09-03 Thread Jerzy

Jerzy jer...@genesilico.pl added the comment:

I know how to make it work. The question is why outputting to file makes 
it crush when outputting to terminal does not.

I have never seen $program  file behaving in a different way than 
$program in any other language

Jerzy Orlowski

Benjamin Peterson wrote:
 Benjamin Peterson benja...@python.org added the comment:

 You have to use an encoding that's not ascii then.

 --
 nosy: +benjamin.peterson
 resolution:  - works for me
 status: open - closed

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6832
 ___





--

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



[issue6832] Outputting unicode crushes when printing to file on Linux

2009-09-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

When output goes to a terminal, Python can determine its encoding. For a
file, it cannot, therefore it refuses to guess.

Also, many programs behave differently when used with redirection;
namely, all those that use `isatty()` to determine if stdout is a terminal.

--
nosy: +georg.brandl

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



[issue6823] time.strftime does unnecessary range check

2009-09-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Assigning to Brett who added this check in r35368.

--
assignee:  - brett.cannon
nosy: +brett.cannon, georg.brandl

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



[issue6830] Some uniformness in defaultdict

2009-09-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

This won't change -- the argument of defaultdict is simply a callable
that is called with no arguments and returns the default value.

It works with `int` because `int()` can be called without arguments and
yields 0; however, `defaultdict` cannot.  Therefore, the lambda
expression you wrote is one of the correct ways to spell this.

--
nosy: +georg.brandl
resolution:  - wont fix
status: open - closed

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



[issue6832] Outputting unicode crushes when printing to file on Linux

2009-09-03 Thread Jerzy

Jerzy jer...@genesilico.pl added the comment:

Well, I would suggest using the terminal encoding as default one when 
redirecting. In my opinion sys.stdin and sys.stdout should always have 
the terminal encoding

Alternatively you could make the function sys.setdefaultencoding() 
visible to change it in a reasonable way

Jerzy

Georg Brandl wrote:
 Georg Brandl ge...@python.org added the comment:

 When output goes to a terminal, Python can determine its encoding. For a
 file, it cannot, therefore it refuses to guess.

 Also, many programs behave differently when used with redirection;
 namely, all those that use `isatty()` to determine if stdout is a terminal.

 --
 nosy: +georg.brandl

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6832
 ___





--

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



[issue6757] Marshal's documentation incomplete (Bools)

2009-09-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r74633.

--
resolution:  - fixed
status: open - closed

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



[issue6820] Redefinition of HAVE_STRFTIME can cause compiler errors.

2009-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Those HAVE_XXX symbols should be defined like autoconf does:
#define HAVE_STRFTIME 1
This is what happens on Unix platforms, and AFAIK this plays well with
other libraries which define the same symbols.

--
nosy: +amaury.forgeotdarc

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



[issue6802] build fails on Snow Leopard

2009-09-03 Thread fideli

Changes by fideli faisal.moled...@gmail.com:


--
nosy: +fideli

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



[issue6802] build fails on Snow Leopard

2009-09-03 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

My current plan is to fix this issue, and the issue of 64-bit universal 
builds on SL in the weekend. 

BTW. I'm not planning to fix this for 2.5 and 2.4, AFAIK both are no 
maintained beyond critical security patches.

--

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



[issue6834] use different mechanism for pythonw on osx

2009-09-03 Thread Ronald Oussoren

New submission from Ronald Oussoren ronaldousso...@mac.com:

Note: this is mostly a reminder for myself to clean up the pythonw stub 
executable

The current implementation of pythonw on OSX uses exec to start an 
executable inside the framework, this is needed to be able to use GUI 
functionality from the command-line without resorting to undocumented 
and unsupported system APIs. To deal with selection between 32-bit and 
64-bit the framework contains a number of python executables.

Using posix_spawnattr_setbinpref_np, posix_spawnattr_setflags and 
posix_spawn it is possible to do away with the additional executables, 
leaving a simpler situation. 

Nice to have features:
* python(1) on SnowLeopard has a system preference to select between 32-
bit and 64-bit:

   $ defaults read com.apple.versioner.python  
   {
Prefer-32-Bit = 1;
   }

(The versioner appears to be a private Apple library/tool, 
reimplementing the functionality would be fairly trivial)

* It would be nice to have a command-line switch as well

* It would be nice if the stub executable could be reused by tools like 
virtualenv without recompilation

--
assignee: ronaldoussoren
components: Macintosh
keywords: easy
messages: 92210
nosy: ronaldoussoren
severity: normal
stage: needs patch
status: open
title: use different mechanism for pythonw on osx
type: feature request
versions: Python 2.7, Python 3.2

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



[issue6835] doctest problem with decorated function when decorator is defined in separate file

2009-09-03 Thread Goetz Pfeiffer

New submission from Goetz Pfeiffer goet...@googlemail.com:

As described in bug 1108, doctest skips tests on 
functions that have been decorated with a decorator that 
is defined in a separate file.

As described in bug 1108, the problem lies in 
file doctest.py, there in class DocTestFinder,
there in method _from_module

There at about line 857 the following code makes problems:

elif inspect.isfunction(object):
return module.__dict__ is object.func_globals

The func_globals property of the function is used to find out if
the function was defined in the current module. This is not true
for a decorated function where the decorator is defined in another
module. Maybe _from_module() should use inspect.getmodulename() or
the __module__ property of the function instead. __module__
is set correctly when the decorator uses functools.wraps().

The func_globals property is read-only, so there is no chance fix this
at the decorator definition.

--
components: Library (Lib)
files: mytest.sh
messages: 92212
nosy: goetzpf
severity: normal
status: open
title: doctest problem with decorated function when decorator is defined in 
separate file
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file14826/mytest.sh

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



[issue6802] build fails on Snow Leopard

2009-09-03 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

On Thu, Sep 3, 2009 at 07:28, Ronald Oussorenrep...@bugs.python.org wrote:

 Ronald Oussoren ronaldousso...@mac.com added the comment:

 My current plan is to fix this issue, and the issue of 64-bit universal
 builds on SL in the weekend.

 BTW. I'm not planning to fix this for 2.5 and 2.4, AFAIK both are no
 maintained beyond critical security patches.

That's correct.

--

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



[issue6832] Outputting unicode crushes when printing to file on Linux

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

Martin v. Löwis mar...@v.loewis.de added the comment:

Using the terminal encoding for sys.stdout does not work in the general
case, as a (background) process may not *have* a controlling terminal
(such as a CGI script, a cron job, or a Windows service). That Python
recognizes the terminal encoding is primarily a convenience feature for
the interactive mode.

Exposing sys.setdefaultencoding is not implementable in a reasonable way.

--
nosy: +loewis

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



[issue6834] use different mechanism for pythonw on osx

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

Martin v. Löwis mar...@v.loewis.de added the comment:

Can you kindly report how architecture selection works? Is there a
separate binary which execs? Some other magic?

Asking primarily out of curiosity, but if it's a launcher, then
(sym)linking it into a virtualenv might be sufficient.

--
nosy: +loewis

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



[issue6832] Outputting unicode crushes when printing to file on Linux

2009-09-03 Thread Jerzy

Jerzy jer...@genesilico.pl added the comment:

OK, I give up.

The problem is that one might test a program on terminal and think that 
everything is running OK and then spend a reasonable amount of time 
trying to find the problem later

Another approach: couldn't utf8 be set as default encoding for all 
inputs and outputs?

I know that some of my questions are caused by the fact that I do not 
understand how python works. But You have to bear in mind that most of 
the people don't. Such behaviour of Python (see also 
http://bugs.python.org/issue5092) is illogical in the common sense for 
standard poeple. If interpreter does something illogical for me, I am 
more eager to switch to another language.

Jerzy

Martin v. Löwis wrote:
 Martin v. Löwis mar...@v.loewis.de added the comment:

 Using the terminal encoding for sys.stdout does not work in the general
 case, as a (background) process may not *have* a controlling terminal
 (such as a CGI script, a cron job, or a Windows service). That Python
 recognizes the terminal encoding is primarily a convenience feature for
 the interactive mode.

 Exposing sys.setdefaultencoding is not implementable in a reasonable way.

 --
 nosy: +loewis

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6832
 ___





--

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



[issue6832] Outputting unicode crushes when printing to file on Linux

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

Martin v. Löwis mar...@v.loewis.de added the comment:

If you want to switch to a different language, consider switching to
Python 3. There, all strings are Unicode strings, and files opened in
text mode always use the locale encoding.

--

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



[issue6582] test_telnetlib doesn't test Telnet.write

2009-09-03 Thread Jack Diederich

Jack Diederich jackd...@gmail.com added the comment:

applied in r74638
and I've added you to Misc/ACKS
Thanks again for the patch!

--
resolution:  - accepted
status: open - closed

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



[issue6748] test test_telnetlib failed

2009-09-03 Thread Jack Diederich

Jack Diederich jackd...@gmail.com added the comment:

I think this is fixed by r74638 but it never triggered on my box (Ubuntu
9.x) so I can't be sure.  What distro are you using?

--
assignee:  - jackdied
nosy: +jackdied

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



[issue6582] test_telnetlib doesn't test Telnet.write

2009-09-03 Thread Rodrigo Steinmuller Wanderley

Rodrigo Steinmuller Wanderley rwander...@rsw.digi.com.br added the comment:

On Thu, 03 Sep 2009 20:38:49 +
Jack Diederich rep...@bugs.python.org wrote:

 
 Jack Diederich jackd...@gmail.com added the comment:
 
 applied in r74638
 and I've added you to Misc/ACKS
 Thanks again for the patch!

No problem,

Anything I can do to improve telnetlib further?

I'm currently with plenty of time available and would appreciate the
opportunity to learn more Python.

Rodrigo

 --
 resolution:  - accepted
 status: open - closed
 
 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6582
 ___

--

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



[issue6806] test_platform fails under Snow Leopard

2009-09-03 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Got a fix, about to start applying it.

--

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



[issue6748] test test_telnetlib failed

2009-09-03 Thread Thomas Kowaliczek

Thomas Kowaliczek linuxdon...@linuxdonald.de added the comment:

Fedora 11 64 Bit

--

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



[issue6806] test_platform fails under Snow Leopard

2009-09-03 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

2.7: 74640
3.2: 74641
3.1: 74642

--
resolution:  - fixed
status: open - closed

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



[issue6823] time.strftime does unnecessary range check

2009-09-03 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Ugh, damn platforms and having to be different. =)

Normalization is the best solution as Python's docs says the expected 
value for the tm_dst field is -1, 0, or 1 (which is why I added the 
check).

--
keywords: +easy
priority:  - low
stage:  - test needed

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



[issue2649] poss. patch for fnmatch.py to add {.htm, html} style globbing

2009-09-03 Thread Tim Hatch

Tim Hatch t...@timhatch.com added the comment:

More discussion has gone on in issue #4573 on this topic.  Can this bug
be marked as a duplicate?

--
nosy: +thatch

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



[issue6824] help for a module should list supported platforms

2009-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

I'm not sure to understand. The web page says the module works on all 
supported platforms. Many python features works equally well on all 
platforms, and I don't feel necessary to repeat this everywhere.
The differences between platforms are more interesting IMO.

--
nosy: +amaury.forgeotdarc

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



[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-03 Thread Philip Jenvey

Philip Jenvey pjen...@users.sourceforge.net added the comment:

The subprocess docs (in Doc/library/subprocess.rst and the module itself) 
need to also reflect this change

--
nosy: +pjenvey

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



[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-03 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

Hey Philip,

I'm not sure I follow.  The patch only changes the os module, not the
subprocess module.  What subprocess documentation do you think needs to
be updated?

--

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



[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-03 Thread Philip Jenvey

Philip Jenvey pjen...@users.sourceforge.net added the comment:

Sorry, I meant the docs describing how to convert os.popen* calls to 
subprocess calls. They assume the shell arg is always True regardless of 
the cmd arg type. Those docs are probably the original source of this bug

--

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



[issue6832] Outputting unicode crushes when printing to file on Linux

2009-09-03 Thread Jerzy

Jerzy jer...@genesilico.pl added the comment:

good point!

I will give it a try

Jerzy

Martin v. Löwis wrote:
 Martin v. Löwis mar...@v.loewis.de added the comment:

 If you want to switch to a different language, consider switching to
 Python 3. There, all strings are Unicode strings, and files opened in
 text mode always use the locale encoding.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6832
 ___





--

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



[issue6824] help for a module should list supported platforms

2009-09-03 Thread Ritesh Raj Sarraf

Ritesh Raj Sarraf r...@researchut.com added the comment:

Take help os or help os.fork for example.

WIth the help output that they provide, how am I supposed to know that
os.fork is only supported on Unix.

We can also go with the assumption that the modules shipped are
cross-platform. But then, for those that aren't, I don't think we mention
that in the help file documentation.

--

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