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

2010-01-16 Thread Florent Xicluna

Changes by Florent Xicluna :


--
keywords:  -needs review

___
Python tracker 

___
___
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-16 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

So, use the pax format. It stores the filenames as utf-8 and this way you will 
be on the safe side.

I hope we both agree that the solution to your particular problem is nothing 
tarfile.py can provide. So, I am going to close this issue now.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: 
http://bugs.python.org/file15908/issue7703_binascii_a2b_hqx_v2.diff

___
Python tracker 

___
___
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-16 Thread STINNER Victor

STINNER Victor  added the comment:

r76197 fixed the warning (Nov 10 2009, 2 months ago).

--
nosy: +haypo
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

Removed no-op str("...") conversions.

--
Added file: http://bugs.python.org/file15910/issue7703_binascii_a2b_hqx_v3.diff

___
Python tracker 

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



[issue7661] compiling ctypes fails with non-ascii path

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

Still failing: buildbot "AMD64 Ubuntu wide 2.6"

Revisions r77466 and r77467 need backport.

--
keywords: +buildbot

___
Python tracker 

___
___
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-16 Thread R. David Murray

R. David Murray  added the comment:

I've committed fix and the non-disabled tests to trunk in r77517.  I updated 
the comments to point to the relevant RFC and note that the problem is not 
fixed, just mitigated.

I've made a note of the additional tests in my issues list for the email 
package.  I'm not sure we can fix the whitespace problem in the 2.x email 
package.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue7713] implement ability to disable automatic search path additions

2010-01-16 Thread Fabian Groffen

New submission from Fabian Groffen :

setup.py adds in various places hardcoded paths to locations in the filesystem 
that may contain libraries/includes to compile a given module or feature.

While this behaviour is probably interesting for some users, it is undesirable 
for distributions that use a package manager to track and install dependencies 
in a given offset on top of a host system such as Mac OS X, Solaris, AIX, HPUX, 
etc.

Examples are:
http://trac.macports.org/browser/trunk/dports/lang/python26/files/patch-setup.py.diff
http://www.mail-archive.com/openpkg-...@openpkg.org/msg09547.html
http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/dev-lang/python/files/python-2.5.1-no-usrlocal.patch

It would be great if there was a way to disable setup.py from looking for 
hardcoded paths, and instead completely rely on the behaviour of compiler and 
linker (or e.g. CFLAGS as given)

--
components: Build
messages: 97880
nosy: grobian
severity: normal
status: open
title: implement ability to disable automatic search path additions
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

___
___
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-16 Thread Skip Montanaro

Skip Montanaro  added the comment:

This is to be expected.  The Error Exception is actually defined in the
underlying _csv extension module.  The higher level csv Python module
imports it.  The two are the same object:

>>> import csv, _csv
>>> csv.Error

>>> _csv.Error

>>> csv.Error is _csv.Error
True

So, continue to use

try:
   ...
except csv.Error:
   ...

and ignore the leading underscore.

--
nosy: +skip.montanaro
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
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-16 Thread Martin von Gagern

Martin von Gagern  added the comment:

You missed a digit in the test comment:
s/See issue 96843/See issue 968430/

--

___
Python tracker 

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



[issue7714] configure GCC version detection fix for Darwin

2010-01-16 Thread Fabian Groffen

New submission from Fabian Groffen :

configure.in contains a check for the compiler in use for Darwin like this:

gcc_version=`gcc -v 2>&1 |  grep version | cut -d\  -f3`

This yields in a wrong answer if the output of gcc -v has "version" in another 
place as well, such as when --enable-version-specific-runtime-libs is enabled.  
A better way to retrieve the compiler version is to use GCC's -dumpversion 
argument, which works with Apple's GCC 3.3, 4.0.1 and 4.2.1 and doesn't need 
additional grepping/cutting, etc.

The attached patch uses -dumpversion to retrieve the GCC version, which allows 
a successful configure run.

--
components: Build
files: python-2.5.1-darwin-gcc-version.patch
keywords: patch
messages: 97883
nosy: grobian
severity: normal
status: open
title: configure GCC version detection fix for Darwin
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: 
http://bugs.python.org/file15911/python-2.5.1-darwin-gcc-version.patch

___
Python tracker 

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



[issue7715] Allow use of GNU arch on Darwin

2010-01-16 Thread Fabian Groffen

New submission from Fabian Groffen :

Configure will die on Darwin with the message

Unexpected output of 'arch' on OSX

when GNU arch is in use.  The following patch simply adds the output as given 
by GNU arch to allow a successful configure run.

--
components: Build
files: python-2.6.4-gnu-arch-darwin.patch
keywords: patch
messages: 97884
nosy: grobian
severity: normal
status: open
title: Allow use of GNU arch on Darwin
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15912/python-2.6.4-gnu-arch-darwin.patch

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

When the following snippet is taken:

if (_PyString_Resize(&rv,
   (bin_data -
(unsigned char *)PyString_AS_STRING(rv))) < 0) {
PyBuffer_Release(&pascii);
Py_DECREF(rv);
rv = NULL;
}

