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
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
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
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
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:
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
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:
Changes by Ankur Ankan ankuran...@gmail.com:
--
nosy: +Ankur.Ankan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10595
___
___
Python-bugs-list
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?
Changes by Ankur Ankan ankuran...@gmail.com:
--
nosy: +Ankur.Ankan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15518
___
___
Python-bugs-list
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?
--
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
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
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
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
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
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
___
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']
--
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
___
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
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
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
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
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
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
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
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
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
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
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.
--
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
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
___
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
___
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
___
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
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?
--
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
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
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
___
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
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
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
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
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
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
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
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
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
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
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
___
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
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
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
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
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
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
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().
--
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.
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: docs@python - ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17329
___
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
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
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
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
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
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:
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.
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
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
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
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
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
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
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
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
74 matches
Mail list logo