[issue6219] nested list value change

2009-06-06 Thread Pushkar Paranjpe

New submission from Pushkar Paranjpe pushkarparan...@gmail.com:

Is this a bug ?

 a = [[1,2],[3,4],[5,6]]
 a
[[1, 2], [3, 4], [5, 6]]
 b = a[0]
 b
[1, 2]
 b[0] = -
 b
[-, 2]
 a
[[-, 2], [3, 4], [5, 6]]


Created a new variable (b) which refers to an element in a list (a).
Changing the value of the new variable also reflects in the original
list. I thought the new variable is actually a new variable with its own
memory allocation and not a symbolic link to pre-existing data. is this
a bug?
Please help.

--
components: Library (Lib)
messages: 88989
nosy: pushkarparanjpe
severity: normal
status: open
title: nested list value change
type: behavior
versions: Python 2.5, Python 2.6

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



[issue6196] tarfile.extractall(readaccess=True)

2009-06-06 Thread Lars Gustäbel

Lars Gustäbel l...@gustaebel.de added the comment:

I close this issue then.

--
resolution:  - rejected
status: open - closed

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



[issue6219] nested list value change

2009-06-06 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

This is correct behavior.
Try making a new *copy* of the sublist:

a = [[1,2],[3,4],[5,6]]
b = a[0][:]
b[0] = -

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

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



[issue6220] typo: opne in doanddont

2009-06-06 Thread cate

New submission from cate c...@debian.org:

http://docs.python.org/dev/howto/doanddont.html use twice in example the
opne function, which should be written as open. From google it seems
that also 3.x is affected (but not really checked)

--
assignee: georg.brandl
components: Documentation
messages: 88992
nosy: cate, georg.brandl
severity: normal
status: open
title: typo: opne in doanddont
versions: Python 2.7

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



[issue6220] typo: opne in doanddont

2009-06-06 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

Here's a patch for trunk.

--
keywords: +patch
nosy: +jszakmeister
Added file: http://bugs.python.org/file14203/issue-6220-doanddont.patch

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



[issue6220] typo: opne in doanddont

2009-06-06 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

That typo is intentional, it's also written in the comment:
try:
foo = opne(file) # misspelled open
except:
sys.exit(could not open file!)

This example shows how a bare except will catch the NameError caused by
'opne' and return the wrong error message, whereas except IOError will
only catch IOErrors and show the NameError.

--
nosy: +ezio.melotti
resolution:  - invalid

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



[issue6220] typo: opne in doanddont

2009-06-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
status: open - closed

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



[issue6220] typo: opne in doanddont

2009-06-06 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

That'll teach me to pay more attention before submitting a patch. 
Thanks Ezio!

--

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



[issue6214] test__locale broken on trunk

2009-06-06 Thread Vikram U Shenoy

Vikram U Shenoy vikram.u.she...@gmail.com added the comment:

Georg has fixed it in r73252.

--
nosy: +vshenoy

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



[issue6220] typo: opne in doanddont

2009-06-06 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

Actually, what's the second example trying to show:
try:
   foo = opne(file) # will be changed to open as soon as we run it
except IOError:
   sys.exit(could not open file)

I'm not sure what that comment really means?

--

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



[issue6218] Make io.BytesIO and io.StringIO picklable.

2009-06-06 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I think it's too late for 3.1, since it's a new feature.

--
nosy: +benjamin.peterson, pitrou
versions:  -Python 3.1

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



[issue1143] Update to latest ElementTree in Python 2.7

2009-06-06 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
versions: +Python 3.2 -Python 3.1

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



[issue6220] typo: opne in doanddont

2009-06-06 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

If we use the bare except: the message could not open file! is shown
and we would waste time trying to figure out why it can't be opened.

Instead, if we use except IOError:, the first time we run the program
the error NameError: name 'opne' is not defined is raised, telling us
what's wrong. Once we know it, we can change 'opne' to 'open' and solve
the problem.

Indeed it could be clearer.

--
keywords:  -patch

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



[issue6195] Serious regression in doctest in Py3.1rc1

2009-06-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It turns out that doctest patches linecache.getlines (which is not, by
the way, a public interface of linecache according to the docs and the
__all__ string) to retrieve the doctest source code.  The special
filename it uses to trigger this is not returned by getsourcefile but is
returned by getfile.

So the issue4050 fix is not impacted, but the fix for this bug is not so
straightforward.

