[issue1559298] test_popen fails on Windows if installed to Program Files

2010-01-15 Thread Florent Xicluna

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

It is on Python 2.7a2

 os.popen('C:\\Python27\\python.exe -c import sys; print sys.argv 
 42').read()
''

 os.popen('C:\\Python27\\python.exe -c import sys; print sys.argv 
 42').read()
['-c', '42']\n

 os.popen3('C:\\Python27\\python.exe -c import sys; print sys.argv 
 42')[2].read()
'\'C:\\Python27\\python.exe -c import\' est pas reconnu en tant que commande 
interne ou externe, un programme executable ou un fichier de commandes.\n'

It may be related to the test_popen failure.
Actually, it seems that the outer double quotes are removed before executing 
the cmdstring:
  C:\Python27\python.exe -c import
 ^  ^

--
nosy: +flox

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



[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Lars Gustäbel

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

In the 2.x branch tarfile is not prepared to deal with unicode pathnames at 
all. This changed in Python 3. The fact that it works anyway (in the majority 
of cases) to add filenames as unicode objects is pure coincidence - I suppose 
you have a utf-8 system encoding. On a latin-1 system your script would fail 
much earlier during the add() call.

Some reading: http://docs.python.org/library/tarfile.html#unicode-issues

--

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



[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Peter Bienstman

Peter Bienstman peter.bienst...@ugent.be added the comment:

So what do suggest then as the best approach if I want to use unicode paths in 
tar files in Python 2.x in a way that is portable across different systems?

--

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



[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Lars Gustäbel

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

First, use a string pathname for extractall(). Most likely, your script is 
going to work. Convert all pathnames to strings using 
sys.getfilesystemencoding() before you add() them. Ensure that all systems you 
are going to use the archives on have the same filesystem encoding, e.g. utf-8. 
Pax archives are probably the best choice if you plan to keep the archives for 
several years. If you simply want to transfer data from one system to the other 
throwing the archives away afterwards, the format is rather irrelevant.

--

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



[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ronald Oussoren

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

abspath is basically dead code in macpath, the module is used to manipulate 
classic MacOS9-style paths and is no longer used as os.path on any supported 
platform (it used to be os.path on MacOS9).

BTW. the module itself is not dead, OSX still uses OS9-style paths in a number 
of older APIs.

--

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



[issue6352] Compiler warning in unicodeobject.c

2010-01-15 Thread Ezio Melotti

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


--
components: +Interpreter Core
nosy: +ezio.melotti
priority:  - normal
stage:  - patch review
type:  - compile error

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



[issue5905] strptime fails in non-UTF locale

2010-01-15 Thread Ezio Melotti

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


--
nosy: +ezio.melotti, lemburg
versions:  -Python 3.0

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



[issue5587] vars() no longer has a useful __repr__

2010-01-15 Thread Ezio Melotti

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


--
nosy: +ezio.melotti
priority:  - normal
stage:  - test needed
type:  - behavior
versions: +Python 3.2 -Python 3.0

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



[issue5825] Patch to add remove method to tempfile.NamedTemporaryFile

2010-01-15 Thread Ezio Melotti

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


--
keywords: +needs review
nosy: +ezio.melotti
priority:  - normal
stage:  - patch review

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



[issue5684] test_zipfile writes in its test directory

2010-01-15 Thread Ezio Melotti

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


--
nosy: +ezio.melotti
stage:  - needs patch
versions:  -Python 3.0

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



[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Peter Bienstman

Peter Bienstman peter.bienst...@ugent.be added the comment:

On Friday 15 January 2010 11:51:24 am Lars Gustäbel wrote:
 Lars Gustäbel l...@gustaebel.de added the comment:
 
 First, use a string pathname for extractall(). Most likely, your script is
  going to work. Convert all pathnames to strings using
  sys.getfilesystemencoding() before you add() them. Ensure that all systems
  you are going to use the archives on have the same filesystem encoding,
  e.g. utf-8. 

Unfortunately, that is beyond my control. Am I then totally out of luck? Would 
the implementation of tarfile in 3.0 be useable on 2.6 (perhaps with small 
modifications?)

  Pax archives are probably the best choice if you plan to keep
  the archives for several years. If you simply want to transfer data from
  one system to the other throwing the archives away afterwards, the format
  is rather irrelevant.

The archives are throw-away, transfer only, but they could be used on any 
system.

--

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



[issue5609] Create Unit Tests for nturl2path module

2010-01-15 Thread Ezio Melotti

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


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

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



[issue5905] strptime fails in non-UTF locale

2010-01-15 Thread Marc-Andre Lemburg

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

The reason for this is that the strftime() C lib API is used to build localized 
month names. With your setting, you'll get French Latin-1 month names and those 
cannot be coerced to UTF-8 due to the accented characters in them.

This works in Python 2.x since PyUnicode_FromString() et al. convert Latin-1 
strings to Unicode.

Apparently, this was changed in Python 3.x without looking at the header file 
or looking at the Python 2.x implementation which mandate Latin-1 as input 
encoding. Even the Python 3.x header still says that PyUnicode_FromString() 
will convert from Latin-1 to Unicode.

No idea why time.strptime() even bothers with these month names, though, since 
neither the format string nor the string being parsed contains literal month 
names.

--

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



[issue7706] Missing #include guards

2010-01-15 Thread Andrej Krpic

New submission from Andrej Krpic akrpi...@gmail.com:

Patch provides consistency with include guards already present in core.
This issue is somehow next step to #1495999 and #1492356.
These headers are missing from MSVC when targeting MS Windows CE .

HAVE_PROCESS_H already used in:
Modules/posixmodule.c, Python/thread_nt.h

HAVE_SYS_TYPES_H already used in:
Modules/io/_iomodule.c, Objects/fileobject.c, ...

HAVE_SIGNAL_H already in:
Modules/posixmodule.c

HAVE_ERRNO_H already in:
Include/Python.h, Python/ceval.c, ...
DONT_HAVE_ERRNO_H is not used anywhere

HAVE_FCNTL_H already in:
Modules/posixmodule.c, Modules/socketmodule.c

--
components: Interpreter Core
files: missing_ifdef_s.patch
keywords: patch
messages: 97809
nosy: akrpic77
severity: normal
status: open
title: Missing #include guards
type: compile error
versions: Python 2.7
Added file: http://bugs.python.org/file15891/missing_ifdef_s.patch

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



[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Lars Gustäbel

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

I suppose you do not have a real problem here. I thought your problem was that 
you want to use unicode pathnames as input and output to tarfile. You don't 
need that.

You want to transfer an archive from one system to another. You can do that 
with tarfile already. Python 3.x's tarfile does the same as Python 2.x's 
tarfile, except that in 3.x *all* strings are unicode strings.

If you have different encodings on these systems, that should not be a problem 
unless these encodings are not compatible with each other. If you want to use a 
tar archive created on a utf-8 system on a iso-8859-1 system that is no 
problem, as long as you use the pax format and all the utf-8 characters used 
are also valid iso-8859-1 characters.

--

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



[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Peter Bienstman

Peter Bienstman peter.bienst...@ugent.be added the comment:

On Friday 15 January 2010 02:14:30 pm Lars Gustäbel wrote:
 Lars Gustäbel l...@gustaebel.de added the comment:
 
 I suppose you do not have a real problem here. I thought your problem was
  that you want to use unicode pathnames as input and output to tarfile. You
  don't need that.
 
 You want to transfer an archive from one system to another. You can do that
  with tarfile already. Python 3.x's tarfile does the same as Python 2.x's
  tarfile, except that in 3.x *all* strings are unicode strings.
 
 If you have different encodings on these systems, that should not be a
  problem unless these encodings are not compatible with each other. If you
  want to use a tar archive created on a utf-8 system on a iso-8859-1 system
  that is no problem, as long as you use the pax format and all the utf-8
  characters used are also valid iso-8859-1 characters.

I think I *do* have a problem. I want to create a tar archive on one system, 
where the filenames could contain non latin characters. I'm sending this tar 
file over a socket to a different system (with potentially a different 
encoding), 
where I want to extract it to a directory which name could contain non-latin 
characters.

--

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



[issue2775] Implement PEP 3108

2010-01-15 Thread Florent Xicluna

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

Modules hotshot and xmllib give deprecation warnings. But they are not part 
of PEP 3108 or PEP 4.

--
nosy: +flox

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



[issue5825] Patch to add remove method to tempfile.NamedTemporaryFile

2010-01-15 Thread Brian Curtin

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

You should use assertFalse in your test, as failIf is deprecated starting in 
2.7.

--
nosy: +brian.curtin

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



[issue7705] libpython2.6.so is not linked correctly on FreeBSD when threads are enabled

2010-01-15 Thread Brian Curtin

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


--
keywords: +needs review
priority:  - normal
stage:  - patch review

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



[issue7632] dtoa.c: oversize b in quorem

2010-01-15 Thread Mark Dickinson

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

I was considering downgrading this to 'normal'.  Then I found Bug 8, and it's a 
biggie:

 10.900012345678912345678912345
10.0

Now I'm thinking it should be upgraded to release blocker instead.

The cause is in the _Py_strtod block that starts: 'if (nd  STRTOD_DIGLIM) 
{'...  It truncates the input to 18 digits, and then deletes trailing zeros.  
But the code that deletes the zeros is buggy, and passes over the digit '9' 
just before the point.

--

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



[issue7632] dtoa.c: oversize b in quorem

2010-01-15 Thread Mark Dickinson

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

Upgrading to release blocker.  It'll almost certainly be fixed before the 
weekend is out.  (And I will, of course, report it upstream.)

--
priority: high - release blocker

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



[issue5825] Patch to add remove method to tempfile.NamedTemporaryFile

2010-01-15 Thread Antoine Pitrou

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

What is the point besides to reduce the need to import os.unlink, which 
sounds a bit futile to me?

--
nosy: +pitrou

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



[issue7689] Pickling of classes with a metaclass and copy_reg

2010-01-15 Thread Antoine Pitrou

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


--
nosy: +alexandre.vassalotti

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



[issue1634034] Show expected token on syntax error

2010-01-15 Thread Antoine Pitrou

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


--
nosy: +benjamin.peterson
versions: +Python 3.2 -Python 3.1

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



[issue7691] test_bsddb3 files are not always removed when test fails

2010-01-15 Thread Florent Xicluna

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


--
resolution:  - duplicate
stage: test needed - 
status: open - closed
superseder:  - Windows buildbot occasional DBFileExistsError failures in 
test_bsddb3

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



[issue7269] Windows buildbot occasional DBFileExistsError failures in test_bsddb3

2010-01-15 Thread Florent Xicluna

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

#7691 marked duplicate of this bug.

I've set the current directory read-only to track this bug.

There's a single TestCase which creates the file in the current directory 
instead of /tmp. All other bsddb tests use either get_new_environment_path or 
get_new_database_path.

--
keywords: +patch
nosy: +flox
stage: needs patch - patch review
Added file: http://bugs.python.org/file15892/issue7269_bsddb3.diff

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



[issue1559298] test_popen fails on Windows if installed to Program Files

2010-01-15 Thread Florent Xicluna

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


--
keywords: +buildbot

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



[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Martin von Gagern

Martin von Gagern martin.vgag...@gmx.net added the comment:

Let's get some traction here, please!

Attached is a test case which will demonstrate the issue. It includes the 
content of test5.eml as a string so that it won't require additional files. It 
produces both human-readable output and a suitable exit status. Turning it into 
a unit test should be easy as well.

It doesn't do signature verification, but uses simple string comparison 
instead. The rationale is that anything changing the string would break the 
signature as well. That should be enough for unit tests.

Please change stage to patch review.

--
Added file: http://bugs.python.org/file15893/issue1670765a.py

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



[issue7668] test_httpservers fails with non-ascii path

2010-01-15 Thread Florent Xicluna

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


--
keywords: +buildbot
stage:  - needs patch

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



[issue7667] test_doctest fails with non-ascii path

2010-01-15 Thread Florent Xicluna

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


--
keywords: +buildbot
priority:  - normal
stage:  - test needed

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



[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Brian Curtin

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


--
keywords: +needs review
stage: test needed - patch review
versions: +Python 3.1 -Python 3.0

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



[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2010-01-15 Thread Alon Zakai

New submission from Alon Zakai thoughtc...@gmail.com:

Creating a multiprocessing.Queue and operating on it while being imported can 
lead to a deadlock.

The attached file will work if run directly (python test.py) but will hang if 
imported from the interpreter (import test).

Additional comments are in the file.

--
components: Library (Lib)
files: test.py
messages: 97820
nosy: kripken
severity: normal
status: open
title: multiprocess.Queue operations during import can lead to deadlocks
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file15894/test.py

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



[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Florent Xicluna

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


--
keywords: +buildbot

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



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2010-01-15 Thread R. David Murray

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

See also issue 655194.

--
nosy: +r.david.murray
priority:  - normal
stage:  - test needed
versions: +Python 3.2

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



[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Brian Curtin

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

Martin, can you provide a true unit test? Lib\email\test\test_email.py has many 
examples, and something like this would fit in there.

--
nosy: +brian.curtin
stage: patch review - test needed

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



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2010-01-15 Thread R. David Murray

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

I mean issue 665194.

--

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



[issue6961] test_distutils failure

2010-01-15 Thread Florent Xicluna

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

There's still similar failures on 3.1 branch only.
Some buildbots which have reported the error:
  AMD64 Ubuntu
  ia64 Ubuntu
  alpha Debian
  AMD64 Gentoo

http://www.python.org/dev/buildbot/all/builders/AMD64%20Ubuntu%203.1/builds/194
http://www.python.org/dev/buildbot/all/builders/ia64%20Ubuntu%203.1/builds/227

test test_distutils failed -- Traceback (most recent call last):
  File 
/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/distutils/tests/test_util.py,
 line 99, in test_get_platform
self.assertEquals(get_platform(), 'macosx-10.3-i386')
AssertionError: 'macosx-10.3-x86_64' != 'macosx-10.3-i386'

--
keywords: +buildbot
nosy: +flox
resolution: invalid - 
status: closed - open
versions:  -Python 3.2

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



[issue6961] test_distutils failure

2010-01-15 Thread Florent Xicluna

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

whoops... I missed #7591 which is a report for the same issue.

--
resolution:  - invalid
status: open - closed

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



[issue7591] test_distutils: test_get_platform fails on 3.1

2010-01-15 Thread Florent Xicluna

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

Some buildbots which have reported the error:
  AMD64 Ubuntu
  ia64 Ubuntu
  alpha Debian
  AMD64 Gentoo

--
nosy: +flox
title: test_get_platform fails on 3.1 - test_distutils: test_get_platform 
fails on 3.1

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



[issue7708] test_xmlrpc fails with non-ascii path

2010-01-15 Thread Florent Xicluna

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

Another buildbot failure (repeated on AMD64 Ubuntu wide).


test_xmlrpc

Exception happened during processing of request from ('127.0.0.1', 59299)
Traceback (most recent call last):
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/xmlrpc/server.py,
 line 474, in do_POST
size_remaining = int(self.headers[content-length])
ValueError: invalid literal for int() with base 10: 'I am broken'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/socketserver.py,
 line 282, in _handle_request_noblock
self.process_request(request, client_address)
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/socketserver.py,
 line 308, in process_request
self.finish_request(request, client_address)
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/socketserver.py,
 line 321, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/socketserver.py,
 line 637, in __init__
self.handle()
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/http/server.py,
 line 360, in handle
self.handle_one_request()
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/http/server.py,
 line 348, in handle_one_request
method()
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/xmlrpc/server.py,
 line 502, in do_POST
self.send_header(X-traceback, traceback.format_exc())
  File 
/home/buildbot/cpython-ucs4-nonascii-€/3.x.pitrou-ubuntu-wide/build/Lib/http/server.py,
 line 418, in send_header
self.wfile.write((%s: %s\r\n % (keyword, value)).encode('ASCII', 
'strict'))
UnicodeEncodeError: 'ascii' codec can't encode character '\u20ac' in position 
93: ordinal not in range(128)

--
components: Tests
keywords: buildbot
messages: 97827
nosy: flox
severity: normal
stage: test needed
status: open
title: test_xmlrpc fails with non-ascii path
type: behavior
versions: Python 3.2

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



[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2010-01-15 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +brett.cannon, jnoller

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



[issue6252] logging midnight rotation

2010-01-15 Thread Peter Hansen

Peter Hansen pe...@engcorp.com added the comment:

In the NEWS file, this was recorded as fixed using the wrong issue number.  The 
entry reads Issue #5262: Fixed bug in next rollover time computation in 
TimedRotatingFileHandler. rather than Issue #6252.

--
nosy: +peter9477

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



[issue4111] Add Systemtap/DTrace probes

2010-01-15 Thread Wilfredo Sanchez

Changes by Wilfredo Sanchez wsanc...@wsanchez.net:


--
nosy: +wsanchez

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-15 Thread Antoine Pitrou

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

The patch should come with an unit test (in Lib/test/test_functools.py).

--

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



[issue4111] Add Systemtap/DTrace probes

2010-01-15 Thread Glyph Lefkowitz

Changes by Glyph Lefkowitz gl...@divmod.com:


--
nosy: +glyph

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



[issue6897] imaplib fails during login

2010-01-15 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
priority:  - normal
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - Imap lib implicit conversion from bytes to string
type:  - behavior

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



[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-15 Thread Antoine Pitrou

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

 The documentation of io.BufferedIOBase.read() reads multiple raw
 reads may be issued to satisfy the byte count. I understood this
 language to mean satisfying read size is optional. Isn't it?

It's the reverse actually. It means that `BufferedIOBase.read` itself
may (or perhaps should) issue multiple raw reads in order to satisfy the
byte count.

--

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



[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Martin von Gagern

Martin von Gagern martin.vgag...@gmx.net added the comment:

OK, here is a patch providing both two test cases and the fix for current 
trunk. Will probably hack something for python 3 as well, although there the 
Message.as_string approach works due to the new headerlength argument 
defaulting to 0. So there I'd adjust the patch 

I also included a second test e-mail together with two disabled test cases in 
order to address the whitespace issue I mentioned. Would be nice to have a fix 
for these as well, but I assume you don't want known to fail test cases without 
a fix in trunk unless it's really serious, right?

In any case, the fact that there should be at least four tests, maybe more in 
the future, all dealing with signature preservation, led me to have a class 
dedicated to them, instead of only adding methods to one of the existing 
classes. I hope you agree with that decision.

--
Added file: http://bugs.python.org/file15895/issue1670765_python2.patch

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



[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-15 Thread Charles Cazabon

Charles Cazabon charlesc-pyt...@pyropus.ca added the comment:

Ping... two alphas into 2.7.  Have you had a chance to review this 
functionality?

Thanks.

--

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



[issue7709] the msg parameters of PyUnit assertions, such as assertEqual, should not obscure the automated diagnostics, such as '%s != %s'

2010-01-15 Thread Phlip

New submission from Phlip phlip2...@gmail.com:

The various assertions are not DRY when they force you to repeat any automatic 
diagnostic in a message string, if you provide it.

Here's an example:

def assertEqual(self, first, second, msg=None):
 self.assert_((first == second), msg or '%s != %s' % (first, second))

I think it should work like this:
 
 def assertEqual(self, first, second, msg=''):
 self.assert_((first == second),
(msg + ('\n%s != %s' % (first, second))).strip())
 
That way, if you provide a message (such as a message describing the semantic 
_meaning_ why 41 should not equal 42), the assertion does not throw away 
the automatically generated 41 != 42.

In the current system, to correctly reflect the 41 and 42, you must add them to 
the msg body. This is redundant with the assertions' primary behaviors...

--
components: Tests
messages: 97833
nosy: Phlip
severity: normal
status: open
title: the msg parameters of PyUnit assertions, such as assertEqual, should not 
obscure the automated diagnostics, such as '%s != %s'
type: feature request
versions: Python 3.2

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



[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-15 Thread Brian Curtin

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


--
keywords: +needs review
priority:  - normal
stage:  - patch review
versions: +Python 3.2 -Python 3.1

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



[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Pascal Chambon

Pascal Chambon chambon.pas...@gmail.com added the comment:

Is there anything I can do to help this patch making its way to the trunk ?
I guess it'd be better if Python2.7 benefited from it, so that users don't run 
anymore the risk of relying of this undocumented and non-canonical truncate 
behaviour.

Regards, 
Pascal

--

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



[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou

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


Removed file: http://bugs.python.org/file15763/Buggy patch - to be forgotten

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



[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-15 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

I'm fine with the functionality; I'm going to test it out and look at 
committing it by mid-week next week. I apologize, I've been pretty maxed out.

--

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



[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou

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

Looking at the patches:
- if you want to remove code, please remove it; don't comment it out
- please don't use C++-style comments (it will break on some compilers, produce 
warnings on others)
- code lines should generally not be wider than 80 chars (although this is not 
really a hard rule)
- I don't understand the purpose of self.seek(0, os.SEEK_CUR); shouldn't it 
be a no-op? If not, please add a comment to explain why.
- you are not decrefinf objects properly when you are done with them (posobj, 
oldposobj), which will certainly produce memory leaks
- some tests seem to be missing from the 2.7 patch, compared to the 2.6 one
- if you want to test BytesIO and StringIO, tests can be added to 
Lib/test/test_memoryio.py

--

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



[issue843590] 'macintosh' encoding alias for 'mac_roman'

2010-01-15 Thread Martin von Gagern

Martin von Gagern martin.vgag...@gmx.net added the comment:

Find attached (issue843590_rfc.patch) an implementation of the macintosh 
encoding as the RFC defines it. I don't suggest its inclusion; I would prefer 
the alias of this implementation, but either one is better than no 'macintosh' 
encoding at all. So if you really want that, here it is.

--
keywords: +patch
Added file: http://bugs.python.org/file15896/issue843590_rfc.patch

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



[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-15 Thread Nir Aides

Nir Aides n...@winpdb.org added the comment:

May be a good idea to clear this up in the documentation.

http://en.wiktionary.org/wiki/may#Verb
(modal auxiliary verb, defective) To have permission to. Used in granting 
permission and in questions to make polite requests.

--

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



[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Florent Xicluna

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

On Python 3:

 int('\0')
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'decimal' codec can't encode character '\x00' in position 
0: invalid decimal Unicode string

 int('\01')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: invalid literal for int() with base 10: '\x01'

 int('\x80')
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: 
unexpected code byte

 int('\xc0')
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 0: 
unexpected end of data


On Python 2, it raises ValueError (except for '\0').

--
components: Interpreter Core
messages: 97839
nosy: flox
severity: normal
status: open
title: Inconsistent Exception for int() conversion
versions: Python 3.2

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



[issue843590] 'macintosh' encoding alias for 'mac_roman'

2010-01-15 Thread Martin von Gagern

Martin von Gagern martin.vgag...@gmx.net added the comment:

And this patch (issue84359_alias.patch) is the alternative, 'macintosh' as an 
alias to 'mac_roman' as originally requested, along with a bunch of aliases 
registered with IANA. I'd prefer this approach over the preceding one, and hope 
someone will maybe review this for inclusion.

--
Added file: http://bugs.python.org/file15897/issue843590_alias.patch

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



[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Florent Xicluna

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

The null byte gives UnicodeEncodeError for other conversions too.

Python 3:
 int('\0'), float('\0'), complex('\0')

Python 2:
 int(u'\0'), long(u'\0'), float(u'\0'), complex(u'0')


Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'decimal' codec can't encode character u'\x00' in position 
1: invalid decimal Unicode string

--

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



[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Jean-Paul Calderone

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

Loosely related to issue4221.

--
nosy: +exarkun

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



[issue2927] expose html.parser.unescape

2010-01-15 Thread Brian Curtin

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


--
keywords: +needs review
priority:  - normal
stage:  - patch review
versions: +Python 2.7 -Python 2.6

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



[issue4221] inconsistent exception from int is confusing

2010-01-15 Thread Florent Xicluna

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


--
nosy: +flox
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5

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



[issue4221] inconsistent exception from int is confusing

2010-01-15 Thread Florent Xicluna

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

Python 3 gives same confusing error:

 int(b'\0', 999)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: invalid literal for int() with base 999: b'\x00'

 int(b'x', 999)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: int() arg 2 must be = 2 and = 36

--

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



[issue7639] bdist_msi fails on files with long names

2010-01-15 Thread Christoph Gohlke

Christoph Gohlke cgoh...@uci.edu added the comment:

I can confirm this issue. It prevents building a IPython msi installer on 
Python 2.6 for Windows. 

A patch to the Directory.make_short function in msilib\__init__.py is attached. 
It falls back to generating prefix~pos filenames when a short name is already 
taken and also generates short names more similar to Windows/NTFS.

--
keywords: +patch
nosy: +cgohlke
Added file: http://bugs.python.org/file15898/msilib_make_short.diff

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



[issue7709] the msg parameters of PyUnit assertions, such as assertEqual, should not obscure the automated diagnostics, such as '%s != %s'

2010-01-15 Thread R. David Murray

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

You are looking for this:

http://docs.python.org/dev/py3k/library/unittest.html#unittest.TestCase.longMessage

I wish it were the default, but at least it exists in 2.7 and 3.x. (It can't be 
the default for backward compatibility reasons.)

--
nosy: +r.david.murray
priority:  - normal
resolution:  - out of date
stage:  - committed/rejected

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



[issue7639] bdist_msi fails on files with long names

2010-01-15 Thread Brian Curtin

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


--
keywords: +needs review
priority:  - normal
stage:  - test needed
type: crash - behavior

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



[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
assignee: barry - r.david.murray
nosy: +r.david.murray
stage: test needed - patch review
versions: +Python 2.7, Python 3.2

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



[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2010-01-15 Thread Brett Cannon

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

Without looking at the multiprocessing code I am willing to guess that some 
code in that run() function is launching some code that runs in a thread that 
is performing an import, deadlocking on the import lock. Jesse, is that what 
could be happening? If so we should probably add a note to the multiprocessing 
docs to not do this sort of stuff, ala 
http://docs.python.org/library/threading.html#importing-in-threaded-code .

--
assignee:  - jnoller

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



[issue2775] Implement PEP 3108

2010-01-15 Thread Brett Cannon

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

I don't know why hotshot was deprecated specifically for Python 3 as that was 
never directly part of the discussion for PEP 3108. As for xmllib, that is most 
likely an oversight. Either way they should get added to the relevant PEPs.

--

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



[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-15 Thread R. David Murray

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

I do not find the existing phrasing in the IO docs ambiguous, but since it is 
obviously possible to misinterpret it it would be good to clarify it.  Can you 
suggest an alternate phrasing that would be clearer?

--
nosy: +r.david.murray

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



[issue7709] the msg parameters of PyUnit assertions, such as assertEqual, should not obscure the automated diagnostics, such as '%s != %s'

2010-01-15 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
status: open - closed

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



[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Pascal Chambon

Pascal Chambon chambon.pas...@gmail.com added the comment:

Allright, I shall fix all this asap.

But it seems the C code for truncate is actually buggy in the current 2.6 
_fileio.c, around line 680.
CF code below :

posobj = portable_lseek(fd, posobj, 0); - don't we lose the reference to the 
old posobj there, doing a memory leak ?

if (PyErr_Occurred()) return NULL; - same thing, we return Null without caring 
about the posobj reference which should be non-Null there ??

If I've understood a little reference counting, portable_lseek returns a 
reference that we own and must Py_DECREF, isn't that so ?




if (posobj == Py_None || posobj == NULL) {
/* Get the current position. */
posobj = portable_lseek(fd, NULL, 1);
if (posobj == NULL)
return NULL;
}
else {
/* Move to the position to be truncated. */
posobj = portable_lseek(fd, posobj, 0);
}

#if defined(HAVE_LARGEFILE_SUPPORT)
pos = PyLong_AsLongLong(posobj);
#else
pos = PyLong_AsLong(posobj);
#endif
if (PyErr_Occurred())
return NULL;

--

--

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



[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Mark Dickinson

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

Here's a patch for the release blocker.

Eric, would you be interested in double checking the logic for this patch? 

Tim:  No, I have to admit I didn't forsee quite this number of bugs.  :)

--
title: dtoa.c: oversize b in quorem - dtoa.c: oversize b in quorem, and a 
menagerie of other bugs
Added file: http://bugs.python.org/file15899/issue7632_bug8.patch

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



[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Mark Dickinson

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

issue7632_bug8.patch uploaded to Rietveld:

http://codereview.appspot.com/186168

--

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



[issue1722] Undocumented urllib functions

2010-01-15 Thread Brian Curtin

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


--
keywords: +easy
stage:  - needs patch
type:  - feature request
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5

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



[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

It looks correct to me, assuming this comment is correct:

 /* scan back until we hit a nonzero digit.  significant digit 'i'
is s0[i] if i  nd0, s0[i+1] if i = nd0. */

I didn't verify the comment itself.

--

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



[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou

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

 posobj = portable_lseek(fd, posobj, 0); - don't we lose the reference
 to the old posobj there, doing a memory leak ?

It's a bit more subtle.
Here, the first reference to posobj that you get is through the
function arguments. You don't own that reference, so must not decref it
when you are done with it. Moreover, if you return that very same
reference, you should incref it first (which your patch doesn't do when
posobj is non-None, and therefore loses a reference, see below).

However, when you get a new posobj from portable_lseek() (or most
other C API functions), you own this new reference and therefore must
decref it when you are done with it.

To sum it up and if I'm not mistaken, you must:
- add a Py_INCREF(posobj) when posobj is non-NULL and non-None.
- Py_DECREF the first posobj, as well as oldposobj, in the
Windows-specific path.

If you wanna witness reference counting behaviour, you should build
Python in debug mode (--with-pydebug if under Linux). Right now under
Linux your patch produces the following behaviour:

[39542 refs]
 f.truncate()
0L
[39547 refs]
 f.truncate()
0L
[39547 refs]
 f.truncate(2)
2
[39545 refs]
 f.truncate(2)
2
[39544 refs]

As you see, when posobj is non-None, we actually lose a reference
because a Py_INCREF is missing.
If you do this too often the small integer object 2 gets wrongly
destroyed and the interpreter crashes:

... 
[snip]
Erreur de segmentation

--

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



[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou

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

He, roundup ate part of the code I pasted. Here it is again:

 import io
[39516 refs]
 f = io.open(foo, wb, buffering=0)
[39542 refs]
 f.truncate()
0L
[39544 refs]
 f.truncate()
0L
[39544 refs]
 f.truncate(2)
2
[39543 refs]
 f.truncate(2)
2
[39542 refs]
 while True: f.truncate(2)
... 
[snip]
Erreur de segmentation

--

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



[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou

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

By the way, you witness the issue (less clearly though) by running the tests in 
debug mode, too:

$ ./python -m test.regrtest -v test_io
test_io
test_BufferedIOBase_destructor (test.test_io.CIOTest) ... ok
test_IOBase_destructor (test.test_io.CIOTest) ... ok
test_RawIOBase_destructor (test.test_io.CIOTest) ... ok
test_TextIOBase_destructor (test.test_io.CIOTest) ... ok
test_append_mode_tell (test.test_io.CIOTest) ... ok
test_array_writes (test.test_io.CIOTest) ... ok
test_buffered_file_io (test.test_io.CIOTest) ... ok
test_close_flushes (test.test_io.CIOTest) ... ok
test_closefd (test.test_io.CIOTest) ... ok
test_closefd_attr (test.test_io.CIOTest) ... ok
test_destructor (test.test_io.CIOTest) ... ok
test_garbage_collection (test.test_io.CIOTest) ... ok
test_invalid_operations (test.test_io.CIOTest) ... ok
test_large_file_ops (test.test_io.CIOTest) ... Fatal Python error: 
Python/ceval.c:4058 object at 0x2572448 has negative ref count -1
Abandon

--

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



[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-15 Thread Antoine Pitrou

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

No, you can't rely on the repr of a frozenset with multiple items. You should 
find another way of testing (if you are brave you could match the 
frozenset(...) with a regex and eval() it).

Some comments on the patch:
- there's a line or two in peephole.c which seems to use spaces for 
indentation; please always use tabs (for this file anyway)
- instead of `self.assertTrue(X in Y)`, you can use `self.assertIn(X, Y)` (and 
`self.assertNotIn(X, Y)` for the negation)

--

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



[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

I have a few minor comments posted on Rietveld, but nothing that would keep you 
from checking this in.

--

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



[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-15 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Thanks for the suggestions.

Attached is a revised version of the patch. 
  - I believe I've fixed all tab/space issues in this version of the patch, 
though I may have missed some (http://www.python.org/dev/tools/ doesn't 
recommend an automated way of checking this).
  - I've rewritten the selftests as you suggested, using re and eval
  - I've rewritten the new selftests to use assertIn, assertNotIn

The existing tests don't use assertIn/assertNotIn; I'm working on a patch for 
that, but I'll file that as a separate bug.

--
Added file: http://bugs.python.org/file15900/optimize-BUILD_SET-v4.patch

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



[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-15 Thread Raymond Hettinger

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

Nice looking patch.

--

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



[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ezio Melotti

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

For consistency I updated all 4 the modules. If the tests pass on both Windows 
and Mac the patch should be ready to go in.

--
Added file: http://bugs.python.org/file15902/issue3426-3.diff

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-01-15 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

issue2636-20100116.zip is a new version of the regex module.

I've given up on the breadth-wise matching - it was too difficult finding a 
pattern structure that would work well for both depth-first and breadth-wise. 
It probably still needs some tweaks and tidying up, but I thought I might as 
well release something!

--
Added file: http://bugs.python.org/file15901/issue2636-20100116.zip

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-15 Thread Evan Klitzke

Evan Klitzke e...@eklitzke.org added the comment:

New patch included, with a test case.

I had wanted to check the classmethod __module__ thing directly, but that 
proved to be elusive, since the classmethod gets the __module__ attribute if 
the module is '__main__', and you can't delete that attribute. My test just 
tries to assign another attribute which doesn't exist.

I just tried to copy the style of the rest of the module, lmk if there are any 
problems.

--
Added file: http://bugs.python.org/file15903/fix.patch

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



[issue5063] python-2.6.spec doesn't build properly

2010-01-15 Thread Sean Reifschneider

Sean Reifschneider j...@tummy.com added the comment:

Committed to release26-maint as 77514.
Committed to trunk as 77515.
Committed to 3k as 77516.

--
resolution:  - accepted
stage:  - committed/rejected
status: open - closed

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



[issue7711] csv error name incorrect

2010-01-15 Thread Scott Kitterman

New submission from Scott Kitterman skl...@kitterman.com:

Using the csv module I encountered an ASCII NUL in a file and got this error:

_csv.Error: line contains NULL byte

According to the documentation ( 
http://docs.python.org/library/csv.html#module-contents ) it should be 
csv.Error:.  Attempting to trap the error using try:/except _csv.Error: does 
not work.  It needs to be except csv.Error:.

--
components: None
messages: 97864
nosy: kitterma
severity: normal
status: open
title: csv error name incorrect
type: behavior
versions: Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7711
___
___
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-01-15 Thread Ezio Melotti

New submission from Ezio Melotti ezio.melo...@gmail.com:

To simplify the tests that require a different CWD I wrote a context manager 
that allows to change the working directory. I used it on #3426 to test 
os.path.abspath() with ASCII and non-ASCII CWDs and realized that it can also 
be used to fix #5684 where a zipfile fails to extract the content of the 
archive in the CWD if it is read-only.

Patch attached.

--
assignee: ezio.melotti
components: Tests
files: tempcwd.patch
keywords: needs review, patch, patch
messages: 97865
nosy: ezio.melotti, flox
priority: normal
severity: normal
stage: patch review
status: open
title: Add a context manager to change cwd in test.test_support
type: feature request
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15904/tempcwd.patch

___
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



[issue5684] test_zipfile writes in its test directory

2010-01-15 Thread Ezio Melotti

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


--
dependencies: +Add a context manager to change cwd in test.test_support

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



[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ezio Melotti

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


--
dependencies: +Add a context manager to change cwd in test.test_support

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