[issue18891] Master patch for content manager addtion to email package.

2013-09-03 Thread Stephen J. Turnbull

Stephen J. Turnbull added the comment:

I'm thinking this may be overengineering, but I may as well post it and find 
out for sure. :-)  Is it worth encapsulating MIME types?  They're "really" 
pairs as far as mail handling applications are concerned, but they have a 
string representation.  So

MacPorts 16:29$ python3.3
Python 3.3.2 (default, May 21 2013, 11:48:51) 
>>> from collections import namedtuple
>>> class MIMEType(namedtuple('MIMETYPE', 'type subtype')):
...  def __str__(self):
...   return "{0}/{1}".format(self.type, self.subtype)
... 
>>> mt = MIMEType('text', 'plain')
>>> str(mt)
'text/plain'
>>> t, s = mt
>>> print('type =', t, 'subtype =', s)
type = text subtype = plain
>>> 

Obviously there needs to be a constructor that handles the 'type/sub' 
represention.

--
nosy: +sjt

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Jeroen Van Goey

New submission from Jeroen Van Goey:

The sample code in the itertools.count documentation should be indented by 4 
spaces.

For 2.7.4: lines 3429 till 3432 in 
http://hg.python.org/releasing/2.7.4/file/026ee0057e2d/Modules/itertoolsmodule.c#l3429

For 3.4.0a1: lines 3981 till 3984 in 
http://hg.python.org/releasing/py3.4.0a1/file/edc668a667ad/Modules/itertoolsmodule.c#l3981

Also, the example code uses the arguments 'firstval' and 'step' whereas the 
documentation of the function itself uses the arguments 'start' and 'step'. 
Maybe better be consistent and use as first argument 'start' in both cases?

--
assignee: docs@python
components: Documentation
hgrepos: 207
messages: 196826
nosy: docs@python, jeroen-vangoey
priority: normal
severity: normal
status: open
title: Intendation issue in example code in itertools.count documentation
type: enhancement
versions: Python 2.7, Python 3.4

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Jeroen Van Goey

Changes by Jeroen Van Goey :


--
hgrepos:  -207

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Jeroen Van Goey

Jeroen Van Goey added the comment:

Patch for Python 2.7.4 attached

--
keywords: +patch
Added file: http://bugs.python.org/file31571/2.7itertoolsmodule.c.patch

___
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-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> We don't have to align EVERY data structure.  But I do have immediate
> beneficial use cases for set tables and for data blocks in deque
> objects.

Can you explain what the use cases are, and post some benchmarking code?

Also, what would be the strategy? Would you align every set/deque, or only
the bigger ones?

--

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Jeroen Van Goey

Jeroen Van Goey added the comment:

Patch for Python 3.4.0a1 attached

--
Added file: http://bugs.python.org/file31572/3.4itertoolsmodule.c.patch

___
Python tracker 

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