--

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



[issue6221] Windows buildbot failure in test_winreg

2009-06-06 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

I'm filing this as release blocker since it might indicate serious
breakage (I'm not a Windows expert).


==
FAIL: testLocalMachineRegistryWorks (test.test_winreg.WinregTests)
--
Traceback (most recent call last):
  File
E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_winreg.py,
line 148, in testLocalMachineRegistryWorks
self.TestAll(HKEY_CURRENT_USER)
  File
E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_winreg.py,
line 143, in TestAll
self.WriteTestData(root_key, subkeystr)
  File
E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_winreg.py,
line 50, in WriteTestData
Not the correct number of values)
AssertionError: Not the correct number of values

--

--
components: Library (Lib), Tests
messages: 89001
nosy: pitrou
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Windows buildbot failure in test_winreg
type: crash
versions: Python 3.1

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



[issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32?

2009-06-06 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I'm not sure it is as non-controversial as it seems.
Someone should 1) do the math 2) show impact on a couple of benchmarks
of his choice

--
nosy: +pitrou

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



[issue6195] Serious regression in doctest in Py3.1rc1

2009-06-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

OK, here is a revised patch that passes all tests, including the new one.

--
stage: needs patch - patch review
Added file: http://bugs.python.org/file14204/issue6195.patch

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



[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2009-06-06 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I've added an entry in the what's new file in r73254.

--
status: open - closed

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



[issue6222] 2to3 except fixer failed in certain case

2009-06-06 Thread Haoyu Bai

New submission from Haoyu Bai divine...@gmail.com:

The 2to3 except fixer will be failed with this code:

try: raise TypeError
except TypeError, x:
pass

with this code, 2to3 will produce an empty diff, i.e. it fixes nothing.

But when change it to the following, 2to3 works again:

try:
raise TypeError
except TypeError, x:
pass

with this, 2to3 will provide a correct diff.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 89005
nosy: bhy
severity: normal
status: open
title: 2to3 except fixer failed in certain case
versions: Python 2.6, Python 3.0, Python 3.1

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



[issue6222] 2to3 except fixer failed in certain case

2009-06-06 Thread Benjamin Peterson

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

Fixed in r73255.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

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



[issue6223] Make _PyUnicode_AsString as public API

2009-06-06 Thread Haoyu Bai

New submission from Haoyu Bai divine...@gmail.com:

Why _PyUnicode_AsString and _PyUnicode_AsStringAndSize are not public
API? They are very useful when porting extension module to Python 3,
because they have the semantic as same as PyString_AsString. For
extension author, these API can be used for replacing PyString_AsString
without any other change in code logic.

So why not make these API public? Any consideration? If we can document
these API, then C extension author can know them and use them, without
spending a lot of time to dig them out from Python source code.

Thanks!

--
assignee: georg.brandl
components: Documentation, Extension Modules, Interpreter Core, Unicode
messages: 89007
nosy: bhy, georg.brandl
severity: normal
status: open
title: Make _PyUnicode_AsString as public API
type: feature request
versions: Python 3.1, Python 3.2

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



[issue6223] Make _PyUnicode_AsString as public API

2009-06-06 Thread Benjamin Peterson

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

They are not public because implicitly encoding unicode is bad practice
in Python 3. You should use PyUnicode_AsEncodedString() or such.

--
nosy: +benjamin.peterson
resolution:  - rejected
status: open - closed

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



[issue6211] [Tutorial] Section 4.7.2 has a wrong description of an example

2009-06-06 Thread Georg Brandl

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

Fixed in r73257.

Please respect the limit of 80 chars per line in future patches :)

--
resolution:  - fixed
status: open - closed

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



[issue6204] Missing reference in section 4.6 to chapter on classes

2009-06-06 Thread Georg Brandl

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

Thanks, applied in r73258!

--
resolution:  - accepted
status: open - closed

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



[issue6217] Add _io._TextIOWrapper.errors

2009-06-06 Thread Benjamin Peterson

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

Thanks for the report! Fixed in r73259.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

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



[issue6224] References to JPython

2009-06-06 Thread Thijs Triemstra

New submission from Thijs Triemstra li...@collab.nl:

The documentation refers to JPython in several places, which is the old 
name, it's called Jython nowadays.

 - platform.java_ver
 - tkinter

