[issue12204] str.upper converts to title

2011-05-28 Thread py.user

New submission from py.user :

specification

1)
str.upper()¶

Return a copy of the string converted to uppercase.

2)
str.isupper()¶

Return true if all cased characters in the string are uppercase and there 
is at least one cased character, false otherwise. Cased characters are those 
with general category property being one of “Lu”, “Ll”, or “Lt” and uppercase 
characters are those with general category property “Lu”.

>>> '\u1ff3'
'ῳ'
>>> '\u1ff3'.islower()
True
>>> '\u1ff3'.upper()
'ῼ'
>>> '\u1ff3'.upper().isupper()
False
>>>

--
components: None
messages: 137167
nosy: py.user
priority: normal
severity: normal
status: open
title: str.upper converts to title
type: behavior
versions: Python 3.1

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

Changes by Ezio Melotti :


--
nosy: +georg.brandl
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



[issue12134] json.dump much slower than dumps

2011-05-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

The name dump and dumps exist to match the same API provided by pickle and 
marshal.

I agree that a note marked as CPython implementation detail should be added.

--
keywords: +easy -patch
stage:  -> needs patch
versions: +Python 2.7, Python 3.2

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

Ezio Melotti  added the comment:

The regex sets (\d\w\s\D\W\S) don't match any Python escape sequence, so even 
if some suggest to always use r'' regardless, I don't find it necessary, 
especially for simple regexs.
The two conflicting escape sequences to keep in mind are \b (backspace for 
Python, word boundary for re) and \number (octal escape for Python, reference 
to a group for re).
There are also other regex escape sequences that are rarely used (\B\A\Z), but 
these don't need to be escaped either.

--

___
Python tracker 

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



[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread library.engine

library.engine  added the comment:

What is so implicit in the passing of a list of undesired namespaces to the 
parse function?
This is quite explicit, in my humble opinion, and it lets you not to repeat 
yourself for each and every tag you want to find in the tree, as well.

--

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

Ezio Melotti  added the comment:

In this case using:
   d.copy_sign(other)
and then refer to 'd' and 'other' might be clearer.

--

___
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-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Everything is an instance of object.

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



[issue12203] isinstance not functioning as documented

2011-05-28 Thread Alex Gaynor

Alex Gaynor  added the comment:

I don't see why this is incorrect, type(a) -> type, and object is a superclass 
of type.

--
nosy: +alex

___
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-28 Thread Joesph

New submission from Joesph :

#Example:
class a(object):
pass

b = a()

print([isinstance(a,object), isinstance(b,object)])

'''
outputs: [True, True]
expected: [False, True]

As class a is not instantiated it should return false. As-is isinstance is just 
a synonym for issubclass.
'''

--
components: Interpreter Core
messages: 137160
nosy: someone3x7
priority: normal
severity: normal
status: open
title: isinstance not functioning as documented
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



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

2011-05-28 Thread Ned Deily

Ned Deily  added the comment:

All that said, the best solution to the problem is to use an appropriately 
configured Python for the task at hand.  If you want to build Python 
executables that are compatible with older OS X versions and Mac hardware (in 
particular, all machines capable of running OS X 10.4, 10.5, and 10.6), then 
you should be using something like the traditional python.org 32-bit-only 
installer configuration (i386/ppc, deployment target=10.3). And to build that 
Python or extension modules for it on OS X 10.6, you need to have Xcode 3 
installed.  End of story.

However, if you don't need that kind of backward compatibility - either you're 
just running on your own 10.6 (or later) system or are only targeting 10.6+ 
systems, then you should be using something like the python.org 64-/32- 
installer configuration (x86_64/i386, deployment target=10.6).  For that you 
should be able to build Python or extension modules with either Xcode 4 or 
Xcode 3.

If you are targeting for 10.5 Intel-only and above and want to use Xcode 4, you 
would need a Python with a slightly different configuration (i.e. with a 10.5 
deployment target); we don't currently supply an installer that meets that 
specialized (and presumably rapidly diminishing) need for x86_64 on 10.5 but it 
isn't that difficult to build yourself if you really need it.

So, if you choose the right binary installer for the task, there *shouldn't* be 
any issues with using Xcode 4.  If you need to build a Python from source, make 
sure you do not use the default ./configure values.  In particular, explicitly 
set --enable-universalsdk, --with-universal-archs, and 
MACOSX_DEPLOYMENT_TARGET.  For example,

  ./configure \
  --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk \
  --with-universal-archs=intel \
  --enable-framework \
  MACOSX_DEPLOYMENT_TARGET=10.6

and any other options you might want like:
 --prefix=/path/to/bin
 --enable-framework=/path/to/framework
 --with-framework-name=whatever
 #which also influences the /Applications directory name

And, yes, longer term, we should do provide more appropriate defaults for these 
newer environments.  As we don't have a lot of experience yet with Xcode 4 and 
10.7 has not been released yet, feedback is appreciated.

--

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

R. David Murray  added the comment:

Why it works is due to a quirk in the handling of python strings: if an 
apparent escape sequence doesn't "mean anything", it is retained verbatim, 
including the '\' character.  This is documented in 
http://docs.python.org/reference/lexical_analysis.html#string-literals:

"Unlike Standard C, all unrecognized escape sequences are left in the string 
unchanged, i.e., the backslash is left in the string. (This behavior is useful 
when debugging: if an escape sequence is mistyped, the resulting output is more 
easily recognized as broken.)"

It is *very* unwise to depend on this behavior for anything except debugging, 
therefore those examples which do are, in my opinion, wrong.

--

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

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

Charles-François Natali  added the comment:

When map is called, a MapResult object is created, which adds itself to the 
Pool's result cache.
When the pool is shut down, the result handler thread waits until the cache 
drains (while cache and thread._state != TERMINATE). But since no result is 
posted to the result queue (since the iterable is empty), the result handler 
never receives any task, and never gets to drain the cache. It thus waits 
forever on the recv on the result queue.

--
nosy: +charles-francois.natali

___
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-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

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

seems clearer to me.

--
nosy: +terry.reedy

___
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-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The doc consistently does NOT quote re's in the text. Rather, they are shaded 
gray, both in Windows help version and html version. So this one should not be 
treated differently.

Most of the confusion reported is due to not reading the intro paragraphs. I 
almost suggested closing this without action. However,  after saying to use the 
r prefix, the doc omits them from examples when not absolutely needed. In 
particular,

>>> m = re.search('(?<=-)\w+', 'spam-egg')

Why does \w work without being doubled or protected (and it does, I checked), 
while \1 does not? Hell if I know. So even though that example works, it should 
be changed. The doc should teach the rule "if strings contains '\', prefix with 
'r'" rather than "test and add 'r' if it fails", or "learn the exact list of 
when needed", which is not given and unknown to me and most any beginner.

I advocate the same practice in the RE How To, which also has at least one 
example with '\' but without 'r':
>>> p = re.compile('\d+')

I do not think we need another example other than those in the text.

--
keywords: +patch
nosy: +terry.reedy
stage:  -> needs patch
versions: +Python 2.7, Python 3.1, 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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I ran with 3.2, winxp with "if __name__ == '__main__':" added after the def 
statement (without this, process spawned 150 processes before I got logged out) 
and ()s added to prints. Hung on pool.join as OP said. I could only stop by 
closing command window as ^C was ignored. Any new test should have a timeout 
;-).

