[issue18411] signal.SIGINT in windows cause process exit directly.

2013-07-08 Thread guo tie

New submission from guo tie:

I wrote those test python code as following:

import signal
import time
import os

def handler(signum, frame):
print "do whatever, like call thread.interrupt_main()"
return

signal.signal(signal.SIGINT, handler)

while 1:
try:
time.sleep(10)
except:
os.kill(int(os.getpid()), signal.SIGINT)
pass


when i excute this test code on windows, the process print "do whatever, like 
call thread.interrupt_main()", then exit;
on linux, it works correctly.

why on windows it not work?

--
components: Windows
messages: 192722
nosy: guo.tie
priority: normal
severity: normal
status: open
title: signal.SIGINT in windows cause process exit directly.
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue14455] plistlib unable to read json and binary plist files

2013-07-08 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Actually attach the latest version of the patch.

--
Added file: http://bugs.python.org/file30874/issue-14455-v8.txt

___
Python tracker 

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-08 Thread Indra Talip

Indra Talip added the comment:

patch initializes the 'timeout' attribute on urllib2.Request.__init__()

--
keywords: +patch
nosy: +italip
versions: +Python 3.4 -Python 2.6
Added file: http://bugs.python.org/file30873/issue-4079-1.patch

___
Python tracker 

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



[issue9849] Argparse needs better error handling for nargs

2013-07-08 Thread paul j3

paul j3 added the comment:

I included this patch (with minor changes) in a patch that I just posted to 
http://bugs.python.org/issue16468.  That issue deals with the argument choices 
option, which can be tested along with nargs and metavars.

--

___
Python tracker 

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



[issue16418] argparse with many choices can generate absurdly long usage message

2013-07-08 Thread paul j3

paul j3 added the comment:

In the patch I just posted to http://bugs.python.org/issue16468 I address this 
long list issue in several ways:

In the Usage line, the metavar gives the user an alternative

In the expanded help line the user can just omit the '%(choices)s' 

In _check_value(), I implemented a numpy like summarize format for choice lists 
longer than 15   '{1,2,3,...,18,19}'.

--

___
Python tracker 

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



[issue9625] argparse: Problem with defaults for variable nargs when using choices

2013-07-08 Thread paul j3

paul j3 added the comment:

The patch I just posted to http://bugs.python.org/issue16468 uses this fix.

--

___
Python tracker 

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



[issue18349] argparse usage should preserve () in metavars such as range(20)

2013-07-08 Thread paul j3

paul j3 added the comment:

I just posted a patch to http://bugs.python.org/issue16468 that uses (and 
tests) this fix.

--

___
Python tracker 

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



[issue16977] argparse: mismatch between choices parsing and usage/error message

2013-07-08 Thread paul j3

paul j3 added the comment:

I just posted a patch to http://bugs.python.org/issue16468 that deals with this 
'bc' in 'abc' issue.

--

___
Python tracker 

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



[issue16468] argparse only supports iterable choices

2013-07-08 Thread paul j3

paul j3 added the comment:

This patch generally deals with the choices option, and specifically the
problems with formatting long lists, or objects that have __contains__
but not __iter__.  But it also incorporates issues 9849 (better add_argument 
testing) and 9625 (choices with *).  It may be too broad for this issue, but 
the changes all relate to 'choices'.

As noted by other posters, there are 3 places where choices is formatted with a 
comprehension.  I have refactored these into one _format_choices function.

_format_choices() is a utility function that formats the choices by
iteration, and failing that using repr().  It raises an error if choices does 
not even have a __contains__.  It also has a summarize option 
({1,2,3,...,19,20}). I did not make this an action method because it only uses 
the choices object.

_metavar_formatter() - calls _format_choices for Usage with the default compact 
form.  Its use of metavar gives the user full control of the choices display.

_expand_help() - calls _format_choices with the looser format.  This form is 
used only if the user puts '%(choices)s' in the help string.  This is not 
documented, and only appears a few times in the test file.  Again the user has 
ultimate control over the contents.

_check_value() - calls _format_choices with a 'summarize=15' option.  Normally 
this error message appears with the usage message.  So it does not need to use 
the metavar.  

The MetavarTypeHelpFormatter subclass is an example of how formats can be 
customized without changing normal behavior.  Such a subclass could even be 
used to set custom parameters, or modify any of the above methods.


other changes:

formatter _format_actions_usage() - I tweaked the regex that trims excess 
notation from mutually exclusive groups.  This removed '()' from other parts of 
the usage line, for example a metavar like 'range(20)'.  Issue 18349.

formatter _format_args() - I included issue 9849 changes which improve
testing for nargs, and array metavars.  This calls the _metavar_formatter.  
Thus any errors in formatting choices pass back through this.

Issue 9849 also changes container add_argument() to call the parser
_check_argument().  This in turn calls _format_args() to test action
options like nargs, metavars, and now choices.  If there are problems
it raises an ArgumentError.

parser _get_values() - issue 9625 changes this to correctly handle choices when 
nargs='*'.

parser _check_value() - I rewrote this to give better errors if there
are problems with __contains__.  If choices is a string (e.g. 'abc') it
converts it to a list, so __contains__ is more consistent.  For example,
'bc' in 'abc' is True, but 'bc' in ['a','b','c'] is False (issue 16977)

--
test_argparse

change examples with string choices to lists

class TestAddArgumentMetavar
change EXPECTED_MESSAGE and EXPECTED_ERROR to reflect issue 9849 changes

class TestMetavarWithParen
tests 'range(n)' choices
makes sure () in the metavar are preserved
tests that metavar is used in Usage as given
tests summarized list of choices in the error message
tests the %(choices)s help line case

