[issue18904] Unnecessary test in file descriptor inheritance test

2013-09-01 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



[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2013-09-01 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Your analysis looks correct to me, that is "raise e" is supposed to raise the 
exception caught by the first try block.

--

___
Python tracker 

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



[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2013-09-01 Thread paul j3

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 action_conflicts.get(action, []):
if conflict_action in seen_non_default_actions:
   ...
seen_non_default_actions.add(action)

This does not cause problems with any existing tests, but makes it possible to 
add an action twice to a group.  Why do that?  To prevent an action from 
occurring more than once.  For some actions like 'count' and 'append' repeated 
use is expected, but for others it isn't expected, and may sometimes be a 
nuisance (the last occurrence is the one that sticks). 

An example use would be:

parser = argparse.ArgumentParser(prog="PROG",
formatter_class=argparse.MultiGroupHelpFormatter)
action = parser.add_argument('--arg', help='use this argument only once')
group1 = parser.add_mutually_exclusive_group(action, action)
args  = parser.parse_args()

calling this with:

python3 test_once.py --arg test --arg next

would produce this error message:

usage: PROG [-h] [--arg ARG | --arg ARG]
PROG: error: argument --arg: not allowed with argument --arg

The usage and error message aren't as clear as they might be if this feature 
was added 'from scratch'.  But for a minor change like this, that may be an 
acceptable price.

--

___
Python tracker 

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



[issue18745] Test enum in test_json is ignorant of infinity value

2013-09-01 Thread Ethan Furman

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.

--

___
Python tracker 

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



[issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser

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

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue18745] Test enum in test_json is ignorant of infinity value

2013-09-01 Thread Vajrasky Kok

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 are not numbers. This is contradictory.

In my personal opinion, I disagree slightly with the naming because infinity 
and negative infinity are numbers. Why not name it WeirdNum (or SpecialNum) to 
make it more mathematically correct and consistent with the test naming?

--

___
Python tracker 

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



[issue18904] Unnecessary test in file descriptor inheritance test

2013-09-01 Thread Vajrasky Kok

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

Please, see the patch to see what I mean.

--
components: Tests
files: remove_unnecessary_test_fd_inheritable.patch
keywords: patch
messages: 196768
nosy: haypo, vajrasky
priority: normal
severity: normal
status: open
title: Unnecessary test in file descriptor inheritance test
versions: Python 3.4
Added file: 
http://bugs.python.org/file31553/remove_unnecessary_test_fd_inheritable.patch

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Madison May

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

___
Python tracker 

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



[issue11798] Test cases not garbage collected after run

2013-09-01 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Ok. Let's close issue.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser

2013-09-01 Thread Jeremy Kloth

Changes by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-01 Thread Westley Martínez

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 case-sensitive, it might make sense for the file-completion to 
disregard case as well.  I'm not sure if this behaviour is preferred, however, 
so I'll leave that up for discussion.

I tested the behaviour on 3.3 and 3.4; I assume it's the same for other 
versions as well.

--
components: IDLE, Windows
messages: 196765
nosy: anikom15
priority: normal
severity: normal
status: open
title: IDLE file-completion is case-sensitive in Windows
type: enhancement
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue18693] help() not helpful with enum

2013-09-01 Thread Ethan Furman

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.

--

___
Python tracker 

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



[issue18693] help() not helpful with enum

2013-09-01 Thread Ethan Furman

Ethan Furman added the comment:

Nope, not yet.  And even a simple dummy metaclass with a custom __dir__ worked 
fine.

--

___
Python tracker 

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



[issue18693] help() not helpful with enum

2013-09-01 Thread Eli Bendersky

Eli Bendersky added the comment:

On Sun, Sep 1, 2013 at 5:29 PM, Ethan Furman  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.
>

So you can't reproduce it with other classes that have a custom __dir__ ?

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Westley Martínez

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 to be able to send a 
sequence to a function that'll weight the sequence for use by random.

--

___
Python tracker 

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



[issue18693] help() not helpful with enum

2013-09-01 Thread Ethan Furman

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 

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



[issue17741] event-driven XML parser

2013-09-01 Thread Eli Bendersky

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 - feel free to subscribe yourself there.

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



[issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser

2013-09-01 Thread Eli Bendersky

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 implementation 
details of the default TreeBuilder to do some of its tasks.

This has to be decoupled from implementation details completely. An XMLParser 
already has a non-blocking input side (feed/close) and a callback "push" API to 
the target. The API has to be fully expanded to include start-ns/end-ns and any 
other events that are required to allow custom tree builders as targets. This 
would make it possible to layer XMLPullParser on top of the stock XMLParser 
coupled with a special target that collects "events" from the callback calls.

--
components: Library (Lib)
messages: 196758
nosy: eli.bendersky
priority: normal
severity: normal
stage: needs patch
status: open
title: Make ET event handling more modular to allow custom targets for the 
non-blocking parser
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue18693] help() not helpful with enum

2013-09-01 Thread Eli Bendersky

Eli Bendersky added the comment:

Do we have enough evidence to open a new bug vs. help() ?

--

___
Python tracker 

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



[issue18850] xml.etree.ElementTree accepts control chars.

2013-09-01 Thread Eli Bendersky

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 

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



[issue18745] Test enum in test_json is ignorant of infinity value

2013-09-01 Thread Eli Bendersky

Eli Bendersky added the comment:

lgtm

--

___
Python tracker 

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



[issue18105] ElementTree writes invalid files when UTF-16 encoding is specified

2013-09-01 Thread Eli Bendersky

Eli Bendersky added the comment:

What Serhiy said.

--
resolution:  -> wont fix
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period

2013-09-01 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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

___
Python tracker 

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



[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-09-01 Thread Jakub Stasiak

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 from the point of view of 
client code.

--
nosy: +jstasiak

___
Python tracker 

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



[issue18900] Add the random.distrib module

2013-09-01 Thread Madison May

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 interest in this kind of 
functionality?

--

___
Python tracker 

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



[issue18726] json functions have too many positional parameters

2013-09-01 Thread Bob Ippolito

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 there are positional arguments, but only when 
people are subclassing these classes. Allowing for subclasses was never a good 
idea, and is actively discouraged in current simplejson documentation. The 
dumps default/loads object_hook functionality is sufficient and doesn't have 
the fragile base class problem. This functionality is is fully compatible with 
all versions of the library that are in use, back to v1.8 in March 2008, 
including Python 2.6's json library which IIRC is based on v1.9.

--
assignee: bob.ippolito -> rhettinger

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Madison May

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 choices are generated and returned.

Their overall implementation is quite similar to the method suggested in the 
python docs.  

>>> choices, weights = zip(*weighted_choices)
>>> cumdist = list(itertools.accumulate(weights))
>>> x = random.random() * cumdist[-1]
>>> choices[bisect.bisect(cumdist, x)]

The addition of a 'size' argument to random.choice() has already been discussed 
(and rejected) in Issue18414, but this was on the grounds that the standard 
idiom for generating a list of random choices ([random.choice(seq) for i in 
range(k)]) is obvious and efficient.

--

___
Python tracker 

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



[issue18870] eval() uses latin-1 to decode str

2013-09-01 Thread Roundup Robot

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:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12420] distutils tests fail if PATH is not defined

2013-09-01 Thread Terry J. Reedy

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 test_optional_extension # or
   line 316, in test_get_outputs
cmd.run)  # should raise an error
 ...\lib\unittest\case.py", line 570, in assertRaises