pascii will get released a second time at the end of function. The rest is 
fine, I'm gonna fix it myself.

--

___
Python tracker 

___
___
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-16 Thread Brian Curtin

Changes by Brian Curtin :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The a2b_hqx() patch was committed in r77528 (trunk) and r77529 (py3k). Thanks 
again!

--

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: 
http://bugs.python.org/file15910/issue7703_binascii_a2b_hqx_v3.diff

___
Python tracker 

___
___
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-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

Lars, I think the situation can still be improved. If tarfile works with bytes 
strings it should accept only bytes strings or unicode strings that can be 
encoded in ASCII, and encode them as soon as it gets them.
In the problem reported by Peter, he was passing u"." that is a unicode 
ASCII-only string. Later in the program this string gets mixed with a byte 
string and this causes an implicit decoding, i.e. it turns the byte strings to 
unicode (and possibly fails if the filename is non-ASCII). Even if the decoding 
succeeds, eventually tarfile will have to convert the unicode string to a byte 
string again.

A better approach would be to encode using the ASCII codec all the unicode 
strings that are passed.
If the unicode strings are ASCII-only (like the u"." Peter was passing), they 
can be encoded without problems. When they get mixed with other strings they 
are all bytes strings so no implicit decoding happens.
If the unicode strings are non-ASCII, the encoding will fail immediately and 
warn the user that he will have to encode the unicode string before passing it 
to the function.

--

___
Python tracker 

___
___
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-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

I've applied a minimal fix for bugs 5 and 7 in r77530 (trunk).  (I wasn't able 
to produce any strings that trigger bug 7, so it may not technically be a bug.)

I'm continuing to review, comment, and clean up the remainder of the 
_Py_dg_strtod.

--

___
Python tracker 

___
___
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-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

Fixes merged to py3k and release31-maint in r77535 and r77537.

--
priority: release blocker -> normal

___
Python tracker 

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



[issue7661] compiling ctypes fails with non-ascii path

2010-01-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I've merged the ctypes fix to 2.6. As for 3.1, it doesn't seem to need the 
fix.

--

___
Python tracker 

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



[issue2531] float compared to decimal is silently incorrect.

2010-01-16 Thread Bert Hughes

Bert Hughes  added the comment:

Expressions like "Decimal('100.0') < .01" being silently wrong (True!) is 
*very* dangerous behavior, it should raise exception like any other 
Decimal-float operation, and hopefully will be back-ported to 2.7. 

Eg: 3rd party module kinterbasdb, which provides access to Firebird database, 
returns floats from firebird large-int types (eg NUMERIC 18,2) in versions of 
kinrebasdb 3.2 or less, but in versions 3.3+ kinterbasdb retrieves large-int as 
type Decimal. This means if python/kinterbasdb users upgrade kinterbasdb they 
must be aware of this python bug, because all existing code must be inspected 
for "(retrieved Decimal value) compare (float)" statements, which before 
upgrade were Ok (retrieved float value) compare (float)) statements.

I'm new to this tracker, I hope this simply is added as an additional comment & 
squawk of dismay to the "float compared to decimal is silently incorrec" issue.

--
nosy: +bertchughes
versions: +Python 2.6 -Python 2.7

___
Python tracker 

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



[issue7716] IPv6 detection, don't assume existence of /usr/xpg4/bin/grep

2010-01-16 Thread Fabian Groffen

New submission from Fabian Groffen :

The solaris case implementation of the ipv6 check assumes /usr/xpg4/bin/grep is 
available.  This gives error messages on e.g. IRIX where /etc/netconfig is 
available, but no /usr/xpg4/bin/grep.  This is simply fixed by using $GREP 
which is set by configure, and will be set to /usr/xpkg4/bin/grep if no 
suitable grep was found in the path.

Attached patch incorporates this change.

--
files: python-2.5.1-no-hardcoded-grep.patch
keywords: patch
messages: 97892
nosy: grobian
severity: normal
status: open
title: IPv6 detection, don't assume existence of /usr/xpg4/bin/grep
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: 
http://bugs.python.org/file15913/python-2.5.1-no-hardcoded-grep.patch

___
Python tracker 

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



[issue4770] binascii module, inconsistent behavior: some functions accept unicode string input

2010-01-16 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15563/issue4770_binascii_py3k_v2.diff

___
Python tracker 

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



[issue4770] binascii module, inconsistent behavior: some functions accept unicode string input

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch updated, after 7703 is merged in py3k.

--
Added file: http://bugs.python.org/file15914/issue4770_binascii_py3k_v3.diff

___
Python tracker 

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



[issue2531] float compared to decimal is silently incorrect.

2010-01-16 Thread Florent Xicluna

Changes by Florent Xicluna :


--
versions: +Python 2.7

___
Python tracker 

___
___
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-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch was committed in r77543 (py3k), thank you!

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

___
Python tracker 

___
___
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-16 Thread R. David Murray

R. David Murray  added the comment:

I actually had the wrong message number entirely.  I was trying to reference 
this one, since it has the additional tests.  Fixed in r77525.