class TestNonIterableChoices
tests a choices container that has __contains__ but not __iter__
tests that repr() is used as needed

class TestBareChoices
tests a class without even __contains__
tests for an add_argument error

class TestStringChoices
tests the expansion of 'abc' to ['a','b','c']

--
Added file: http://bugs.python.org/file30872/choice2.patch

___
Python tracker 

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



[issue18410] IDLE Improvements: Unit test for SearchDialog.py

2013-07-08 Thread Phil Webster

New submission from Phil Webster:

Continuing the IDLE unittest framework from #15392. Depends on #18365.

--
components: IDLE
messages: 192713
nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Improvements: Unit test for SearchDialog.py
type: enhancement
versions: Python 2.7, 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



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-08 Thread Katie Miller

Katie Miller added the comment:

Attached is a new patch, which includes Nick's logic from msg140493, some of 
the code readability changes Jim suggested in msg151989 (but not the 
behavioural changes), and associated tests. On Nick's advice, I have also 
replaced the dunder equals calls with the standard comparators (==/!=), given 
not all classes will necessarily have both NE and EQ, and made the comparison 
the last action in each method, for consistency.

Test cases have been added to check a TypeError is raised, rather than True 
being returned, when GE/LE is called on two objects that are equal but have a 
comparator that returns NotImplemented.

--
Added file: 
http://bugs.python.org/file30871/10042_new_total_ordering_with_tests.patch

___
Python tracker 

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



[issue18409] IDLE Improvements: Unit test for AutoComplete.py

2013-07-08 Thread Phil Webster

New submission from Phil Webster:

I've started writing this test which depends on #18365.

--
components: IDLE
messages: 192711
nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Improvements: Unit test for AutoComplete.py
type: enhancement
versions: Python 2.7, 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



[issue17840] base64_codec uses assert for runtime validity checks

2013-07-08 Thread Nick Coghlan

Nick Coghlan added the comment:

ValueError works for me.

--

___
Python tracker 

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



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-08 Thread Nick Coghlan

Nick Coghlan added the comment:

OK, I had misunderstood the way Jim's code works (it still coerces a "False" 
result for __eq__ into NotImplemented if the ordered comparison returns 
NotImplemented).

However, I spent some more time tinkering with it today (see
https://bitbucket.org/ncoghlan/misc/src/856bd105e5e43cb96ebaa2d250c3c801da571953/tinkering/comparisons.py?at=default
 ) which shows that my version (which ignores __eq__ entirely if the ordered 
comparison returns NotImplemented) is consistent with the current behaviour, 
while accepting a "True" return from __eq__ in that case (as Jim's version 
does) may result in some existing TypeError results becoming "True" comparison 
results instead.

Since this is such an incredibly niche edge case (the ordered comparison has to 
return NotImplemented while __eq__ returns True), I remaining consistent with 
the existing behaviour is the most important consideration. We'll add a test 
case to ensure this remains consistent, though.

The other code clarification changes look reasonable though - Katie plans to 
incorporate several of those.

--

___
Python tracker 

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



[issue4708] os.pipe should return inheritable descriptors (Windows)

2013-07-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +sbt

___
Python tracker 

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



[issue15403] Refactor package creation support code into a common location

2013-07-08 Thread Indra Talip

Indra Talip added the comment:

updated patch to apply on top of patch from issue15494

--
nosy: +italip
Added file: http://bugs.python.org/file30870/issue-15403-3.patch

___
Python tracker 

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



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-08 Thread Nick Coghlan

Nick Coghlan added the comment:

I'm actually not sure which of us is correct - Katie and I will be looking into 
it further today to compare the existing implementation, my proposal and yours 
to see if there's a clear winner in terms of consistent.

It may be that we end up choosing the version that pushes towards more correct 
behaviour, since types incorrectly returning True or False from comparisons 
(instead of NotImplemented) is actually a pretty common bug preventing the 
creation of unrelated types that interoperate cleanly with an existing type.

--

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread STINNER Victor

STINNER Victor added the comment:

misc_fixes.patch: Misc bugfixes related to MemoryError, this patch should be 
read carefully. The changes in unicodeobject.c may be written differently. I 
wrote them to fix a failing assertion ("assert(data != NULL);") in 
_PyUnicode_CheckConsistency(), called when the creation of a new string failed.

--
Added file: http://bugs.python.org/file30869/misc_fixes.patch

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread STINNER Victor

STINNER Victor added the comment:

type_slot_tp_str.patch: Fix for the __str__ slot of types (slot_tp_str() in 
typeobject.c).

--
Added file: http://bugs.python.org/file30868/type_slot_tp_str.patch

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread STINNER Victor

STINNER Victor added the comment:

call_exc_trace.patch: Fix for the call_exc_trace() function when the traceback 
is not set.

--
Added file: http://bugs.python.org/file30867/call_exc_trace.patch

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread STINNER Victor

STINNER Victor added the comment:

use_failmalloc.patch: Patch to use pyfailmalloc on the Python test suite. 
Command to run test suite: "gdb -args ./python -m test -F".

--
keywords: +patch
Added file: http://bugs.python.org/file30866/use_failmalloc.patch

___
Python tracker 

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



[issue18364] Remove _not_found hack from importlib

2013-07-08 Thread Eric Snow

Eric Snow added the comment:

That'll work. :)

--

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ba79f6a86300 by Victor Stinner in branch 'default':
Issue #18408: Fix ConvParam() of the ctypes module to handle paramfunc failure
http://hg.python.org/cpython/rev/ba79f6a86300