[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows

2013-09-03 Thread Vlad Shcherbina

Changes by Vlad Shcherbina :


Removed file: http://bugs.python.org/file31518/fix_for_27.patch

___
Python tracker 

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



[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows

2013-09-03 Thread Vlad Shcherbina

Changes by Vlad Shcherbina :


Added file: http://bugs.python.org/file31573/temp_dir_exists_retry_27.patch

___
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-03 Thread Stefan Behnel

Stefan Behnel added the comment:

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

Given that we have an XMLPullParser now, I think we should not clutter the API 
with more classes that do not add anything more than making other classes 
redundant. So, -1 on adding a special target that collects events. Anyone who 
wants to use that feature can just use the XMLPullParser.

In the Python implementation of that parser, custom targets can already be 
allowed right now. Only the C implementation prevents it currently (AFAICT) as 
it has its own built-in TreeBuilder target.

Therefore, +1 for the general cleanup to properly allow arbitrary targets as 
backend.

Also, +1 for allowing start-ns and end-ns event callbacks on parser targets, 
although that's a different feature entirely.

--
nosy: +scoder

___
Python tracker 

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



[issue18851] subprocess's Popen closes stdout/stderr filedescriptors used in another thread when Popen errors

2013-09-03 Thread Jan-Wijbrand Kolman

Jan-Wijbrand Kolman added the comment:

Thanks you for the swift followup!

--

___
Python tracker 

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



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

2013-09-03 Thread Stefan Behnel

Stefan Behnel added the comment:

(fixing subject to properly hit bug filters)

--
title: Make ET event handling more modular to allow custom targets for the 
non-blocking parser -> Make ElementTree event handling more modular to allow 
custom targets for the non-blocking parser

___
Python tracker 

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



[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows

2013-09-03 Thread Vlad Shcherbina

Changes by Vlad Shcherbina :


Added file: http://bugs.python.org/file31574/temp_dir_exists_retry_33_34.patch

___
Python tracker 

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



[issue18906] Create a way to always run tests in subprocesses within regrtest

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> The most natural approach is to have a special attribute set in the module's 
> global dict (for example: __REGRTEST_SUBPROCESS__ = True); however, there's a 
> slight problem with this approach - regrtest has to import the module to see 
> this attribute, and the module may do some work in its top-level code 
> (commonly, imports) that already needs to be done within a subprocess.

The main regrtest process can run auxilary child process which imports all test 
modules and says main process which of them have __REGRTEST_SUBPROCESS__=True.

It will be even better if the main process runs child process for testing all 
tests so when any test crashes it is possible to report this and respawn child 
process to continue testing other tests.

--

___
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-03 Thread STINNER Victor

STINNER Victor added the comment:

Linux provides the following functions:

int posix_memalign(void **memptr, size_t alignment, size_t size);
void *valloc(size_t size);  # obsolete
void *memalign(size_t boundary, size_t size);  # obsolete

Windows provides the following functions:

void* _aligned_malloc(size_t size,  size_t alignment);
void _aligned_free(void *memblock);

_aligned_malloc() has a warning: "Using free is illegal."

Do all platform provide at least a function to allocate aligned memory? 
Windows, Mac OS X, FreeBSD, old operating systems, etc.? If no, how should we 
handle these operating systems? Refuse to start Python? Disable some 
optimizations? How should we check in the source code (ex: setobject.c) than 
aligned allocations are not supported? An #ifdef?

***

Because of the Windows API, wee need at least two functions:

void* PyMem_MallocAligned(size_t size, size_t alignment);
void PyMem_FreeAligned(void *ptr);

The GIL must be held when callling these functions.


Windows provides also a "realloc" function:

void* _aligned_realloc(void *memblock, size_t size,  size_t alignment);

If the OS does not provide a realloc function, we can reimplement it (malloc, 
memcpy, free).

void* PyMem_ReallocAligned(void *ptr, size_t size, size_t alignment);

***

For the PEP 445: the new API is different than the PyMemAllocator structure 
because malloc and realloc functions have an extra "alignment" parameter. We 
can drop the parameter if the allocator has always the size alignment, but each 
object may require a different aligment?

--

___
Python tracker 

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



[issue17862] itertools.chunks(iterable, size, fill=None)

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We should distinguish between at least two different functions. One generates 
slices of input sequence (it is especially useful for strings and bytes 
objects), and other groups items from arbitrary iterator into tuples. They have 
different applications.

--

___
Python tracker 

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



[issue18911] minidom does not encode correctly when calling Document.writexml

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

On Python 3 you should not only open file in text mode with specified encoding, 
but also specify the "xmlcharrefreplace" error handler.

doc.writexml(open(filename, "w", encoding="utf-8", 
errors="xmlcharrefreplace"), "", "  ", "utf-8")

I can suggest only one solution -- explicitly document this behavior.

Perhaps we also should add a special module level function for writing DOM tree 
to binary file. Low-level writexml() should not be used directly.

--
nosy: +eli.bendersky, scoder, serhiy.storchaka
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
stage:  -> patch review

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Matěj Stuchlík

New submission from Matěj Stuchlík:

Doing 'valgrind --suppressions=Misc/valgrind-python.supp ./python 
Lib/tests/test_ssl.py' I'm getting:

==322== LEAK SUMMARY:
==322==definitely lost: 32 bytes in 1 blocks
==322==indirectly lost: 392 bytes in 16 blocks
==322==  possibly lost: 1,617,191 bytes in 1,052 blocks
==322==still reachable: 4,068,239 bytes in 3,201 blocks
==322== suppressed: 0 bytes in 0 blocks


I managed to reduce that to a shorter reproducer:

"""
import os
import ssl

NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir, 
"nullbytecert.pem")
p = ssl._ssl._test_decode_cert(NULLBYTECERT)
"""

where NULLBYTECERT is the cert introduced in issue18709.

Python 2.7 does not leak like this, and the PySSL_test_decode_certificate 
function looks the same there as in Python 2.6, so I assume it's something else 
that does the actual leaking.

--
components: Extension Modules
messages: 196837
nosy: sYnfo
priority: normal
severity: normal
status: open
title: ssl._ssl._test_decode_cert seems to leak memory with certain 
certificates in Python 2.6
type: resource usage
versions: Python 2.6

___
Python tracker 

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



[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows

2013-09-03 Thread Eli Bendersky

Eli Bendersky added the comment:

The fix looks good to me, in general. Could you create a test that goes along?

My only (minor) doubt is whether this should be generalized, in two dimensions:

1. PermissionError is mapped from both EACCES and EPERM. So to make the 2.7 
patch equivalent with 3.x, EPERM should also be checked. That said, Windows 
documents it doesn't really use EPERM 
(http://msdn.microsoft.com/en-us/library/5814770t.aspx).
2. Should this be restricted to Windows? Could there be other platforms that 
exhibit the same behavior? On the other hand, say on Linux, EACCES should not 
happen in a temp dir and so it's good to re-raise it. 

For (2) I don't think doing anything is necessary at this point - the added 
test may help because it can fail for some strange platform at some point and 
then the solution should be obvious. As for (1), adding EPERM into the 
condition probably can't hurt and it will make Python 2.7 behave more 
consistently with 3.x in case of some undocumented Windows behavior.

--
nosy: +eli.bendersky
stage: needs patch -> patch review

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

To ensure it's a real memory leak: do the figures increase when the code is 
called in a loop?
I would not consider a single-time malloc (stored in some static variable) to 
be a leak.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Eli Bendersky

Eli Bendersky added the comment:

LGTM, thanks

--
nosy: +eli.bendersky

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8e174ee0575a by Eli Bendersky in branch '3.3':
Issue #18912: Fix indentation in docstring
http://hg.python.org/cpython/rev/8e174ee0575a

New changeset 31ef590a0d2f by Eli Bendersky in branch 'default':
Issue #18912: Fix indentation in docstring
http://hg.python.org/cpython/rev/31ef590a0d2f

--
nosy: +python-dev

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Matěj Stuchlík

Matěj Stuchlík added the comment:

That's a good idea:

NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir, 
"nullbytecert.pem")
for i in xrange(100):
p = ssl._ssl._test_decode_cert(NULLBYTECERT)

gives

==1647== LEAK SUMMARY:
==1647==definitely lost: 3,200 bytes in 100 blocks
==1647==indirectly lost: 39,200 bytes in 1,600 blocks
==1647==  possibly lost: 591,285 bytes in 545 blocks
==1647==still reachable: 1,955,652 bytes in 3,136 blocks
==1647== suppressed: 0 bytes in 0 blocks

so yes, they do increase.

--

___
Python tracker 

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



[issue18912] Intendation issue in example code in itertools.count documentation

2013-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a559cda6a498 by Eli Bendersky in branch '2.7':
Close #18912: Fix indentation in docstring
http://hg.python.org/cpython/rev/a559cda6a498

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18906] Create a way to always run tests in subprocesses within regrtest

2013-09-03 Thread Eli Bendersky

Eli Bendersky added the comment:

On Tue, Sep 3, 2013 at 2:32 AM, Serhiy Storchaka wrote:

>
> Serhiy Storchaka added the comment:
>
> > The most natural approach is to have a special attribute set in the
> module's global dict (for example: __REGRTEST_SUBPROCESS__ = True);
> however, there's a slight problem with this approach - regrtest has to
> import the module to see this attribute, and the module may do some work in
> its top-level code (commonly, imports) that already needs to be done within
> a subprocess.
>
> The main regrtest process can run auxilary child process which imports all
> test modules and says main process which of them have
> __REGRTEST_SUBPROCESS__=True.
>
> It will be even better if the main process runs child process for testing
> all tests so when any test crashes it is possible to report this and
> respawn child process to continue testing other tests.
>

Well, if we go *that* way, my initial proposal would be to just always run
every test in a subprocess. Kind of what happens today with -jN, just also
for -j1. Since most people, and I assume bots, run -jN anyway, they already
see each test executed in a subprocess. Some folks didn't feel good about
it because the stress testing "all in one process" provides is apparently
desired.

Your proposal complicates the flow significantly, IMHO. I'd just run each
test in its own subprocess and be done with it.

--

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

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

Jesús Cea Avión added the comment:

Could you possibly check this in Python 2.7, 3.2 and 3.3?. Python 2.6 is open 
ONLY for security fixes, if any.

--
nosy: +jcea

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Matěj Stuchlík

Matěj Stuchlík added the comment:

Ah, that is unfortunate. I did check it for 2.7 and 3.4, neither of those leak, 
I can check it for the rest tomorrow, but I imagine it'll be the same story.

--

___
Python tracker 

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



[issue18891] Master patch for content manager addtion to email package.

2013-09-03 Thread R. David Murray

R. David Murray added the comment:

It's an interesting thought.  It bothered me to be handling them as pure 
strings when writing the code.  It just felt wrong somehow :)

--

___
Python tracker 

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



[issue5202] wave.py cannot write wave files into a shell pipeline

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is corrected patch (it uses relative seek()) with a lot of tests.

--

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

http://hg.python.org/cpython/rev/c4bbda2d4c49 looks relevant.

--

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Ah, http://hg.python.org/cpython/rev/80d491aaeed2/ as well then.

--

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Matěj Stuchlík

Matěj Stuchlík added the comment:

Potentially interesting part of the valgrind output:

==21685== 42,400 (3,200 direct, 39,200 indirect) bytes in 100 blocks are 
definitely lost in loss record 909 of 914
==21685==at 0x4A0887C: malloc (vg_replace_malloc.c:270)
==21685==by 0x331B06315F: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.1e)
==21685==by 0x331B0CD4EE: sk_new (in /usr/lib64/libcrypto.so.1.0.1e)
==21685==by 0x331B0F2E42: ??? (in /usr/lib64/libcrypto.so.1.0.1e)
==21685==by 0x331B0F2F7B: ??? (in /usr/lib64/libcrypto.so.1.0.1e)
==21685==by 0x331B0F2884: ASN1_item_ex_d2i (in 
/usr/lib64/libcrypto.so.1.0.1e)
==21685==by 0x331B0F3103: ASN1_item_d2i (in /usr/lib64/libcrypto.so.1.0.1e)
==21685==by 0xB431892: _decode_certificate (_ssl.c:710)
==21685==by 0xB431E57: PySSL_test_decode_certificate (_ssl.c:1025)
==21685==by 0x49D187: PyEval_EvalFrameEx (ceval.c:3750)
==21685==by 0x497A01: PyEval_EvalCodeEx (ceval.c:3000)
==21685==by 0x497B41: PyEval_EvalCode (ceval.c:541)

_ssl.c:710 snippet:

(...)
 p = ext->value->data;
  if (method->it)
> names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, &p, ext->value->length, 
> ASN1_ITEM_ptr(method->it)));
  else
  names = (GENERAL_NAMES*) (method->d2i(NULL, &p, ext->value->length));