I backported the fix to 2.6 in r77526 and r77527, forwarded ported to py3k in 
r77542 (with the addition of the new test), and backported to 3.1 in r77546.

I'm going to close this issue, but we aren't forgetting about the whitespace 
issues.

--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7716] IPv6 detection, don't assume existence of /usr/xpg4/bin/grep

2010-01-16 Thread Brian Curtin

Changes by Brian Curtin :


--
components: +Build
keywords: +needs review
priority:  -> normal
type:  -> behavior
versions:  -Python 2.5

___
Python tracker 

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



[issue7717] Compilation fixes for IRIX

2010-01-16 Thread Fabian Groffen

New submission from Fabian Groffen :

Patches to fix compilation issues on IRIX, on behalf of Frank Everdij and 
Stuart Shelton.

--
components: Build
files: python-2.7-irix.patch
keywords: patch
messages: 97896
nosy: grobian
severity: normal
status: open
title: Compilation fixes for IRIX
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15915/python-2.7-irix.patch

___
Python tracker 

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



[issue7717] Compilation fixes for IRIX

2010-01-16 Thread Fabian Groffen

Changes by Fabian Groffen :


Added file: http://bugs.python.org/file15916/python-2.6.4-irix.patch

___
Python tracker 

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



[issue7718] Build shared libpythonX.Y.so on IRIX

2010-01-16 Thread Fabian Groffen

New submission from Fabian Groffen :

Create a libpythonX.Y.so library on IRIX.  Patch on behalf of Stuart Shelton.

--
components: Build
files: python-2.6-irix-libpython2.6.patch
keywords: patch
messages: 97897
nosy: grobian
severity: normal
status: open
title: Build shared libpythonX.Y.so on IRIX
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15917/python-2.6-irix-libpython2.6.patch

___
Python tracker 

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



[issue7717] Compilation fixes for IRIX

2010-01-16 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue7719] distutils: ignore .nfsXXXX files

2010-01-16 Thread Fabian Groffen

New submission from Fabian Groffen :

NFS on certain platforms (most notably AIX, Solaris) use .nfsX files that 
appear and disappear automagically.  distutils can get confused by that once a 
.nfsX file was earlier seen with listdir and then removed by the OS before 
its copied.

Simply ignore .nfsX files as workaround.

--
assignee: tarek
components: Distutils
files: python-2.5.1-distutils-aixnfs.patch
keywords: patch
messages: 97898
nosy: grobian, tarek
severity: normal
status: open
title: distutils: ignore .nfs files
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15918/python-2.5.1-distutils-aixnfs.patch

___
Python tracker 

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



[issue2531] float compared to decimal is silently incorrect.

2010-01-16 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +skrah

___
Python tracker 

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



[issue1471934] Python libcrypt build problem on Solaris 8, 9, 10 and OpenSolaris

2010-01-16 Thread Fabian Groffen

Fabian Groffen  added the comment:

I use this patch, which just always uses crypt_i on Solaris to work around the 
problem.

--
keywords: +patch
nosy: +grobian
title: Python libcrypt build problem on Solaris 8 -> Python libcrypt build 
problem on Solaris 8, 9, 10 and OpenSolaris
versions: +Python 2.7
Added file: http://bugs.python.org/file15919/python-2.7-solaris64-crypt.patch

___
Python tracker 

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



[issue1471934] Python libcrypt build problem on Solaris 8, 9, 10 and OpenSolaris

2010-01-16 Thread Fabian Groffen

Changes by Fabian Groffen :


Added file: http://bugs.python.org/file15920/python-2.6.2-solaris64-crypt.patch

___
Python tracker 

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



[issue7719] distutils: ignore .nfsXXXX files

2010-01-16 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> test needed

___
Python tracker 

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



[issue1471934] Python libcrypt build problem on Solaris 8, 9, 10 and OpenSolaris

2010-01-16 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review

___
Python tracker 

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



[issue7718] Build shared libpythonX.Y.so on IRIX

2010-01-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I'm worried about this "on behalf of" contribution. Does Stuart Shelton 
actually approve this contribution? Would he be willing to sign a contributor 
agreement?

--
nosy: +loewis

___
Python tracker 

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



[issue7718] Build shared libpythonX.Y.so on IRIX

2010-01-16 Thread Brian Curtin

Brian Curtin  added the comment:

#7717 also contains code "on behalf of" other people.

--
nosy: +brian.curtin
priority:  -> normal
type:  -> feature request

___
Python tracker 

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



[issue7718] Build shared libpythonX.Y.so on IRIX

2010-01-16 Thread Fabian Groffen

Fabian Groffen  added the comment:

I think so.  From my experience he's mainly not willing to sign up to each and 
every bugtracking system, which I fully understand.

Do you guys need signed contracts for each and every (even single line) patch?  
Is it better to report the problem and how it can possibly be redone by one of 
the python devs?  In this case that would be something like "take the linux 
case, and change LD_LIBRARY_PATH to LD_LIBRARYN32_PATH".

I'm really in favour of getting rid of these 35 patches against Python :)