New changeset 2ef2edfd1a4c by Victor Stinner in branch 'default':
Issue #18408: Fix zlib.compressobj() to handle PyThread_allocate_lock() failure
http://hg.python.org/cpython/rev/2ef2edfd1a4c

New changeset a45407fa4a5b by Victor Stinner in branch 'default':
Issue #18408: Fix PyCode_Optimize(): raise a MemoryError on memory allocation
http://hg.python.org/cpython/rev/a45407fa4a5b

New changeset ed0c9d77e179 by Victor Stinner in branch 'default':
Issue #18408: Fix usage of _PyBytes_Resize()
http://hg.python.org/cpython/rev/ed0c9d77e179

New changeset d605c6b8095c by Victor Stinner in branch 'default':
Issue #18408: _PyUnicodeWriter_Finish() now clears its buffer attribute in all
http://hg.python.org/cpython/rev/d605c6b8095c

New changeset 549d8d3297f2 by Victor Stinner in branch 'default':
Issue #18408: Fix _PyMem_DebugRealloc()
http://hg.python.org/cpython/rev/549d8d3297f2

New changeset c91e7f707562 by Victor Stinner in branch 'default':
Issue #18408: Fix select.select() to handle PyList_New() failure (MemoryError)
http://hg.python.org/cpython/rev/c91e7f707562

--

___
Python tracker 

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



[issue18365] Idle: mock Text class and test thereof

2013-07-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Great start! Some revisions:
* Create root directly (and just once); add root.destroy, which added several 
warnings.
* Create Text directly; test should not require Editors. This removed warnings. 
I suspect that EditorWindow.py does other things that are not properly undone. 
In any case, tests should only create needed objects.
* Worked on docstrings; polished _decode.
* Revised .insert to handle '' and 'az\n' and added corresponding tests.
* Consistently used 'end' instead of 'end' here and 'END' there.
* Added test_no_delete and edited mock delete to pass.
* Finished compare methods and added tests.
* Deleted non-tk .setDate/.getData, which only slightly abbreviate the real 
.get and .insert methods. I notice that Phil already changed the 
FormatParagraph test to not use them.

Here is the result. I think it is about ready to commit after sleeping on it 
and a final review.

--
stage: test needed -> commit review
Added file: http://bugs.python.org/file30865/mock_text2.diff

___
Python tracker 

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



[issue18100] socket.sendall() cannot send buffers of 2GB or more

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Does it affect Python 3, too?

--
nosy: +christian.heimes

___
Python tracker 

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



[issue18100] socket.sendall() cannot send buffers of 2GB or more

2013-07-08 Thread Anton Tyurin

Anton  Tyurin added the comment:

This issue is similar like http://bugs.python.org/issue9566.
It seems reasonable to apply a similar fix.

But why not use the types described in the signature functions in 
. In particular use for len size_t, and for n - ssize_t?

--

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-08 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Ugh, sorry for the bad quoting (silly GMail).

--

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-08 Thread Jeremy Kloth

Jeremy Kloth added the comment:

The change in grammar.c:addlabel() is correct.  The return value is an
index into the ll->ll_label array, thus an int.  The code could be
rewritten to avoid the pointer addition by saving the value of
ll->ll_nlabels before it is incremented and return that instead,

On Mon, Jul 8, 2013 at 1:23 PM, STINNER Victor  wrote:
>
> STINNER Victor added the comment:
>
> This issue duplicates the isuse #9566, but your patch is interesting. I 
> created other more specific issues like #18295 and #18294.
>
> -return lb - ll->ll_label;
> +return Py_SAFE_DOWNCAST(lb - ll->ll_label, Py_intptr_t, int);
>
> I don't think that such change is correct, IMO the right fix is to change the 
> result type to Py_intptr_t.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-08 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Yeah, sorry.  This made it in by mistake.  It was in the tree just to
eliminate warning noise.

On Mon, Jul 8, 2013 at 1:20 PM, STINNER Victor  wrote:
>
> STINNER Victor added the comment:
>
> -  /USECL:MS_OPTERON /GS- 
> %(AdditionalOptions)
> +  false
>
> Please don't change too much things in the same patch. The issue #15792 is a 
> better place for such change.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread STINNER Victor

STINNER Victor added the comment:

"I created a first toy based on the PEP 445 to test of Python handles 
MemoryError: in short, Python handles them badly..."

Ooops: to test *how* Python handles..

--

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 111c2a070f28 by Victor Stinner in branch 'default':
Issue #18408: PyObject_GC_NewVar() now raises SystemError exception if nitems
http://hg.python.org/cpython/rev/111c2a070f28

New changeset ba766323b53a by Victor Stinner in branch 'default':
Issue #18408: Fix PyDict_New() to handle correctly new_keys_object() failure
http://hg.python.org/cpython/rev/ba766323b53a

New changeset 68887e177dd4 by Victor Stinner in branch 'default':
Issue #18408: Fix list.pop() to handle list_resize() failure (MemoryError).
http://hg.python.org/cpython/rev/68887e177dd4

New changeset 697d722d97f9 by Victor Stinner in branch 'default':
Issue #18408: Fix marshal reader for Unicode strings: handle
http://hg.python.org/cpython/rev/697d722d97f9

New changeset de1473f4503b by Victor Stinner in branch 'default':
Issue #18408: Fix PyType_Ready() and type.__bases__ setter to handle
http://hg.python.org/cpython/rev/de1473f4503b

New changeset f4311870e329 by Victor Stinner in branch 'default':
Issue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure
http://hg.python.org/cpython/rev/f4311870e329

