Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18821
___
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18752
___
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: docs@python - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18313
___
Raymond Hettinger added the comment:
-1 Once the positional arguments are in the wild, you can't take them away
without breaking a lot of code.
This code was available as a third-party module prior to inclusion in Python
and had many happy users. If the positional arguments had been a
Changes by Ned Deily n...@acm.org:
--
nosy: +ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18893
___
___
Python-bugs-list mailing
Charles-François Natali added the comment:
Please don't FUD this one to death. Aligned memory access is
sometimes important and we currently have no straight-forward
way to achieve it.
I guess that a simple way to cut the discussion short would be to have a first
implementation, and run
STINNER Victor added the comment:
Why do you not provide a structure to decode the bytes? I thought relying
on ctypes in the stdlib was not advised...
We should expose it. The ctypes was just a poof of concept.
--
___
Python tracker
Roundup Robot added the comment:
New changeset c27527dce71e by Victor Stinner in branch 'default':
Issue #18571: Merge duplicate test code
http://hg.python.org/cpython/rev/c27527dce71e
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
A more efficient approach for many use-cases would do the precomputation
once, returning some kind of 'distribution' object from which samples can be
generated.
I like the idea about adding a family of distribution generators. They should
check input
Serhiy Storchaka added the comment:
We don't want to create more obstacles to upgrading or converting from Python
2.
But these obstacles already exists.
The 10th parameter of dump() is encoding in Python 2 and simplejson, and
default in Python 3.
The 12th parameter of dump() is
anatoly techtonik added the comment:
None that I know of.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18553
___
___
Python-bugs-list mailing
Andrew Svetlov added the comment:
Ok. Close as won't fix.
Please reopen if needed.
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18750
___
STINNER Victor added the comment:
New patch (version 2):
- an hash table entry can now contain the data directly instead of a pointer to
the data
- _tracemalloc._get_stats() copies the hash table to not have to lock the hash
table too long, which will be especially useful for TRACE_RAW_MALLOC
Changes by Armin Rigo ar...@users.sourceforge.net:
--
nosy: +arigo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18885
___
___
Python-bugs-list
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6299
___
___
Python-bugs-list mailing list
Madison May added the comment:
[Raymond Hettinger]
The sticking point is going to be that we don't want to recompute the
cumulative weights for every call to weighted_choice.
So there should probably be two functions:
cw = make_cumulate_weights(weight_list)
x = choice(choice_list, cw)
Changes by Madison May madison@students.olin.edu:
Removed file: http://bugs.python.org/file31546/weighted_choice_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18844
___
Changes by Madison May madison@students.olin.edu:
Added file: http://bugs.python.org/file31547/weighted_choice_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18844
___
Changes by Meador Inge mead...@gmail.com:
--
assignee: - meador.inge
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16826
___
Tim Peters added the comment:
Suggest caution here. test_sax fails the same way for me too (Windows Vista),
under both the released 3.3.2 and a Python built from the current hg default
branch.
However, these files (test.xml and test.xml.out) have not changed since the
Python 2.7 line - the
New submission from Stefan Behnel:
diff --git a/performance/pystone.py b/performance/pystone.py
--- a/performance/pystone.py
+++ b/performance/pystone.py
@@ -59,9 +59,9 @@
def main(loops=LOOPS):
benchtime, stones = pystones(loops)
-print Pystone(%s) time for %d passes = %g % \
-
Antoine Pitrou added the comment:
Oh, pystone... I didn't know we had included that particular horror in the
benchmark suite :-)
--
nosy: +brett.cannon, pitrou
stage: - patch review
versions: +3rd party
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Are there tests for this?
Not sure what you mean: there are several tests using isatty() in test suite.
Regardless, there is no #ifdef around the isatty() definition in posixmodule.c,
so I can only assume it exists on all platforms.
--
nosy: +pitrou
Tim Peters added the comment:
Seeing as Python 3 _does_ open these files in binary mode, I fiddled my local
.hgeol to mark the test files as BIN (then deleted the test data directory and
did an hg revert on the directory). Then test_sax passes.
I don't know whether that's the proper fix,
New submission from Serhiy Storchaka:
In some functions in the random module checking input arguments and
precomputation takes a considerable portion of time. Here is a sample
implementation of new random.distrib module which provides alternative faster
interface to generating of random
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file31550/distrib_bench.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18900
___
Serhiy Storchaka added the comment:
Would these distribution generators be implemented internally (see attached
patch) or publicly exposed?
See issue18900. Even if this proposition will be rejected I think we should
publicly expose weighted choice_generator(). A generator or a builder which
New submission from Claudiu.Popa:
This is similar to what was done for issue17818 and issue17487 and will gain
for all the three audio libraries, aifc, wave and sunau a similar API. Patch
and tests attached.
--
components: Library (Lib)
files: sunau.patch
keywords: patch
messages:
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +scoder
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18105
___
___
Python-bugs-list
Madison May added the comment:
Use lru_cache isn't good because several choice generators can be used in a
program and because it left large data in a cache long time after it was used.
Yeah, I just did a quick search of the stdlib and only found one instance of
lru_cache in use -- another
Madison May added the comment:
I like the core idea of a family of random generators, but it feels like a new
module that's nearly identical to random introduces a lot of repeated code.
Perhaps adding an additional optional arg ('generator=False', for example) to
these functions in the random
Antoine Pitrou added the comment:
Marking the files as binary (really don't touch) in .hgeol sounds
reasonable to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18889
___
Terry J. Reedy added the comment:
Two things have happened with Python: we switched bytes from 'text or binary'
to 'binary (or text)' in 3.0. We switched from svn to hg in 3.2. When did
test_sax start failing? I have no idea. Until recently, there were much worse
problems with the test suite
Changes by Jon Foster jongfos...@users.sourceforge.net:
--
nosy: +jongfoster
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16531
___
___
Serhiy Storchaka added the comment:
Nit 2: why? The test passes as is.
Currently test.xml and test.xml.out contain only ascii characters. But this can
be changed in future. Actually I had added non-ascii characters to other test
data and this had exposed some bugs in test suite.
When did
Tim Peters added the comment:
test_email still passed on Windows under 3.2.5 (but test_sax failed).
test_email and test_sax both fail under 3.3.2.
I'll just push the change to .hgeol - minimally invasive, fixes the immediate
problem, and it appears these really are binary files.
--
Stefan Behnel added the comment:
I can well imagine that the serialiser is broken for this in Py2.x, given that
the API accepts byte strings and stores them as such. The fix might be as
simple as decoding byte strings in the serialiser before writing them out.
Involves a pretty high
Terry J. Reedy added the comment:
Having the files be the same on all systems seems the right solution. Changing
.hgeol should do that, at least for the repository. Let's hope the Windows .msi
installer leave line endings alone. I should install the a,b,c releases just to
run the test suite
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +tim.peters
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18900
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 8efcf3c823f9 by Tim Peters in branch '3.3':
Fix issue 18889: test_sax: multiple failures on Windows desktop.
http://hg.python.org/cpython/rev/8efcf3c823f9
New changeset 25211a8b by Tim Peters in branch 'default':
Merge fix from 3.3 into
Changes by Tim Peters t...@python.org:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18889
___
Tim Peters added the comment:
Terry, yes, the installer won't change line endings. I think - we'll find out
for sure next time a release is cut - LOL ;-)
Agreed that Lib/email/test/data/msg_26.txt is probably obsolete. Fix it, if
you like! It's helpful to get rid of obsolete cruft.
Elazar Gershuni added the comment:
I think in such case it is reasonable to fail silently, since the information
will not be readable anyway.
Is a patch like the attached acceptable? (Sorry, I am new here)
results:
import os, argparse; p = argparse.ArgumentParser(prog='PROG')
Raymond Hettinger added the comment:
I like the idea about adding a family of distribution generators
Let's stay focused on the OP's feature request for a weighted version of
choice().
For the most part, it's not a good idea to just add a family of anything to
the standard library. We wait
Michael Foord added the comment:
I'd rather not propagate more options all the way through, especially as this
is some thing that should be decided by the test framework and is unlikely to
be something you want to turn on and off per test run (which is what command
line options are for).
R. David Murray added the comment:
For test_email, the fix was correct because the *test* didn't care about what
line ending the source file had. I can't speak for sax.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18889
Serhiy Storchaka added the comment:
Of course if this idea will be accepted we can turn current functions in the
random module into wrappers around generators from the distrib module.
E.g.:
def triangular(self, *args, **kwargs):
return next(triangular(*args, random=self,
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +r.david.murray
stage: - patch review
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18901
___
Serhiy Storchaka added the comment:
Due to the fact that such bug was not fixed even in 3.2 where it was more ease
I doubt that it worth to fix in 2.7.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18105
Terry J. Reedy added the comment:
This warning still appears on buildbots running with warnings turned on.
--
nosy: +terry.reedy
versions: +Python 3.4 -Python 3.1, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9709
Raymond Hettinger added the comment:
Serhiy, please resist the urge to engage in API churn. We've had zero user
requests to abandon the current API. I'm not a fan of the current positional
arguments, but changing it isn't really worth it (creating disruption with
nearly zero benefit, no new
Terry J. Reedy added the comment:
I just ran into this issue (same I believe) running the test suite with
installed, versus repository, python on win7, but get a different traceback.
Traceback (most recent call last):
...\lib\distutils\tests\test_build_ext.py
line 156, in
Roundup Robot added the comment:
New changeset 869cbcabb934 by Benjamin Peterson in branch '2.7':
document that various functions that parse from source will interpret things as
latin-1 (closes #18870)
http://hg.python.org/cpython/rev/869cbcabb934
--
nosy: +python-dev
resolution: -
Madison May added the comment:
What do R, SciPy, Fortran, Matlab or other statistical packages already do?
Numpy avoids recalculating the cumulative distribution by introducing a 'size'
argument to numpy.random.choice(). The cumulative distribution is calculated
once, then 'size' random
Bob Ippolito added the comment:
I tend to agree with Raymond here. While I also don't like the positional
arguments, I don't think the benefit of API churn them is high enough to remove
them. Other than this issue, I have not seen any requests for this change.
I have seen problems because
Madison May added the comment:
...we can turn current functions in the random module into wrappers
around generators from the distrib module.
Makes sense.
In light of Raymond's comments on code bloat in issue18844, perhaps this module
could be added to PyPi to see whether or not there's
Jakub Stasiak added the comment:
I'd change cumulativepercall and totalpercall to cumpercall and percall (and/or
intpercall) but that's a detail, this patch works for me.
Data structure affected by this patch is produced and consumed internally by
the sort method so it looks like nothing
Changes by Terry J. Reedy tjre...@udel.edu:
--
Removed message: http://bugs.python.org/msg196681
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18730
___
Eli Bendersky added the comment:
What Serhiy said.
--
resolution: - wont fix
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18105
___
Eli Bendersky added the comment:
lgtm
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18745
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
Can this be transformed into a new issue that succinctly summarizes what the
new requested feature is, and why it's useful?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18850
Eli Bendersky added the comment:
Do we have enough evidence to open a new bug vs. help() ?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18693
___
New submission from Eli Bendersky:
As issue #17741 shows in detail, there's a number of implementation problems in
the current ET that make a fully non-blocking parser more difficult to
implement than it should be.
The main problem is that XMLParser._setevents relies on internal
Eli Bendersky added the comment:
I'm closing this issue as fixed because the feature was implemented. As
discussed, opened a new issue (#18902) to discuss re-designing some parts of
the current code that would allow a nicer implementation of this feature.
Anyone interested in the subject -
Ethan Furman added the comment:
I've done some more investigation today but I can't tell if the issue is solely
in help or if it's some wierd
interaction between help and _EnumMeta.
--
___
Python tracker rep...@bugs.python.org
Westley Martínez added the comment:
Honestly, I think adding weights to any of the random functions are trivial
enough to implement as is. Just because something becomes a common task does
not mean it ought to be added to the stdlib.
Anyway, from a user point of view, I think it'd be useful
Eli Bendersky added the comment:
On Sun, Sep 1, 2013 at 5:29 PM, Ethan Furman rep...@bugs.python.org wrote:
Ethan Furman added the comment:
I've done some more investigation today but I can't tell if the issue is
solely in help or if it's some wierd
interaction between help and _EnumMeta.
Ethan Furman added the comment:
Nope, not yet. And even a simple dummy metaclass with a custom __dir__ worked
fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18693
___
Ethan Furman added the comment:
What I know for sure:
1) if something is added to dir() that does not live in __dict__, help()
breaks.
2) if a certain something or some things are removed from dir(), help()
breaks. I'm not yet certain which somethings
apply here.
--
New submission from Westley Martínez:
Hi, I'm not sure if this would be considered a bug or a feature request, but
IDLE's file-completion is case-sensitive in Windows (e.g. if I have a file
named ABBA and I type in 'abb' + tab, ABBA won't pop up. Since Windows files
systems are not
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:
--
nosy: +jkloth
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18902
___
___
Andrew Svetlov added the comment:
Ok. Let's close issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11798
___
Madison May added the comment:
Just ran across a great blog post on the topic of weighted random generation
from Eli Bendersky for anyone interested:
http://eli.thegreenplace.net/2010/01/22/weighted-random-generation-in-python/
--
nosy: +eli.bendersky
New submission from Vajrasky Kok:
In Lib/test/test_os.py in class FDInheritanceTests, we have an unnecessary
test, which is test_set_inheritable. What test_set_inheritable tests is already
being covered by test_get_inheritable.
Also, I think test_get_inheritable should be renamed to
Vajrasky Kok added the comment:
To test the infinity, negative infinity, and NaN (Not a Number), you named the
test as test_weird_floats. So implicitely, you admitted that they are floats
but just weird. Yet, you named the sample data test class as NotNum.
Implicitely, you were saying they
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18902
___
___
Python-bugs-list mailing list
Ethan Furman added the comment:
From my layman's perspective they are all not numbers -- you can't add 5 to
any of them and get a number back that is 5
more than you started with.
By I have no problem with your proposed name -- I'll make the change.
--
paul j3 added the comment:
A possible further tweak is, in take_action(), test for conflicts before adding
the action to 'seen_non_default_actions'
if argument_values is not action.default:
#seen_non_default_actions.add(action)
for conflict_action in
78 matches
Mail list logo