(...)

--

___
Python tracker 

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



[issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

2013-09-03 Thread Matěj Stuchlík

Matěj Stuchlík added the comment:

That seems to be it, no more leaking! Good job!

--

___
Python tracker 

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



[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-09-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
title: SSL module fails to handle NULL bytes inside subjectAltNames general 
names (CVE-2013-4238) -> SSL module fails to handle NULL bytes inside 
subjectAltNames general names (CVE-2013-4238)

___
Python tracker 

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



[issue18906] Create a way to always run tests in subprocesses within regrtest

2013-09-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16662] load_tests not invoked in package/__init__.py

2013-09-03 Thread Zachary Ware

Zachary Ware added the comment:

I took a stab at the doc changes, attached here and including Barry's patch.

--
components: +Library (Lib)
type:  -> enhancement
versions: +Python 3.4
Added file: http://bugs.python.org/file31575/16662_with_doc.diff

___
Python tracker 

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



[issue18914] Python docs link to terrible outsi

2013-09-03 Thread Brian Mingus

New submission from Brian Mingus:

The python documentation links to an outside website for info and examples on 
http basic auth. This documentation is terrible and confusing. The link should 
be removed, and user's should be advised to use the Requests library.


# this example is from 
http://www.voidspace.org.uk/python/articles/authentication.shtml
# which is linked to by the official python docs 
http://docs.python.org/2/howto/urllib2.html

import urllib2
 
theurl = 'http://www.someserver.com/toplevelurl/somepage.htm'
username = 'johnny'
password = 'XX'
# a great password
 
passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
# this creates a password manager
passman.add_password(None, theurl, username, password)
# because we have put None at the start it will always
# use this username/password combination for  urls
# for which `theurl` is a super-url
 
authhandler = urllib2.HTTPBasicAuthHandler(passman)
# create the AuthHandler
 
opener = urllib2.build_opener(authhandler)
 
urllib2.install_opener(opener)
# All calls to urllib2.urlopen will now use our handler
# Make sure not to include the protocol in with the URL, or
# HTTPPasswordMgrWithDefaultRealm will be very confused.
# You must (of course) use it when fetching the page though.
 
pagehandle = urllib2.urlopen(theurl)
# authentication is now handled automatically for us

--
assignee: docs@python
components: Documentation
messages: 196854
nosy: docs@python, mingus
priority: normal
severity: normal
status: open
title: Python docs link to terrible outsi
versions: Python 2.7

___
Python tracker 

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



[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +michael.foord
title: Python docs link to terrible outsi -> Confusing documentation in the 
urllib2 HOWTO

___
Python tracker 

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



[issue16938] pydoc confused by __dir__

2013-09-03 Thread Ethan Furman

Ethan Furman added the comment:

I wonder if it would be better to have inspect.classify_class_attrs be improved 
instead?

--

___
Python tracker 

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



[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread Brian Mingus

Brian Mingus added the comment:

The documentation is confusing. Consider this comment:

# All calls to urllib2.urlopen will now use our handler
# Make sure not to include the protocol in with the URL, or
# HTTPPasswordMgrWithDefaultRealm will be very confused.
# You must (of course) use it when fetching the page though.

In the actual code he provides, he uses the protocol. Furthermore, before 
showing a simple way to use the libary, he shows a godawfully complex way. 

Either the documentation should made beautiful and comprehensible, or it should 
not be linked to.

--

___
Python tracker 

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



[issue18891] Master patch for content manager addtion to email package.

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Sep 03, 2013, at 07:37 AM, Stephen J. Turnbull wrote:

>I'm thinking this may be overengineering, but I may as well post it and find
>out for sure. :-) Is it worth encapsulating MIME types?  They're "really"
>pairs as far as mail handling applications are concerned, but they have a
>string representation.

Neat idea.

--

___
Python tracker 

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



[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread R. David Murray

R. David Murray added the comment:

Suggesting using a 3rd party library in order to explain how to use the python 
standard library to do something isn't going to work.

Would you like to propose an alternate article or an improvement to the howto, 
using only stdlib facilities?

(Note that the external web page linked to is that of an active Python core 
contributor.)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue16039] imaplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

blocker for 2.6.9

--
nosy: +barry
priority: critical -> release blocker

___
Python tracker 

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



[issue18747] Re-seed OpenSSL's PRNG after fork

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

blocker for 2.6.9

--
nosy: +larry
priority: normal -> release blocker

___
Python tracker 

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



[issue16201] socket.gethostbyname incorrectly parses ip

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

Charles-François Natali added the comment:

Here's an updated patch with new tests.

It passes the regression test, and yields noticable performance improvements 
for IPv6:
before:
$ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET, 
socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('127.0.0.1', 4242)) "
1 loops, best of 3: 28 usec per loop
$ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET6, 
socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('::1', 4242)) "
1 loops, best of 3: 59.1 usec per loop
after:
$ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET, 
socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('127.0.0.1', 4242)) "
1 loops, best of 3: 24.8 usec per loop
$ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET6, 
socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('::1', 4242)) "
1 loops, best of 3: 26.7 usec per loop