New changeset df8b40593a08 by Victor Stinner in branch 'default':
Issue #18408: Fix _PyUnicodeWriter_Finish(): clear writer->buffer,
http://hg.python.org/cpython/rev/df8b40593a08

--
nosy: +python-dev

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2013-07-08 Thread Steve Dower

Steve Dower added the comment:

I must have missed something when I merged files to create the diffs. In any 
case, you'll still require VC9 or VC10 to be able to build something compatible 
with a CPython release (though maybe that doesn't matter for Cython? I don't 
know).

When I get a chance I'll fix up the changes and then ping Python-Dev about 
getting a review.

--

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-08 Thread STINNER Victor

New submission from STINNER Victor:

I created a first toy based on the PEP 445 to test of Python handles 
MemoryError: in short, Python handles them badly...

Home page of the project:
https://pypi.python.org/pypi/pyfailmalloc

I will use this issue to track crashes found by this tool.

--
messages: 192691
nosy: haypo
priority: normal
severity: normal
status: open
title: Fixes crashes found by pyfailmalloc
type: crash
versions: Python 3.4

___
Python tracker 

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



[issue17911] Extracting tracebacks does too much work

2013-07-08 Thread Guido van Rossum

Guido van Rossum added the comment:

In terms of how much freedom you have about changing the internal, I'd check 
how long ago they were changed.  "Internal" APIs that have been stable for many 
versions tend to have illicit external uses -- but internal APIs that were 
introduced recently (e.g. in 3.2) are usually safe to use -- nobody is going to 
make too much of a stink if you break their code.

As for saving f_globals, if you're going to save an extra pointer anyways, why 
not just save the frame pointer?

--

___
Python tracker 

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



[issue14455] plistlib unable to read json and binary plist files

2013-07-08 Thread Ned Deily

Ned Deily added the comment:

Ronald, I think v8 of the patch is missing (and plistlib_generate_testdata.py 
was uploaded twice).

--

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-08 Thread STINNER Victor

STINNER Victor added the comment:

This issue duplicates the isuse #9566, but your patch is interesting. I created 
other more specific issues like #18295 and #18294.

-return lb - ll->ll_label;
+return Py_SAFE_DOWNCAST(lb - ll->ll_label, Py_intptr_t, int);

I don't think that such change is correct, IMO the right fix is to change the 
result type to Py_intptr_t.

--

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-08 Thread STINNER Victor

STINNER Victor added the comment:

-  /USECL:MS_OPTERON /GS- 
%(AdditionalOptions)
+  false

Please don't change too much things in the same patch. The issue #15792 is a 
better place for such change.

--

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-08 Thread Jeremy Kloth

Changes by Jeremy Kloth :


--
components: +Build, Windows
type:  -> compile error
versions: +Python 3.4

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-08 Thread Jeremy Kloth

New submission from Jeremy Kloth:

The attached patch fixes compiler warnings for the pythoncore project when 
building on 64-bit Windows.

Fixes for built-in modules are not included, however.

--
files: issue18407.diff
keywords: patch
messages: 192686
nosy: brian.curtin, christian.heimes, haypo, jeremy.kloth, jkloth, loewis, 
tim.golden
priority: normal
severity: normal
status: open
title: Fix compiler warnings in pythoncore for Win64
Added file: http://bugs.python.org/file30864/issue18407.diff

___
Python tracker 

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



[issue7457] Adding a read_pkg_file to DistributionMetadata

2013-07-08 Thread Ned Deily

Ned Deily added the comment:

There have been a number of issues that have come up over the past few years 
due to Python 3.2+'s distutils being a subset of Python 2.7's as a result of 
the revert (29a3eda89995).  Since circumstances have changed since the decision 
was made to do the revert and distutils isn't going away immediately, I think 
the best thing at this point would be for someone to make a comprehensive 
forward port patch of the current distutils in 2.7 to default for review with 
the goal of having a common base, feature- and bug-wise, for 3.4.  That isn't 
going to solve the problem for those who need to support 3.2, of course, but 
knowing exactly what the differences are at this point might suggest some 
practical solutions, as I expect the differences among 3.2, 3.3, and default 
(3.4) at this point are fewer than the differences between any of them and 2.7. 
 A first step would be to open an issue.

--
nosy: +ned.deily

___
Python tracker 

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