--

___
Python tracker 

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



[issue6308] termios fix for QNX breaks HP-UX

2010-01-16 Thread Fabian Groffen

Fabian Groffen  added the comment:

still applies to 2.7

--
nosy: +grobian
versions: +Python 2.7

___
Python tracker 

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



[issue7717] Compilation fixes for IRIX

2010-01-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Same issue as with 7718: I'm worried about this "on behalf of" contribution. 
Does Stuart Shelton actually approve this contribution? Would he be willing to 
sign a contributor agreement?

--
nosy: +loewis

___
Python tracker 

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



[issue7718] Build shared libpythonX.Y.so on IRIX

2010-01-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I think the patch in its current form is then, unfortunately, not acceptable - 
unless Stuart Shelton actually signs a contributor agreement. I don't know what 
makes you believe that he actually meant to contribute the code to Python, but 
I just don't want to take the risk that he comes back later and says that the 
contribution was unauthorized (or perhaps not even his own work).

For trivial patches, redoing them might be reasonable. It might then be useful 
to record (e.g. in a comment) how they had been done, and to also indicate how 
the submitter has tested them.

Rejecting this patch.

--
resolution:  -> postponed
status: open -> closed

___
Python tracker 

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



[issue7718] Build shared libpythonX.Y.so on IRIX

2010-01-16 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
resolution: postponed -> rejected

___
Python tracker 

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



[issue7718] Build shared libpythonX.Y.so on IRIX

2010-01-16 Thread Fabian Groffen

Fabian Groffen  added the comment:

I've asked Stuart to sign up and comment on this bug to get his opinion.  Sorry.

--

___
Python tracker 

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



[issue7714] configure GCC version detection fix for Darwin

2010-01-16 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> patch review
versions:  -Python 2.5

___
Python tracker 

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



[issue7713] implement ability to disable automatic search path additions

2010-01-16 Thread Brian Curtin

Changes by Brian Curtin :


--
priority:  -> normal
stage:  -> test needed
versions:  -Python 2.5

___
Python tracker 

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



[issue7715] Allow use of GNU arch on Darwin

2010-01-16 Thread Brian Curtin

Changes by Brian Curtin :


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

___
Python tracker 

___
___
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-16 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin

___
Python tracker 

___
___
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-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

One of the buildbots just produced a MemoryError from test_strtod:

http://www.python.org/dev/buildbot/all/builders/i386%20Ubuntu%203.x/builds/411

It looks as though there's a memory leak somewhere in dtoa.c.  It's a bit 
difficult to tell, though, since the memory allocation functions in that file 
deliberately hold on to small pieces of memory.

--

___
Python tracker 

___
___
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-16 Thread Brian Curtin

Brian Curtin  added the comment:

In your test, the more common convention is to use assertFalse(foo) instead of 
assert_(not foo).

--
keywords: +needs review
nosy: +brian.curtin
stage:  -> patch review

___
Python tracker 

___
___
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-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I think it would be better to test with some of the real world examples given 
in this issue: str.split, and a functools.partial object.

--

___
Python tracker 

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



[issue7720] Errors in tests and C implementation of raw FileIO

2010-01-16 Thread Pascal Chambon

New submission from Pascal Chambon :

My own fileio implementation fails against the latests versions of the io test 
suite, under python2.6, because these now require FileIO objects to accept 
unicode strings in their write methods, whereas the doc mentions raw streams 
only deal with bytes/bytearrays.

Below is the faulty test (unicode literals or ON). The unicode "xxx" is written 
to the io.FileIO instance, and the stdlib implementation indeed accepts unicode 
args (in _fileio.c : "if (!PyArg_ParseTuple(args, "s*", &pbuf)...").

In test_io.py :

   def test_destructor(self):
record = []
class MyFileIO(io.FileIO):
def __del__(self):
record.append(1)
io.FileIO.__del__(self)
def close(self):
record.append(2)
io.FileIO.close(self)
def flush(self):
record.append(3)
io.FileIO.flush(self)
f = MyFileIO(test_support.TESTFN, "w")
f.write("xxx")
del f
self.assertEqual(record, [1, 2, 3])

--
components: IO
messages: 97910
nosy: pakal
severity: normal
status: open
title: Errors in tests and C implementation of raw FileIO
versions: Python 2.6

___
Python tracker 

___
___
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-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

First, I get the following compilation warnings under Linux:
/home/antoine/cpython/26/Modules/_fileio.c: In function ‘fileio_truncate’:
/home/antoine/cpython/26/Modules/_fileio.c:651: attention : unused variable 
‘tempposobj’
/home/antoine/cpython/26/Modules/_fileio.c:650: attention : unused variable 
‘oldposobj’

The two variables should be declared at the beginning of the Windows-specific 
block instead.

Second, there's a test failure in test_io:

==
FAIL: test_large_file_ops (test.test_io.IOTest)
--
Traceback (most recent call last):
  File "/home/antoine/cpython/26/Lib/test/test_io.py", line 221, in 