--
nosy: +terry.reedy
stage:  -> test needed
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



[issue12155] queue example doesn't stop worker threads

2011-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The proposed change adds about 7 lines to show the 'trick' of putting 
num-worker Nones on the queue. I think that is worth it.

--
nosy: +terry.reedy

___
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-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The basic fix is to replace the fake verb 'to or', conjugated not really 
properly as "or's" or "or'ing", with the real noun 'bitwise-or'.

help(doctest.testmod)
...
Optional keyword arg "optionflags" or's together module constants,
and defaults to 0.  This is new in 2.3.  Possible values (see the
docs for details):

Eliminate 'this is new...' here and above. Suggested replacement:

Optional keyword arg "optionflags" (default 0) is the bitwise-or
of the following module constants (see the docs for details):

help(doctest.testfile)
...
Optional keyword arg "optionflags" or's together module constants,
and defaults to 0.  Possible values (see the docs for details):

Same replacement (whatever we decide on).

Lib 25.2.4. Basic API
doctest.testfile entry:
...
Optional argument optionflags or’s together option flags. See section Option 
Flags and Directives.

->
Optional argument optionflags is the bitwise-or of options flags. See section 
Option Flags and Directives.

doctest.testmode entry refers back to above.

25.2.3.5. Option Flags and Directives

doctest.COMPARISON_FLAGS 
A bitmask or’ing together all the comparison flags above.
doctest.REPORTING_FLAGS 
A bitmask or’ing together all the reporting flags above.

A bitmask that is the bitwise-or of all the comparison flags above.
ditto with 'reporting' instead.

-or-
A bitmask -- the bitwise-or of ...

I think this is all. Searching on "or'" does not work because sphinx nicely 
replaces "'" with a non-ascii unicode char ;-).

--
nosy: +terry.reedy

___
Python tracker 

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



[issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set

2011-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Exceptions with traceback are ordinary behavior issues. 'Crash' means segfault 
or equivalent on Windows. And Jesus is correct.

In general, include system with reports.
With 3.2.0 IDLE on Winxp, adjusted 3.x code

import urllib.request as ur, http.cookiejar as ck
cookie_jar = ck.CookieJar()
request = ur.Request('http://gdyn.cnn.com/1.1/1.gif?1301540335193')
conn = ur.urlopen(request)
cookie_jar.make_cookies(conn, request)

produces essentially same traceback ending in AttributeError.
I did not try the patch.

--
nosy: +terry.reedy
stage:  -> test needed
type: crash -> behavior
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6

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

R. David Murray  added the comment:

For the record (for people reading this ticket later), the removal of the 
python version of the unix subprocess code was discussed on IRC, and it was 
clarified there that the reason for removing it is not that it duplicates the C 
code.  We like having python implementations of C code where possible, but the 
key here is "where possible".  The python version of the Unix subprocess code 
cannot be made to work correctly, it is necessary to drop into C to get the 
semantics correct.

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



[issue11785] email subpackages documentation problems

2011-05-28 Thread Adam Woodbeck

Changes by Adam Woodbeck :


--
nosy: +adam.woodbeck

___
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-28 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Include an appropriate Version Added annotation in the pipe2 documentation.

Otherwise the current patches look good to me.

--

___
Python tracker 

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



[issue12142] Reference cycle when importing ctypes

2011-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

If you are able to rebuild Python, have you tried running the ctypes test after 
rebuilding with this change? And, does the test cover the internal uses of 
_array_type?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue12137] Error EBADF in test_urllibnet

2011-05-28 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: EBADF in test_urllibnet -> Error EBADF in test_urllibnet

___
Python tracker 

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



[issue12177] re.match raises MemoryError

2011-05-28 Thread Matthew Boehm

Matthew Boehm  added the comment:

Here are some windows results with Python 2.7:

>>> import re
>>> re.match("()*?1", "1")
<_sre.SRE_Match object at 0x025C0E60>
>>> re.match("()+?1", "1")
>>> re.match("()+?1", "11")
<_sre.SRE_Match object at 0x025C0E60>
>>> re.match("()*?1", "11")
<_sre.SRE_Match object at 0x025C3C60>
<_sre.SRE_Match object at 0x025C3C60>
>>> re.match("()*?1", "a1")

Traceback (most recent call last):
  File "", line 1, in 
re.match("()*?1", "a1")
  File "C:\Python27\lib\re.py", line 137, in match
return _compile(pattern, flags).match(string)
MemoryError
>>> re.match("()+?1", "a1")

Traceback (most recent call last):
  File "", line 1, in 
re.match("()+?1", "a1")
  File "C:\Python27\lib\re.py", line 137, in match
return _compile(pattern, flags).match(string)
MemoryError

Note that when matching to a string starting with "1", the matcher will not 
throw a MemoryError.

--
nosy: +Matthew.Boehm

___
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-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

>From just reading the docs, it appears that json.dump(obj,fp) == 
>fp.write(json.dumps(obj)) and it is easy to wonder why .dump even exists, as 
>it seems a trivial abbreviation (and why not .dump and .dumpf instead). Since, 
>'_one_shot' and 'c_make_encoder' are not mentioned in the doc, there is no 
>hint from these either. So I think a doc addition is needed.

The benchmark is not completely fair as the .dumps timing omits the write call. 
For the benchmark, that would be trivial. But in real use on multitasking 
systems with slow (compared to cpu speed) output channels, the write time might 
dominate.  I can even imagine .dump sometimes winning by getting chunks into a 
socket buffer and possibly out on the wire, almost immediately, instead of 
waiting to compute the entire output, possibly interrupted by task swaps. So I 
presume *this* is at least part of the reason for the incremental .dump.

I changed 'pass' to 'print(bug)' in class writable and verified that .dump is 
*very* incremental. Even '[' and ']' are separate outputs.

DOC suggestion: (limited to CPython since spec does not prohibit naive 
implementation of .dump given above) After current .dumps line, add

"In CPython, json.dumps(o), by itself, is faster than json.dump(o,f), at the 
expense of using more space, because it creates the entire string at once, 
instead of incrementally writing each piece of o to f. However, 
f.write(json.dumps(o)) may not be faster."

--
keywords: +patch
nosy: +terry.reedy

___
Python tracker 

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



[issue11893] Obsolete SSLFakeFile in smtplib?

2011-05-28 Thread Catalin Iacob

Catalin Iacob  added the comment:

Attached v1 of patch. Please review.

There are some tests using GMail in test_smtpnet.py. They still pass with the 
patch. I also did manual tests with GMail with both SMTP + starttls and 
SMTP_SSL.

The idea of the patch is that SMTP.getreply is already doing:
  if self.file is None:
  self.file = self.sock.makefile('rb')
Therefore, the patch invalidates self.file by setting it to None every time 
self.sock is (re-)assigned to something.