Note that the tests aren't as good as I'd like them to, because apparently some 
systems (e.g. Solaris) have broken gethostbyaddr()...
But it's cleaner, more robust and more efficient.

--
Added file: http://bugs.python.org/file31576/parse_inet-1.diff

___
Python tracker 

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



[issue16040] nntplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

blocker for 2.6.9

--
nosy: +barry
priority: critical -> release blocker

___
Python tracker 

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



[issue16038] ftplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

blocker for 2.6.9

--
nosy: +barry
priority: critical -> release blocker

___
Python tracker 

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



[issue16043] xmlrpc: gzip_decode has unlimited read()

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

blocker for 2.6.9

--
priority: critical -> release blocker

___
Python tracker 

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



[issue16037] httplib: header parsing is not delimited

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

blocker for 2.6.9

--
priority: critical -> release blocker

___
Python tracker 

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



[issue16042] smtplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

blocker for 2.6.9

--
priority: critical -> release blocker

___
Python tracker 

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



[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread Brian Mingus

Brian Mingus added the comment:

Yes - this link was a waste of my time. It would have been better if it had not 
been there. I propose to replace it with nothing.

--

___
Python tracker 

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



[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread R. David Murray

R. David Murray added the comment:

The article is *explaining* basic auth, thus the pedegogy of the presentation, 
and why it is a "see also" and not part of the docs proper.

I'll admit I don't understand the first part of that comment, since the second 
part says you do have to put the protocol in the URL, which is what the example 
does.

As I said, would you care to propose a replacement?

--

___
Python tracker 

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



[issue17487] wave.Wave_read.getparams should be more user friendly

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage: committed/rejected -> patch review

___
Python tracker 

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



[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

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



[issue11126] Wave.py does not always write proper length in header

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> invalid
stage:  -> committed/rejected
status: pending -> closed

___
Python tracker 

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



[issue18878] Add support of the 'with' statement to sunau.open.

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +Claudiu.Popa

___
Python tracker 

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



[issue18878] Add support of the 'with' statement to sunau.open.

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue18901] sunau.getparams should return a namedtuple

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue8311] wave module sets data subchunk size incorrectly when writing wav file

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue8934] aifc should use str instead of bytes (wave, sunau compatibility)

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I afraid we can't just change comptype to string. We can allow setcomptype() 
accept strings and convert them to bytes, but we can't change the type of 
getcomptype()'s result.