return context.handle('assertRaises', callableObj, args, kwargs)
 ...\lib\unittest\case.py", line 135, in handle
callable_obj(*args, **kwargs)
 ...\lib\distutils\command\build_ext.py", line 354, in run
self.build_extensions()
 ...\lib\distutils\command\build_ext.py", line 463, in build_extensions
self.build_extension(ext)
 ...\lib\distutils\command\build_ext.py", line 518, in build_extension
depends=ext.depends)
 ...\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
 ...\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
 ...\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys(
ValueError: ['path']

I agree with  Éric that the test should be skipped if it cannot go on.
Wrapping
self.assertRaises((UnknownFileError, CompileError),
  cmd.run)  # should raise an error
and
cmd.run()
with
try:...except ValueError:  would fix this issue on Windows. So would 
skipping if sys.platform == 'win32' and '+' not in sys.version (repository 
builds have a '+' and the test currently work for them).  However, neither 
solution would work on *nix, which seems to have a completely different failure 
path to the same end result.

Are distutils and test_distutils maintained at all? msvc9compiler.py (2005) 
says it also works with vc10 (2008, used for 2.7) but makes no mention of vc11 
(2010, used for 3.3,3.4).

Nick, what do you think we should do with this? I think that when python is 
installed and working as well as we expect, the test suite should pass, so any 
failures indicate a problem with the particular installation. I think this is 
especially important on Windows, with newbies who do not know distutils from, 
say, itertools.

--
nosy: +ncoghlan, terry.reedy
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue18726] json functions have too many positional parameters

