[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-29 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I don't agree that distutils should autodetect architectures, that can result 
in silent behavior changes when you built extensions and assume ppc support 
will get compiled in.

We should probably start to mention the intel only builds more prominently 
though, that's the one that will be useful to most people at this time.

--

___
Python tracker 

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



[issue12134] json.dump much slower than dumps

2011-05-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Please don't add notes of this sort to the docs.

--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue12134] json.dump much slower than dumps

2011-05-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

Are you against the proposed wording or the note itself?

Stating that in CPython json.dump doesn't use the C accelerations is a 
reasonable thing to do imho.

--

___
Python tracker 

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



[issue12204] str.upper converts to title

2011-05-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

'\u1ff3'.upper() returns '\u1ffc', so we have:
  U+1FF3 (ῳ - GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI)
  U+1FFC (ῼ - GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI)
The first belongs to the Ll (Letter, lowercase) category, whereas the second 
belongs to the Lt (Letter, titlecase) category.

The entries for these two chars in the UnicodeData.txt[0] files are:
1FF3;GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI;Ll;0;L;03C9 
0345N;;;1FFC;;1FFC
1FFC;GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI;Lt;0;L;03A9 
0345N1FF3;

U+1FF3 has U+1FFC in both the third last and last field 
(Simple_Uppercase_Mapping and Simple_Titlecase_Mapping respectively -- see 
[1]), so .upper() is doing the right thing here.
U+1FFC has U+1FF3 in the second last field (Simple_Lowercase_Mapping), but 
since it's category is not Lu, but Lt, .isupper() returns False.

The Unicode Standard Annex #44[2] defines the Lt category as:
  Lt  Titlecase_Letter  a digraphic character, with first part uppercase

I'm not sure there's anything to fix here, both function behave as documented, 
and it might indeed be the case that .upper() returns chars with category Lt, 
that then return False with .isupper()

[0]: http://unicode.org/Public/UNIDATA/UnicodeData.txt
[1]: http://www.unicode.org/reports/tr44/#UnicodeData.txt
[2]: http://www.unicode.org/reports/tr44/#GC_Values_Table

--
components: +Interpreter Core, Unicode -None
nosy: +belopolsky, ezio.melotti
versions: +Python 3.2, Python 3.3

___
Python tracker 

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