--

___
Python tracker 

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



[issue18901] sunau.getparams should return a namedtuple

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Claudiu for your contribution.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17487] wave.Wave_read.getparams should be more user friendly

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Claudiu. I have changed _Wave_params to _wave_params for consistency 
with issue17818 and issue18901.

--
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18878] Add support of the 'with' statement to sunau.open.

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file31577/sunau_context_manager.patch

___
Python tracker 

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



[issue18878] Add support of the 'with' statement to sunau.open.

2013-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file31512/sunau_context_manager.patch

___
Python tracker 

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



[issue18878] Add support of the 'with' statement to sunau.open.

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I will commit it tomorrow if there are no objections.

--

___
Python tracker 

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



[issue18901] sunau.getparams should return a namedtuple

2013-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 99d26f32aed3 by Serhiy Storchaka in branch 'default':
Issue #18901: The sunau getparams method now returns a namedtuple rather than
http://hg.python.org/cpython/rev/99d26f32aed3

--
nosy: +python-dev

___
Python tracker 

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



[issue17487] wave.Wave_read.getparams should be more user friendly

2013-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a14ec46de0a4 by Serhiy Storchaka in branch 'default':
Issue #17487: The result of the wave getparams method now is pickleable again.
http://hg.python.org/cpython/rev/a14ec46de0a4

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://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-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 934e650abc4d by Meador Inge in branch '3.3':
Issue #16826: Don't check for PYTHONCASEOK when using -E.
http://hg.python.org/cpython/rev/934e650abc4d