2013-09-01 Thread Raymond Hettinger

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 functionality and possibly slowing down the calls 
in module where people seem to really care about speed).

Bob, would you please weigh-in on this one.  You have the best appreciation for 
the needs of the established user base.

--
assignee: rhettinger -> bob.ippolito
priority: normal -> low

___
Python tracker 

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



[issue9709] test_distutils warning: initfunc exported twice on Windows

2013-09-01 Thread Terry J. Reedy

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 

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



[issue18105] ElementTree writes invalid files when UTF-16 encoding is specified

2013-09-01 Thread Serhiy Storchaka

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 

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



[issue18901] sunau.getparams should return a namedtuple

2013-09-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +r.david.murray
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue18900] Add the random.distrib module

2013-09-01 Thread Serhiy Storchaka

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, **kwargs))

--

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread R. David Murray

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 

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



[issue11798] Test cases not garbage collected after run

2013-09-01 Thread Michael Foord

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). Frameworks that want to disable this behaviour should 
use a TestSuite that overrides _removeAtIndex.

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Raymond Hettinger

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 for user requests and use cases to guide the 
design and error on the side of less, rather than more.  This helps avoid 
bloat.   Also, it would be a good idea to start something like this as a 
third-party to module to let it iterate and mature before deciding whether 
there was sufficient user uptake to warrant inclusion in the standard library.

For the current request, we should also do some research on existing solutions 
in other languages.  This isn't new territory.  What do R, SciPy, Fortran, 
Matlab or other statistical packages already do?  Their experiences can be used 
to inform our design.  Alan Kay's big criticism of Python developers is that 
they have a strong propensity invent from scratch rather than taking advantage 
of the mountain of work done by the developers who came before them.

--

___
Python tracker 

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



[issue13107] Text width in optparse.py can become negative

2013-09-01 Thread Elazar Gershuni

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')
>>> os.environ['COLUMNS'] = '0'
>>> print(p.format_help())
usage: PROG
   
   [-h]

optional arguments:
  -h, --help  

>>>

--
keywords: +patch
nosy: +elazar
Added file: http://bugs.python.org/file31552/fixargparse.patch

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Tim Peters

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.

--

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Tim Peters

Changes by Tim Peters :


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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Roundup Robot

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 default.
http://hg.python.org/cpython/rev/25211a8b

--
nosy: +python-dev

___
Python tracker 

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



[issue18900] Add the random.distrib module

2013-09-01 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +tim.peters

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Terry J. Reedy

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 with them.

Side note: just above the quoted context in .hgeol is
Lib/email/test/data/msg_26.txt = BIN
which does not exist now.
I suspect it should be removed as the obsolete old version of
Lib/test/test_email/data/msg_26.txt = BIN
which is in the quoted context.

