[issue17388] Providing invalid value to

2013-03-09 Thread Chris Tandiono

New submission from Chris Tandiono:

Currently, random.sample(population, k) raises a ValueError if k is out of the 
range of [0, len(population)], inclusive. However, the message says Sample 
larger than population even when the real problem is that k  0. The attached 
patch fixes that.

The problem exists in all versions of Python that have the random.sample 
function.

I think I should be adding tests for this, but I don't know in what existing 
file, if any, this test should go into.

--
components: Library (Lib)
files: random_sample.patch
keywords: patch
messages: 183808
nosy: Chris.Tandiono
priority: normal
severity: normal
status: open
title: Providing invalid value to
type: behavior
versions: 3rd party, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file29354/random_sample.patch

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



[issue17388] Providing invalid value to random.sample can result in incorrect error message

2013-03-09 Thread Chris Tandiono

Changes by Chris Tandiono chris.tandi...@gmail.com:


--
title: Providing invalid value to - Providing invalid value to random.sample 
can result in incorrect error message

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



[issue15873] datetime cannot parse ISO 8601 dates and times

2013-03-09 Thread Anders Hovmöller

Anders Hovmöller added the comment:

Éric Araujo: absolutely. Although I think my code can be improved (speed wise, 
elegance, etc) since I just wrote it quickly a weekend :)

--

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't think you need slicing if you rewrite the patch in another way, e.g.:

for i in range(n):
try:
waiter = __waiters.popleft()
except IndexError:
break
waiter.release()

I think this is safe, since notify() must be called with the lock held: another 
thread shouldn't be able to mutate the waiters list in the meantime.

As for notify_all(), it could be optimized to swap the internal list with an 
empty one: there's no need to pop the waiters one by one.

--
nosy: +neologix

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



[issue17389] Optimize Event.wait()

2013-03-09 Thread Antoine Pitrou

New submission from Antoine Pitrou:

It should be possible to optimize threading.Event.wait() to not acquire the 
condition when the event is already set. Patch attached.

Without patch:

$ ./python -m timeit -s import threading; e = threading.Event(); e.set() 
e.wait()
100 loops, best of 3: 0.466 usec per loop

With patch:

$ ./python -m timeit -s import threading; e = threading.Event(); e.set() 
e.wait()
1000 loops, best of 3: 0.19 usec per loop

--
components: Library (Lib)
files: event_wait.patch
keywords: patch
messages: 183811
nosy: neologix, pitrou, sbt
priority: normal
severity: normal
stage: patch review
status: open
title: Optimize Event.wait()
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file29355/event_wait.patch

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



[issue17340] Handle malformed cookie

2013-03-09 Thread karl

karl added the comment:

Yes the new RFC has been written by Adam Barth who wanted to describe things 
matching the reality of HTTP and servers/browsers issues.

--

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



[issue17299] Test cPickle with real files

2013-03-09 Thread Aman Shah

Aman Shah added the comment:

I have updated the patch for test_cpickle.py . Also, I would like to help out 
in creating mixins for the 3 but, it would be helpful if you can explain it in 
a bit more detail. What is the problem in using the existing pickletester.py??

--
Added file: http://bugs.python.org/file29356/test_cpickle_patch

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



[issue10595] Adding a syslog.conf reader in syslog

2013-03-09 Thread Ankur Ankan

Changes by Ankur Ankan ankuran...@gmail.com:


--
nosy: +Ankur.Ankan

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



[issue13564] ftplib and sendfile()

2013-03-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't understand why you must put the socket in non-blocking mode for 
sendfile().
Also I think the support code (_use_send() / _use_sendfile()) should be 
factored out somewhere. There could even be a socket.sendfile() method with the 
appropriate fallbacks?

--

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