New changeset ba850a78cbbc by Meador Inge in branch 'default':
Issue #16826: Don't check for PYTHONCASEOK when using -E.
http://hg.python.org/cpython/rev/ba850a78cbbc

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://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-03 Thread Meador Inge

Changes by Meador Inge :


--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp

2013-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is PyLong_FromVoidPtr() for such cases.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2013-09-03 Thread STINNER Victor

STINNER Victor added the comment:

Oh, another TODO: drop the (optional) dependency to psutil. Implement 
get_process_memory() in C (in the _tracemalloc module).

--

___
Python tracker 

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



[issue18915] ssl.wrap_socket, pass in certfile and keyfile as PEM strings

2013-09-03 Thread mpb

New submission from mpb:

It would be nice to be able to pass ssl.wrap_socket the key and certificate as 
PEM encoded strings, rather than as paths to files.

Similarly for SSLContext.load_cert_chain.

--
components: Library (Lib)
messages: 196878
nosy: mpb
priority: normal
severity: normal
status: open
title: ssl.wrap_socket, pass in certfile and keyfile as PEM strings
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread Michael Foord

Michael Foord added the comment:

As David explained, the linked article *explains* basic auth as well as showing 
how to use the standard library support. I think the article is still of some 
value, it has certainly been useful to many people.

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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://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-03 Thread Meador Inge

Meador Inge added the comment:

My last commit caused some buildbot failures 
(http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/1069).
  I am investigating.

--

___
Python tracker 

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



[issue18916] Various out-of-date Lock text in 3.2+

2013-09-03 Thread Tim Peters

New submission from Tim Peters:

Here under 3.3.2:

"""
>>> from threading import Lock
>>> help(Lock)
Help on built-in function allocate_lock in module _thread:

allocate_lock(...)
allocate_lock() -> lock object
(allocate() is an obsolete synonym)

Create a new lock object.  See help(LockType) for information about locks.
"""

But there is no relevant LockType anymore.  The type is now:

"""
>>> type(Lock())

"""

The docs should probably say "help(type(Lock())" instead of "help(LockType)" 
now.  So let's try that:

"""
>>> help(type(Lock()))
Help on class lock in module _thread:

class lock(builtins.object)
 |  A lock object is a synchronization primitive.  To create a lock,
 |  call the PyThread_allocate_lock() function.
"""

That's a problem:  PyThread_allocate_lock() is a C function, not available 
(under that name) to Python code.  A Python user should probably stick to 
threading.Lock().

Skipping most other output:

"""
...
 |  acquire(...)
 |  acquire([wait]) -> bool
 |  (acquire_lock() is an obsolete synonym)
 |  
 |  Lock the lock.  Without argument, this blocks if the lock is already
 |  locked (even by the same thread), waiting for another thread to release
 |  the lock, and return True once the lock is acquired.
 |  With an argument, this will only block if the argument is true,
 |  and the return value reflects whether the lock is acquired.
 |  The blocking operation is interruptible.
...
"""

That's not the right signature for acquire anymore.  Should be

acquire(blocking=True, timeout=-1) 

which is what the threading module docs say.  That is, the docs are up-to-date, 
but the help strings in the code aren't.  Since 3.2 is the first version 
introducing the timeout option, that's the earliest version I selected on this 
report.

I'm going to leave this for someone who wants an easy patch exercise - you're 
welcome ;-)

--
components: Interpreter Core
keywords: easy
messages: 196881
nosy: tim.peters
priority: low
severity: normal
stage: needs patch
status: open
title: Various out-of-date Lock text in 3.2+
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue18898] Apply the setobject optimizations to dictionaries

2013-09-03 Thread Alan Cristhian