--

___
Python tracker 

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



[issue18105] ElementTree writes invalid files when UTF-16 encoding is specified

2013-09-01 Thread Stefan Behnel

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 performance regression, though (and ET's serialiser is 
known to be rather slow anyway).

Not sure if the current behaviour should be changed in 2.x.

In any case, it's a duplicate of the other ticket, which was *not* fixed for 
2.7.

--

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Tim Peters

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.

--

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Serhiy Storchaka

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 test_sax start failing? I have no idea.

I guess it becomes after my commit in issue1470548 a half year ago.

All proposed fixes are good enough. Feel free to commit what you prefers.

--

___
Python tracker 

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



[issue16531] Allow IPNetwork to take a tuple

2013-09-01 Thread Jon Foster

Changes by Jon Foster :


--
nosy: +jongfoster

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Marking the files as "binary" (really "don't touch") in .hgeol sounds 
reasonable to me.

--

___
Python tracker 

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



[issue18900] Add the random.distrib module

2013-09-01 Thread Madison May

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 module would be a bit simpler.

--
nosy: +madison.may

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Madison May

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 sign that lru_cache is a bad choice.

--

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Terry J. Reedy

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 on desktop windows; it sometimes quit before 
getting to 'sax'.

Email and its tests (which had the same eol issue) were heavily revised in 3.3; 
I do not know if the test that failed in 3.3 failed earlier or not. Another 
failing email test was added in 3.4.

David, Antoine: Tim questions/challenges the solution pushed in #12037.

--
nosy: +pitrou, r.david.murray

___
Python tracker 

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



[issue18105] ElementTree writes invalid files when UTF-16 encoding is specified

2013-09-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +scoder

___
Python tracker 

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



[issue18901] sunau.getparams should return a namedtuple

2013-09-01 Thread Claudiu.Popa

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: 196729
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: sunau.getparams should return a namedtuple
versions: Python 3.4
Added file: http://bugs.python.org/file31551/sunau.patch

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Serhiy Storchaka

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 
returns function are only ways how efficiently implement this feature. 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.

--

___
Python tracker 

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



[issue18900] Add the random.distrib module

2013-09-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file31550/distrib_bench.py

___
Python tracker 

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



[issue18900] Add the random.distrib module

2013-09-01 Thread Serhiy Storchaka

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 distributed values. It contains generators 
which generates values with same distributions as functions with same name in 
the random module.

Benchmark results:

random distrib
random() 0.061   0.055  1.12
randrange(0, 100, 5) 1.494   0.620  2.41
randint(1, 100)  1.283   0.551  2.33
uniform(-10.0, 10.0) 0.332   0.121  2.73
triangular(0.0, 10.0, 6.0)   0.661   0.317  2.09
gauss(5.0, 2.0)  0.707   0.280  2.53
normalvariate(5.0, 2.0)  0.867   0.553  1.57
lognormvariate(5.0, 2.0) 1.078   0.640  1.68
expovariate(0.1,)0.508   0.293  1.73
vonmisesvariate(1.0, 1.0)1.201   0.671  1.79
gammavariate(0.35, 1.45) 1.117   0.508  2.20
betavariate(2.71828, 3.14159)2.868   1.776  1.61
paretovariate(5.0,)  0.493   0.238  2.07
weibullvariate(1.0, 3.0) 0.670   0.402  1.67
choice([0, 1, 2, 3, 4, 5, 6...   0.887   0.594  1.49

Distrib functions are 1.5-2.8 times faster than random functions. Weighted 
choice() function (see issue18844) can be even dozens times faster (depends on 
size of the input).

In additional some random generators (i.e. gauss()) looks simpler when 
implemented as generators. distrib.gauss() is twice faster than 
distrib.normalvariate() (both generates numbers with same distribution) and I 
think some other generators can be implemented more efficient in generator 
style.

--
components: Library (Lib)
files: distrib.py
messages: 196727
nosy: mark.dickinson, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Add the random.distrib module
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31549/distrib.py

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Tim Peters

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, but it works ;-)

--
Added file: http://bugs.python.org/file31548/eol-patch.txt

___
Python tracker 

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



[issue18553] os.isatty() is not Unix only

2013-09-01 Thread Antoine Pitrou

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

___
Python tracker 

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



[issue18899] make pystone.py Py3 compatible in benchmark suite

2013-09-01 Thread Antoine Pitrou

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 

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



[issue18899] make pystone.py Py3 compatible in benchmark suite

2013-09-01 Thread Stefan Behnel

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" % \
-  (__version__, loops, benchtime)
-print "This machine benchmarks at %g pystones/second" % stones
+print("Pystone(%s) time for %d passes = %g" %
+  (__version__, loops, benchtime))
+print("This machine benchmarks at %g pystones/second" % stones)
 
 
 def pystones(loops=LOOPS):
@@ -72,7 +72,7 @@
 Char1Glob = '\0'
 Char2Glob = '\0'
 Array1Glob = [0]*51
-Array2Glob = map(lambda x: x[:], [Array1Glob]*51)
+Array2Glob = list(map(lambda x: x[:], [Array1Glob]*51))
 PtrGlb = None
 PtrGlbNext = None

--
components: Benchmarks
messages: 196723
nosy: scoder
priority: normal
severity: normal
status: open
title: make pystone.py Py3 compatible in benchmark suite
type: behavior

___
Python tracker 

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



[issue18889] test_sax: multiple failures on Windows desktop

2013-09-01 Thread Tim Peters

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 \r\n line endings have _always_ been there, and test_sax 
works fine under (e.g.) Python 2.7.5 on Windows.

So it's not that the files have changed, it must be that Python is behaving 
differently.

Unfortunately, I don't know anything about what test_sax is trying to do.  I do 
see that under 2.7, test_sax does

xml_test_out = open(TEST_XMLFILE_OUT).read()

but 3.3 does

with open(TEST_XMLFILE_OUT, 'rb') as f:
xml_test_out = f.read()

That is, 2.7 opens the file for reading in text mode, but 3.3 opens it in 
binary mode.  That makes a big difference for text files under Windows.

It's also disturbing that the Windows buildbots don't fail.  There is no change 
in "environment" that should affect the bytes seen when a file is read - and 
the buildbots "should be" seeing, byte for byte, the same files developers and 
users see.

--
nosy: +tim.peters

___
Python tracker 

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



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2013-09-01 Thread Meador Inge

Changes by Meador Inge :


--
assignee:  -> meador.inge
stage: patch review -> commit review

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Madison May

Changes by Madison May :


Added file: http://bugs.python.org/file31547/weighted_choice_v2.diff

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Madison May

Changes by Madison May :


Removed file: http://bugs.python.org/file31546/weighted_choice_v2.diff

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Madison May

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)

That's pretty much how I broke things up when I decided to test out 
optimization with lru_cache.  That version of the patch is now attached.

[Serhiy Storchaka]
> I like the idea about adding a family of distribution generators. 
> They should check input parameters and make a precomputation and then > 
> generate infinite sequence of specially distributed random numbers.

Would these distribution generators be implemented internally (see attached 
patch) or publicly exposed?

--
Added file: http://bugs.python.org/file31546/weighted_choice_v2.diff

___
Python tracker 

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



[issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2

2013-09-01 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue18885] handle EINTR in the stdlib

2013-09-01 Thread Armin Rigo

Changes by Armin Rigo :


--
nosy: +arigo

___
Python tracker 

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-01 Thread STINNER Victor

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
- Add get_object_trace() function which returns a namedtuple
- get_process_memory() returns a namedtuple
- DisplayGarbage class has been removed: the PEP 442 has been implemented, it 
is no more interesting to trace uncollectable objects because they became very 
rare. If you still want to do that, get_object_trace() is available


TODO:

- TRACE_RAW_MALLOC define is still disabled because it introduces a deadlock 
when PyMem_RawMalloc() is called indirectly by Py_NewInterpreter()
- minor pending FIXME in the code
- review the high level API: add an helper to build a diff between two 
snapshots and drop colors (not portable)?


test_capi deadlock with TRACE_RAW_MALLOC:

test_subinterps (test.test_capi.SubinterpreterTest) ... ^C
Program received signal SIGINT, Interrupt.
0xb7fdd424 in __kernel_vsyscall ()
(gdb) where
...
#2  0x081abc1c in PyCOND_TIMEDWAIT (cond=0x83470e0, mut=0x8347110, us=5000) 
at Python/condvar.h:103
#3  0x081ac55c in take_gil (tstate=0x8349c78) at Python/ceval_gil.h:224
#4  0x081ad0a9 in PyEval_RestoreThread (tstate=0x8349c78) at 
Python/ceval.c:443
#5  0x081f08e3 in PyGILState_Ensure () at Python/pystate.c:786
#6  0x0808df1b in trace_get_filename (trace=0x84c26b8, gil_held=0) at 
./Modules/_tracemalloc.c:555
#7  0x0808e314 in trace_log_alloc (ptr=0x84c9f18, size=52, gil_held=0) at 
./Modules/_tracemalloc.c:698
#8  0x0808e449 in trace_malloc (ctx=0x8342890, size=52, gil_held=0) at 
./Modules/_tracemalloc.c:744
#9  0x0808e5b8 in trace_raw_malloc (ctx=0x8342890, size=52) at 
./Modules/_tracemalloc.c:811
#10 0x0805d32a in PyMem_RawMalloc (size=52) at Objects/obmalloc.c:256
#11 0x081eeb79 in PyInterpreterState_New () at Python/pystate.c:63
#12 0x08060c8b in Py_NewInterpreter () at Python/pythonrun.c:700
#13 0xb74d4b90 in run_in_subinterp ()
#14 0x080e9e7a in PyCFunction_Call ()
...

--
Added file: http://bugs.python.org/file31545/tracemalloc-2.patch

___
Python tracker 

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



[issue18750] '' % [1] doesn't fail

2013-09-01 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Ok. Close as won't fix.
Please reopen if needed.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue18553] os.isatty() is not Unix only

2013-09-01 Thread anatoly techtonik

anatoly techtonik added the comment:

None that I know of.

--

___
Python tracker 

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



[issue18726] json functions have too many positional parameters

2013-09-01 Thread Serhiy Storchaka

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 "use_decimal" simplejson, and "sort_keys" in 
Python 2.

The 2nd parameter of load() is "encoding" in Python 2 and simplejson, and "cls" 
in Python 3.

Due to the fact that most arguments are boolean or accepts None some shifting 
of positional arguments can left unnoticed long time and causes subtle bugs 
when upgrading from Python 2 to Python 3 or switching between stdlib json 
module and simplejson.

Proposed change doesn't break any code at first stage, it just adds deprecation 
warning about using dangerous non-portable feature. We can defer forbidding 
positional parameters until Python 2 will gone and simplejson will be changed 
to keyword-only parameters too.

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-01 Thread Serhiy Storchaka

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 parameters and make a precomputation and then generate infinite 
sequence of specially distributed random numbers.

--

___
Python tracker 

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



[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-09-01 Thread Roundup Robot

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 

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



[issue12304] expose signalfd(2) in the signal module

2013-09-01 Thread STINNER Victor

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 

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



[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2013-09-01 Thread Charles-François Natali

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 some benchmarks to measure the benefits.

I can certainly see the benefit of cacheline-aligned data structures in 
multithreaded code (to avoid false sharing/cacheline bouncing): I'm really 
curious to see how much this would benefit in a single-threaded workload.

--
nosy: +neologix

___
Python tracker 

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



[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2013-09-01 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ronaldoussoren

___
Python tracker 

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