[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-29 Thread sorin

sorin  added the comment:

Let's try to find a good compromise regarding this. I hope the we all agree 
that we should not put our personal needs or preferences on the first place, 
it's important to improve the overall experience for most users.

First, we do not want to fail to build and install a package if you are on 
specific case (xcode3, xcode4, ...).

I think that most people do not have `ARCHFLAGS` env var defined and they 
should not even care about it. Compilers are smart enough to pick the right 
architecture for them (xcode3 will build ppc/i386/x64 and xcode4 i386/x64, and 
who known maybe next version will include armX).

As for package maintainers and they build machines, they are more likely to be 
already aware about what they want to distribute. For this reason I consider 
that they can hack the build environment to meet their distribution needs 
(whatever env vars they want, blend xcode4 with xcode3,...). 

Still as stated in a previous comment, we do not want publish Universal 
binaries that will miss PPC architecture, in order to prevent this distutils 
should throw an warning if ppc architecture is not supported (xcode4).

Also if the ARCHFLAGS is defined and includes PPC, the build is supposed to 
fail.

Some other considerations: think that "some" people may want to install 
packages to their OS provided Python and in this case the python that comes 
with 10.6 doesn't have a PPC arch.

--

___
Python tracker 

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



[issue12205] test_subprocess fails due to uninstalled test subdirectory

2011-05-29 Thread Ned Deily

New submission from Ned Deily :

==
FAIL: test_wait_when_sigchild_ignored 
(test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_subprocess.py",
 line 860, in test_wait_when_sigchild_ignored
" non-zero with this error:\n%s" % stderr)
AssertionError: sigchild_ignore.py exited non-zero with this error:
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
 can't open file 'subprocessdata/sigchild_ignore.py': [Errno 2] No such file or 
directory

The Makefile for 3.2 was fixed but not 3.1 nor 2.7.  Fix follows.

--
assignee: ned.deily
messages: 137173
nosy: benjamin.peterson, gps, ned.deily
priority: normal
severity: normal
status: open
title: test_subprocess fails due to uninstalled test subdirectory
versions: Python 2.7, Python 3.1

___
Python tracker 

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



[issue12191] Add shutil.chown to allow to use user and group name (and not only uid/gid)

2011-05-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I added comments in the code review.

this patch is looking good once the comments are addressed.  thanks for your 
contribution!

As for talk of support for recursion... thats what os.walk() is for.  it 
doesn't belong as part of any particular individual function itself.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue12205] test_subprocess fails due to uninstalled test subdirectory

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8349094d1fe8 by Ned Deily in branch '2.7':
Issue #12205: Fix test_subprocess failure due to uninstalled test data.
http://hg.python.org/cpython/rev/8349094d1fe8

New changeset bd49031b9488 by Ned Deily in branch '3.1':
Issue #12205: Fix test_subprocess failure due to uninstalled test data.
http://hg.python.org/cpython/rev/bd49031b9488

New changeset 791c64fdc405 by Ned Deily in branch '3.2':
Record null merge of Issue #12205
http://hg.python.org/cpython/rev/791c64fdc405

New changeset e8e8a9dbc3c0 by Ned Deily in branch 'default':
Record null merge of Issue #12205
http://hg.python.org/cpython/rev/e8e8a9dbc3c0

--
nosy: +python-dev

___
Python tracker 

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



[issue12205] test_subprocess fails due to uninstalled test subdirectory

2011-05-29 Thread Ned Deily

Ned Deily  added the comment:

Applied to 2.7 (for 2.7.2) and 3.1 (for 3.1.4).

--
resolution:  -> fixed
stage:  -> 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




[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-29 Thread Ned Deily

Ned Deily  added the comment:

"Compilers are smart enough to pick the right architecture for them (xcode3 
will build ppc/i386/x64 and xcode4 i386/x64"

Actually, that's not the case for Python builds.  The architecture selection is 
based on what the builder of the Python interpreter specified on the 
./configure command and/or the defaults programmed into ./configure which look 
at other settings like deployment target. For extension module builds, 
Distutils attempts to use compile settings that are compatible with those the 
interpreter was built with, allowing some values to be influenced by 
environment variable settings.  In either case, the compiler has no say in the 
selection.

"Some other considerations: think that "some" people may want to install 
packages to their OS provided Python and in this case the python that comes 
with 10.6 doesn't have a PPC arch."

Actually, that's also not the case.  The Apple-supplied Pythons in OS X 10.6 do 
have a PPC arch; try "file /usr/bin/python2.6" in a shell and you'll see there 
are three archs.  It will even run on 10.6 in PPC emulation under Rosetta (try 
"arch -ppc /usr/bin/python2.6"),

But I sense a misconception here.  The python.org project has no say about what 
Apple does or doesn't do with regard to the system Pythons they supply in OS X. 
Python is an open-source project and many distributors (like Apple) build and 
release their own versions of Python. The PSF python.org project also builds 
and releases our own Windows and OS X binary installers.  But what is shipped 
with OS X is up to Apple.  For 10.6 the system python2.6 has a number of 
Apple-developed changes and add-ons.  The fact that Xcode 4 has complicated 
extension module builds with the system Python 2.6 is an issue to be taken up 
with Apple; there's nothing we here can do about that other than to suggest 
some workarounds.  And based on past experience, with the imminent release of 
10.7, it's highly unlikely Apple will be making any non-security related 
changes to their Pythons in 10.6.  We'll have to see what 10.7 brings.  For the 
system Pythons on 10.6, the choice seems clear: either stick wi
 th Xcode 3 or resort to workarounds.

What we can do here is try to make things better for users of the python.org 
source or binary installers for currently supported versions of Python.  
Documenting the tradeoffs of our current installer options is one step towards 
that.  Hope that makes things clearer!

--

___
Python tracker 

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



[issue12206] Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct)

2011-05-29 Thread Martin Ponweiser

New submission from Martin Ponweiser :

I hope the title is self-explanatory.

--
assignee: docs@python
components: Documentation
messages: 137178
nosy: docs@python, mponweiser
priority: normal
severity: normal
status: open
title: Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: 
level(currently wrong) -> levelno (correct)
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



[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-29 Thread sorin

sorin  added the comment:

You are right about Python from 10.6, it has PPC, but 10.7 doesn't.

bash-3.2$ file /Volumes/107/usr/bin/python2.6
/Volumes/107/usr/bin/python2.6: Mach-O universal binary with 2 architectures
/Volumes/107/usr/bin/python2.6 (for architecture x86_64):   Mach-O 64-bit 
executable x86_64
/Volumes/107/usr/bin/python2.6 (for architecture i386): Mach-O executable i386

--

___
Python tracker 

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



[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-29 Thread sorin

sorin  added the comment:

And in addition to 2.5 and 2.6, 10.7 includes 2.7.

--

___
Python tracker 

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



[issue12204] str.upper converts to title

2011-05-29 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Ezio Melotti wrote:
> 
> Ezio Melotti  added the comment:
> 
> '\u1ff3'.upper() returns '\u1ffc', so we have:
>   U+1FF3 (ῳ - GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI)
>   U+1FFC (ῼ - GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI)
> The first belongs to the Ll (Letter, lowercase) category, whereas the second 
> belongs to the Lt (Letter, titlecase) category.
> 
> The entries for these two chars in the UnicodeData.txt[0] files are:
> 1FF3;GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI;Ll;0;L;03C9 
> 0345N;;;1FFC;;1FFC
> 1FFC;GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI;Lt;0;L;03A9 
> 0345N1FF3;
> 
> U+1FF3 has U+1FFC in both the third last and last field 
> (Simple_Uppercase_Mapping and Simple_Titlecase_Mapping respectively -- see 
> [1]), so .upper() is doing the right thing here.
> U+1FFC has U+1FF3 in the second last field (Simple_Lowercase_Mapping), but 
> since it's category is not Lu, but Lt, .isupper() returns False.
> 
> The Unicode Standard Annex #44[2] defines the Lt category as:
>   Lt  Titlecase_Letter  a digraphic character, with first part uppercase
> 
> I'm not sure there's anything to fix here, both function behave as 
> documented, and it might indeed be the case that .upper() returns chars with 
> category Lt, that then return False with .isupper()
> 
> [0]: http://unicode.org/Public/UNIDATA/UnicodeData.txt
> [1]: http://www.unicode.org/reports/tr44/#UnicodeData.txt
> [2]: http://www.unicode.org/reports/tr44/#GC_Values_Table

I think there's a misunderstanding here: title cased characters
are ones typically used in titles of a document. They don't
necessarily have to be upper case, though, since some characters
are never used as first letters of a word.

Note that .upper() also does not guarantee to return an upper
case character. It just applies the mapping defined in the
Unicode standard and if there is no such mapping, or Python
does not support the mapping, the method returns the
original character.

The German ß is such a character (U+00DF). It doesn't have
an uppercase mapping in actual use and only received such
a mapping in Unicode 5.1 based on rather controversial
grounds (see http://en.wikipedia.org/wiki/ẞ).

The character is normally mapped to 'SS' when converting it
to upper case or title case. This multi-character mapping
is not supported by Python, so .upper() just returns U+00DF.

I suggest to close this ticket as invalid or to add a note
to the documentation explaining how the mapping is applied
(and when not).

--
nosy: +lemburg

___
Python tracker 

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



[issue12199] Unify TryExcept and TryFinally

2011-05-29 Thread Nick Coghlan

Nick Coghlan  added the comment:

Looks good to me.

--

___
Python tracker 

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



[issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other"

2011-05-29 Thread Adam Woodbeck

Adam Woodbeck  added the comment:

I propose:

object.copy_sign(other)

Return a copy of *object* with the sign set to be the same as the sign of 
*other*.

This format is most familiar to me.  But like Ezio wrote, all other methods 
referring to first and second operands would need to updated to refer to 
*object* and *other*, respectively.

--

___
Python tracker 

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



[issue9938] Documentation for argparse interactive use

2011-05-29 Thread Xuanji Li

Xuanji Li  added the comment:

Updated previous patch with test cases and renamed exit_on_argument_error flag 
to exit_on_error.

--
Added file: http://bugs.python.org/file22172/issue9938_with_test.patch

___
Python tracker 

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



[issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other"

2011-05-29 Thread Adam Woodbeck

Adam Woodbeck  added the comment:

Or rather:

object.copy_sign(other)

Return a copy of *object* with the sign set to be that of *other*.

--

___
Python tracker 

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



[issue12196] add pipe2() to the os module

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 866d959dea8e by Charles-François Natali in branch 'default':
Issue #12196: Add PIPE_MAX_SIZE to test.support, constant larger than the
http://hg.python.org/cpython/rev/866d959dea8e

--
nosy: +python-dev

___
Python tracker 

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



[issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other"

2011-05-29 Thread Adam Woodbeck

Adam Woodbeck  added the comment:

Sorry guys.  I'm new at this.  After reviewing this thread, Terry's suggestion 
makes the most sense to me.

--

___
Python tracker 

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




[issue9223] distutils Command docs linking

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset db60dee0019b by Éric Araujo in branch '2.7':
Backport doc improvements for distutils.cmd.Command (#9223).
http://hg.python.org/cpython/rev/db60dee0019b

--
nosy: +python-dev

___
Python tracker 

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



[issue9831] test_distutils should honor PYTHONDONTWRITEBYTECODE

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset da7617248935 by Éric Araujo in branch '2.7':
Fix test_distutils when sys.dont_write_bytecode is true (#9831).
http://hg.python.org/cpython/rev/da7617248935

--
nosy: +python-dev

___
Python tracker 

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



[issue10359] ISO C cleanup

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 74fa7b4b934f by Éric Araujo in branch 'default':
Port r86353 to packaging (#10359: “;” after function definition is invalid in 
ISO C)
http://hg.python.org/cpython/rev/74fa7b4b934f

--
nosy: +python-dev

___
Python tracker 

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



[issue9831] test_distutils should honor PYTHONDONTWRITEBYTECODE

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 3d56e559ffc6 by Éric Araujo in branch '3.1':
Fix test_build_py when sys.dont_write_bytecode is true (#9831).
http://hg.python.org/cpython/rev/3d56e559ffc6

New changeset 1370dc2690a2 by Éric Araujo in branch '3.2':
Merge doc touch-ups and fixes for #9831 and #9223 from 3.1
http://hg.python.org/cpython/rev/1370dc2690a2

New changeset c5d6a384132d by Éric Araujo in branch 'default':
Merge touch-ups and fixes for #9831 (+port fix to packaging) and #9223 from 3.2
http://hg.python.org/cpython/rev/c5d6a384132d

--

___
Python tracker 

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



[issue9831] test_distutils should honor PYTHONDONTWRITEBYTECODE

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Now fixed, thanks for the report.

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.3

___
Python tracker 

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



[issue9831] test_distutils should honor PYTHONDONTWRITEBYTECODE

2011-05-29 Thread Ismail Donmez

Ismail Donmez  added the comment:

Awesome, thank you!

--

___
Python tracker 

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



[issue10454] Clarify compileall command-line options

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Hi David, I made this patch to port the improvements you made to 2.7.  The new 
usage message looks like this:

usage: python compileall.py [-l] [-f] [-q] [-d destdir] [-x regexp] [-i list] 
[directory|file ...]

arguments: zero or more file and directory names to compile; if no arguments 
given, 
   defaults to the equivalent of -l sys.path

options:
-l: don't recurse into subdirectories
-f: force rebuild even if timestamps are up-to-date
-q: output only error messages
-d destdir: directory to prepend to file paths for use in compile-time 
tracebacks and in
runtime tracebacks in cases where the source file is unavailable
-x regexp: skip files matching the regular expression regexp; the regexp is 
searched for
   in the full path of each file considered for compilation
-i file: add all the files and directories listed in file to the list 
considered for
 compilation; if "-", names are read from stdin

I noticed some minor style issues, so I (IMO) improved them in my 2.7 patch and 
made a 3.x patch with the same minor touch-ups.

--
Added file: http://bugs.python.org/file22173/compileall-help-2.7.diff

___
Python tracker 

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



[issue10454] Clarify compileall command-line options

2011-05-29 Thread Éric Araujo

Changes by Éric Araujo :


Added file: http://bugs.python.org/file22174/compileall-help-3.x.diff

___
Python tracker 

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



[issue12191] Add shutil.chown to allow to use user and group name (and not only uid/gid)

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

The python-dev discussion talked about chowntree vs. os.walk:
http://mail.python.org/pipermail/python-dev/2011-May/111667.html
http://mail.python.org/pipermail/python-dev/2011-May/111673.html
http://mail.python.org/pipermail/python-dev/2011-May/111674.html

I find those arguments of convenience and precedent convincing.

--

___
Python tracker 

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



[issue12162] Documentation about re \number

2011-05-29 Thread R. David Murray

R. David Murray  added the comment:

The fact that you have carefully think about which are escapes and which aren't 
tells you that you should not be depending on the non-escapes not being 
escapes.  What if we added one?  The doc says preserving the \s is a debugging 
aid, and that is all it should be used for, IMO.

--

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

If you’re logged into Roundup, you should automatically be logged into our 
Rietveld instance.  You can file a bug on the meta-tracker (link in the left 
sidebar) if this does not work.

--

___
Python tracker 

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



[issue12101] PEPs should have consecutive revision numbers

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

This request is not feasible with Mercurial and the useful info is already 
available.  Closing.

--
resolution:  -> works for me
stage:  -> 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



[issue12199] Unify TryExcept and TryFinally

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset e0e663132363 by Benjamin Peterson in branch 'default':
unify TryExcept and TryFinally (closes #12199)
http://hg.python.org/cpython/rev/e0e663132363

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> 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



[issue12206] Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct)

2011-05-29 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue12148] Clarify "or-ing together" doctest option flags

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

I found “bitwise OR-ed” in library/fcntl.rst library/functions.rst 
library/os.rst library/winsound.rst (using grep, not Sphinx :)

--

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Again, changing the role :func: to :class: adds zero value to the tools or the 
human readers.  What’s needed are class *directives* that will provide a target 
for those links, e.g.:

.. class:: list

   .. method:: append

Then :func:`list` and :meth:`list.append` would generate links to his part of 
the docs.

--

___
Python tracker 

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



[issue5043] get_msvcr() returns None rather than []

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for explaining.

> a) NoneType object is not iterable. If the function don't return empty list
> later distutil will fail

Possible fix: self.dll_libraries = get_msvcr() or []

> method for detection of a msvc runtime is not correct. If the method
> return a library GCC will link to two c-runtimes. Also some function
> dearation are not visible if is not specified appropriate
> preprocessor directive.

Can you propose fixes for those?  Also, how to test it?

> So I could not found reason this method to exist .

“Include the appropriate MSVC runtime library if Python was built with MSVC 7.0 
or later.”

--
versions: +Python 3.3

___
Python tracker 

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



[issue12207] Document ast.PyCF_ONLY_AST

2011-05-29 Thread Éric Araujo

New submission from Éric Araujo :

Title says it all.

--
assignee: docs@python
components: Documentation
files: document-pycf-only-ast.diff
keywords: needs review, patch
messages: 137203
nosy: docs@python, eric.araujo
priority: normal
severity: normal
stage: patch review
status: open
title: Document ast.PyCF_ONLY_AST
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file22175/document-pycf-only-ast.diff

___
Python tracker 

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



[issue12208] Glitches in email.policy docs

2011-05-29 Thread Éric Araujo

New submission from Éric Araujo :

I found a bug in email.policy.rst (Msg instead of msg) and did other touch-ups 
in the file.  Please review.

--
assignee: docs@python
components: Documentation
files: email.policy-markup-glitches.diff
keywords: patch
messages: 137204
nosy: docs@python, eric.araujo, r.david.murray
priority: normal
severity: normal
stage: patch review
status: open
title: Glitches in email.policy docs
versions: Python 3.3
Added file: http://bugs.python.org/file22176/email.policy-markup-glitches.diff

___
Python tracker 

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



[issue12207] Document ast.PyCF_ONLY_AST

2011-05-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Use of PyCF_ONLY_AST be superseded by ast.parse.

--
nosy: +benjamin.peterson
priority: normal -> low

___
Python tracker 

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



[issue12209] Minor edits to faulthandler doc

2011-05-29 Thread Éric Araujo

New submission from Éric Araujo :

I made some grammar fixes in faulthandler.rst and tweaked the example to better 
show what the module does.

I’d like to fix the synopsis too: “dump the Python traceback” is not very clear 
to me.  It is the traceback or the stack trace?  Why is it called “the” 
traceback?  Something like “dumping the stack trace on CPython crashes” would 
be better IMO.

--
assignee: docs@python
components: Documentation
files: faulthandler-doc.diff
keywords: needs review, patch
messages: 137206
nosy: docs@python, eric.araujo, haypo
priority: normal
severity: normal
stage: patch review
status: open
title: Minor edits to faulthandler doc
versions: Python 3.3
Added file: http://bugs.python.org/file22177/faulthandler-doc.diff

___
Python tracker 

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



[issue11964] Undocumented change to indent param of json.dump in 3.2

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

This is my current patch, FYI.

--
keywords: +patch
Added file: 
http://bugs.python.org/file22178/versionadded-3.2-json-indent-str.diff

___
Python tracker 

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



[issue5729] Allows tabs for indenting JSON output

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

See #11964 for a documentation problem with this change.

--

___
Python tracker 

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



[issue968063] Add fileinput.islastline()

2011-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Would storing len(self._buffer) in the instance be premature optimization?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue11751] Increase distutils.filelist test coverage

2011-05-29 Thread Éric Araujo

Changes by Éric Araujo :


--
status: open -> pending

___
Python tracker 

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



[issue12196] add pipe2() to the os module

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 293c398cd4cf by Charles-François Natali in branch 'default':
Issue #12196: Add pipe2() to the os module.
http://hg.python.org/cpython/rev/293c398cd4cf

--

___
Python tracker 

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



[issue10772] Several actions for argparse arguments missing from docs

2011-05-29 Thread Marc Sibson

Marc Sibson  added the comment:

issue10772.patch: add help, count and parsers to Doc/library/argparse.rst

--
keywords: +patch
nosy: +marcs
Added file: http://bugs.python.org/file22179/issue10772.patch

___
Python tracker 

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



[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-05-29 Thread Ned Deily

Ned Deily  added the comment:

Should this be a release blocker for 3.2.1?

--
nosy: +ned.deily

___
Python tracker 

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



[issue12196] add pipe2() to the os module

2011-05-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

The Gentoo buildbot on which O_CLOEXEC test failed also chokes on test_pipe2:

[ 10/355] test_posix
test test_posix failed -- Traceback (most recent call last):
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_posix.py", line 
487, in test_pipe2
r, w = os.pipe2()
OSError: [Errno 38] Function not implemented

If've added a test to skip this test on Linux kernels older than 2.6.27: like 
O_CLOEXEC, the problem is that the libc defines pipe2() while the kernel 
doesn't support it, so when syscall() is called it bails out with ENOSYS.
(This buildbot should really have its libc/kernel upgraded...)

--

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-29 Thread Jonas H.

Jonas H.  added the comment:

Linking a class using a function directive is counter-intuitive. That's why we 
need to make use of class directives rather than function directives here.

--

___
Python tracker 

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



[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2011-05-29 Thread David Barnett

Changes by David Barnett :


--
nosy: +mu_mind

___
Python tracker 

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



[issue12148] Clarify "or-ing together" doctest option flags

2011-05-29 Thread R. David Murray

R. David Murray  added the comment:

I like bitwise-or better than bitwise OR because 'bitwise-or' is a distinct 
operation from 'or', and making it hyphenated emphasizes that.

--

___
Python tracker 

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



[issue12210] test_smtplib: intermittent failures on FreeBSD

2011-05-29 Thread Stefan Krah

New submission from Stefan Krah :

With Python 2.7, the FreeBSD AMD64 bot has sporadic failures in
test_smtplib. Since these failures don't occur in other branches,
I wonder if the timeout of 3 seconds is too low in 2.7. The timeout
is 15 seconds in 3.3.


test test_smtplib failed -- Traceback (most recent call last):
  File 
"/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/test/test_smtplib.py", 
line 186, in testNOOP
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
  File "/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/smtplib.py", 
line 242, in __init__
(code, msg) = self.connect(host, port)
  File "/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/smtplib.py", 
line 303, in connect
(code, msg) = self.getreply()
  File "/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/smtplib.py", 
line 352, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed



test test_smtplib failed -- Traceback (most recent call last):
  File 
"/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/test/test_smtplib.py", 
line 206, in testVRFY
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
  File "/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/smtplib.py", 
line 242, in __init__
(code, msg) = self.connect(host, port)
  File "/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/smtplib.py", 
line 303, in connect
(code, msg) = self.getreply()
  File "/usr/home/buildbot/buildarea/2.7.krah-freebsd/build/Lib/smtplib.py", 
line 352, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed

--
components: Tests
keywords: buildbot
messages: 137217
nosy: r.david.murray, skrah
priority: normal
severity: normal
status: open
title: test_smtplib: intermittent failures on FreeBSD
type: behavior
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



[issue11416] netrc module does not handle multiple entries for a single host

2011-05-29 Thread Jean-Marc Saffroy

Changes by Jean-Marc Saffroy :


Removed file: http://bugs.python.org/file21443/netrc.patch

___
Python tracker 

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



[issue11416] netrc module does not handle multiple entries for a single host

2011-05-29 Thread Jean-Marc Saffroy

Jean-Marc Saffroy  added the comment:

Ping? A patch is available for review.

--

___
Python tracker 

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



[issue12210] test_smtplib: intermittent failures on FreeBSD

2011-05-29 Thread Stefan Krah

Stefan Krah  added the comment:

Indeed, increasing the timeout to 15 solves the problem (I ran the
test with the -F option for about 100 times).

Since the timeout has been increased before to deal with flaky tests
(52682bd738a7), I guess it's ok to do the same for 2.7.

--
keywords: +patch
Added file: http://bugs.python.org/file22181/issue12210.diff

___
Python tracker 

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



[issue12196] add pipe2() to the os module

2011-05-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

The test now runs fine on the buildbots, closing.

--
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



[issue11416] netrc module does not handle multiple entries for a single host

2011-05-29 Thread Brian Curtin

Changes by Brian Curtin :


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

___
Python tracker 

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



[issue12210] test_smtplib: intermittent failures on FreeBSD

2011-05-29 Thread Stefan Krah

Stefan Krah  added the comment:

Hmm, testVRFY occurs twice, once with timeout=15 and once with
timeout=3. So there might be another reason why the test passes on
3.3 but not on 2.7.

Anyway, increasing the timeout to 15 throughout does solve
(or suppress) the problem.

--

___
Python tracker 

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



[issue12196] add pipe2() to the os module

2011-05-29 Thread STINNER Victor

STINNER Victor  added the comment:

> If've added a test to skip this test on Linux kernels older than 2.6.27:
> like O_CLOEXEC, the problem is that the libc defines pipe2() while the
> kernel doesn't support it, so when syscall() is called it bails out with
> ENOSYS. (This buildbot should really have its libc/kernel upgraded...)

You may add the issue number of your commit changelog, so a comment is 
generated directly in the issue.

support.linux_version() may be changed for requires_linux_version(2, 6, 27), 
but linux_version() is always used in tests to check the Linux version. 
requires_linux_version() would only raise a SkipTest if the OS is Linux and if 
the kernel is lesser than the specified version.

By the way, I like the new os.pipe2() function! You may want to document it in 
the "What's new in Python 3.3" doc (just mention the new function, the 
document will be rephrased later).

--

___
Python tracker 

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



[issue10736] test_ttk_guionly fails on OS X using ActiveState Tcl 8.5.9 (Cocoa)

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset de4d34a95603 by Ned Deily in branch 'default':
Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
http://hg.python.org/cpython/rev/de4d34a95603

--
nosy: +python-dev

___
Python tracker 

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



[issue10736] test_ttk_guionly fails on OS X using ActiveState Tcl 8.5.9 (Cocoa)

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c2f61149764e by Ned Deily in branch 'default':
Issue #10736: Revert changeset de4d34a95603 as it causes failures with
http://hg.python.org/cpython/rev/c2f61149764e

--

___
Python tracker 

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



[issue10736] test_ttk_guionly fails on OS X using ActiveState Tcl 8.5.9 (Cocoa)

2011-05-29 Thread Ned Deily

Ned Deily  added the comment:

The changes looked good to me and fixed the test failures with Cocoa Tk 8.5.9 
and caused no regressions with the ActiveState Carbon Tk 8.4 so I committed 
them to get some exposure.  But then I recalled I had not tested with just the 
old Apple-supplied Tk 8.4 and, of course, the test fails there.  So reverting 
for now.

--

___
Python tracker 

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



[issue12211] math.copysign must keep object type.

2011-05-29 Thread umedoblock

New submission from umedoblock :

I expected return int if I gave x as integer to copysign.

I encounterd two problems.
I'd like to fix this problems.
but I can't come up with nice idea.
therefore I just report for you.

one:
>>> import math
>>> a = [0, 1, 2, 3]
>>> i = 1
>>> i_copysign = math.copysign(i, -1)
>>> a[i_copysign]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers, not float

two:
>>> n = 10 ** 20
>>> math.copysign(n + 1, 1) == n + 1
False

--
components: Library (Lib)
messages: 137226
nosy: umedoblock
priority: normal
severity: normal
status: open
title: math.copysign must keep object type.
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue10736] test_ttk_guionly fails on OS X using ActiveState Tcl 8.5.9 (Cocoa)

2011-05-29 Thread Ned Deily

Ned Deily  added the comment:

It appears the original (unmodified) test also fails with the old 
Apple-supplied Tk 8.4 (this is on OS X 10.5).  So I'll do some more testing and 
then probably re-apply this at some point after the current round of releases.

--

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 48e837b2a327 by Nadeem Vawda in branch 'default':
Miscellaneous cleanups to bz2 and test_bz2 following issue #1625.
http://hg.python.org/cpython/rev/48e837b2a327

--

___
Python tracker 

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



[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-29 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


Added file: http://bugs.python.org/file22182/patch_v2.patch

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2011-05-29 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> If you’re logged into Roundup, you should automatically be logged into
> our Rietveld instance.

I thought this was the case, but it isn't working for me. I've filed a
bug on the meta-tracker.

--

___
Python tracker 

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



[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-29 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


Added file: http://bugs.python.org/file22183/patch_v2.txt

___
Python tracker 

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



[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-29 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


Removed file: http://bugs.python.org/file22006/patches_v2.tar.gz

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2011-05-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 3e5200abf8eb by Nadeem Vawda in branch 'default':
Issue #1625: Add stream ordering test to test_bz2.
http://hg.python.org/cpython/rev/3e5200abf8eb

--

___
Python tracker 

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



[issue12209] Minor edits to faulthandler doc

2011-05-29 Thread STINNER Victor

STINNER Victor  added the comment:

What do you call a "stack trace"? I use this term in the C language, especially 
when using the "where" command of gdb. In Python, the stack trace is called a 
"traceback". Anyway, faulthandler prints the Python trace, not the C trace, so 
I prefer to call it a "traceback" than "stack trace".

faulthandler.dump_traceback() output is similar to:

try:
raise ValueError()
except:
exctype, value, tb = sys.exc_info()
traceback.print_tb(tb)

faulthandler doesn't print the line from the script, only the function name, 
file name and line number; and the first line is different.

--

___
Python tracker 

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



[issue12175] FileIO.readall() read the file position and size at each read

2011-05-29 Thread STINNER Victor

Changes by STINNER Victor :


--
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



[issue12203] isinstance not functioning as documented

2011-05-29 Thread Joesph

Joesph  added the comment:

And much sense is made. If there is a generic instance test that I have
missed I'd be willing to work around this minor flaw. That the definition is
an instance of 'object' is a case that should be handled by the function
though.
On May 28, 2011 6:19 PM, "Benjamin Peterson"  wrote:
>
> Benjamin Peterson  added the comment:
>
> Everything is an instance of object.
>
> --
> nosy: +benjamin.peterson
> resolution: -> invalid
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___

--
Added file: http://bugs.python.org/file22184/unnamed

___
Python tracker 

___And much sense is made. If there is a generic instance test that I have 
missed I'd be willing to work around this minor flaw. That the definition 
is an instance of 'object' is a case that should be handled by the 
function though.

On May 28, 2011 6:19 PM, "Benjamin Peterson" 
rep...@bugs.python.org> 
wrote:> > Benjamin Peterson benja...@python.org> added the 
comment:
> > Everything is an instance of object.> > 
--> nosy: +benjamin.peterson> resolution:  -> 
invalid> status: open -> closed> > 
___
> Python tracker rep...@bugs.python.org>> 
http://bugs.python.org/issue12203>>
 ___

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



[issue12211] math.copysign must keep object type.

2011-05-29 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue12211] math.copysign must keep object type.

2011-05-29 Thread R. David Murray

R. David Murray  added the comment:

"Except when explicitly noted otherwise, all return values are floats."

On the other hand, copysign says "return x with the sign of y", which certainly 
sounds like it is preserving x, not creating a new float.  So at the least 
there is a doc issue, I think.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue12203] isinstance not functioning as documented

2011-05-29 Thread R. David Murray

R. David Murray  added the comment:

Everything in python is an instance of something.  Objects all the way down...

>>> isinstance(object, object)
True

So, there is no function you are overlooking because there is nothing that is 
not an instance.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue12212] Minor proofreading typo in index.rst

2011-05-29 Thread Mitch Ackermann

New submission from Mitch Ackermann :

-Here are some links that you may find you refererence frequently while
+Here are some links that you may find you reference frequently while

--
components: Devguide
messages: 137235
nosy: mita
priority: normal
severity: normal
status: open
title: Minor proofreading typo in index.rst

___
Python tracker 

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



[issue12203] isinstance not functioning as documented

2011-05-29 Thread Joesph

Joesph  added the comment:

It only fails when checking for 'object'. To think classes are instances is
absurd. Its like saying the chicken is the egg. I can understand that
classes are an instance of object in the interpreter, but, that isn't the
case in the interpreted. Thus this is an unhandled case.

To accept your answer would mean it is a pointless function that should be
removed altogether. But that is not the case as this example works as
expected:

class A(object):
pass

class B(A):
pass

C = B()

print([isinstance(B,A),isinstance(C,A)])

# outputs: [False, True]

You did make it obvious to me why the object case was failing and for that I
am grateful. It will make it easier to work around when I get back to that
part of the code.

On Sun, May 29, 2011 at 7:14 PM, R. David Murray wrote:

>
> R. David Murray  added the comment:
>
> Everything in python is an instance of something.  Objects all the way
> down...
>
> >>> isinstance(object, object)
> True
>
> So, there is no function you are overlooking because there is nothing that
> is not an instance.
>
> --
> nosy: +r.david.murray
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file22185/unnamed

___
Python tracker 

___It only fails when checking for 'object'. To think classes are 
instances is absurd. Its like saying the chicken is the egg. I can understand 
that classes are an instance of object in the interpreter, but, that isn't 
the case in the interpreted. Thus this is an unhandled case. 
To accept your answer would mean it is a pointless function that should be 
removed altogether. But that is not the case as this example works as 
expected:class A(object):    passclass B(A):    
pass
C = B()print([isinstance(B,A),isinstance(C,A)])# outputs: 
[False, True]You did make it obvious to me why the object case was 
failing and for that I am grateful. It will make it easier to work around when 
I get back to that part of the code.
On Sun, May 29, 2011 at 7:14 PM, R. David Murray 
rep...@bugs.python.org> 
wrote:

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

Everything in python is an instance of something.  Objects all the way 
down...

>>> isinstance(object, object)
True

So, there is no function you are overlooking because there is nothing that is 
not an instance.

--
nosy: +r.david.murray

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


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



[issue12212] Minor proofreading typo in index.rst

2011-05-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

e685024a2699

--
nosy: +benjamin.peterson
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



[issue12213] BufferedRandom: write(); read() gives different result using io and _pyio

2011-05-29 Thread STINNER Victor

New submission from STINNER Victor :

The following code displays "Xbc" using io, and "bc" using _pyio (or an 
unbuffered file, e.g. io.FileIO):
-
import _pyio, io

with io.BytesIO(b'abc') as raw:
#with _pyio.BufferedRandom(raw) as f:
with io.BufferedRandom(raw) as f:
f.write(b"X")
print("pos?", f.tell(), raw.tell())
print(f.read())
-

I expect .write() to change the file position, and so "bc" must be the correct 
result, not "Wbc".

_pyio.BufferedRandom overrides its write method, whereas io.BufferedRandom 
doesn't.

I already noticed the implement difference of BufferedRandom.write(), but I 
don't remember if I reported it or not!?

--
messages: 137238
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: BufferedRandom: write(); read() gives different result using io and _pyio
versions: Python 3.3

___
Python tracker 

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



[issue12213] BufferedRandom: write(); read() gives different result using io and _pyio

2011-05-29 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +IO

___
Python tracker 

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



[issue12213] BufferedRandom: write(); read() gives different result using io and _pyio

2011-05-29 Thread STINNER Victor

STINNER Victor  added the comment:

> I already noticed the implement difference of BufferedRandom.write(),
> but I don't remember if I reported it or not!?

Yes, I already reported the difference:
http://bugs.python.org/issue12062#msg135876

--

___
Python tracker 

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



[issue12213] BufferedRandom: write(); read() gives different result using io and _pyio

2011-05-29 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue12062] Buffered I/O inconsistent with unbuffered I/O in certain cases

2011-05-29 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue12203] isinstance not functioning as documented

2011-05-29 Thread R. David Murray

R. David Murray  added the comment:

You are correct, B is not an instance of A.  But both B and A are instances of 
'type':

>>> class A:
...   pass
...
>>> class B(A):
...pass
...
>>> isinstance(A, type)
True
>>> isinstance(B, type)
True
>>> 

And type is a subclass of object.  isinstance is correct, because Python is 
consistent.  As we said, *everything* is an object.

If you want to know if something is a class, you can check isinstance(X, type):

>>> a = A()
>>> isinstance(a, type)
False

--

___
Python tracker 

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



[issue12203] isinstance not functioning as documented

2011-05-29 Thread Joesph

Joesph  added the comment:

Beautiful, thank you. This should be in the isinstance documentation for
clarity.
On May 29, 2011 9:28 PM, "R. David Murray"  wrote:
>
> R. David Murray  added the comment:
>
> You are correct, B is not an instance of A. But both B and A are instances
of 'type':
>
 class A:
> ... pass
> ...
 class B(A):
> ... pass
> ...
 isinstance(A, type)
> True
 isinstance(B, type)
> True

>
> And type is a subclass of object. isinstance is correct, because Python is
consistent. As we said, *everything* is an object.
>
> If you want to know if something is a class, you can check isinstance(X,
type):
>
 a = A()
 isinstance(a, type)
> False
>
> --
>
> ___
> Python tracker 
> 
> ___

--
Added file: http://bugs.python.org/file22186/unnamed

___
Python tracker 

___Beautiful, thank you. This should be in the isinstance documentation for 
clarity.
On May 29, 2011 9:28 PM, "R. David Murray" 
rep...@bugs.python.org> 
wrote:> > R. David Murray rdmur...@bitdance.com> added the 
comment:
> > You are correct, B is not an instance of A.  But both B and A are 
instances of 'type':>  class A:> ...  
 pass> ... class B(A):> ...pass
> ... isinstance(A, type)> 
True isinstance(B, type)> True 
> > And type is a subclass of object.  isinstance is correct, 
because Python is consistent.  As we said, *everything* is an object.
> > If you want to know if something is a class, you can check 
isinstance(X, type):>  a = A() 
isinstance(a, type)> False> > --> 
> ___> Python tracker rep...@bugs.python.org>> 
http://bugs.python.org/issue12203>
> ___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12196] add pipe2() to the os module

2011-05-29 Thread R. David Murray

R. David Murray  added the comment:

FYI that buildbot is likely to get a kernel upgrade in the not too distant 
future.

--

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-29 Thread R. David Murray

R. David Murray  added the comment:

You are confusing directives and roles.  As was already pointed out, there is 
currently no target for list.append to point to.  That's what needs to be added.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-29 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

What 10.7? ;-) Please remember 10.7 is under NDA, and as such shouldn't be 
discussed in public.

As I mentioned earlier: the 32-bit build should be deprecated and is only 
needed for older machines, anyone running modern machines can install OSX 10.6 
(or later) and can use the intel-only build.

--

___
Python tracker 

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



[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-29 Thread sorin

sorin  added the comment:

FYI, I got the above output from 10.7 from a friend, I do not have access to 
the seed, so the information could be wrong.

--

___
Python tracker 

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