test_large_file_ops
self.large_file_ops(f)
  File "/home/antoine/cpython/26/Lib/test/test_io.py", line 154, in 
large_file_ops
self.assertEqual(f.tell(), self.LARGE + 1)
AssertionError: 2147483650L != 2147483649

--

--

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

New submission from Martin Manns :

In the Python 2.6.4 documentation "2. Built-in Functions" at
http://docs.python.org/library/functions.html,
the section about the xrange function (paragraph "CPython implementation 
detail") contains the following code:

islice(count(start, step), (stop-start+step-1)//step)

However, count only accepts one parameter, so that this solution does
not work. Furthermore, islice only accepts positive values for step.

Therefore, the code does not work.

I tested this with Python 2.5.4 and Python 2.6.4 on Debian Linux (AMD64).

--
assignee: georg.brandl
components: Documentation
messages: 97912
nosy: georg.brandl, mm
severity: normal
status: open
title: Code in xrange documentation does not work
versions: Python 2.5, Python 2.6

___
Python tracker 

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



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

2010-01-16 Thread Brian Curtin

Brian Curtin  added the comment:

Most of the patch is outdated, but I could check out an updated patch on my 
Win7 64 machine.

--
keywords: +needs review
nosy: +brian.curtin

___
Python tracker 

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



[issue7714] configure GCC version detection fix for Darwin

2010-01-16 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue7715] Allow use of GNU arch on Darwin

2010-01-16 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> ronaldoussoren
nosy: +ronaldoussoren

___
Python tracker 

___
___
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-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

Okay, so there's a memory leak for overflowing values:  if an overflow is 
detected in the main correction loop of _Py_dg_strtod, then 'references' to 
bd0, bd, bb, bs and delta aren't released.

There may be other leaks;  I'm trying to come up with a good way to detect them 
reliably.

--

___
Python tracker 

___
___
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-16 Thread Stefan Krah

Stefan Krah  added the comment:

This is what Valgrind complains about:

==4750== 3,456 (1,440 direct, 2,016 indirect) bytes in 30 blocks are definitely 
lost in loss record 3,302 of 3,430
==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195)
==4750==by 0x41B7B5: PyMem_Malloc (object.c:1740)
==4750==by 0x4C03CF: Balloc (dtoa.c:352)
==4750==by 0x4C286E: _Py_dg_strtod (dtoa.c:1675)
==4750==by 0x4BEDF2: _PyOS_ascii_strtod (pystrtod.c:103)
==4750==by 0x4BEF61: PyOS_string_to_double (pystrtod.c:345)
==4750==by 0x543968: PyFloat_FromString (floatobject.c:192)
==4750==by 0x546E74: float_new (floatobject.c:1569)
==4750==by 0x42B5C9: type_call (typeobject.c:664)
==4750==by 0x516442: PyObject_Call (abstract.c:2160)
==4750==by 0x47FDAE: do_call (ceval.c:4088)
==4750==by 0x47F1CF: call_function (ceval.c:3891)

==4750== 9,680 bytes in 242 blocks are still reachable in loss record 3,369 of 
3,430
==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195)
==4750==by 0x41B7B5: PyMem_Malloc (object.c:1740)
==4750==by 0x4C03CF: Balloc (dtoa.c:352)
==4750==by 0x4C0875: i2b (dtoa.c:556)
==4750==by 0x4C2906: _Py_dg_strtod (dtoa.c:1687)
==4750==by 0x4BEDF2: _PyOS_ascii_strtod (pystrtod.c:103)
==4750==by 0x4BEF61: PyOS_string_to_double (pystrtod.c:345)
==4750==by 0x543968: PyFloat_FromString (floatobject.c:192)
==4750==by 0x546E74: float_new (floatobject.c:1569)
==4750==by 0x42B5C9: type_call (typeobject.c:664)
==4750==by 0x516442: PyObject_Call (abstract.c:2160)
==4750==by 0x47FDAE: do_call (ceval.c:4088)

==4750== 270,720 bytes in 1,692 blocks are indirectly lost in loss record 3,423 
of 3,430
==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195)
==4750==by 0x41B7B5: PyMem_Malloc (object.c:1740)
==4750==by 0x4C03CF: Balloc (dtoa.c:352)
==4750==by 0x4C0F97: diff (dtoa.c:825)
==4750==by 0x4C2BED: _Py_dg_strtod (dtoa.c:1779)
==4750==by 0x4BEDF2: _PyOS_ascii_strtod (pystrtod.c:103)
==4750==by 0x4BEF61: PyOS_string_to_double (pystrtod.c:345)
==4750==by 0x543968: PyFloat_FromString (floatobject.c:192)
==4750==by 0x546E74: float_new (floatobject.c:1569)
==4750==by 0x42B5C9: type_call (typeobject.c:664)
==4750==by 0x516442: PyObject_Call (abstract.c:2160)
==4750==by 0x47FDAE: do_call (ceval.c:4088)