[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-03-09 Thread Ankur Ankan

Changes by Ankur Ankan ankuran...@gmail.com:


--
nosy: +Ankur.Ankan

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



[issue17375] Add docstrings to methods in the threading module

2013-03-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Raymond - which patch is it? You didn't specify the contributor in the commit. 
What about the duplicate issue #12768 where someone also worked to supply a 
patch? 

Also, you've only committed this to 2.7; why?

--

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



[issue16576] ctypes: structure with bitfields as argument

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0acd9408b6f1 by Eli Bendersky in branch '3.2':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/0acd9408b6f1

New changeset bfc159f8e4b4 by Eli Bendersky in branch '3.3':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/bfc159f8e4b4

New changeset 502624235c7b by Eli Bendersky in branch 'default':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/502624235c7b

--
nosy: +python-dev

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



[issue16575] ctypes: unions as arguments

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0acd9408b6f1 by Eli Bendersky in branch '3.2':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/0acd9408b6f1

New changeset bfc159f8e4b4 by Eli Bendersky in branch '3.3':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/bfc159f8e4b4

New changeset 502624235c7b by Eli Bendersky in branch 'default':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/502624235c7b

--
nosy: +python-dev

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



[issue16576] ctypes: structure with bitfields as argument

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eece32440a52 by Eli Bendersky in branch '2.7':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/eece32440a52

--

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



[issue16575] ctypes: unions as arguments

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eece32440a52 by Eli Bendersky in branch '2.7':
Add warning in ctypes documentation for #16575 and #16576
http://hg.python.org/cpython/rev/eece32440a52

--

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Henrik, this patch fails to apply to 3.2

applying issue11367_branch32.patch
patching file Doc/library/xml.etree.elementtree.rst
Hunk #1 FAILED at 411
1 out of 1 hunks FAILED -- saving rejects to file 
Doc/library/xml.etree.elementtree.rst.rej
patching file Lib/xml/etree/ElementTree.py
Hunk #1 FAILED at 704
Hunk #2 FAILED at 725
Hunk #3 FAILED at 750
3 out of 3 hunks FAILED -- saving rejects to file 
Lib/xml/etree/ElementTree.py.rej
abort: patch failed to apply


I suspect this may be because of line endings. Are you generating the patches 
on a Windows machine? All patches to Python should be strictly in Unix format 
(LF for line ending, not CR LF). Can you configure your hg client and / or 
editor to do this?

I haven't touched Windows for some time but IIRC TortoiseHg does the right 
thing if your file is proper. In other words, perhaps it's the editor's fault. 
Your editor should not insert Windows line-endings into a Unix-y file (which 
Doc/library/xml.etree.elementtree.rst is).

--

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



[issue17359] python modules.zip is not documented

2013-03-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Marc-Andre,  Can this issue be closed or are the docs lacking in some way?

--

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



[issue17138] XPath error in xml.etree.ElementTree

2013-03-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Gutzwiller, the [position] syntax means the Nth child *of its parent*. Since 
you placed the second h1 into p, it's the first child of its parent. So the 
library's behavior is correct here. Note:

 [e.text for e in xml.findall('.//h1[1]')]
['1', '2']

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

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



[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-03-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Chris Calloway, would you like to pursue this issue further?

--

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



[issue16954] Add docstrings for ElementTree module

2013-03-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Thanks David, the patch looks good. I will commit it with some slight 
modifications and touch-ups shortly.

The issue of C extension docstrings vs. Python docstrings is an interesting 
one. It's a shame that help() shows empty strings, and it's a shame to 
copy-paste. What do other modules do? It may also be worth asking in python-dev 
or the docs mailing list and hear suggestions from other developers.

--

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



[issue16954] Add docstrings for ElementTree module

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f27d7c1eac4d by Eli Bendersky in branch 'default':
Issue #16954: Add docstrings for ElementTree
http://hg.python.org/cpython/rev/f27d7c1eac4d

--
nosy: +python-dev

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-09 Thread anatoly techtonik

anatoly techtonik added the comment:

You can use patch.py utility from 
http://python-patch.googlecode.com/svn-history/trunk/patch.py to apply patch 
that doesn't have this CRLF problem.

--

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



[issue13564] ftplib and sendfile()

2013-03-09 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

 I don't understand why you must put the socket in 
 non-blocking mode for sendfile().

I did that mainly because I'm using select() / poll() and it seems kind of 
natural to set the socket in non-blocking mode (proftpd does the same).
I'm not sure whether it actually makes any difference though (on Linux it works 
either way, blocking or not).
I'm removing the non-blocking mode in the new attached patch. We can take take 
a look at the buildbots later and see how they behave.

 Also I think the support code (_use_send() / _use_sendfile()) should be 
 factored out somewhere.

Agreed and turned them into methods.

 There could even be a socket.sendfile() method with the appropriate fallbacks?

Perhaps. The only thing which is not clear is how to deal with blocking vs. 
non-blocking sockets.
Also, Windows should also be covered and expose TransmitFile. 
It's probably better to discuss this elsewhere.

--
Added file: http://bugs.python.org/file29357/ftplib-sendfile4.patch

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



[issue13564] ftplib and sendfile()

2013-03-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

  I don't understand why you must put the socket in 
  non-blocking mode for sendfile().
 
 I did that mainly because I'm using select() / poll() and it seems
 kind of natural to set the socket in non-blocking mode (proftpd does
 the same).

But why do you need to use select() / poll() ? Can't you just call
sendfile() right from the start?

--

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



[issue17370] PEP should note if it has been superseded

2013-03-09 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Mar 09, 2013, at 03:30 AM, Terry J. Reedy wrote:

I think you are, in effect, asking for expansion of the 'PEP Header Preamble'
section of PEP-0001. I have added some of the PEP editors listed in the PEP
as nosy. I will let them decide if this should be discussed elsewhere.

Looks like Benjamin just changed Replaced-By with Superseded-By in PEP 1 and
Replaced with Superseded as a Status.  He also updated a bunch of PEPs with
the new headers, including 333.

He probably should have discussed this with the other PEP editors beforehand,
but in retrospect, it seems fine.

I guess that means you're requesting a new header such as 'Related' which
would contain a list of PEP numbers?  Usually we just put those in the
references (and it's perfectly fine to update a PEP after it's final with new
references - that's why we have a version control system. :)

--

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



[issue13564] ftplib and sendfile()

2013-03-09 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Because otherwise sendfile() fails with EAGAIN many times before sending any 
actual data. 
select() / poll() make sure the while loop awakens only when the socket is 
ready to be written (as opposed to continuously catching EAGAIN and wait for 
sendfile() to succeed).

--

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



[issue17343] Add a version of str.split which returns an iterator

2013-03-09 Thread Gregory P. Smith

Gregory P. Smith added the comment:

It'd perhaps have been better if things like memoryview were never exposed to 
the user at all as a distinct type and became an internal implementation detail 
behind PyBytes and PyUnicode objects (they could hold a reference to something 
else or collapse that down to their own copy on their own terms, up to the 
particulars of the Python VM).

Anyways, the above is getting off topic for this issue.  I retract my 
memoryview suggestion; that belongs in its own issue.

An iterating version of str.split is indeed hard to add today IFF we are 
against a str.itersplit() method name or against an optional keyword only 
argument that'd cause split(iterator=True)'s return type to potentially be 
different.

--

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



[issue13564] ftplib and sendfile()

2013-03-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Because otherwise sendfile() fails with EAGAIN many times before
 sending any actual data. 

EAGAIN on a blocking fd? Is it documented somewhere?
The Linux man page for sendfile() says:

   EAGAIN Nonblocking I/O has been selected using O_NONBLOCK and the
write would block.

FreeBSD apparently says something similar:

 [EAGAIN]   The socket is marked for non-blocking I/O and not all
data was sent due to the socket buffer being filled.
If specified, the number of bytes successfully sent
will be returned in *sbytes.

--

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



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-03-09 Thread Roger Serwy

Roger Serwy added the comment:

I think it's a problem on Tk on Windows. The painting of the selection 
highlight goes away when a window loses focus.

--

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



[issue13564] ftplib and sendfile()

2013-03-09 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I see. Well, what I'm experiencing right now if I remove the select() / poll() 
call is a sequence of EAGAIN errors alternated by successful sendfile() calls.  
Either the man page is wrong or I'm missing something.

--

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



[issue13564] ftplib and sendfile()

2013-03-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I see. Well, what I'm experiencing right now if I remove the
 select() / poll() call is a sequence of EAGAIN errors alternated by
 successful sendfile() calls.  
 Either the man page is wrong or I'm missing something.

Weird. I guess it would be nice to dig a bit more :-)

--

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



[issue17388] Providing invalid value to random.sample can result in incorrect error message

2013-03-09 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +mark.dickinson, rhettinger
versions:  -3rd party, Python 2.6, Python 3.1, Python 3.5

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



[issue17388] Providing invalid value to random.sample can result in incorrect error message

2013-03-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This seems like a silly criticism to me.  A negative value will almost never be 
the cause of this exception.

That said, I'll tweak the message at some point.

--
assignee:  - rhettinger
priority: normal - low

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



[issue17384] test_logging failures on Windows

2013-03-09 Thread Ezio Melotti

Ezio Melotti added the comment:

Confirmed, thanks for fixing this!

--
stage: needs patch - committed/rejected

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17384
___
___
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

2013-03-09 Thread Zachary Ware

Zachary Ware added the comment:

 Doc/make.bat assumes that this issue has already been resolved:
   if %PYTHON% EQU  set PYTHON=..\pcbuild\python
 Even with '_d' appended, as it should be, that does not work for 3.x.
 I think that line should be @rem'ed out until it does work.
 Does anyone mind if I do so?

I have offered an alternative fix for that issue as a part of issue17386.

--
nosy: +zach.ware

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



[issue17340] Handle malformed cookie

2013-03-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe our normal policy is to only follow accepted RFCs. But your comment 
suggests that in this case we should pay attention to the new draft. Do you 
have any idea why apparently nothing has happened in two years. Do some people 
oppose it?

--

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



[issue15605] Explain sphinx documentation building in devguide

2013-03-09 Thread Zachary Ware

Zachary Ware added the comment:

In issue17386, I have offered a patch to Doc/make.bat which makes using 
make.bat on Windows very, very nearly the same as using make on UNIX.  With 
such a patch applied, it would be trivial to rewrite section 7.6.1 with 
instructions that apply equally well to both platforms.

 make -C Doc xxx will not work with make.bat.

In issue16895, there is a make.bat file intended for the root of the Python 
repository, which, if there is any interest, could be fairly easily expanded to 
support a make -C Doc xxx command.  In fact, the version posted includes a 
doc target, which does essentially the same thing as make -C Doc xxx.

--
nosy: +zach.ware

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



[issue17370] PEP should note if it has been superseded

2013-03-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think an optional section header, Related PEPs, to go either at the top or 
bottom (the two places of most prominence) whould be better than a header with 
a list of numbers. A section could have a sentence or two for each listing 
describing the perceived relation.

--

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



[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2013-03-09 Thread Ezio Melotti

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


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

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



[issue17370] PEP should note related PEPs

2013-03-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Re-reading the original post, I see that a section (or paragraph) was an option 
Brandon requested. Changed title to reflect remaining issue.

--
title: PEP should note if it has been superseded - PEP should note related PEPs

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

+1

Add make external[-64] to runs Tools/buildbot/external[-amd64].bat
and explain this in the devguide (if not already) rather than buried in the 
opaque PCBuild/readme.

Even after reading build.bat, I do not understand what is the different net 
effect of that versus just double clicking pcbuild.sln and building. So some 
explanation in the devguide would be needed.

--
nosy: +brian.curtin, terry.reedy, tim.golden

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



[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2013-03-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

+1 I would worry more about performance than elegance.

While this is debated, can you provide a mini-patch for at least 3.3+ that 
corrects the bug of trying to run sphinx with python 3, so that anything but 
'make checkout' fails? I would apply that immediately.

--
nosy: +brian.curtin, terry.reedy, tim.golden

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9ee8c00f7e63 by Ezio Melotti in branch '2.7':
#11963: avoid printing messages in test_parser.  Initial patch by Éric Araujo.
http://hg.python.org/cpython/rev/9ee8c00f7e63

New changeset 10a82140f36d by Ezio Melotti in branch '3.2':
#11963: avoid printing messages in test_parser.  Initial patch by Éric Araujo.
http://hg.python.org/cpython/rev/10a82140f36d

New changeset 185c923f21ec by Ezio Melotti in branch '3.3':
#11963: merge with 3.2.
http://hg.python.org/cpython/rev/185c923f21ec

New changeset acf6ffc57fcf by Ezio Melotti in branch 'default':
#11963: merge with 3.3.
http://hg.python.org/cpython/rev/acf6ffc57fcf

--
nosy: +python-dev

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



[issue17340] Handle malformed cookie

2013-03-09 Thread Luke Plant

Luke Plant added the comment:

I'm a core developer on Django, and I've looked into cookies a lot, and also 
Python's SimpleCookie, and I've found that all accepted RFCs are completely 
irrelevant for this issue.

No accepted RFC was ever widely implemented - instead browsers mainly did 
something like the original Netscape cookies, with various interpretations. 
Opera attempted RFC 2965, at least at one point, but no-one else.

RFC 6265, whatever its status, is probably the closest thing to a useful 
document of how cookies should work. But even then, I'm afraid that the main 
guiding principle has to be sheer pragmatism. Read the source code or bug 
trackers of any other project that has to handle cookies and you'll find they 
have all come to that conclusion, unfortunately.

--

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



[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2013-03-09 Thread Stefan Krah

Stefan Krah added the comment:

I've started working on the alternative DSL PEP, but I hit a DSL-independent 
roadblock:

The preprocessor passes copies of structs to the _impl functions,
which could lead to subtle bugs. I pointed out a benign example on
Rietveld, but in general I think this should not be done.

So the question is whether to add another flag or symbol that
determines if a pointer should be passed to the _impl function.

--

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



[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2013-03-09 Thread Zachary Ware

Zachary Ware added the comment:

Sure can.  This one should do it, at least for anyone with 3.3 installed.

--
Added file: http://bugs.python.org/file29358/win_doc_make_minipatch.diff

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



[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2013-03-09 Thread Larry Hastings

Larry Hastings added the comment:

Thanks for pointing that out!  I've fixed it in my local branch, though I'm 
fooling around with some new syntax so I'm not ready to publish it yet.

It's not a general problem, exactly; it's a problem with extension types.  
After just a little tweaking and refactoring, the extension interface now lets 
you override the behavior in a fine-grained way.  So path_t is declared on the 
stack, but a pointer is passed in to the impl.

--

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-09 Thread Eli Bendersky

Eli Bendersky added the comment:

No, according to the devguide patches for Python have to be created with 'hg 
diff' and applicable with 'hg patch'. I can fix the patch in a number of ways, 
but I think it's important for a new contributor to learn how to generate a 
correct patch that can be applied without extra work. This should help the 
contributor create more useful patches in the future that get committed quickly.

--

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



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-03-09 Thread Dirk Zabel

Dirk Zabel added the comment:

If this is a Tk problem on windows, are there any chances to get it fixed? The 
Tk version installed with python 3.3 seems to be 8.5.11, while there are newer 
Tk versions available on www.activestate.com (8.5.13 and 8.6.0). But I don't 
know how to connect a stand-alone version of Tcl/Tk with Python, and I don't 
want to mess up my Python installation.

--
nosy: +dzabel

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



[issue17388] Providing invalid value to random.sample can result in incorrect error message

2013-03-09 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


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

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-09 Thread Ezio Melotti

Ezio Melotti added the comment:

 Putting another layer of indirection with script_helper could obfuscate 
 it to the point of making it unreadable (what stdout are we talking 
 about?  It’s a subprocess in a subprocess in a test).

The attached patch does this.  The basic idea for test_stdout_none is that the 
subprocess inherits the stdout of the parent if stdout=None.
If the test launches a subprocess with stdout=None, the subprocess will print 
on the test's stdout.  This is what currently happens, and that's why you see 
this bit of output is from a test of stdout in a different process while 
running test_subprocess.  If we add another layer, we have the test that 
launches a subprocess (parent), that in turn launches another subprocess 
(child).  The child process inherits the stdout of the parent process, and 
prints on it, and the test can then check the value of the parent stdout.

For test_stdout_filedes_of_stdout I used the same method, and everything seems 
to work fine.

--
versions: +Python 2.7, Python 3.2, Python 3.4
Added file: http://bugs.python.org/file29359/issue11963.diff

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



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-03-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Martin, is there any way to test if tcl/tk 8.5.13 and/or 8.6.0 fix this 
windows-only tk issue?

--
nosy: +loewis

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



[issue17388] Providing invalid value to random.sample can result in incorrect error message

2013-03-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

A negative value will almost never be the cause of this exception.

The proposed new message is more accurate but is also less useful and 
informative.  Getting a ValueError exception already means the value is 
invalid.  The job of the message is to suggest the likely cause so a person 
will no what to do about it. 

That said, I'll tweak the message at some point but I'm rejecting the patch 
as-is because I believe it makes the message worse rather better.

Please do keep looking for ways to improve Python's error messages and make 
them as useful as possible.

Here's food for thought:  In Py2.x, the error message for len(obj) is different 
depending on whether it is a new-style or old-style class.  If someone has 
forgotten to add the appropriate magic method to their class, which message 
would be the most helpful:

 class A(object): pass

 len(A())
Traceback (most recent call last):
...
TypeError: object of type 'A' has no len()

 class A: pass
 len(A())
Traceback (most recent call last):
...
AttributeError: A instance has no attribute '__len__'

--
resolution:  - rejected
status: open - closed

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-09 Thread Ezio Melotti

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


--
assignee:  - ezio.melotti
Added file: http://bugs.python.org/file29360/issue11963.diff

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



[issue17388] Providing invalid value to random.sample can result in incorrect error message

2013-03-09 Thread Chris Tandiono

Chris Tandiono added the comment:

Hmm. I'm not sure I buy the argument that the new message is less useful 
(wouldn't you like to know the exact values that caused the problem? that's 
what int() does when you provide it garbage). I guess it could be less 
informative, since you have to decide for yourself whether it's too large or 
too small a value.

At any rate, I think that whatever modification(s) you make to the message, it 
shouldn't say Sample larger than population when k  0, because that's just 
plain misleading.

--

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



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2013-03-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

A few thoughts:

* The LRU cache was originally intended for IO bound calls not for tight, 
frequently computationally bound calls like re.compile.

* The Py3.3 version of lru_cache() favors size optimizations (i.e. it uses only 
one dictionary instead of the two used by OrderedDict and keyword arguments are 
flattened into a single list instead of a nested structure).  Also, the 3.3 
version assures that __hash__ is not called more than one for a given key (this 
change helps objects that have a slow hash function and it helps solve a 
reentrancy problem with recursive cached function calls).  The cost of these 
changes is that _make_key is slower than it was before.

* I had hoped to get in a C version of _make_key before Py3.3 went out but I 
didn't have time.  Going forward, the lru_cache() will likely have a 
C-implementation that is blindingly fast.  

* For the re module, it might make sense to return to custom logic in the re 
modue that implements size limited caching without the overhead of 1) LRU 
logic, 2) general purpose argument handling, 3) reentrancy or locking logic, 
and 4) without statistics tracking.

--
assignee:  - rhettinger

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



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2013-03-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Until the lru_cache can be sped-up significantly, I recommend just accepting 
Serhiy's patch to go back to 3.2 logic in the regex module.

In the meantime, I'll continue to work on improving speed of _make_key().

--

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 61ec83956ba6 by Ezio Melotti in branch '2.7':
#11963: fix Windows buildbots.
http://hg.python.org/cpython/rev/61ec83956ba6

New changeset 64b87578c071 by Ezio Melotti in branch '3.2':
#11963: fix Windows buildbots.
http://hg.python.org/cpython/rev/64b87578c071

New changeset f683ca2b30e3 by Ezio Melotti in branch '3.3':
#11963: merge with 3.2.
http://hg.python.org/cpython/rev/f683ca2b30e3

New changeset 65147d2422dc by Ezio Melotti in branch 'default':
#11963: merge with 3.3.
http://hg.python.org/cpython/rev/65147d2422dc

--

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



[issue17329] Document unittest.SkipTest

2013-03-09 Thread Ezio Melotti

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


--
assignee: docs@python - ezio.melotti

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-09 Thread Anuj Gupta

Anuj Gupta added the comment:

Fixed ( My first contribution ever, please be kind :) )

--
keywords: +patch
nosy: +anuj
type:  - behavior
Added file: http://bugs.python.org/file29361/benchmark_count.patch

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



[issue17387] Error in C API documentation of PySequenceMethods

2013-03-09 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16136] Removal of VMS support

