[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Thanks Antoine, I fixed both issues.

--
Added file: http://bugs.python.org/file16140/add-readable-writable2.patch

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



[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Antoine Pitrou

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

Oh and the following line shouldn't be needed:

data = b'xxx' if 'b' in mode else u'xxx'

Since old-style file objects always take bytestrings (it's harmless, though, 
because the unicode string will be implicitly converted).

--

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



[issue7857] test_logging fails

2010-02-05 Thread Antoine Pitrou

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

First, listening and/or connecting often fails.
Second, the test should use try/finally to release all resources even in case 
of failure.

This is breaking most buildbots currently: 
http://www.python.org/dev/buildbot/trunk/


[snip]
test_listen_config_1_ok (test.test_logging.ConfigDictTest) ... Exception in 
thread Thread-1044:
Traceback (most recent call last):
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py, line 
526, in __bootstrap_inner
self.run()
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py, line 
479, in run
self.__target(*self.__args, **self.__kwargs)
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/logging/config.py, 
line 847, in serve
server = rcvr(port=port, handler=hdlr)
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/logging/config.py, 
line 827, in __init__
ThreadingTCPServer.__init__(self, (host, port), handler)
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py, 
line 406, in __init__
self.server_bind()
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py, 
line 417, in server_bind
self.socket.bind(self.server_address)
  File /home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/socket.py, 
line 222, in meth
return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use

ok

==
ERROR: test_listen_config_10_ok (test.test_logging.ConfigDictTest)
--
Traceback (most recent call last):
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/test/test_logging.py,
 line 1597, in test_listen_config_10_ok
self.setup_via_listener(json.dumps(self.config10))
  File 
/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/test/test_logging.py,
 line 1581, in setup_via_listener
sock.connect(('localhost', PORT))
  File /home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/socket.py, 
line 222, in meth
return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused

--
assignee: vinay.sajip
messages: 98872
nosy: pitrou, vinay.sajip
priority: critical
severity: normal
stage: needs patch
status: open
title: test_logging fails
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue7857] test_logging fails

2010-02-05 Thread Florent Xicluna

Florent Xicluna la...@yahoo.fr added the comment:

It could take benefit of test_support.find_unused_port.

--
components: +Library (Lib)
keywords: +buildbot
nosy: +flox

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



[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Ok, I'll fix that. Perhaps I should also remove the comment in err_mode(). I 
wonder if the ValueError in fileio.c is intentional:

 import io
 f = io.open(testfile, w)
 f.write(xxx)
3
 f.read()
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: not readable
 
 f = io.FileIO(testfile, w)
 f.write(xxx)
3
 f.read()
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: File not open for reading

--

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



[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Antoine Pitrou

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

 I wonder if the ValueError in fileio.c is intentional:

I don't know, but this would be the subject of a separate issue anyway.

--

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



[issue7857] test_logging fails

2010-02-05 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Fix checked into trunk with following changes:
  - use of test_support.find_unused_port()
  - if connection is refused, a finally clause shuts down the server thread.

Marked as pending awaiting testing of these changes on buildbots.

--
resolution:  - fixed
status: open - pending

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



[issue7857] test_logging fails

2010-02-05 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Further update done to disable listening tests for now (r77986). Will try to 
investigate these - the trouble is, they work on my system :-(

--
status: pending - open

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



[issue5498] Can SGMLParser properly handle empty/ tags?

2010-02-05 Thread Ezio Melotti

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


--
priority:  - normal
resolution:  - invalid
stage: test needed - committed/rejected
status: open - closed

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



[issue7857] test_logging fails

2010-02-05 Thread Florent Xicluna

Florent Xicluna la...@yahoo.fr added the comment:

You may use the decorator @unittest.skip(see issue #7857) for these tests, 
until it's fixed.
(or @unittest.expectedFailure, if you want to run them anyway)

http://docs.python.org/dev/library/unittest.html#unittest.skip

--

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



[issue7858] os.utime(file, (0, 0, )) fails on on vfat, but doesn't fail immediately

2010-02-05 Thread Damien Elmes

New submission from Damien Elmes resol...@gmail.com:

It seems like you can't set a modtime of 0 on a vfat partition. This may not be 
a valid thing to do, but it took me a long time to figure out it was a bad 
thing, as the error doesn't appear until the next time the error flag is 
checked:

 os.utime(testfile, (0.0,0.0))
 import time
Traceback (most recent call last):
  File stdin, line 1, in module
WindowsError: [Error 87] The parameter is incorrect

--
messages: 98879
nosy: Damien.Elmes
severity: normal
status: open
title: os.utime(file, (0,0,)) fails on on vfat, but doesn't fail immediately
versions: Python 2.5, Python 2.6

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-05 Thread Chris Rebert

Chris Rebert pyb...@rebertia.com added the comment:

One problem with the 3.x versions: the raw_input() should be input().

--

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



[issue5498] Can SGMLParser properly handle empty/ tags?

2010-02-05 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue7844] Add -3 warning for absolute imports.

2010-02-05 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/issue7844
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-05 Thread R. David Murray

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

Thanks for catching that.  Fixed r77987 r77988.

--

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



[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


Added file: http://bugs.python.org/file16141/add-readable-writable3.patch

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



[issue850997] mbcs encoding ignores errors

2010-02-05 Thread Ezio Melotti

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


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

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



[issue7859] support with self.assertRaises(SomeException) as exc: syntax

2010-02-05 Thread Florent Xicluna

New submission from Florent Xicluna la...@yahoo.fr:

It would be useful to get the actual exception in order to introspect its 
attributes.

(See some potential uses in test_dict)

--
components: Tests
messages: 98882
nosy: flox
priority: normal
severity: normal
status: open
title: support with self.assertRaises(SomeException) as exc: syntax
type: feature request
versions: Python 2.7, Python 3.2

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



[issue7859] support with self.assertRaises(SomeException) as exc: syntax

2010-02-05 Thread Antoine Pitrou

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

You can't get the exception before it is even raised...

--
nosy: +pitrou

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



[issue7859] support with self.assertRaises(SomeException) as exc: syntax

2010-02-05 Thread Florent Xicluna

Florent Xicluna la...@yahoo.fr added the comment:

right, but it could return a wrapper object which receives the exception on 
__exit__.

--

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



[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Antoine Pitrou

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

The patch was committed in r77989 (trunk) and r77990 (2.6). Thank you Stefan!

--
resolution:  - fixed
stage: test needed - committed/rejected
status: open - closed

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



[issue7859] support with self.assertRaises(SomeException) as exc: syntax

2010-02-05 Thread Ezio Melotti

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


--
nosy: +ezio.melotti
stage:  - needs patch

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



[issue7859] support with self.assertRaises(SomeException) as exc: syntax

2010-02-05 Thread Antoine Pitrou

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

Indeed. In that case, I am all for it.

--

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



[issue7858] os.utime(file, (0, 0, )) fails on on vfat, but doesn't fail immediately

2010-02-05 Thread Antoine Pitrou

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

Looks like a missing goto done in posix_utime(), posixmodule.c, line 2805. 
Could you test the following patch?

--
keywords: +patch
nosy: +pitrou
priority:  - normal
stage:  - needs patch
type:  - behavior
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5
Added file: http://bugs.python.org/file16142/win_utime.patch

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



[issue7858] os.utime(file, (0, 0, )) fails on on vfat, but doesn't fail immediately

2010-02-05 Thread Damien Elmes

Damien Elmes resol...@gmail.com added the comment:

I'm afraid I don't have a Windows build environment handy, but a quick look at 
the function in question seems to indicate that is the problem. Thanks for the 
quick reply!

--

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



[issue7859] support with self.assertRaises(SomeException) as exc: syntax

2010-02-05 Thread Raymond Hettinger

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

Too clever by far.

--
nosy: +rhettinger

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Brian Curtin

New submission from Brian Curtin cur...@acm.org:

When running 32-bit Python on a 64-bit version of Windows, therefore running 
the process in WOW64 mode, platform.machine returns a misleading value. When 
running in WOW64, the processor architecture is masked to appear as x86 when 
the machine is actually AMD64 (which you see on a 64-bit app on 64-bit OS).

The change involves looking at an environment variable only set on WOW64 
processes to see the native architecture. See 
http://blogs.msdn.com/david.wang/archive/2006/03/26/HOWTO-Detect-Process-Bitness.aspx

The patch does not include any test, as I'm not really sure how you could test 
this without using the change itself to figure out when it should be tested. 
Suggestions would be appreciated.

--
components: Library (Lib), Windows
files: arch_misrepresented.diff
keywords: needs review, patch, patch
messages: 98890
nosy: brian.curtin
priority: normal
severity: normal
stage: patch review
status: open
title: 32-bit Python on 64-bit Windows reports incorrect architecture
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file16143/arch_misrepresented.diff

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



[issue7847] Remove 'python -U' or document it

2010-02-05 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

Good point Georg.  See updated patch.

--
Added file: http://bugs.python.org/file16144/7847-2.patch

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



[issue7847] Remove 'python -U' or document it

2010-02-05 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

Martin, thanks.

--

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



[issue7852] [PATCH] Drop Computer from Apple Computer in plistlib

2010-02-05 Thread Ezio Melotti

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

I did a quick search and couldn't find any reference about this change, the 
examples in the apple doc still use 'Apple Computer'.
Do you have any reference that says that the correct doctype (now) uses only 
'Apple'?

--
nosy: +ezio.melotti
priority:  - low
stage:  - patch review

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



[issue7847] Remove 'python -U' or document it

2010-02-05 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

trunk: r77992
py26: r77993

--
resolution:  - fixed
status: open - closed

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



[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2010-02-05 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

Phillip, can you fix this in 2.6, 2.7, 3.1 and trunk? (There are certain rules 
for merging fixes between branches but I don't recall the details. Contact 
Benjamin or another active core developer via IRC if you need help.)

--
nosy: +gvanrossum

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Antoine Pitrou

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


--
nosy: +lemburg

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Antoine Pitrou

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

It's also inconsistent with Linux behaviour:

 import sys 
 sys.maxsize
2147483647
 import platform
 platform.machine()
'x86_64'
 platform.architecture()
('32bit', 'ELF')

(on a Python compiled with -m32 on a 64-bit Linux)

--
nosy: +pitrou

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Antoine Pitrou

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

The test could simply check that platform.machine() never returns x86 when 
sys.maxsize is greater than 2**32.
(and it would even be platform-agnostic)

--

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



[issue5341] A selection of spelling errors and typos throughout source

2010-02-05 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Additional note to help reviewing: I changed occurrences of the form “builtin 
x” to “built-in function x” not because I think the noun “builtin” is 
incorrect, as you may guess from my first message in this thread, but because 
it seemed more readable for beginners. If core devs disagree for some reason 
I’ll back out these changes.

About the change from “the builtin set function” to “the built-in set class”: I 
stumbled about this occurrence and fixed it, but haven’t looked at the rest of 
the docs. Tell me if this belongs in a separate, more complete patch.

--

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



[issue6715] xz compressor support

2010-02-05 Thread Antoine Pitrou

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

There's a Python binding for some lzma lib here: https://launchpad.net/pyliblzma

--

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



[issue7861] 2to3: import foo - from . import foo

2010-02-05 Thread Thomas Spura

New submission from Thomas Spura toms...@fedoraproject.org:

My custom setup / testcase for testing the transition import foo - from . 
import foo:

mkdir -p test/sub
touch test/sub/__init__.py
touch test/__init__.py

cat  test/__init__.py  EOF
import sub
EOF

cat  test.py  EOF
import test
EOF

This won't work with python3 so I ran 2to3 on it:
$ 2to3 .
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: No files need to be modified.

- Nothing found.

Using the python3 version of 2to3:
$ python3-2to3 .
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored ./test/__init__.py
--- ./test/__init__.py (original)
+++ ./test/__init__.py (refactored)
@@ -1,1 +1,1 @@
-import sub
+from . import sub
RefactoringTool: Files that need to be modified:
RefactoringTool: ./test/__init__.py


- python3 version of 2to3 can change it, but Python 2.6.2 is not able to.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 98900
nosy: tomspur
severity: normal
status: open
title: 2to3: import foo -  from . import foo
type: compile error
versions: Python 2.6

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



[issue5689] please support lzma compression as an extension and in the tarfile module

2010-02-05 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +Merwok

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



[issue6715] xz compressor support

2010-02-05 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +Merwok

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



[issue7807] test_macostools fails on OS X 10.6: no attribute 'FSSpec'

2010-02-05 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

This seems to be a 64-bit issue.

The 32-bit build passes this test.

 echo ${TESTPYTHON} ${TESTPROG} ${TESTOPTS}
/Users/zvezdan/opt/snapshot/2.6.5/bin/python -E -tt 
/Users/zvezdan/opt/snapshot/2.6.5/lib/python2.6/test/test_macostools.py -l -uall

 ${TESTPYTHON} ${TESTPROG} ${TESTOPTS}
test_copy (__main__.TestMacostools) ... ok
test_mkalias (__main__.TestMacostools) ... ok
test_mkalias_relative (__main__.TestMacostools) ... ok
test_touched (__main__.TestMacostools) ... ok

--
Ran 4 tests in 0.013s

OK

When 64-bit build is used:

 echo ${TESTPYTHON} ${TESTPROG} ${TESTOPTS}
/Users/zvezdan/opt/snapshot/2.6.5-64/bin/python -E -tt 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_macostools.py -l 
-uall


 ${TESTPYTHON} ${TESTPROG} ${TESTOPTS}
test_copy (__main__.TestMacostools) ... ERROR
test_mkalias (__main__.TestMacostools) ... ERROR
test_mkalias_relative (__main__.TestMacostools) ... ERROR
test_touched (__main__.TestMacostools) ... ok

==
ERROR: test_copy (__main__.TestMacostools)
--
Traceback (most recent call last):
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_macostools.py, 
line 65, in test_copy
macostools.copy(test_support.TESTFN, TESTFN2)
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/plat-mac/macostools.py, 
line 114, in copy
srcfss = File.FSSpec(src)
AttributeError: 'module' object has no attribute 'FSSpec'

==
ERROR: test_mkalias (__main__.TestMacostools)
--
Traceback (most recent call last):
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_macostools.py, 
line 73, in test_mkalias
macostools.mkalias(test_support.TESTFN, TESTFN2)
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/plat-mac/macostools.py, 
line 46, in mkalias
dstfsr, dstfss = Res.FSCreateResourceFile(dstdirfsr, unicode(dstname),
AttributeError: 'module' object has no attribute 'FSCreateResourceFile'

==
ERROR: test_mkalias_relative (__main__.TestMacostools)
--
Traceback (most recent call last):
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_macostools.py, 
line 88, in test_mkalias_relative
macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/plat-mac/macostools.py, 
line 46, in mkalias
dstfsr, dstfss = Res.FSCreateResourceFile(dstdirfsr, unicode(dstname),
AttributeError: 'module' object has no attribute 'FSCreateResourceFile'

--
Ran 4 tests in 0.016s

FAILED (errors=3)
Traceback (most recent call last):
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_macostools.py, 
line 101, in module
test_main()
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_macostools.py, 
line 97, in test_main
test_support.run_unittest(TestMacostools)
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_support.py, line 
734, in run_unittest
_run_suite(suite)
  File 
/Users/zvezdan/opt/snapshot/2.6.5-64/lib/python2.6/test/test_support.py, line 
717, in _run_suite
raise TestFailed(err)
test.test_support.TestFailed: multiple errors occurred

--
nosy: +zvezdan

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



[issue7861] 2to3: import foo - from . import foo

2010-02-05 Thread Ezio Melotti

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


--
nosy: +benjamin.peterson, ezio.melotti, mark.dickinson
priority:  - normal
stage:  - needs patch
type: compile error - feature request

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

The patch looks ok. Since we are emulating the Unix uname() function here, we 
might as well mimic its inconsistencies.

Note that platform.machine() and platform.processor() are not really very 
reliable ways of determining the machine type or processor.

--

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



[issue7861] 2to3: import foo - from . import foo

2010-02-05 Thread Thomas Spura

Thomas Spura toms...@fedoraproject.org added the comment:

#2446 should be related to this one.

--
nosy: +David Wolever

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-05 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

This worked fine on OS X 10.6, but failed on OS X 10.5:

gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. 
-I/Users/barry/projects/python/python26/./Include 
-I/Users/barry/projects/python/python26/./Mac/Include -I. -IInclude -I./Include 
-I/usr/local/include -I/Users/barry/projects/python/python26/Include 
-I/Users/barry/projects/python/python26 -c 
/Users/barry/projects/python/python26/Modules/readline.c -o 
build/temp.macosx-10.3-ppc-2.6/Users/barry/projects/python/python26/Modules/readline.o
/Users/barry/projects/python/python26/Modules/readline.c:41: error: conflicting 
types for 'completion_matches'
/usr/include/readline/readline.h:172: error: previous declaration of 
'completion_matches' was here
/Users/barry/projects/python/python26/Modules/readline.c: In function 
'py_remove_history':
/Users/barry/projects/python/python26/Modules/readline.c:378: warning: passing 
argument 1 of 'free' discards qualifiers from pointer target type
/Users/barry/projects/python/python26/Modules/readline.c: In function 
'py_replace_history':
/Users/barry/projects/python/python26/Modules/readline.c:415: warning: passing 
argument 1 of 'free' discards qualifiers from pointer target type
/Users/barry/projects/python/python26/Modules/readline.c: In function 
'call_readline':
/Users/barry/projects/python/python26/Modules/readline.c:1032: warning: 
assignment discards qualifiers from pointer target type
/Users/barry/projects/python/python26/Modules/readline.c:1035: warning: 
assignment discards qualifiers from pointer target type

Failed to find the necessary bits to build these modules:
_bsddb gdbm   linuxaudiodev   
ossaudiodevspwd   sunaudiodev 
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


Failed to build these modules:
readline  

running build_scripts
@bytor[~/projects/python/python26:1011]%

--

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



[issue7861] 2to3: import foo - from . import foo

2010-02-05 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
nosy: +dmalcolm

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



[issue7852] [PATCH] Drop Computer from Apple Computer in plistlib

2010-02-05 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

How about this example from Mac OS X Reference Library Property List 
Programming Guide:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/PropertyLists/QuickStartPlist/QuickStartPlist.html

Perhaps the fact that Apple officially changed the name from Apple Computer 
to Apple back in 2007 also helps:

http://www.macworld.com/article/54770/2007/01/applename.html

This one had a short URL, you can search Google for apple computer changes 
name for more (Forbes, Information Week, etc.)

Do you have a reference where Apple docs written after 2007 use Apple 
Computer?

--
nosy: +zvezdan

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



[issue7829] dis module documentation gives no indication of the dangers of bytecode inspection

2010-02-05 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The doc begins
30.12. dis — Disassembler for Python bytecode
The dis module supports the analysis of Python bytecode by disassembling it. 
Since there is no Python assembler, this module defines the Python assembly 
language. The Python bytecode which this module takes as an input is defined in 
the file Include/opcode.h and used by the compiler and the interpreter.

This goes back to when python.exe (CPython) was the only implementation. 
Python bytecode is no longer appropriate. It should be changed to CPython 
bytecode. My suggestion for a possible update:

30.12. dis — Disassembler for CPython bytecode
CPython currently compiles Python source code to a custom bytecode that is 
defined by the CPytyon source file Include/opcode.h and explained below. While 
such implementation details are subject to change in any CPython x.y version, 
the dis module supports the analysis of current bytecode by disassembling it to 
a format similar to assembly language.

Calling it an actual assembly language, as the current doc does, implies to me 
that there is/should be an assembler (which Guido has said there should not be).

30.12.1. Python Bytecode Instructions
The Python compiler ...

Python - CPython

In the glossary:
bytecode 
Python source code is compiled into bytecode, the internal representation of a 
Python program in the interpret
= something like
bytecode
CPython currently compiles Python source code to an internal bytecode 
representation that it uses to execute the program. Some other implementations 
do something similar.

These suggestions touch on the larger issue of differentiating and 
disentangling language doc from CPython implementation doc. I support this even 
though I have never used any of the other implementations.

--
nosy: +tjreedy

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



[issue7852] [PATCH] Drop Computer from Apple Computer in plistlib

2010-02-05 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

Also, on a Mac computer:

- start Xcode 3.2.1 and select Help-Developer Documentation
- type in the search box in the top right corner property list
- the second hit is Property List Programming Guide; click on it
- the second page gives the same example as the URL I put in msg98905
- it uses DOCTYPE with /Apple/ only

--

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-05 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

This is a configuration bug:

/Users/barry/projects/python/python26/Modules/readline.c -o 
build/temp.macosx-10.3-ppc-2.6 ...

Why is it trying to build using macosx-10.3 target?
I bet if you specify MACOSX_DEPLOYMENT_TARGET=10.5 on the ./configure line it 
will work fine.  It worked for me when I used Leopard (until September 2009).

This is a bug in configure.in

--

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



[issue7852] [PATCH] Drop Computer from Apple Computer in plistlib

2010-02-05 Thread Ezio Melotti

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


--
nosy: +ronaldoussoren

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



[issue7862] fileio.c: ValueError vs. IOError with impossible operations

2010-02-05 Thread Stefan Krah

New submission from Stefan Krah stefan-use...@bytereef.org:

I think that certain FileIO methods should raise IOError instead of
ValueError when a file operation is attempted with the wrong mode.
The methods of IOBase are documented to raise IOError in these situations.


 import io
 f = io.open(testfile, w)
 f.read()
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: not readable
 
 f = io.FileIO(testfile, w)
 f.read()
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: File not open for reading

--
components: IO
messages: 98909
nosy: pitrou, skrah, stutzbach
severity: normal
status: open
title: fileio.c: ValueError vs. IOError with impossible operations
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

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



[issue4722] _winreg.QueryValue fault while reading mangled registry values

2010-02-05 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


Removed file: http://bugs.python.org/file15960/issue4722.diff

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



[issue7030] Update version{added, changed} entries in py3k unittest docs

2010-02-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

assertSameElements doc issue fixed in revision 77997. Also improved example for 
assertRaises as a context manager and added versionadded to the test skipping 
section. Revisions 77999-78002.

Thanks for sorting the version changed / added in the Py3k docs Ezio.

--
resolution:  - fixed
status: open - closed

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



[issue7856] cannot decode from or encode to big5 \xf9\xd8

2010-02-05 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

 That iconv supports it is not convincing, ...

GNU libc is not convincing . What you talking about ?

--
nosy: +rpetrov

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-05 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

It's not a configuration bug.  All current python.org python installers are 
built with MACOSX_DEPLOYMENT_TARGET=10.3 and with the 10.4u SDK to allow one 
installer to work on systems from 10.3.9 through 10.6.

--
nosy: +ned.deily

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-05 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

Barry,

I'm sorry, I only now noticed this line in your compilation on 10.5:

/Users/barry/projects/python/python26/Modules/readline.c:41: error: conflicting 
types for 'completion_matches'

This problem was introduced by a patch in issue4204.
See my comments in msg82619 and msg92482.
They've been ignored because the issue was closed, and I did not have a right 
to reopen it.

Please notice that my original patch attached here (readline-trunk.patch) has 
this part in it, which is very important for 10.5:

@@ -6,6 +6,7 @@
 
 /* Standard definitions */
 #include Python.h
+#include stdlib.h
 #include setjmp.h
 #include signal.h
 #include errno.h

Ronald has omitted that part when he was changing the patch and I completely 
forgot about its importance since I'm running 10.6 and did not have problems.

Initially my first version of the patch was checking for __APPLE__ and avoided 
to re-define completion_matches on lines 35-36.  I used that patch when 2.6.1 
came out in my personal builds. 

Then I found out that including stdlib early avoided the problem.

I really do not have a 10.5 machine to test on now.
Can you please try inserting that include stdlib.h and see if 10.5 builds 
readline?

If yes, I'd be glad to make a new patch against 2.6 branch and trunk/3.x branch 
(probably need the same include line).

If not, then we need to make a choice of #ifdef __FreeBSD__ as I suggested in 
issue4204, or #ifndef __APPLE__ as I used in my first personal version of the 
patch.

The problem with re-definition of completion_matches did not exist in 2.4 and 
2.5 and is definitely introduced by a patch in issue 4204, which annoyed me 
because it broke a modern OS to support a very old version of FreeBSD (4.x).
:-)

aside note
That said, I still think that configure.in should not treat 10.5 as 10.3 
because Leopard was a big change to the UNIX 2003 specification and too many 
things are different between 10.3/10.4 and 10.5/10.6.

We had a discussion on pythonmac-sig about it and people mostly agreed but I do 
not remember if any issue was opened in the tracker to act on it or not.
/aside note

--

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



[issue7030] Update version{added, changed} entries in py3k unittest docs

2010-02-05 Thread Ezio Melotti

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

You should thank Georg for those, I just fixed the examples in r77968. ;)

--
stage: needs patch - committed/rejected

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



[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

What made you think that would work? In your example foo.test_suite is neither 
a test nor a suite but a function.

--

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



[issue7852] [PATCH] Drop Computer from Apple Computer in plistlib

2010-02-05 Thread Wang Chun

Wang Chun yaohua2...@gmail.com added the comment:

plutil is a command shipped with every Mac. See the example in my original post.

--

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



[issue7862] fileio.c: ValueError vs. IOError with impossible operations

2010-02-05 Thread Antoine Pitrou

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


--
nosy: +amaury.forgeotdarc

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



[issue7588] unittest.TestCase.shortDescription isn't short anymore

2010-02-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

The problem this fix was trying to fix was that if you provide a docstring for 
your test then the test name is ommitted in the report.

This could be fixed in the _TextTestResult instead - changing the 
getDescription() method to always include str(test).

--

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



[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Robert Collins

Robert Collins robe...@robertcollins.net added the comment:

Its a common convention in zope.testing, trial, testtools, bzr, ...

--

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



[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

So it's a feature request then...

--

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



[issue7863] platform module doesn't detect Windows 7

2010-02-05 Thread Adal Chiriliuc

New submission from Adal Chiriliuc adal.chiril...@gmail.com:

Running python 32 bit on Windows 7 64 bit:
 import platform
 platform.platform()
'Windows-post2008Server-6.1.7600'

Should be corrected to display
'Windows-7-6.1.7600'

Fix:
elif maj == 6:
if min == 0:
# ..
release = 'Vista'
else:
if productType == VER_NT_WORKSTATION:
release = 'Vista'
else:
release = '2008Server'
elif min == 1:
release = '7'
else:
release = 'post2008Server'

--
components: Library (Lib)
messages: 98920
nosy: adal
severity: normal
status: open
title: platform module doesn't detect Windows 7
versions: Python 2.6

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



[issue7863] platform module doesn't detect Windows 7

2010-02-05 Thread Antoine Pitrou

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


--
nosy: +lemburg

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



[issue7863] platform module doesn't detect Windows 7

2010-02-05 Thread Ezio Melotti

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

Confirmed on Python 2.7a2.

--
nosy: +brian.curtin, ezio.melotti
priority:  - normal
stage:  - test needed
type:  - behavior
versions: +Python 2.7

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Antoine Pitrou wrote:
 
 Antoine Pitrou pit...@free.fr added the comment:
 
 The test could simply check that platform.machine() never returns x86 when 
 sys.maxsize is greater than 2**32.
 (and it would even be platform-agnostic)

I'm not sure what such a test would prove, e.g. on 64-bit Mac OS X,
platform.machine() return 'i386'. That could be mapped to 'x86'...

Note that 'x86_64' is just a 'x86' compatible processor with
the AMD 64-bit extensions, so 'x86' is a superset of 'x86_64'.

--

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



[issue7863] platform module doesn't detect Windows 7

2010-02-05 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Note that this will also need the Workstation check that 6.0 has right above 
this, because both Windows 7 and Windows Server 2008 R2 are version 6.1.x.

Also of note is that sys.getwindowsversion (renamed as GetVersionEx here) has 
been expanded to make use of the OSVERSIONINFOEX structure in trunk and py3k, 
which will make things like getting the platform and service pack info cleaner.

I'll work on a patch.

--
assignee:  - brian.curtin

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



[issue7799] unittest returning standard_tests from load_tests in module fails

2010-02-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Fixed in revision 78010.

--
resolution:  - fixed
stage: test needed - committed/rejected
status: open - closed

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



[issue7780] unittest: allow an 'import_path' as an alternative to 'top_level_dir' in test discover

2010-02-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

My suggestion is that test discovery should first try the argument as a 
directory. If that fails try it as a dotted name by importing it. If the import 
succeeds discovery can start from the directory containing the imported package.

If a module rather than a package is specified as a dotted name argument to 
test discovery then we can either just run the tests in that module or raise an 
error?

--

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Antoine Pitrou

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

 I'm not sure what such a test would prove, e.g. on 64-bit Mac OS X,
 platform.machine() return 'i386'. That could be mapped to 'x86'...

You're right. There doesn't seem to be much consistency accross
platforms.

 Note that 'x86_64' is just a 'x86' compatible processor with
 the AMD 64-bit extensions, so 'x86' is a superset of 'x86_64'.

Oops, indeed.

--

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



[issue7712] Add a context manager to change cwd in test.test_support

2010-02-05 Thread Florent Xicluna

Changes by Florent Xicluna la...@yahoo.fr:


Removed file: http://bugs.python.org/file15951/temp_cwd_decorator_v2.diff

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



[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-05 Thread Florent Xicluna

Changes by Florent Xicluna la...@yahoo.fr:


--
title: Add a context manager to change cwd in test.test_support - Add a 
context manager to change cwd in test.test_support and run the test suite in a 
temp dir.

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



[issue7863] platform module doesn't detect Windows 7

2010-02-05 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Here's a patch which fixes this on trunk. 

2.6/3.1 is a different story as there doesn't appear to be a way to get the 
platform type to differentiate workstation/server. #7766 is what makes it easy 
on trunk, but it's a new feature and isn't backported. Thoughts?

--
components: +Windows
keywords: +needs review, patch
Added file: http://bugs.python.org/file16145/issue7863_trunk.diff

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-05 Thread Benjamin Peterson

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

BTW, I'm not going to backport this fix, since the implementation does carry 
over well to 2.6. Additionally, it is probably an unacceptable change of 
behavior in a bug fix release.

--

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



[issue7861] 2to3: import foo - from . import foo

2010-02-05 Thread Benjamin Peterson

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

Well, you'll just have to wait for the next version of 2.6 to be released then.

--
resolution:  - out of date
status: open - closed

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



[issue7859] support with self.assertRaises(SomeException) as exc: syntax

2010-02-05 Thread Benjamin Peterson

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

I'd prefer for the magic context manager to be returned.

--
nosy: +benjamin.peterson

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



[issue7501] python -m unittest path_to_suite_function errors

2010-02-05 Thread Jean-Paul Calderone

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

Sounds like one.

As far as the trial behavior goes, trial foo.test_suite won't work, but 
trial foo will call foo.test_suite, if one is defined.

--
nosy: +exarkun

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



[issue7588] unittest.TestCase.shortDescription isn't short anymore

2010-02-05 Thread Jean-Paul Calderone

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

I agree that changing the result object is a better way to implement this 
feature: if the results object wants to report things by *name*, not 
*description*, then it should get the test's *name*, not rely on changing the 
meaning of the test's description method.

--

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



[issue7864] Deprecation markers in unittest docs are unclear

2010-02-05 Thread Justin Lebar

New submission from Justin Lebar star...@gmail.com:

The documentation for assertTrue/assert_/failUnless reads:

assertTrue(expr, msg=None)
assert_(expr, msg=None)
failUnless(expr, msg=None)
...
Deprecated since version 3.1: failUnless().

The deprecation warning is confusing, since it appears to suggest that 
failUnless is also deprecated.

Perhaps the last line could read 

  assertTrue and assert_ are deprecated since version 3.1: Use failUnless() 
instead.

And similarly for the rest of the assertX methods.

--
assignee: georg.brandl
components: Documentation
messages: 98933
nosy: Justin.Lebar, georg.brandl
severity: normal
status: open
title: Deprecation markers in unittest docs are unclear
versions: Python 3.1

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



[issue7864] Deprecation markers in unittest docs are unclear

2010-02-05 Thread Ezio Melotti

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

 The deprecation warning is confusing, since it appears to suggest that 
 failUnless is also deprecated.

That's exactly what the warning is saying: failUnless() is deprecated since 
version 3.1.
assertTrue and assert_ are ok.

--
nosy: +ezio.melotti
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue7864] Deprecation markers in unittest docs are unclear

2010-02-05 Thread Justin Lebar

Justin Lebar star...@gmail.com added the comment:

Oh, I see.

I still think a complete sentence would be helpful here, although now that I 
understand that the colon doesn't mean use instead I suppose I'm less 
confused...

--

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



[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-05 Thread Ezio Melotti

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

Here is a patch based on the previous patches and some discussion.
I still have to test it better and add a few comments, but it should be almost 
ok.

--
Added file: http://bugs.python.org/file16146/issue7712.diff

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



[issue7728] test_timeout should use find_unused_port helper

2010-02-05 Thread R. David Murray

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

Thanks.  Committed in r78014, r78015, r78016, and r78017.

--
nosy: +r.david.murray
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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