Changes by Alan Cristhian :


--
nosy: +Alan.Cristhian

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://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-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7801ef4a4ce3 by Meador Inge in branch '3.3':
Issue #16826: Revert fix while Windows issues are being worked out.
http://hg.python.org/cpython/rev/7801ef4a4ce3

New changeset a1282b67b4cf by Meador Inge in branch 'default':
Issue #16826: Revert fix while Windows issues are being worked out.
http://hg.python.org/cpython/rev/a1282b67b4cf

--

___
Python tracker 

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



[issue18916] Various out-of-date Lock text in 3.2+

2013-09-03 Thread R. David Murray

R. David Murray added the comment:

Thanks.  I suspect someone will indeed latch on to this soon enough.

We use the 'versions' to track what version we are going to fix the bug in.  So 
I've removed 3.2, since that only gets security fixes, and 3.5, since that 
doesn't exist yet.  (If we don't fix this for 3.4, we will change the versions 
next time we visit the issue.)

--
nosy: +r.david.murray
versions:  -Python 3.2, Python 3.5

___
Python tracker 

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



[issue15875] tarfile may not make @LongLink for non-ascii character

2013-09-03 Thread Manuke

Changes by Manuke :


--
versions: +Python 3.4

___
Python tracker 

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



[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed

2013-09-03 Thread Nikolaus Rath

Nikolaus Rath added the comment:

*ping*

--

___
Python tracker 

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



[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp

2013-09-03 Thread Christoph Gohlke

Christoph Gohlke added the comment:

Is PyLong_FromVoidPtr compatible to PyInt_FromLong on 32 bit Python 2.7? It 
looks like PyLong_FromVoidPtr returns a PyLong when the address is > 2**31, 
while PyInt_FromLong returns a PyInt? Not sure it matters. PyLong_FromVoidPtr 
is certainly cleaner.

--

___
Python tracker 

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



[issue18917] python won't display greek characters in apache under windows

2013-09-03 Thread Nick

New submission from Nick:

I've set up apache on Windows 7 and I'm running python with cgi.

I have a script that contains this:
#!C:\Python34\python.exe
print ("Content-Type: text/html; charset=utf-8\n")
print ("Δοκιμή")

Pretty simple, right? When I'm opening the page to my browser in stead of 
"Δοκιμή" I get weird ��� symbols (when the browser is set on UTF-8) If I set my 
browser to ISO-8859-7 I will get the normal greek letters.

"sys.stdout.encoding" will display "cp1253" instead of "utf-8" as it probably 
should.

scripts with only english characters will work totally fine. the problems seems 
to be on non-english characters. it displays them as ISO-8859-7.

this doesn't seem to be an apache or windows issue as PHP and Lua will run just 
fine and all the scripts will display greek characters in my browser. the 
problem occurs only with python.

--
messages: 196886
nosy: nickl1
priority: normal
severity: normal
status: open
title: python won't display greek characters in apache under windows
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue18917] python won't display greek characters in apache under windows

2013-09-03 Thread Nick

Changes by Nick :


--
components: +Unicode, Windows
nosy: +ezio.melotti

___
Python tracker 

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



[issue18882] Add threading.main_thread() function

2013-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 96e55a1a0de7 by Andrew Svetlov in branch 'default':
Issue #18882: Add threading.main_thread() function.
http://hg.python.org/cpython/rev/96e55a1a0de7

--
nosy: +python-dev

___
Python tracker 

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



[issue18882] Add threading.main_thread() function

2013-09-03 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18918] help('FILES') finds no documentation

2013-09-03 Thread bussau

New submission from bussau:

Calling for help() about the topic 'FILES' returns 

no documentation found for 'FILES'
--

Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help('topics')

Here is a list of available topics.  Enter any topic name to get more help.

ASSERTION   DEBUGGING   LITERALSSEQUENCEMETHODS2
ASSIGNMENT  DELETIONLOOPING SEQUENCES
ATTRIBUTEMETHODSDICTIONARIESMAPPINGMETHODS  SHIFTING
ATTRIBUTES  DICTIONARYLITERALS  MAPPINGSSLICINGS
AUGMENTEDASSIGNMENT DYNAMICFEATURES METHODS SPECIALATTRIBUTES
BACKQUOTES  ELLIPSISMODULES SPECIALIDENTIFIERS
BASICMETHODSEXCEPTIONS  NAMESPACES  SPECIALMETHODS
BINARY  EXECUTION   NONESTRINGMETHODS
BITWISE EXPRESSIONS NUMBERMETHODS   STRINGS
BOOLEAN FILES   NUMBERS SUBSCRIPTS
CALLABLEMETHODS FLOAT   OBJECTS TRACEBACKS
CALLS   FORMATTING  OPERATORS   TRUTHVALUE
CLASSES FRAMEOBJECTSPACKAGESTUPLELITERALS
CODEOBJECTS FRAMES  POWER   TUPLES
COERCIONS   FUNCTIONS   PRECEDENCE  TYPEOBJECTS
COMPARISON  IDENTIFIERS PRINTINGTYPES
COMPLEX IMPORTING   PRIVATENAMESUNARY
CONDITIONAL INTEGER RETURNING   UNICODE
CONTEXTMANAGERS LISTLITERALSSCOPING 
CONVERSIONS LISTS   SEQUENCEMETHODS1