2013-03-09 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Ping...

--

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-09 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue14489] repr() function link on the built-in function documentation is incorrect

2013-03-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aea3167355fc by Ezio Melotti in branch '2.7':
#14489: fix wrong link.
http://hg.python.org/cpython/rev/aea3167355fc

--

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



[issue14489] repr() function link on the built-in function documentation is incorrect

2013-03-09 Thread Ezio Melotti

Ezio Melotti added the comment:

The s/:func:`repr`/:func:`.repr`/ committed by Georg got lost in 07b3fc67bf45, 
however reintroducing it results in this warning:
Doc/library/functions.rst:1182: WARNING: duplicate object description of repr, 
other instance in Doc/library/repr.rst, use :noindex: for one of them
Even after adding the :noindex: the repr() in the table wasn't a link, so I 
ended up using a workaround that fixed the link and didn't need the :noindex:.

--
assignee: docs@python - ezio.melotti
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue17340] Handle malformed cookie

2013-03-09 Thread karl

karl added the comment:

The current status of RFC6265 is PROPOSED STANDARD 
http://www.rfc-editor.org/info/rfc6265

Adam Barth is part of the Google Chrome Team. I do not want to talk for Adam. 
So better ask him, I don't think he has the energy/will to push further through 
the IETF process.