[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2013-07-08 Thread Chris Rebert

Changes by Chris Rebert :


--
nosy: +cvrebert

___
Python tracker 

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



[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2013-07-08 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +benjamin.peterson, ezio.melotti, loewis
stage:  -> needs patch

___
Python tracker 

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



[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2013-07-08 Thread David P. Kendal

New submission from David P. Kendal:

On python-ideas I proposed the addition of a way to iterate over the graphemes 
of a string, either as part of the unicodedata library or as a method on the 
built-in str type. 


I provided a sample implementation, but "MRAB" pointed out that my definition 
of a grapheme is slightly wrong; it's a little more complex than just 
"character followed by combiners". 


M.-A. Lenburg asked me to open this issue. 


--
messages: 192684
nosy: dpk
priority: normal
severity: normal
status: open
title: unicodedata.itergraphemes / str.itergraphemes / str.graphemes
type: enhancement
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



[issue18405] crypt.mksalt() result has unnecessarily low entropy

2013-07-08 Thread Christian Heimes

New submission from Christian Heimes:

crypt.mksalt() creates a salt with a lower entropy than possible. It uses 
random.SystemRandom().sample() to generate a salt string from the set of 64 
chars (string.ascii_letters + string.digits + './'). SystemRandom() uses a 
CPRNG (good) but sample() returns n UNIQUE members of the set (very bad). 
sample() reduces the set possible chars by one for each salt char.

Suggested fix:

salt = base64.b64encode(os.urandom(salt_chars * 3 // 4), b"./").decode("ascii")

--
assignee: christian.heimes
components: Library (Lib)
messages: 192683
nosy: christian.heimes, gregory.p.smith
priority: critical
severity: normal
stage: patch review
status: open
title: crypt.mksalt() result has unnecessarily low entropy
type: security
versions: Python 2.7, Python 3.2, 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



[issue7457] Adding a read_pkg_file to DistributionMetadata

2013-07-08 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I see now, the code was removed in 29a3eda89995.

But the associated comment indicates distutils is feature-frozen and that 
subsequent work should be done in distutils2, which of course is now a defunct 
effort.

Given that information, what's the proper solution for a project that requires 
the ability to read distribution metadata (preferably one that supports Python 
3.2)?

--
nosy: +ncoghlan

___
Python tracker 

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



[issue7457] Adding a read_pkg_file to DistributionMetadata

2013-07-08 Thread Jason R. Coombs

Jason R. Coombs added the comment:

On second thought, the hyperlink for r76706 resolves to d9b4f6ea3e39, which is 
in the default branch since 2009, so apparently the code was present, so I'll 
continue to trace why it went away.

--

___
Python tracker 

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



[issue14518] Add bcrypt $2a$ to crypt.py

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

I'll have a look

--
assignee:  -> christian.heimes
nosy: +christian.heimes
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue7457] Adding a read_pkg_file to DistributionMetadata

2013-07-08 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I recently discovered this method is missing from Python 3. I started porting a 
project which depends on it (a tool that uploads an already-packaged package to 
a cheeseshop), but found the method missing on Python 3. According to the 
changelog, this commit landed in 2.7 and 3.2, but when I search the Mercurial 
repo for #7457, it seems it only landed in 2.7 (25aede62fc17). Perhaps the 
change was lost in the migration to Mercurial?

Since this behavior was not intentionally removed from Python 3 and has no 
suitable replacement (afaik), the functionality should be restored in 3.2+, as 
it is a regression from 2.7.

--
nosy: +jason.coombs
status: closed -> open

___
Python tracker 

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



[issue11012] Add log1p(), exp1m(), gamma(), and lgamma() to cmath

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
priority: normal -> low
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue14620] Fatal Python error: Cannot recover from stack overflow.

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

The link doesn't work anymore and I'm unable to reproduce the issue. Please 
reopen the issue if you still get a stack overflow. Don't forget to attach your 
script, too.

--
nosy: +christian.heimes
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue14139] test_ftplib: segfault

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

It doesn't crash anymore for me.

The link doesn't work anymore, too.

--
nosy: +christian.heimes
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue5124] IDLE - pasting text doesn't delete selection

2013-07-08 Thread Mark Young

Mark Young added the comment:

+1 at least providing the option. This behavior is obnoxious and weird (no 
other program on linux that I know of does this (not to say no such program 
exists)). If I didn't want the original gone, I wouldn't have highlighted it.

--
nosy: +Mark.Young

___
Python tracker 

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



[issue13856] xmlrpc / httplib changes to allow for certificate verification

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue13942] ssl.wrap_socket does not work on socket.socketpair()'s

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Agreed

--
nosy: +christian.heimes
status: pending -> closed

___
Python tracker 

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



[issue13788] os.closerange optimization

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes
stage: committed/rejected -> 
versions: +Python 3.4

___
Python tracker 

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



[issue13611] Integrate ElementC14N module into xml.etree package

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes, effbot
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue13418] Embedded Python memory leak

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Martin, can we close this issue or do you want to keep it around?

--
nosy: +christian.heimes
resolution:  -> wont fix
status: open -> languishing

___
Python tracker 

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



[issue12984] XML NamedNodeMap ( attribName in NamedNodeMap fails )

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for your report. The issue has been address in Python 3.x. NamedNodeMap 
properly implements __contains__(). Python 2.7 is in feature freeze mode which 
means we can't backport the function.

--
nosy: +christian.heimes
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



[issue12999] _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED usage on Solaris

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

I think the cause of the bug has been addressed because tests on Solaris are 
passing.

--
nosy: +christian.heimes
resolution:  -> fixed
status: open -> pending

___
Python tracker 

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



[issue17911] Extracting tracebacks does too much work

2013-07-08 Thread Björn Sandberg Lynch

Björn Sandberg Lynch added the comment:

I've been looking into this as an easy piece to bite off. If I understand Guido 
correctly, he'd like to defer or suppress the linecache call when getting the 
tb summary. The problem with deferring is that you need to access f_globals for 
the loader to work correctly when the module source is a non-file import 
source. If we keep a reference to f_globals for each line in the traceback, we 
can defer this to later (ideally we'd just keep the __loader__ value, but that 
would require changing the linecache interface as well).

My inclination would be to have another keyword argument to 
_extract_tb_or_stack_iter (terse=False or verbose=True - either style works). 
In terse mode, no source lines would be available, and the formatted output 
would be the same as if the source wasn't available at all. This would work, 
although the traceback module is structured so that I'd need to pass it through 
quite a few wrapped iterator calls.

I'm not sure how free a hand I have when it comes to refactoring the internal 
implementation. I'm not fond of the extractor callbacks - I'd prefer a 
generator-based approach on the lines of:

def _tb_iter(tb, limit):
i = 0
while tb is not None:
if limit is not None and limit < i:
break
yield tb.tb_frame, tb.tb_lineno
tb = tb.tb_next
i += 1

def _extract_frame_iter(frames, terse=False):
...
for frame, lineno in frames:
...