==4750== 382,080 bytes in 2,388 blocks are indirectly lost in loss record 3,424 
of 3,430
==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195)
==4750==by 0x41B7B5: PyMem_Malloc (object.c:1740)
==4750==by 0x4C03CF: Balloc (dtoa.c:352)
==4750==by 0x4C0C82: lshift (dtoa.c:730)
==4750==by 0x4C2BA9: _Py_dg_strtod (dtoa.c:1771)
==4750==by 0x4BEDF2: _PyOS_ascii_strtod (pystrtod.c:103)
==4750==by 0x4BEF61: PyOS_string_to_double (pystrtod.c:345)
==4750==by 0x543968: PyFloat_FromString (floatobject.c:192)
==4750==by 0x546E74: float_new (floatobject.c:1569)
==4750==by 0x42B5C9: type_call (typeobject.c:664)
==4750==by 0x516442: PyObject_Call (abstract.c:2160)
==4750==by 0x47FDAE: do_call (ceval.c:4088)

==4750== 414,560 bytes in 2,591 blocks are indirectly lost in loss record 3,425 
of 3,430
==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195)
==4750==by 0x41B7B5: PyMem_Malloc (object.c:1740)
==4750==by 0x4C03CF: Balloc (dtoa.c:352)
==4750==by 0x4C0C82: lshift (dtoa.c:730)
==4750==by 0x4C2AD1: _Py_dg_strtod (dtoa.c:1744)
==4750==by 0x4BEDF2: _PyOS_ascii_strtod (pystrtod.c:103)
==4750==by 0x4BEF61: PyOS_string_to_double (pystrtod.c:345)
==4750==by 0x543968: PyFloat_FromString (floatobject.c:192)
==4750==by 0x546E74: float_new (floatobject.c:1569)
==4750==by 0x42B5C9: type_call (typeobject.c:664)
==4750==by 0x516442: PyObject_Call (abstract.c:2160)
==4750==by 0x47FDAE: do_call (ceval.c:4088)

==4750== 414,960 (414,768 direct, 192 indirect) bytes in 2,604 blocks are 
definitely lost in loss record 3,426 of 3,430
==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195)
==4750==by 0x41B7B5: PyMem_Malloc (object.c:1740)
==4750==by 0x4C03CF: Balloc (dtoa.c:352)
==4750==by 0x4C0929: mult (dtoa.c:592)
==4750==by 0x4C0B90: pow5mult (dtoa.c:691)
==4750==by 0x4C2B1A: _Py_dg_strtod (dtoa.c:1753)
==4750==by 0x4BEDF2: _PyOS_ascii_strtod (pystrtod.c:103)
==4750==by 0x4BEF61: PyOS_string_to_double (pystrtod.c:345)
==4750==by 0x543968: PyFloat_FromString (floatobject.c:192)
==4750==by 0x546E74: float_new (floatobject.c:1569)
==4750==by 0x42B5C9: type_call (typeobject.c:664)
==4750==by 0x516442: PyObject_Call (abstract.c:2160)

==4750== 890,720 (532,960 direct, 357,760 indirect) bytes in 3,331 blocks are 
definitely lost in loss record 3,428 of 3,430
==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195)
==4750==by 0x41B7B5: PyMem_Malloc (object.c:1740)
==4750==by 0x4C03CF: Balloc (dtoa.c:352)
==4750==by 0x4C0C82: lshift (dtoa.c:730)
==4750==by 0x4C2AD1: _Py_dg_strto

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

2010-01-16 Thread Eric Smith

Eric Smith  added the comment:

I don't see where the patch is outdated.

I'm attaching an updated patch 18 that works cleanly against r77557. It also 
fixes an unterminated comment.

XP runs correctly (without the new functionality) with this patch. However, on 
Windows 7 as a normal user I get a permission issue:

Python 3.2a0 (py3k, Jan 16 2010, 17:26:22) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.symlink('python.exe', 'python-test.exe')
Traceback (most recent call last):
  File "", line 1, in 
WindowsError: [Error 1314] A required privilege is not held by the client: 
'python.exe'

This is in a directory that I own, with a file that I own.

Jason: Is there something obvious that I'm missing? Or is some special (not 
out-of-the-box) permission really required?

--
Added file: http://bugs.python.org/file15921/windows symlink draft 18.patch

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

Confirmed. The snippet works for 3.1 and 2.7a2.