--

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



[issue17351] Fixed python3 descriptor documentation example + removal of explicit object inheritance in docs

2013-03-09 Thread Ned Batchelder

Ned Batchelder added the comment:

Why is it important to remove subclassing object?  Isn't it still good form to 
mention object as a base class.

--
nosy: +nedbat

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



[issue17379] Zen amendment

2013-03-09 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16278] os.rename documentation slightly inaccurate

2013-03-09 Thread Todd Rovito

Todd Rovito added the comment:

Version 2 of the patch includes many improvements most of which were suggested 
by Ezio making the patch a much higher quality.  The patch is very WET at this 
point.  I still need to test on Windows which I plan to do as soon as I can get 
my Windows partition in order.  

Thanks for all the great feedback!

--
Added file: http://bugs.python.org/file29362/16278OSRenameDocsTestV2.patch

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



[issue17387] Error in C API documentation of PySequenceMethods

2013-03-09 Thread Mike Hoy

Mike Hoy added the comment:

I was looking at 3.4 files. You're right it is in 2.7. Guess you have all the 
info you need to make a patch for it then?

ssizessizeargfunc PySequenceMethods.sq_slice

It passes the lower and upper bound and expects back a subsequence.

Or is there more to it than that? I cannot for the life of me make any sense 
out of it. Here I was sitting looking at this thinking it would be very easy 
doc fix for me but in the end I think I'll bow out.