--
assignee: georg.brandl
components: Documentation
messages: 89012
nosy: georg.brandl, thijs
severity: normal
status: open
title: References to JPython
versions: Python 2.5, Python 2.6, Python 3.1

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



[issue6214] test__locale broken on trunk

2009-06-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue6224] References to JPython

2009-06-06 Thread Georg Brandl

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

Thanks, fixed in r73260.

--
resolution:  - fixed
status: open - closed

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



[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I've uploaded a new version of the patch and test suite.  I wanted a few
more test cases but didn't want to litter the test directory with little
test files, so I borrowed some techniques from test_import and created
the modules to import on the fly.

I haven't come up with a fix for your last test case (yet?).  I've
commented the test to indicate this.  I think to fix it we may need to
look into the traceback itself.

--
Added file: http://bugs.python.org/file14205/issue5230.patch

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



[issue4966] Improving Lib Doc Sequence Types Section

2009-06-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
priority:  - normal
stage:  - needs patch
type:  - feature request

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



[issue3798] SystemExit incorrectly displays unicode message

2009-06-06 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

I did some more experiments, here are the results:

Windows XP, from cmd.exe (cp850):
Py 2.x:
 raise SystemExit(u'aeiou') # unicode string, ascii chars, works fine
aeiou

 raise SystemExit(u'àèìòù') # unicode string, non-ascii chars, no output


 raise SystemExit('àèìòù') # byte strings, non-ascii chars, works fine
àèìòù

Py 3.0:
 raise SystemExit('àèìòù') # unicode string, non-ascii chars, wrong
output
àèìòù

The output here is utf-8 and cmd shows it as cp850.


Linux, UTF-8 terminal:
Py 2.x:
 raise SystemExit(u'àèìòù') # unicode string, non-ascii chars, no output

There's no output even if the terminal uses utf-8.

Py 3.x:
 raise SystemExit('àèìòù') # unicode string, non-ascii chars, works fine
àèìòù


When a unicode string with non-ascii characters is passed:
* Py2 always fails (no output);
* Py3 works only when the terminal uses utf-8, otherwise it fails (the
chars are displayed using another encoding).

--
components: +Unicode
nosy: +ezio.melotti
priority:  - normal
type:  - behavior
versions: +Python 2.6, Python 2.7

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



[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2009-06-06 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Confirmed for 3.1, 3.0 still returns (None, None).

--
components: +Library (Lib)
nosy: +ezio.melotti
priority:  - normal

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-06-06 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

In the interest of expediency, I've implemented I.(a): specifically,
I've put a wrapper around DeleteFileW to check if the target is a
directory-symlink, and if it is, call RemoveDirectory instead.  I've
updated the test case to reflect this behavior.  Patch draft 6 includes
these changes.

Is there anything else that needs to be addressed before this can be merged?

--
Added file: http://bugs.python.org/file14206/windows symlink draft 6.patch

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



[issue6191] HTMLParser attribute parsing - 2 test cases when it fails

2009-06-06 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

BeautifulSoup use SGMLParser for all the versions 3.1. BeautifulSoup 
3.1 is supposed to be compatible with Python 3 and since SGMLParser is
gone it's now using HTMLParser, but it's not able to handle some things
anymore.

For more information:
http://www.crummy.com/software/BeautifulSoup/3.1-problems.html

(FWIW I tried BeautifulSoup 3.1 but it failed where BeautifulSoup 3.0.7
was working so I came back to 3.0.7)

--
nosy: +ezio.melotti

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



[issue670664] HTMLParser.py - more robust SCRIPT tag parsing

2009-06-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
versions: +Python 2.7, Python 3.2 -Python 2.5

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



[issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure

2009-06-06 Thread Guilherme Polo

New submission from Guilherme Polo ggp...@gmail.com:

Hi,

While testing Tkinter.Canvas I've found several minor bugs that I would
prefer to see fixed. Many of them change the current Canvas api a bit,
but for better. For example, the methods focus, gettags, icursor,
index, insert, move (and some others) accept arbitrary amount of
arguments, but all these tcl subcommands have a fixed amount of
arguments they accept, so I consider it is better to make this clear on
Tkinter too.

I've also found a problem in Misc._configure which is also fixed by the
attached patch. The problem is that when cnf is a string, the call
self.tk.split(self.tk.call(_flatten((self._w, cmd, '-'+cnf may
still result in an empty string causing the following statement to fail
return (x[0][1:],) + x[1:].

One thing that left me curious was the comment # XXX Should use
_flatten on args in Canvas.coords. I've tried understanding why it
should use _flatten there, but couldn't figure it out. This is a very
old comment, so maybe it is no longer true ?

--
components: Tkinter
files: Canvas_fixes.diff
keywords: patch
messages: 89019
nosy: gpolo
severity: normal
status: open
title: Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file14207/Canvas_fixes.diff

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



[issue6226] Inconsistent 'file' vs 'stream' kwarg in pprint, other stdlibs

2009-06-06 Thread Philip Jenvey

New submission from Philip Jenvey pjen...@users.sourceforge.net:

It'd be nice to eventually standardize on the kwarg name used for basic 
file-like args in the stdlib. print, warnings.showwarning and some 
others take a file= argument whereas pprint, getpass.getpass take 
stream=

print and pprint in particular should match -- though they do have a 
different option set, when you're using the same options this 
consistency would ease replacing:

print(obj, file=sys.stderr)
with
pprint(obj, stream=sys.stderr)

--
components: Library (Lib)
messages: 89020
nosy: pjenvey
severity: normal
status: open
title: Inconsistent 'file' vs 'stream' kwarg in pprint, other stdlibs
type: feature request

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



[issue798058] IDLE / PyOS_InputHook

2009-06-06 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Closing as promised.

--

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2009-06-06 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Idle has changed a bit since the initial message, so it no longer hangs
when it is configured to open an edit window by default, but now it
hangs when running it as: idle -e somedirnamehere (which the patch fixes).

--

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



[issue6215] Backport the IO lib to trunk

2009-06-06 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

New patch incorporating the latest py3k changes.

--
Added file: http://bugs.python.org/file14208/iobackport2.patch

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



[issue6221] Windows buildbot failure in test_winreg

2009-06-06 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

This doesn't happen on Win2k. Maybe does it depend on OS?

--
nosy: +ocean-city

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



[issue4309] ctypes documentation

2009-06-06 Thread Michael Newman

Michael Newman michael.b.new...@gmail.com added the comment:

Regarding Section 15.15.1.5. Calling functions, continued on:
http://docs.python.org/3.0/library/ctypes.html

I would recommend changing the first example code block to the following:

 printf = libc.printf
 printf(bHello, %s\n, bWorld!)
Hello, World!
14
 printf(c_char_p(Hello, %s\n), c_char_p(World!))
Hello, World!
14
 printf(bHello, %S\n, World!)
Hello, World!
14
 printf(c_char_p(Hello, %S\n), World!)
Hello, World!
14
 printf(c_char_p(%d bottles of beer\n), 42)
42 bottles of beer
19
 printf(c_char_p(%f bottles of beer\n), 42.5)
Traceback (most recent call last):
  File stdin, line 1, in module
ctypes.ArgumentError: argument 2: class 'TypeError': Don't know how to
convert parameter 2

And change the second example block to:

 printf(c_char_p(An int %d, a double %f\n), 1234, c_double(3.14))
An int 1234, a double 3.14
31

Aside: For reference, here is how I started up the interactive session:
m...@www:~$ python3.0
Python 3.0.1 (r301:69556, Jun  6 2009, 21:34:43)
[GCC 4.3.2] on linux2
Type help, copyright, credits or license for more information.
 from ctypes import *
 libc = CDLL(libc.so.6)

Note the printf.argtypes method is discussed later in Section
15.15.1.7. Specifying the required argument types (function
prototypes), so it might be premature to use it here.

--
nosy: +mnewman

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



[issue6227] doctest_aliases doesn't test duplicate removal

2009-06-06 Thread James Abbatiello

New submission from James Abbatiello abb...@gmail.com:

The file Lib/test/doctest_aliases.py is used by test_doctest to check
the handling of duplicate removal.  The g = f line in this file is one
indent too far to the right so instead of creating an alias for f called
g it is just unreachable code inside of f.  Since there is no alias
there is no need to remove duplicates and the test passes trivially.

I think this affects all versions but I've only checked on 2.7.

--
components: Tests
files: doctest_aliases.patch
keywords: patch
messages: 89027
nosy: abbeyj
severity: normal
status: open
title: doctest_aliases doesn't test duplicate removal
versions: Python 2.7
Added file: http://bugs.python.org/file14210/doctest_aliases.patch

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