from itertools import count, islice
irange = lambda start, stop, step: islice(count(start, step), 
(stop-start+step-1)//step)


The documentation needs update for 2.6 only.

This kind of snippet seems backward compatible for 2.6:
irange = lambda start, stop, step: islice(count(start), 0, stop, step)

--
nosy: +flox
stage:  -> needs patch
type:  -> behavior
versions:  -Python 2.5

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

Martin Manns  added the comment:

The new snippet does not work for me:

>>> list(irange(-12, 20, 4))
[-12, -8, -4, 0, 4]

I have attached code that seems to work.
It is more than a snipped though.

--
Added file: http://bugs.python.org/file15922/irange.py

___
Python tracker 

___
___
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-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

Stefan, thanks for that!  I'm not entirely sure how to make use of it, though.  
Is there a way to tell Valgrind that some leaks are expected?

The main problem with leak detection is that dtoa.c deliberately keeps hold of 
any malloc'ed chunks less than a certain size (which I think is something like 
2048 bytes, but I'm not sure).  These chunks are never freed in normal use;  
instead, they're added to a bunch of free lists for the next time that strtod 
or dtoa is called.  The logic isn't too complicated:  it's in the functions 
Balloc and Bfree in dtoa.c.

So the right thing to do is just to check that for each call to strtod, the 
total number of calls to Balloc matches the total number of calls to Bfree with 
non-NULL argument.  And similarly for dtoa, except that in that case one of the 
Balloc'd blocks gets returned to the caller (it's the caller's responsibility 
to call free_dtoa to free it when it's no longer needed), so there should be a 
difference of 1.

And there's one further wrinkle:  dtoa.c maintains a list of powers of 5 of the 
form 5**2**k, and this list is automatically extended with newly allocated 
Bigints when necessary:  those Bigints are never freed either, so calls to 
Balloc from that source should be ignored.  Another way round this is just to 
ignore any leak from the first call to strtod, and then do a repeat call with 
the same parameters;  the second call will already have all the powers of 5 it 
needs.

--

___
Python tracker 

___
___
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-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

Upgrading to release blocker again:  the memory leak should be fixed for 2.7 
(and more immediately, for 3.1.2).

--
priority: normal -> release blocker

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

Right. Insufficient test.

This snippet looks better, if we provide a replacement for 2.6.

>>> irange = lambda start, stop, step: islice(count(start), 0, stop-start, step)

--

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

Martin Manns  added the comment:

The new snippet works better.

>>> list(irange(-12, 20, 4))
[-12, -8, -4, 0, 4, 8, 12, 16]

However, it does not like large or negative slices:

>>> list(irange(-2**65,2**65,2**61))
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
OverflowError: long int too large to convert to int

>>> list(irange(32,2,-3))
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
ValueError: Indices for islice() must be non-negative integers or None.

Perhaps the documentation can mention that.

--

___
Python tracker 

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



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

2010-01-16 Thread Brian Curtin

Brian Curtin  added the comment:

I'm getting failures in test_glob, test_os, test_platform, test_posixpath, 
test_shutil, and test_tarfile. failures.txt is attached with the results I see 
on Win 7 with a 64 bit build.

I'm not seeing the exception Eric saw. That worked for me as both an admin and 
regular user.

--
Added file: http://bugs.python.org/file15923/failures.txt

___
Python tracker 

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



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

2010-01-16 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I haven't seen this error. My first guess is its a regression due to  
win 7 or updates to the python code. I'll look into it.

Sent from my comm

On Jan 16, 2010, at 17:47, "Eric Smith"  wrote:

>
> Eric Smith  added the comment:
>
> I don't see where the patch is outdated.
>
> I'm attaching an updated patch 18 that works cleanly against r77557.  
> It also fixes an unterminated comment.
>
> XP runs correctly (without the new functionality) with this patch.  
> However, on Windows 7 as a normal user I get a permission issue:
>
> Python 3.2a0 (py3k, Jan 16 2010, 17:26:22) [MSC v.1500 32 bit  
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
 import os
 os.symlink('python.exe', 'python-test.exe')
> Traceback (most recent call last):
>  File "", line 1, in 
> WindowsError: [Error 1314] A required privilege is not held by the  
> client: 'python.exe'
>
> This is in a directory that I own, with a file that I own.
>
> Jason: Is there something obvious that I'm missing? Or is some  
> special (not out-of-the-box) permission really required?
>
> --
> Added file: http://bugs.python.org/file15921/windows symlink draft  
> 18.patch
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

You will prefer this one. It is as fast as the 2.7 version.

from itertools import count, takewhile
irange = lambda start, stop, step: takewhile(lambda x: x>> list(irange(-2**65,2**65,2**61))
[-36893488147419103232L, -34587645138205409280L, ...

--

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

You will prefer this one. It is as fast as the 2.7 version.
The restrictions are described in the itertools documentation.


from itertools import count, takewhile
irange = lambda start, stop, step: takewhile(lambda x: x>> list(irange(-2**65,2**65,2**61))
[-36893488147419103232L, ...

--

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

If you need also negative steps:

from itertools import count, takewhile
def irange(start, stop, step):
if step < 0:
cond = lambda x: x > stop
else:
cond = lambda x: x < stop
return takewhile(cond, (start + i * step for i in count()))

--

___
Python tracker 

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



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

Martin Manns  added the comment:

Great solution!

Thank you

--

___
Python tracker 

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



[issue7715] Allow use of GNU arch on Darwin

2010-01-16 Thread Ned Deily

Ned Deily  added the comment:

Note that with current trunk and in-the-pipeline proposed changes, configure is 
depending on using the Apple-supplied enhanced version of arch on 10.5+ (e.g. 
to force execution in 32-bit mode) so, while the patch here doesn't harm 
anything, it points to another potential problem: configure should probably 
ensure it *is* using the Apple arch.

--
nosy: +ned.deily

___
Python tracker 

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



[issue7722] calendar.{HTMLCalendar, TextCalendar}.formatyear have incorrect definition

2010-01-16 Thread Bill Thiede

New submission from Bill Thiede :

The documentation for both HTMLCalendar and TextCalendar from the calendar 
module have formatyear defined as:

TextCalendar.formatyear(theyear, themonth[, w[, l[, c[, m)

and 

HTMLCalendar. formatyear(theyear, themonth[, width])

However the function definitions are actually:

TextCalendar.formatyear(self, theyear, w=2, l=1, c=6, m=3)

and 

HTMLCalendar.formatyear(self, theyear, width=3)

There is no 'themonth' parameter in either.  I wouldn't be surprised if this 
was a cut-n-paste error from the 'formatmonth' variants.

--
assignee: georg.brandl
components: Documentation
messages: 97931
nosy: georg.brandl, wathiede
severity: normal
status: open
title: calendar.{HTMLCalendar,TextCalendar}.formatyear have incorrect definition
versions: Python 2.6

___
Python tracker 

___
___
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-16 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

___
___
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-16 Thread Martin von Gagern

Martin von Gagern  added the comment:

Here is the corresponding path for python3 (py3k branch). It's mostly the same, 
except for one additional test which ensures header preservation even if the 
maxheaderlen argument to Message.as_string is greater than 0. It's called 
test_long_headers_as_string_maxheaderlen.

--
Added file: http://bugs.python.org/file15905/issue1670765_python3.patch

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch for the last "t#" format string in binascii module.
And provide additional tests.

PS: I removed this comment. IMHO, it is a wrong assertion:
"# The hqx test is in test_binhex.py"

--
Added file: http://bugs.python.org/file15906/issue7703_binascii_a2b_hqx.diff

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I don't think the bytes -> bytearray changes are useful, e.g.:

-fillers = ""
+fillers = bytearray()

As for:

+try:
+f(empty)
+except SystemError, err:
+self.fail("{}({!r}) raises SystemError: {}".format(func, 
empty, err))
+except Exception, err:
+self.fail("{}({!r}) raises {!r}".format(func, empty, err))

The "except SystemError" is pointless, since "except Exception" will catch 
SystemError anyway.

--

___
Python tracker 

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



[issue6943] setup.py fails to find headers of system libffi

2010-01-16 Thread Matthias Klose

Matthias Klose  added the comment:

this patch looks wrong, as it only works with libffi >= 3.0 (the standalone 
libffi releases, which introduces the pkg-config stuff).

--
nosy: +doko

___
Python tracker 

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



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

2010-01-16 Thread sorin

sorin  added the comment:

If you could provide a build I could run the tests on Windows 7 x64. 

This is a very old bug that I would like to see it solved.

--
nosy: +sorin

___
Python tracker 

___
___
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-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

A patch which provides a context manager and a decorator.
(with ideas from Ezio and Antoine)

Sample usages:

with temp_cwd() as cwd:
  assert cwd == os.getcwd()


@writablecwd
def test_zipfile():
  # do something useful
  print os.path.abspath('.')

--
nosy: +pitrou
Added file: http://bugs.python.org/file15907/temp_cwd_decorator.diff

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15906/issue7703_binascii_a2b_hqx.diff

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna

Florent Xicluna  added the comment:

Changed.

--
Added file: http://bugs.python.org/file15908/issue7703_binascii_a2b_hqx_v2.diff

___
Python tracker 

___
___
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-16 Thread Pascal Chambon

Changes by Pascal Chambon :


Removed file: 
http://bugs.python.org/file15765/python26_full_truncate_patch.patch

___
Python tracker 

___
___
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-16 Thread Pascal Chambon

Changes by Pascal Chambon :


Removed file: 
http://bugs.python.org/file15766/python27_full_truncate_bugfix.patch

___
Python tracker 

___
___
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-16 Thread Pascal Chambon

Pascal Chambon  added the comment:

Thanks for the detailed feedback.

According to what you said (and to details found in python docs), the current 
_fileio.truncate is actually quite buggy -> no reference counting ops were done 
on posobj, even though it's sometimes retrieved from _portable_seek, and 
returned or not depending on rare error cases (SetEndOfFile failing etc.).

Here is a patch fixing all that for python2.6, I've tested it manually in debug 
mode, and against memoryio/io/fileio tests ; hope it will be OK.

As soon as this one is certified, I'll prepare a patch for python2.7

--
Added file: 
http://bugs.python.org/file15909/patch26_truncate_pos_refcounts.patch

___
Python tracker 

___
___
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-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

Applied the bug 8 patch in r77519 (thanks Eric for reviewing!).  For safety, 
I'll leave this as a release blocker until fixes have been merged to py3k and 
release31-maint.

I've uploaded a fix for bugs 5 and 7 to Rietveld:

http://codereview.appspot.com/186182

I still don't like the parsing code much:  I'm tempted to pull out the 
calculation of y and z and do it after the parsing is complete.  It's probably 
marginally less efficient that way, but it would help make the code clearer.

--

___
Python tracker 

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