--

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



[issue17351] Fixed python3 descriptor documentation example + removal of explicit object inheritance in docs

2013-03-09 Thread Ezio Melotti

Ezio Melotti added the comment:

 Why is it important to remove subclassing object?

It's not /important/, but those are just leftovers from 2.x, and there's no 
reason to keep them around.

 Isn't it still good form to mention object as a base class.

I don't think so (or at least I've never seen anyone suggesting to keep or add 
object explicitly).

The patch LGTM, so unless there's a valid reason to keep the object around 
I'll commit it soon.

--
nosy: +ezio.melotti

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-09 Thread Zachary Ware

Zachary Ware added the comment:

Here's an updated version in the form of a patch.

Features include:

- Ensure things are done in the right directory with pushd/popd

- Allow setting environment variables (for the life of the script) with:
 make test PYTHON=..\PCbuild\python.exe

- Emulate UNIX's `make -C dir` (cd dir; call make.bat %*, essentially)

- Choose x86 or x64 with -64 command line switch

- Intelligently choose an interpreter for `make patchcheck` and `make test`

- Available targets are: build, clean, patchcheck, ready, test.  ready is 
implemented by Tools/buildbot/external[-amd64].bat; make ready sounds better 
and possibly more accurate than make external to me.

- Create a convenience python.bat script, which calls the newly built 
interpreter with all supplied arguments.  Created by :build, deleted by :clean 
(and added to .hgignore)