For consistency, setting self.file to None is also done in LMTP.connect when 
setting self.sock to a Unix socket although it's not necessarily needed there. 
Not doing this makes the following scenario fail: create an LMTP instance, call 
connect, send and read some data (self.file gets initialized), call connect 
again with an Unix socket, reading more data now uses self.file referring to 
old socket. But I'm not sure if this scenario is a bug or a misuse of the API, 
aka you shouldn't call connect twice on the same instance.

Note that I didn't test LMTP. Should I or is it obvious enough that the change 
is ok?

--
keywords: +patch
nosy: +catalin.iacob
Added file: http://bugs.python.org/file22171/remove_sslfakefile_v1.patch

___
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-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thanks for the review. New patch.

--
Added file: http://bugs.python.org/file22170/try2.patch

___
Python tracker 

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



[issue12053] Add prefetch() for Buffered IO (experiment)

2011-05-28 Thread John O'Connor

Changes by John O'Connor :


Added file: http://bugs.python.org/file22169/issue12053-tests.patch

___
Python tracker 

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



[issue12053] Add prefetch() for Buffered IO (experiment)

2011-05-28 Thread John O'Connor

John O'Connor  added the comment:

I started a draft in python. I am attaching the _pyio version along with tests. 
I will continue work on the C implementation and eventually documentation if 
this is well received. It seems straightforward, I am interested to see what 
you guys think.

Also, there are now 2 places which use hasattr(self, "peek"). I was wondering 
if it would make sense to add peek() to BufferedIOBase and raise 
UnsupportedOperation or return b"".

Some benchmarks..

$ ./python -m timeit -s "from _pyio import open;f = open('LICENSE', 'rb'); 
b=bytearray(128)" 'while f.prefetch(b, 4, 4): pass'
_pyio.BufferedIOBase.prefetch:
10 loops, best of 3: 10.6 usec per loop
_pyio.BufferedReader.prefetch:
10 loops, best of 3: 6 usec per loop

$ ./python -m timeit -s "from _pyio import open;f = open('LICENSE', 
'rb');b=bytearray(4);" 'while f.read(4): f.readinto(b)'
10 loops, best of 3: 5.07 usec per loop

--
keywords: +patch
Added file: http://bugs.python.org/file22168/issue12053-pyio.patch

___
Python tracker 

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



[issue12129] Document Object Model API - validation

2011-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I suspect you are right, but do not know the rules, and have never used the 
module. There is no particular person maintaining xml.dom.X at present.

Could you please fill in the ... after the import to give a complete minimal 
example that fails? Someone could then test it on 3.2

--
nosy: +terry.reedy
stage:  -> test needed

___
Python tracker 

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



[issue11906] test_argparse failure in interactive mode

2011-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I will when I get setup to do that again.

--

___
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-28 Thread Charles-François Natali

Charles-François Natali  added the comment:

> I just nuked the pure Python POSIX subprocess implementation

Nice.

I've updated both patches to address Victor's comments on test_io and
test_subprocess usage of PIPE_MAX_SIZE, and Ross' comment on pipe2's
configure tests.
I left subprocess use _posixsubprocess.cloexec_pipe, since it leads to
simpler code, especially now that the Python version has been removed.

--
Added file: http://bugs.python.org/file22166/posix_pipe2.diff
Added file: http://bugs.python.org/file22167/support_pipe_max.diff

___
Python tracker 

___diff -r c5bd972391cd Doc/library/os.rst
--- a/Doc/library/os.rstSat May 28 10:00:14 2011 -0700
+++ b/Doc/library/os.rstSat May 28 19:07:31 2011 +0200
@@ -1019,6 +1019,17 @@
Availability: Unix, Windows.
 
 
+.. function:: pipe2(flags=0)
+
+   Create a pipe with *flags* set atomically.
+   *flags* is optional and can be constructed by ORing together zero or more of
+   these values: :data:`O_NONBLOCK`, :data:`O_CLOEXEC`.
+   Return a pair of file descriptors ``(r, w)`` usable for reading and writing,
+   respectively.
+
+   Availability: some flavors of Unix.
+
+
 .. function:: posix_fallocate(fd, offset, len)
 
Ensures that enough disk space is allocated for the file specified by *fd*
diff -r c5bd972391cd Lib/test/test_posix.py
--- a/Lib/test/test_posix.pySat May 28 10:00:14 2011 -0700
+++ b/Lib/test/test_posix.pySat May 28 19:07:31 2011 +0200
@@ -477,6 +477,31 @@
 reader, writer = posix.pipe()
 os.close(reader)
 os.close(writer)