--
nosy: +adaptivelogic

___
Python tracker 

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



[issue12097] python.exe crashes if it is unable to find its .dll

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

'We' don't show any error message. Windows does it on its own because the 
pythonXX.dll is a dependency for the executable.

If python.exe can't find the DLL then it's also likely that the DLL is unable 
to find Python's stdlib. Python requires the stdlib to run, too. There isn't 
much we can do about that.

--
nosy: +christian.heimes
resolution:  -> 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



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-07-08 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Attached the fix and the unit test for this problem.

--
nosy: +vajrasky
Added file: 
http://bugs.python.org/file30863/patch_for_fixing_the_server_serving_the_url_with_trailing_slash.txt

___
Python tracker 

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



[issue10664] xml.sax.expatreader should support namespace prefixes

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue8176] Interpreter crash with "double free or corruption" message

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

I'm closing the bug because it hasn't seen any activity in the past 2.5 years.

--
nosy: +christian.heimes
status: open -> closed

___
Python tracker 

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



[issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general

2013-07-08 Thread Glyph Lefkowitz

Glyph Lefkowitz added the comment:

It would be nice for this to be fixed in a 2.7.x release too, if possible, 
since the workaround involves a ton of extra system calls and there's no other 
way to construct a socket object directly.

--
nosy: +glyph
versions: +Python 2.7

___
Python tracker 

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



[issue1038591] Python 2.3+ socket._fileobject handles EAGAIN with data loss

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Shall we close this ticket then?

--
nosy: +christian.heimes
status: open -> languishing

___
Python tracker 

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



[issue14097] Improve the "introduction" page of the tutorial

2013-07-08 Thread Ezio Melotti

Ezio Melotti added the comment:

This still needs to be backported to 2.7.  There's also a typo reported in 
#18403 that should be fixed before the backport.

--
assignee: docs@python -> ezio.melotti

___
Python tracker 

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



[issue18403] Minor bug in The Python Tutorial

2013-07-08 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> enhancement
versions: +Python 3.4

___
Python tracker 

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



[issue18403] Minor bug in The Python Tutorial

2013-07-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6f16fa5223cc by Ezio Melotti in branch '3.3':
#18403: fix an off-by-one typo noticed by Xue Fuqiao.
http://hg.python.org/cpython/rev/6f16fa5223cc

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

--
nosy: +python-dev

___
Python tracker 

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



[issue9838] Inadequate C-API to Python 3 I/O objects

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

I agree with Antoine. If you are still interested to improve the situation then 
please start a discussion on the python-ideas mailing list.

--
nosy: +christian.heimes
resolution:  -> postponed
status: open -> closed

___
Python tracker 

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



[issue3093] Namespace pollution from multiprocessing

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Python 3.4 no longer exports symbols without a Py or _Py prefix:

$ nm -p build/lib.linux-x86_64-3.4-pydebug/_multiprocessing.cpython-34dm.so | 
sed -n "/ [TDB] /s/.* //p" | sort
__bss_start
_edata
_end
_fini
_init
PyInit__multiprocessing
_PyMp_SemLockType
_PyMp_SetError

Python 3.3 still does but I don't like to modify the ABI in a patch release.

$ nm -p build/lib.linux-x86_64-3.3-pydebug/_multiprocessing.cpython-33dm.so | 
sed -n "/ [TDB] /s/.* //p" | sort
__bss_start
BufferTooShort
_edata
_end
_fini
_init
mp_SetError
ProcessError
PyInit__multiprocessing
SemLockType

--
nosy: +christian.heimes
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



[issue1208730] expat binding for XML_ParserReset

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
assignee:  -> christian.heimes
nosy: +christian.heimes
stage: test needed -> patch review
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



[issue4708] os.pipe should return inheritable descriptors (Windows)

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Victor, this fits nicely with your recent PEP.

--
nosy: +christian.heimes, haypo
versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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



[issue4885] mmap enhancement request

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

It's a trivial task for any Python developer with some C experience.

--
keywords: +easy

___
Python tracker 

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



[issue4885] mmap enhancement request

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

1) and 2) have been fixed in Python 3.x. mmap supports writable memory views 
and slice assignment from any object that supports the buffer protocol.

3) is still an issue as mmap objects are not weakref-able yet. It should be 
easy to add __weakref__ to mmap objects.

--
components: +Extension Modules -Library (Lib)
nosy: +christian.heimes
priority: normal -> low
stage: test needed -> needs patch
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



[issue5060] gcc profile guided optimization

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

run_profile_task has been fixed a while ago and works with --enabled-shared.

--
nosy: +christian.heimes
resolution:  -> works for me
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



[issue18360] Won't install. Keeps telling me DLL is missing.

2013-07-08 Thread Dale Smith

Dale Smith added the comment:

I have redownloaded.  Still getting the same message.  Thank you.

--

___
Python tracker 

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



[issue18360] Won't install. Keeps telling me DLL is missing.

2013-07-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You will have to wait until Martin can respond, but the log says failure 
occurred with
C:\Users\astar\AppData\Local\Temp\MSIA812.tmp entry: _CheckDir@4
Description from web:
   Driver Install Frameworks for Applications library module
This appears to part of the unpacked download. Have you redownloaded?

--

___
Python tracker 

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



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-08 Thread Jim Jewett

Jim Jewett added the comment:

On Mon, Jul 8, 2013 at 3:30 AM, Nick Coghlan wrote:

> The key difference between them relates to the following different approaches 
> to handling unknown types in __eq__:

> @functools.total_ordering
> class TotallyOrderedEqualsReturnsFalse:
...
>def __eq__(self, other):
>return isinstance(other, Weird) and self._value == other._value

> @functools.total_ordering
> class TotallyOrderedEqualsReturnsNotImplemented:
...
>def __eq__(self, other):
>if not isinstance(other, Weird): return NotImplemented
>return self._value == other._value

> Formally, the version which returns False directly is incorrect - it should 
> be returning NotImplemented, and letting Python take of converting two 
> results of NotImplemented to an equality comparison result of False.

I had not considered this.  I'm not sure exactly where to improve the
docs, but I think it would be helpful to use a docstring (or at least
comments) on the test cases, so that at least someone looking at the
exact test cases will understand the subtlety.

> In practice, lots of types are written that way, so we need to preserve the 
> current behaviour of not checking the equality operations if the ordered 
> comparison isn't implemented, or we will inadvertently end up making "<=" or 
> ">=" return an answer instead of raising TypeError.

I had viewed that as a feature; for types where only some values will
have a useful answer, I had thought it better to still return that
answer for the values that do have one.  I freely acknowledge that
others may disagree, and if you say the issue was already settled,
then that also matters.

-jJ

--

___
Python tracker 

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



[issue9814] subprocess isn't friendly to other Python implementations with different GCs

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
versions: +Python 3.3, 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



[issue15792] Fix compiler options for x64 builds on Windows

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
components: +Windows
nosy: +christian.heimes
type:  -> compile error

___
Python tracker 

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



[issue7573] Position independent include of Python.h

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Yes, I'm closing it. The issue has been addressed in our documentation.

--
nosy: +christian.heimes
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



[issue13655] Python SSL stack doesn't have a default CA Store

2013-07-08 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jul 08, 2013, at 11:56 AM, Antoine Pitrou wrote:

>I don't think it's a good idea to maintain a list of hard-coded
>paths in Python: it's not manageable, and it will always become
>outdated. If there was a widely-respected standard (e.g. in FHS or
>LSB), things would be a lot better.

I agree.  I don't think we should be shipping certs, but if we do, then it
must be possible and easy for e.g. Linux distros to override.  Linux distros
are already managing certs through their normal and security updates, so it's
a burden to also have to do so for Python.  I think this analogous to shipping
other types of external databases, e.g. timezones, etc.

--

___
Python tracker 

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



[issue18367] See if a venv setup can be used for devinabox for coverage

2013-07-08 Thread Brett Cannon

Brett Cannon added the comment:

So first thing is that you can't relocate a venv. The --upgrade option is only 
for when you upgrade a Python installation in-place (e.g. go from 3.3 to 3.4 
but otherwise all other details stay the same). The --clear option empties out 
the directories so nothing will stick around.

IOW without adding a --move option to pyvenv, a venv is not worth leaving 
around in the box. It is probably reasonable, though, to provide a script or 
integrate into full_coverage.py to set up the venv and such.

--

___
Python tracker 

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



[issue14268] _move_file is broken because of a bad mock

2013-07-08 Thread Éric Araujo

Éric Araujo added the comment:

Yes, this was probably kept open for packaging forward-port, which is now moot. 
 Note that many others distutils2 issues are kept open because they can be 
relevant for the distlib fork or other packaging libs.

--

___
Python tracker 

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



[issue10071] Should not release GIL while running RegEnumValue

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

LGTM

I suggest that you add a comment with a link to this issue. People may wonder 
why some places don't release the GIL.

--
nosy: +christian.heimes
versions: +Python 3.3, 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



[issue12272] Python 2.7.1 version conflict for package "Tcl" on Windows 7

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

I'm closing this ticket because the op hasn't responded in two years and nobody 
has reported the issue ever since.

--
nosy: +christian.heimes
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue18404] Memory leak in gdbmmodule

2013-07-08 Thread Bohuslav "Slavek" Kabrda

New submission from Bohuslav "Slavek" Kabrda:

Function dbm_length from Modules/_gdbmmodule.c seems to be leaking memory. A 
simple reproducer:

import dbm

d = dbm.open('spam', 'c')
d['x'] = '1'
print(len(d))


The interesting part of valgrind output with --leak-check=full:

==3312== 1 bytes in 1 blocks are definitely lost in loss record 1 of 3,622
==3312==at 0x4A06409: malloc (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3312==by 0x3A31A0349D: get_next_key (gdbmseq.c:72)
==3312==by 0x3A31A03595: gdbm_nextkey (gdbmseq.c:126)
==3312==by 0xDD74192: dbm_length (_gdbmmodule.c:104)
==3312==by 0x3A2473F50B: builtin_len (bltinmodule.c:1293)
==3312==by 0x3A247510D1: PyEval_EvalFrameEx (ceval.c:4080)
==3312==by 0x3A24753758: PyEval_EvalCodeEx (ceval.c:3462)
==3312==by 0x3A2475390A: PyEval_EvalCode (ceval.c:791)
==3312==by 0x3A24773893: run_mod (pythonrun.c:1989)
==3312==by 0x3A24775EE7: PyRun_FileExFlags (pythonrun.c:1945)
==3312==by 0x3A24777000: PyRun_SimpleFileExFlags (pythonrun.c:1455)
==3312==by 0x3A2478F72B: Py_Main (main.c:306)

It seems that the problem is in the loop here [1] - specifically, the last 
okey.dptr seems not to be freed (the loop is terminated when key.dptr is NULL, 
but okey.dptr is still pointing to something).
I'm attaching a supersimple patch that should fix this (unless I'm totally 
wrong about everything...)


[1] http://hg.python.org/cpython/file/65f2c92ed079/Modules/_gdbmmodule.c#l102