Everything seems to work ok for me, but my testing platforms are limited to a 
single Win7 laptop, currently.  This issue is also somewhat constrained by 
issue 17202; it is supposed to work without any change to .hgeol, but that 
can't be guaranteed.

--
keywords: +patch
Added file: http://bugs.python.org/file29363/win_make.diff

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Tim, do you remember why Condition.notify() went to great lengths to act as if 
the lock could be released after the check for self._is_owned()?  

It loops over its own a copy of __waiters, and the __waiters.remove(waiter) 
code is wrapped in a try/except to detect a situation where __waiters mutated 
during the release-loop.  I'm presuming that defensive programming was put 
there for a reason.

--
nosy: +tim_one

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



[issue17351] Fixed python3 descriptor documentation example + removal of explicit object inheritance in docs

2013-03-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

[Ned]
 Isn't it still good form to mention object as a base class.

I don't think so.  The classes look much cleaner without it.

+1 from for removing (object) from most examples (except for the descriptor 
howto).

[Terry]
 The respective howto and examples authors should give their 
 OK for deleting '(object)' in case they are trying to keep 
 one text compatible across 2 and 3. I added the other two 
 to the nosy list.

Thanks Terry.  Yes, I would like to keep (object) in the text of the descriptor 
how-to.  As you said, it keeps the text compatible.  But also, the explicit 
inheritance from (object) is an aid to clarity in a document that needs to 
highlight that attribute access occurs in two forms, object.__getattribute__ 
and type.__getattribute__.

--

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