+
+@unittest.skipUnless(hasattr(os, 'pipe2'), "test needs os.pipe2()")
+def test_pipe2(self):
+self.assertRaises(TypeError, os.pipe2, 'DEADBEEF')
+self.assertRaises(TypeError, os.pipe2, 0, 0)
+
+# try calling without flag, like os.pipe()
+r, w = os.pipe2()
+os.close(r)
+os.close(w)
+
+# test flags
+r, w = os.pipe2(os.O_CLOEXEC|os.O_NONBLOCK)
+self.addCleanup(os.close, r)
+self.addCleanup(os.close, w)
+self.assertTrue(fcntl.fcntl(r, fcntl.F_GETFD) & fcntl.FD_CLOEXEC)
+self.assertTrue(fcntl.fcntl(w, fcntl.F_GETFD) & fcntl.FD_CLOEXEC)
+# try reading from an empty pipe: this should fail, not block
+self.assertRaises(OSError, os.read, r, 1)
+# try a write big enough to fill-up the pipe (64K on most kernels): 
this
+# should either fail or perform a partial write, not block
+try:
+os.write(w, b'x' * support.PIPE_MAX_SIZE)
+except OSError:
+pass
 
 def test_utime(self):
 if hasattr(posix, 'utime'):
diff -r c5bd972391cd Modules/posixmodule.c
--- a/Modules/posixmodule.c Sat May 28 10:00:14 2011 -0700
+++ b/Modules/posixmodule.c Sat May 28 19:07:31 2011 +0200
@@ -6547,6 +6547,31 @@
 }
 #endif  /* HAVE_PIPE */
 