--
components: Extension Modules
files: gdbm-len-leak-fix.patch
keywords: patch
messages: 192647
nosy: bkabrda
priority: normal
severity: normal
status: open
title: Memory leak in gdbmmodule
versions: Python 3.3
Added file: http://bugs.python.org/file30862/gdbm-len-leak-fix.patch

___
Python tracker 

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



[issue18402] Finding perl64

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

I don't mind to add perl64 to the search path.

--
components: +Windows
nosy: +christian.heimes
stage:  -> patch review

___
Python tracker 

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



[issue18393] Gestalt() is deprecated on OSX 10.8, remove support?

2013-07-08 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 08.07.2013 14:08, Ronald Oussoren wrote:
> 
> Ronald Oussoren added the comment:
> 
> I had hoped to just drop it in 3.4.
> 
> To remove:
> 
> * extension _gestalt
> 
> * function platform._mac_ver_gestalt
> 
> * function platform._mac_ver_lookup (only used by ^^^)
> 
> * function platform._bcd2str (likewise)
> 
> To change:
> 
> * function platform.mac_ver: remove call to _mac_ver_gestalt

Fine with me.

--

___
Python tracker 

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



[issue18403] Minor bug in The Python Tutorial

2013-07-08 Thread Madison May

Madison May added the comment:

Nope, definitely an error!  Good catch, Xue.

--
nosy: +madison.may

___
Python tracker 

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



[issue8813] SSLContext doesn't support loading a CRL

2013-07-08 Thread Christian Heimes

Changes by Christian Heimes :


--
components: +Extension Modules
nosy: +christian.heimes
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue17128] OS X system openssl deprecated - installer should build local libssl

2013-07-08 Thread Christian Heimes

Christian Heimes added the comment:

Mateusz,
we would like to avoid that path and use the operating system's root CAs list 
when the OS provides one. It gives better user experience and the OS' root CA 
list gets updates through the OS.

--

___
Python tracker 

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



[issue18393] Gestalt() is deprecated on OSX 10.8, remove support?

2013-07-08 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I had hoped to just drop it in 3.4.

To remove:

* extension _gestalt

* function platform._mac_ver_gestalt

* function platform._mac_ver_lookup (only used by ^^^)

* function platform._bcd2str (likewise)

To change:

* function platform.mac_ver: remove call to _mac_ver_gestalt

--

___
Python tracker 

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



[issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature

2013-07-08 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 06.07.2013 18:17, Ronald Oussoren wrote:
> As to the question of actually signing the installer: we ask the PSF about 
> acquiring a developer account once we have something that can actually be 
> signed.

Please write to p...@python.org with an explanation of how this can be
done. We'd also need to know who will be in charge of the signing
(probably the core dev doing the respective release).

--
nosy: +lemburg

___
Python tracker 

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



[issue18393] Gestalt() is deprecated on OSX 10.8, remove support?

2013-07-08 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Do we follow the deprecation procedure for private functions as well?

The patch removes a private and undocumented extension, and removes a private 
function that uses that extension. There is no change in the public API.

Also, as I mentioned before the removed code is effectively dead because it 
will never be called on systems that aren't totally broken.

--

___
Python tracker 

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



[issue13655] Python SSL stack doesn't have a default CA Store

2013-07-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I think we can improve the situation with shipping our own CA certs.
> Almost every operating system or distribution comes with a set of CA
> certs.

Why would we ship our own CA certs if every OS comes with CA certs?

> I lots of Linux distributions and most BSD systems. All except
> FreeBSD install CA certs by default. A fresh FreeBSD systems doesn't
> have certs but ``pkg_add -r ca-root-nss`` fixes that.

Kudos to FreeBSD.
Anyway, isn't SSLContext.set_default_verify_paths() enough already?

> Here is a full list: [snip full list]

I don't think it's a good idea to maintain a list of hard-coded
paths in Python: it's not manageable, and it will always become
outdated. If there was a widely-respected standard (e.g. in FHS or
LSB), things would be a lot better.

--

___
Python tracker 

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



[issue18393] Gestalt() is deprecated on OSX 10.8, remove support?

2013-07-08 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 08.07.2013 13:55, Ronald Oussoren wrote:
> 
> Do we follow the deprecation procedure for private functions as well?
> 
> The patch removes a private and undocumented extension, and removes a private 
> function that uses that extension. There is no change in the public API.
> 
> Also, as I mentioned before the removed code is effectively dead because it 
> will never be called on systems that aren't totally broken.

Oh, I was under the impression that the API is public. I just did a
grep: the _gestalt module is not documented and neither is the
gestalt function, so I guess we can speed up the deprecation procedure
or even drop it right away in 3.4 :-)

--

___
Python tracker 

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



[issue17840] base64_codec uses assert for runtime validity checks

2013-07-08 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 07.07.2013 16:31, Alex Henderson wrote:
> Having discussed this with Ezio, I think the better option might be to raise 
> ValueError instead - if someone is expecting to be able to silently recover 
> from errors they won't be able to, and should find out about this sooner 
> rather than later.
> I'll upload an updated patch shortly.

+1

--
nosy: +lemburg

___
Python tracker 

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



[issue17128] OS X system openssl deprecated - installer should build local libssl

2013-07-08 Thread Mateusz Lenik

Mateusz Lenik added the comment:

The other way to solve problem with CA certs may be this script[1] that can be 
used to generate pem files from mozilla CA cert bundle[2] during compilation or 
installation.

[1]: http://curl.haxx.se/docs/caextract.html
[2]: 
http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt

--

___
Python tracker 

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



  1   2   >