>>> help('FILES')
no documentation found for 'FILES'



best regards
stephan

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 196888
nosy: docs@python, st.semp...@gmail.com
priority: normal
severity: normal
status: open
title: help('FILES') finds no documentation
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue14903] dictobject infinite loop while importing socket

2013-09-03 Thread Daniel Farina

Daniel Farina added the comment:

I've confirmed this in a non-gevent program (actually a very trivial one, I can 
include the source if anyone asks), in 'initposix'.  This is on a quiet system, 
so OOM is not a very likely explanation.  Perhaps signal handling?


#0  0x0054662d in ?? ()
#1  0x0054d12e in ?? ()
#2  0x005209e9 in PyDict_SetItem ()
#3  0x004430cd in ?? ()
#4  0x00456fcc in initposix ()
#5  0x00456d2b in ?? ()
#6  0x0055fd03 in ?? ()
#7  0x005600cb in ?? ()
#8  0x004a0893 in ?? ()
#9  0x00560964 in ?? ()
#10 0x00553eab in ?? ()
#11 0x004bf2a6 in PyObject_Call ()
#12 0x004bf5a6 in PyEval_CallObjectWithKeywords ()
#13 0x0046870b in PyEval_EvalFrameEx ()
#14 0x0057bd02 in PyEval_EvalCodeEx ()
#15 0x0057cda8 in PyImport_ExecCodeModuleEx ()
#16 0x0055f6d1 in ?? ()
#17 0x005600cb in ?? ()
#18 0x004a0893 in ?? ()
#19 0x00560964 in ?? ()
#20 0x00553eab in ?? ()
#21 0x004bf2a6 in PyObject_Call ()
#22 0x004bf5a6 in PyEval_CallObjectWithKeywords ()
#23 0x0046870b in PyEval_EvalFrameEx ()
#24 0x0057bd02 in PyEval_EvalCodeEx ()
#25 0x0057cda8 in PyImport_ExecCodeModuleEx ()
#26 0x0055f6d1 in ?? ()
#27 0x005600cb in ?? ()
#28 0x004a0893 in ?? ()
#29 0x00560964 in ?? ()
#30 0x00553eab in ?? ()
#31 0x004bf2a6 in PyObject_Call ()
#32 0x004943c5 in PyObject_CallFunction ()
#33 0x0054dfbe in PyImport_Import ()
#34 0x0050df4d in ?? ()
#35 0x00511ae2 in ?? ()
#36 0x00512764 in Py_Main ()
#37 0x7f88142bc76d in __libc_start_main () from
/lib/x86_64-linux-gnu/libc.so.6
#38 0x0041ba51 in _start ()

--

___
Python tracker 

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



[issue18918] help('FILES') finds no documentation

2013-09-03 Thread Ramchandra Apte

Ramchandra Apte added the comment:

I am able to reproduce on Python 3.3 as well.

--
components:  -Interpreter Core
nosy: +Ramchandra Apte
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue14903] dictobject infinite loop while importing socket

2013-09-03 Thread Alex Gaynor

Alex Gaynor added the comment:

If you could supply the source that'd be great.

--
nosy: +alex

___
Python tracker 

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



[issue14903] dictobject infinite loop while importing socket

2013-09-03 Thread Daniel Farina

Daniel Farina added the comment:

Attached.  The program's function is to take a base64 encoded string and 
arguments as input and then to materialize this program on disk and run it with 
its arguments.

Notably, this one contains no socket interaction at all, unlike the other 
examples, which narrows the cause quite a bit.  It is run via 'ssh'.  Like the 
other case, it's during module dictionary set-up.

--
Added file: http://bugs.python.org/file31578/offender.py

___
Python tracker 

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



[issue14903] dictobject infinite loop in module set-up

2013-09-03 Thread Daniel Farina

Daniel Farina added the comment:

altered title now that it's been seen in init_posix.

--
title: dictobject infinite loop while importing socket -> dictobject infinite 
loop in module set-up

___
Python tracker 

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



[issue18882] Add threading.main_thread() function

2013-09-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't think you saw my review, but could you add a docstring to the 
main_thread() function? Thanks!

--

___
Python tracker 

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



[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp

2013-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
priority: normal -> high
stage:  -> patch review
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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