+#ifdef HAVE_PIPE2
+PyDoc_STRVAR(posix_pipe2__doc__,
+"pipe2(flags=0) -> (read_end, write_end)\n\n\
+Create a pipe with flags set atomically.\
+flags is optional and can be constructed by ORing together zero or more\n\
+of these values: O_NONBLOCK, O_CLOEXEC.\n\
+");
+
+static PyObject *
+posix_pipe2(PyObject *self, PyObject *args)
+{
+int flags = 0;
+int fds[2];
+int res;
+
+if (!PyArg_ParseTuple(args, "|i:pipe2", &flags))
+return NULL;
+
+res = pipe2(fds, flags);
+if (res != 0)
+return posix_error();
+return Py_BuildValue("(ii)", fds[0], fds[1]);
+}
+#endif /* HAVE_PIPE2 */
+
 #ifdef HAVE_WRITEV
 PyDoc_STRVAR(posix_writev__doc__,
 "writev(fd, buffers) -> byteswritten\n\n\
@@ -9441,6 +9466,9 @@
 #ifdef HAVE_PIPE
 {"pipe",posix_pipe, METH_NOARGS, posix_pipe__doc__},
 #endif
+#ifdef HAVE_PIPE2
+{"pipe2",   posix_pipe2, METH_VARARGS, posix_pipe2__doc__},
+#endif
 #ifdef HAVE_MKFIFO
 {"mkfifo",  posix_mkfifo, METH_VARARGS, posix_mkfifo__doc__},
 #endif
diff -r c5bd972391cd configure
--- a/configure Sat May 28 10:00:14 2011 -0700
+++ b/configure Sat May 28 19:07:31 2011 +0200
@@ -9307,7 +9307,7 @@
  getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
  if_nameindex \
  initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc 
mkdirat mkfifo \
- mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
+ mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock 
poll \
  posix_fallocate posix_fadvise pread \
  pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath 
renameat \
  select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid 
seteuid \
@@ -13824,14 +13824,6 @@
 esac
 
 
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
-if test "x$ac_cv_func_pipe2" = x""yes; then :
-
-$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
-
-fi
-
-
 
 
 for h in `(c

[issue12196] add pipe2() to the os module

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

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file22151/support_pipe_max.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-28 Thread Charles-François Natali

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file22154/posix_pipe2.diff

___
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-28 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
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-28 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I just nuked the pure Python POSIX subprocess implementation in 
70467:75ca834df824.  No need for both implementations.  _posixsubprocess is now 
the only option.

--

___
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-28 Thread sorin

sorin  added the comment:

I think that distutils must me modified to auto detect supported architectures 
and use them, this without requiring you to hack ARCHFLAGS. 

The number of developers that need to build PPC binaries is at least one order 
of magnitude lower than the number of users in need of building/installing 
python packages.

--
nosy: +sorin

___
Python tracker 

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



[issue11217] python-32 not linked in /usr/local/bin in framework builds

2011-05-28 Thread Tom Loredo

Tom Loredo  added the comment:

Thanks for handling this, Ned!  -Tom

--

___
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-28 Thread Eric V. Smith

Eric V. Smith  added the comment:

I'm not talking about the method itself but rather the descriptive text. For 
example:

copy_sign(other)

Return a copy of the first operand with the sign set to be the same as the 
sign of the second operand. 

There is no second operand, unless you consider "self" the first and "other" 
the second. Which of course is true inside the method, but it reads oddly as a 
description of the method from the outside.

--

___
Python tracker 

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



[issue3099] On windows, "import nul" always succeed

2011-05-28 Thread Mark Mc Mahon

Mark Mc Mahon  added the comment:

I am not sure that I fully understand the issue - but it seems that trunk still 
has this issue.
As stated by Amaury - this is on DEBUG builds only.

c:\>pcbuild\python_d.exe
Python 3.3a0 (default, May 28 2011, 20:22:11) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import nul
[60967 refs]
>>> import con
^Z
[60986 refs]

c:\>PCbuild\python.exe
Python 3.3a0 (default, May 28 2011, 20:25:13) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import nul
Traceback (most recent call last):
  File "", line 1, in 
ImportError: DLL load failed: The parameter is incorrect.
>>> import con
Traceback (most recent call last):
  File "", line 1, in 
ImportError: DLL load failed: The specified module could not be found.
>>>

--
nosy: +markm

___
Python tracker 

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



[issue12202] Check status returns in msilib.SummaryInformation.GetProperty()

2011-05-28 Thread Mark Mc Mahon

Mark Mc Mahon  added the comment:

I have added tests to the patch - but it's not easy to know what would cause an 
error in MsiSummaryInfoGetProperty which would trigger the new code.

--
keywords: +patch
Added file: 
http://bugs.python.org/file22165/ensure_MsiSummaryInfoGetProperty_return_value_checked.patch

___
Python tracker 

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



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2011-05-28 Thread Mark Mc Mahon

Mark Mc Mahon  added the comment:

Responding to Eric's comments

1. There are only three valid property types returned by MsiInteger, String & 
FILETIME. (http://msdn.microsoft.com/en-us/library/aa372045%28v=VS.85%29.aspx)

2. That comment makes sense - I have entered a new issue (issue12202) for that.

3. Per 1. - there shouldn't be any other unhandled types. I have entered issue 
issue12201 to track adding support for FILETIMEs.

--

___
Python tracker 

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



[issue12202] Check status returns in msilib.SummaryInformation.GetProperty()

2011-05-28 Thread Mark Mc Mahon

New submission from Mark Mc Mahon :

Per Eric V. Smith's comment issue1104 (msg134976) the return value of the call 
MsiSummaryInfoGetProperty() in summary_getproperty() (pc\_msi.c) is only 
checked for the error return ERROR_MORE_DATA.

Other error values should be checked.

--
messages: 137132
nosy: loewis, markm
priority: normal
severity: normal
status: open
title: Check status returns in msilib.SummaryInformation.GetProperty()

___
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-28 Thread Jonas H.

Jonas H.  added the comment:

Does that look good to you? If it does, I'll go on using the script 
(http://paste.pocoo.org/show/396661/) on the 3.x docs.

--
keywords: +patch
Added file: http://bugs.python.org/file22164/p1.patch

___
Python tracker 

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



[issue12201] Returning FILETIME is unsupported in msilib.SummaryInformation.GetProperty()

2011-05-28 Thread Mark Mc Mahon

New submission from Mark Mc Mahon :

In _msi.c, summary_getproperty() and summary_setproperty() raise an exception 
if the type being set/got is VT_FILETIME. 

This issue is to track adding support for (or declining to support) FILETIMEs 
in msilib.SummaryInformation.GetProperty()/SetProperty().

I have included a patch which adds this support (with some basic tests).
Should this function accept/return datetime.datetime - or a timestamp (both 
require conversion anyway). I have used datetimes in my patch.

--
components: Windows
files: add_FILETIME_support_to_summary_info.patch
keywords: patch
messages: 137130
nosy: loewis, markm
priority: normal
severity: normal
status: open
title: Returning FILETIME is unsupported in 
msilib.SummaryInformation.GetProperty()
versions: Python 3.2
Added file: 
http://bugs.python.org/file22163/add_FILETIME_support_to_summary_info.patch

___
Python tracker 

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



[issue11217] python-32 not linked in /usr/local/bin in framework builds

2011-05-28 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the suggested patch.  In addition to the "installunixtools" target, 
the "altinstallunixtools" target needed to be updated; it is used by default in 
the Python 3.x Makefiles.  The applied fix causes the following additional 
symlinks to be added to the --prefix bin directory for a 64-/32-bit framework 
install:

py27:  python2.7-32  pythonw2.7-32
   python-32 pythonw-32

py32:  python3.2-32  pythonw3.2-32
   python3-32pythonw3-32 ["make frameworkinstallunixtools" only]

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



[issue11203] gzip doc is behind

2011-05-28 Thread Adam Woodbeck

Changes by Adam Woodbeck :


--
nosy: +adam.woodbeck

___
Python tracker 

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



[issue11644] Cross-link 2to3 documentation, what’s new and pyporting howto

2011-05-28 Thread Adam Woodbeck

Changes by Adam Woodbeck :


--
nosy: +adam.woodbeck

___
Python tracker 

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



[issue11217] python-32 not linked in /usr/local/bin in framework builds

2011-05-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a2f088cf7ced by Ned Deily in branch '2.7':
Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
http://hg.python.org/cpython/rev/a2f088cf7ced

New changeset 7f2e3c466d57 by Ned Deily in branch '3.2':
Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
http://hg.python.org/cpython/rev/7f2e3c466d57

New changeset 2936e8f12e4f by Ned Deily in branch 'default':
Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
http://hg.python.org/cpython/rev/2936e8f12e4f

--
nosy: +python-dev

___
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-28 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

To the extent that we can, we should try to support relative symlinks. Absolute 
symlinks aren't the right thing in some cases, where the symlinks should be 
movable with their targets. I use relative links extensively.

Is it worth considering changing the current working directory to the same 
directory as the symlink when calling DeviceIoControl?

--

___
Python tracker 

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



[issue11699] Doc for optparse.OptionParser.get_option_group is wrong

2011-05-28 Thread Adam Woodbeck

Changes by Adam Woodbeck :


--
nosy: +adam.woodbeck

___
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-28 Thread Adam Woodbeck

Changes by Adam Woodbeck :


--
nosy: +adam.woodbeck

___
Python tracker 

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



[issue10449] “os.environ was modified by test_httpservers”

2011-05-28 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +benjamin.peterson

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

Ezio Melotti  added the comment:

Note that usually 'self' is not included in the arguments of methods.  The 3.3 
doc correctly uses e.g. copy_sign(other).  A 'd.' could also be added so that 
the end result looks like:
  d.copy_sign(other)
but it's not mandatory (if done, all the other methods should be updated as 
well).

--
keywords: +easy
nosy: +ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

That would be c4ddb460f4f2.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

One other thing I should mention is that in a later checkin, Benjamin did add a 
couple of explicit with statement examples to test_ast. These will fail if 
other implementations don't update the front end of their compilation processes 
correctly, so that should eliminate cases of counteracting bugs in the front 
end and back end.

--

___
Python tracker 

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



[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Thanks for this answer.

--

___
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-28 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

>> Also, the pure python implementation of subprocess for posix can now >> be 
>> updated to use pipe2 if it exists (previously on _posixsubprocess.c
>> used it).

> I don't understand the last part :-)
> What do you suggest?

Perhaps, os.pipe2 can be used if available, then a modified version of 
_posixsubprocess.cloexec_pipe without the check for pipe2 could be used as a 
fallback.

I'm not sure why there exists both a python and c implementation.

--

___
Python tracker 

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



[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

The AST version changed, and, more importantly, if other implementations pick 
up our AST changes without updating their compilers accordingly, their symbol 
table analysis and code compilation processes will break.

So yes, the test suite does already cover this change.

For the record:
3.2: ast.__version__ == 82163
3.3: ast.__version__ == 0daa6ba25d9b

(The latter is only the 3.3 AST version for the moment - there are additional 
AST cleanups planned for 3.3 now that the other projects gave their blessing to 
do so on python-dev)

--
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-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

>From my review:

"""One genuine problem with a stale assert and comment in ast.c, and a small 
objection to style in compile.c (I'd like a new compile_try() function to match 
the new AST node).

Otherwise looked good in a desk review."""

--

___
Python tracker 

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



[issue10449] “os.environ was modified by test_httpservers”

2011-05-28 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I think, if you speak to RM, you can just have this change in. Don't we get "no 
commits please" email request from RM with hg or is the branch already cut?

--

___
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-28 Thread Charles-François Natali

Changes by Charles-François Natali :


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



[issue12196] add pipe2() to the os module

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

Charles-François Natali  added the comment:

> Out of interest, is there any reason that the configure check for pipe2 is a 
> special case near the bottom of configure.in instead of with all the other 
> function checks in the AC_CHECK_FUNCS[] section in the middle?

No clue. I'll fix that.

> Also, the pure python implementation of subprocess for posix can now be 
> updated to use pipe2 if it exists (previously on _posixsubprocess.c used it).

I don't understand the last part :-)
What do you suggest?
Use os.pipe2 if available, otherwise use _posixsubprocess.c (because
it has the advantage of running with the GIL held) if available, and
use os.pipe + fcntl as last resort?

By the way, what's the reason for having a both a Python and a C implementation?
Are they some configurations where _posixsubprocess could not be available?

--

___
Python tracker 

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



[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc :


--
status: closed -> open

___
Python tracker 

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



[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Does this change have a visible effect? If so, can it have some unit test? 
Otherwise pypy and other alternative implementations are likely to miss this 
change.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue985064] plistlib crashes too easily on bad files

2011-05-28 Thread Ned Deily

Ned Deily  added the comment:

Thank you for the patch and tests!  Applied in 3.1 (for 3.1.4), 3.2 (for 
3.2.1), and 3.3. (The 2.x version of plistlib differs somewhat from the 3.x 
version so the patch would need some rework and testing for 2.7; that is 
probably not worth the effort at this point.)

--
assignee:  -> ned.deily
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue985064] plistlib crashes too easily on bad files

2011-05-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a2688e252204 by Ned Deily in branch '3.1':
Issue #985064: Make plistlib more resilient to faulty input plists.
http://hg.python.org/cpython/rev/a2688e252204

New changeset f555d959a5d7 by Ned Deily in branch '3.2':
Issue #985064: Make plistlib more resilient to faulty input plists.
http://hg.python.org/cpython/rev/f555d959a5d7

New changeset d0bc18a50bd1 by Ned Deily in branch 'default':
Issue #985064: Make plistlib more resilient to faulty input plists.
http://hg.python.org/cpython/rev/d0bc18a50bd1

--
nosy: +python-dev

___
Python tracker 

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



[issue10225] Fix doctest runable examples in python manual

2011-05-28 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



[issue10224] Build 3.x documentation using python3.x

2011-05-28 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



[issue9382] os.popen referenced but not documented in Python 3.x

2011-05-28 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



[issue12170] Bytes.index() and bytes.count() should accept byte ints

2011-05-28 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



[issue10449] “os.environ was modified by test_httpservers”

2011-05-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

The release date of 3.1.4 is actually June 11th.  Today will be released an RC 
though, so what I said should still apply.

--

___
Python tracker 

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



[issue10449] “os.environ was modified by test_httpservers”

2011-05-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

Python 3.1.4 should be released today, so I think it's too late for this to be 
fixed.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue11906] test_argparse failure in interactive mode

2011-05-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

Terry, I think you can apply the patch you proposed in msg137085 and close this 
issue.
If the recommended structure of test files is not documented, a section in the 
devguide should be added, but that's another issue.  (FWIW I'm not even sure 
there's a recommended structure, if that's the case we should figure out one, 
document it, and use it in all the tests.)

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue12188] PEP 7, C style: add ++ policy and explanation

2011-05-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

I'm not sure it's worth adding this to the PEP 7.  The PEP is about conventions 
and style not idioms.
PEP 8 has a section about "Programming Recommendations" that contains a few 
idioms, but since PEP 7 doesn't have an equivalent section, I think that 
explaining this idiom (and not others) will look out of place.

--
nosy: +ezio.melotti

___
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-28 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Out of interest, is there any reason that the configure check for pipe2 is a 
special case near the bottom of configure.in instead of with all the other 
function checks in the AC_CHECK_FUNCS[] section in the middle?
I know this patch didn't write the configure check but maybe it could be 
changed.

Also, the pure python implementation of subprocess for posix can now be updated 
to use pipe2 if it exists (previously on _posixsubprocess.c used it).

--
nosy: +rosslagerwall

___
Python tracker 

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



[issue9670] Exceed Recursion Limit in Thread

2011-05-28 Thread Ned Deily

Ned Deily  added the comment:

Version 4 looks good and the tests pass on OS X with pydebug enabled.  Applied 
in 2.7 (for release in 2.7.2), 3.1 (for 3.1.4). 3.2 (for 3.2.1), and default 
(for 3.3).

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



[issue9670] Exceed Recursion Limit in Thread

2011-05-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset ecf0ef85c72a by Ned Deily in branch '2.7':
Issue #9670: Increase the default stack size for secondary threads on
http://hg.python.org/cpython/rev/ecf0ef85c72a

New changeset 0cded2f2cea3 by Ned Deily in branch '3.1':
Issue #9670: Increase the default stack size for secondary threads on
http://hg.python.org/cpython/rev/0cded2f2cea3

New changeset 8a484090da7e by Ned Deily in branch '3.2':
Issue #9670: Increase the default stack size for secondary threads on
http://hg.python.org/cpython/rev/8a484090da7e

New changeset 8220f68f1229 by Ned Deily in branch 'default':
Issue #9670: Increase the default stack size for secondary threads on
http://hg.python.org/cpython/rev/8220f68f1229

--

___
Python tracker 

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



[issue12163] str.count

2011-05-28 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
components: +Interpreter Core
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



[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
Removed message: http://bugs.python.org/msg137107

___
Python tracker 

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



[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I recommend to revert this change. It seems that some users are opposed to any 
kind of folding (as my earlier folding experiment has demonstrated); users who 
*really* don't want to see the history would need to step forward and request a 
per-user option to suppress it.

I think the real solution to information flooding here is to have users split 
larger issues into smaller ones, only discuss one issue at the time, etc.

--
nosy: +loewis

___
Python tracker 

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



[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread Stefan Behnel

Stefan Behnel  added the comment:

I don't see this having much to do with the DRY principle. It's "explicit is 
better than implicit" and "better safe than sorry" that applies here.

--

___
Python tracker 

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