[issue18986] Add a case-insensitive case-preserving dict

2013-12-13 Thread Mark Dickinson

Mark Dickinson added the comment:

 Mark, what was the use case you found?

It's essentially an IdentityDict, though I've found other more specific 
transforms useful.

I was writing a tool to find reference cycles between Python objects (we have a 
customer application that's working in a multithreaded COM environment and has 
to ensure that COM objects are released on the same types of threads they were 
created on, so we have to be careful about cyclic garbage and delayed garbage 
collection).

The graph of Python objects (class 'ObjectGraph') is modelled as a fairly 
standard directed graph (set of vertices, set of edges, two dictionaries 
mapping each edge to its head and tail), but of course for this application the 
dict and set have to be based on object identity rather than normal equality.  
Using a TransformDict (and an IdentitySet) lets me write the standard graph 
algorithms (e.g., for finding strongly connected components) in a natural way, 
leaving it to the TransformDict and IdentitySet to do the necessary id() 
conversions under the hood.)

I also have a similar AnnotatedGraph object (a sort of offline version of the 
ObjectGraph), where the edges and vertices carry additional information and 
it's convenient to be able to use a lightweight ID rather than an entire vertex 
or edge as a dictionary key.  Again, using a TransformDict lets one hide the 
details and present the graph manipulation code readably and naturally.

Some code here, if you're interested:

https://github.com/mdickinson/refcycle/blob/refactor/refcycle/object_graph.py

Caveat: it's work in progress.

--

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



[issue19466] Clear state of threads earlier in Python shutdown

2013-12-13 Thread Charles-François Natali

Charles-François Natali added the comment:

Hum...
Correct me if I'm wrong, but destroying the thread state of daemon threads
while they're running is really a bad idea in fact: for example, if
warnings are now emitted for unclosed file objects, this means that the
file object, and all associated buffers, are destroyed.
But even though the daemon thread doesn't hold the GIL, he might still be
using this object.

For example, if we have:
daemon thread:
readinto:
release_gil
read(fd, fileobj-buffer, fileobj-size)
acquire_gil

and the main thread exits, then fileobj will be deallocated.

It's actually fairly easy to write a short crasher launching a deamon
thread reading from e.g. /dev/zero in loop, with the main thread exiting
right in the middle.

--

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



[issue19230] Reimplement the keyword module in C

2013-12-13 Thread Christian Heimes

Christian Heimes added the comment:

I still like the idea, too. It's more elegant, easier to maintain and gives a 
speedup, too.

--

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



[issue19965] Non-atomic generation of Include/Python-ast.h and Python/Python-ast.c

2013-12-13 Thread Charles-François Natali

Charles-François Natali added the comment:

Here's a patch.

--
Added file: http://bugs.python.org/file33113/makefile_ast_h.diff

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



[issue19970] Typo of `immediatly` and `agin` words

2013-12-13 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


Added file: 
http://bugs.python.org/file33115/fix_typo_agin_and_immediatly_python33.patch

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



[issue19970] Typo of `immediatly` and `agin` words

2013-12-13 Thread Vajrasky Kok

New submission from Vajrasky Kok:

ethan@amiau:~/Documents/code/python/cpython3.4$ grep -R immediatly *
Doc/library/asyncio-protocol.rst::meth:`Transport.close` can be called 
immediatly after
Lib/test/test_signal.py:# unblock the pending signal calls 
immediatly the signal handler
Modules/faulthandler.c:/* call the previous signal handler: it is called 
immediatly if we use
ethan@amiau:~/Documents/code/python/cpython3.4$ grep -R  agin  *
Modules/posixmodule.c:   the symlink path agin and not the actual final 
path. */
Modules/posixmodule.c:   the symlink path agin and not the actual final 
path. */

--
assignee: docs@python
components: Documentation, Extension Modules, Library (Lib)
files: fix_typo_agin_and_immediatly_python34.patch
keywords: patch
messages: 206031
nosy: docs@python, vajrasky
priority: normal
severity: normal
status: open
title: Typo of `immediatly` and `agin` words
type: enhancement
versions: Python 3.3, Python 3.4
Added file: 
http://bugs.python.org/file33114/fix_typo_agin_and_immediatly_python34.patch

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



[issue19466] Clear state of threads earlier in Python shutdown

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

It's actually fairly easy to write a short crasher launching a deamon
thread reading from e.g. /dev/zero in loop, with the main thread exiting
right in the middle.

I'm unable to write such crasher, can you please give an example? Are you able 
to crash Python on Linux or on Python 3.3?

Does the threading test makes sense?

--

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



[issue19969] PyBytes_FromFormatV(%c) and PyString_FromFormatV(%c) don't check for character min/max value

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch for Serhiy's remark (replace ValueError with OverflowError).

--
Added file: http://bugs.python.org/file33116/bytes_fromformat_c-2.patch

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



[issue19965] Non-atomic generation of Include/Python-ast.h and Python/Python-ast.c

2013-12-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  - neologix
stage:  - commit review

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



[issue19969] PyBytes_FromFormatV(%c) and PyString_FromFormatV(%c) don't check for character min/max value

2013-12-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  - haypo
stage:  - commit review
type:  - behavior
versions: +Python 2.7, Python 3.3, Python 3.4

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



[issue19971] Remove Tulip words from asyncio documentation/code

2013-12-13 Thread Vajrasky Kok

New submission from Vajrasky Kok:

I was reading the documentation about asyncio. Here is the introduction 
paragraph:

Doc/library/asyncio.rst
===

This module provides infrastructure for writing single-threaded concurrent
code using coroutines, multiplexing I/O access over sockets and other
resources, running network clients and servers, and other related primitives.
Here is a more detailed list of the package contents:

Then I read it like a novel. Then somewhere out of the blue, the Tulip word 
shows up.

Doc/library/asyncio-sync.rst


Unlike the standard library :mod:`queue`, you can reliably know this Queue's
   size with :meth:`qsize`, since your single-threaded Tulip application won't
   be interrupted between calling :meth:`qsize` and doing an operation on the
   Queue.

The Tulip word breaks the flow of the story because we never introduce the 
Tulip word previously. There are two ways to handle this situation:
1. Introduce the Tulip word in the introduction and other parts consistently,
2. Remove the references to Tulip.

I suggest we take option 2 (users of Python 3.4 asyncio stdlib have no reason 
to know the word Tulip). Here is the patch.

--
assignee: docs@python
components: Documentation
files: remove_Tulip.patch
keywords: patch
messages: 206036
nosy: docs@python, gvanrossum, vajrasky
priority: normal
severity: normal
status: open
title: Remove Tulip words from asyncio documentation/code
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file33117/remove_Tulip.patch

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



[issue19971] Remove Tulip words from asyncio documentation/code

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I agree to drop references to the Tulip name. Thanks for your patch.

changeset:   87927:10378199e37b
tag: tip
user:Victor Stinner victor.stin...@gmail.com
date:Fri Dec 13 10:57:04 2013 +0100
files:   Doc/library/asyncio-sync.rst Doc/whatsnew/3.4.rst 
Lib/asyncio/queues.py Lib/asyncio/test_utils.py
description:
asyncio: remove references to the Tulip project, rename Tulip to asyncio.
Patch written by Vajrasky Kok.

--
nosy: +haypo
resolution:  - fixed
status: open - closed

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



[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The disadvantage of 'H' is that it never raises OverflowError.

The simplest solution is just revert a part of the patch for issue15989.

--
assignee:  - serhiy.storchaka
versions:  -Python 3.2, Python 3.3, Python 3.5

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



[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 08c95dd68cfc by Serhiy Storchaka in branch '3.3':
Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
http://hg.python.org/cpython/rev/08c95dd68cfc

New changeset e78743e03c8f by Serhiy Storchaka in branch 'default':
Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
http://hg.python.org/cpython/rev/e78743e03c8f

New changeset 64f32a31cd49 by Serhiy Storchaka in branch '2.7':
Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
http://hg.python.org/cpython/rev/64f32a31cd49

--
nosy: +python-dev

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



[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 The disadvantage of 'H' is that it never raises OverflowError.

The correct fix is to write a new parser just for this function.

See for example uint_converter() in Modules/zlibmodule.c. I would prefer to add 
such new parser to Python/getargs.c directly, but I was not motivated when I 
fixed #18294 (integer overflow in the zlib module).

--
nosy: +haypo

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



[issue19972] Leak in pickle (?)

2013-12-13 Thread Stefan Krah

New submission from Stefan Krah:

Hi Alexandre, the following leaks appear after 64c6d52793be. I'm
not sure yet if they're caused or just exposed by the changeset.


Code:
==
import sys
import pickle
sys.exit(0)
==


==8118== 864 (192 direct, 672 indirect) bytes in 3 blocks are definitely lost 
in loss record 2,198 of 2,365
==8118==at 0x4C28B8C: malloc (vg_replace_malloc.c:270)
==8118==by 0x41D12A: _PyMem_RawMalloc (obmalloc.c:60)
==8118==by 0x41D5E9: PyObject_Malloc (obmalloc.c:351)
==8118==by 0x533FC9: _PyObject_GC_Malloc (gcmodule.c:1726)
==8118==by 0x534092: _PyObject_GC_New (gcmodule.c:1749)
==8118==by 0x450CDF: new_dict (dictobject.c:391)
==8118==by 0x4527BB: _PyDict_NewPresized (dictobject.c:1043)
==8118==by 0x4DCAFD: PyEval_EvalFrameEx (ceval.c:2366)
==8118==by 0x4E3340: PyEval_EvalCodeEx (ceval.c:3576)
==8118==by 0x4D3A59: PyEval_EvalCode (ceval.c:770)
==8118==by 0x4CD6BE: builtin_exec (bltinmodule.c:876)
==8118==by 0x5B11B3: PyCFunction_Call (methodobject.c:93)
==8118==by 0x4E6946: ext_do_call (ceval.c:4546)
==8118==by 0x4DFC60: PyEval_EvalFrameEx (ceval.c:2866)
==8118==by 0x4E3340: PyEval_EvalCodeEx (ceval.c:3576)
==8118==by 0x4E5BF7: fast_function (ceval.c:4332)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E5ACA: fast_function (ceval.c:4322)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E5ACA: fast_function (ceval.c:4322)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E5ACA: fast_function (ceval.c:4322)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E5ACA: fast_function (ceval.c:4322)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E3340: PyEval_EvalCodeEx (ceval.c:3576)
==8118==by 0x5B05F2: function_call (funcobject.c:632)
==8118==by 0x4252E7: PyObject_Call (abstract.c:2087)
==8118==by 0x42619E: _PyObject_CallMethodIdObjArgs (abstract.c:2359)
==8118==by 0x502FBE: PyImport_ImportModuleLevelObject (import.c:1473)
==8118==by 0x4CC3EC: builtin___import__ (bltinmodule.c:210)
==8118==by 0x5B11D5: PyCFunction_Call (methodobject.c:99)
==8118==by 0x4252E7: PyObject_Call (abstract.c:2087)
==8118==by 0x4E4E01: PyEval_CallObjectWithKeywords (ceval.c:4101)
==8118==by 0x4DD718: PyEval_EvalFrameEx (ceval.c:2466)
==8118==by 0x4E3340: PyEval_EvalCodeEx (ceval.c:3576)
==8118==by 0x4D3A59: PyEval_EvalCode (ceval.c:770)
==8118==by 0x4CD6BE: builtin_exec (bltinmodule.c:876)
==8118==by 0x5B11B3: PyCFunction_Call (methodobject.c:93)
==8118==by 0x4E6946: ext_do_call (ceval.c:4546)
==8118==by 0x4DFC60: PyEval_EvalFrameEx (ceval.c:2866)
==8118==by 0x4E3340: PyEval_EvalCodeEx (ceval.c:3576)
==8118==by 0x4E5BF7: fast_function (ceval.c:4332)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)


==8118== 2,112 (128 direct, 1,984 indirect) bytes in 2 blocks are definitely 
lost in loss record 2,301 of 2,365
==8118==at 0x4C28B8C: malloc (vg_replace_malloc.c:270)
==8118==by 0x41D12A: _PyMem_RawMalloc (obmalloc.c:60)
==8118==by 0x41D5E9: PyObject_Malloc (obmalloc.c:351)
==8118==by 0x533FC9: _PyObject_GC_Malloc (gcmodule.c:1726)
==8118==by 0x4734D9: PyType_GenericAlloc (typeobject.c:784)
==8118==by 0x456438: dict_new (dictobject.c:2604)
==8118==by 0x473355: type_call (typeobject.c:751)
==8118==by 0x4252E7: PyObject_Call (abstract.c:2087)
==8118==by 0x4E6313: do_call (ceval.c:4454)
==8118==by 0x4E57B5: call_function (ceval.c:4252)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E3340: PyEval_EvalCodeEx (ceval.c:3576)
==8118==by 0x4D3A59: PyEval_EvalCode (ceval.c:770)
==8118==by 0x4CD6BE: builtin_exec (bltinmodule.c:876)
==8118==by 0x5B11B3: PyCFunction_Call (methodobject.c:93)
==8118==by 0x4E6946: ext_do_call (ceval.c:4546)
==8118==by 0x4DFC60: PyEval_EvalFrameEx (ceval.c:2866)
==8118==by 0x4E3340: PyEval_EvalCodeEx (ceval.c:3576)
==8118==by 0x4E5BF7: fast_function (ceval.c:4332)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E5ACA: fast_function (ceval.c:4322)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E5ACA: fast_function (ceval.c:4322)
==8118==by 0x4E5796: call_function (ceval.c:4250)
==8118==by 0x4DF8C7: PyEval_EvalFrameEx (ceval.c:2826)
==8118==by 0x4E5ACA: fast_function (ceval.c:4322)
==8118==by 0x4E5796: 

[issue19787] Fix PyThread_set_key_value() strange behaviour

2013-12-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5d078b0bae75 by Victor Stinner in branch 'default':
Issue #19787: PyThread_set_key_value() now always set the value
http://hg.python.org/cpython/rev/5d078b0bae75

--

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



[issue10915] Make the PyGILState API compatible with multiple interpreters

2013-12-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5d078b0bae75 by Victor Stinner in branch 'default':
Issue #19787: PyThread_set_key_value() now always set the value
http://hg.python.org/cpython/rev/5d078b0bae75

--
nosy: +python-dev

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



[issue15751] Support subinterpreters in the GIL state API

2013-12-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5d078b0bae75 by Victor Stinner in branch 'default':
Issue #19787: PyThread_set_key_value() now always set the value
http://hg.python.org/cpython/rev/5d078b0bae75

--
nosy: +python-dev

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



[issue15582] Enhance inspect.getdoc to follow inheritance chains

2013-12-13 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Hello!

Here's a patch. Currently it lacks doc updates, but if the solution is okay, 
then I could provide them.

--
keywords: +patch
nosy: +Claudiu.Popa
Added file: http://bugs.python.org/file33118/inspect_getdoc.patch

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



[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 The simplest solution is just revert a part of the patch for issue15989.

The revert reintroduced the integer overflow:

 self-ufds[i].events = (short)PyLong_AsLong(value);

--

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



[issue10915] Make the PyGILState API compatible with multiple interpreters

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #15751.

--

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



[issue15751] Support subinterpreters in the GIL state API

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 FYI I fixed a weird behaviour of the PyThread_set_key_value() function.  The 
 change has indirectly on impact on test.support.run_in_subinterp():

The impact was a bug. I reverted my changeset and pushed a new changeset which 
leaves _PyGILState_NoteThreadState() unchanged.

--

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



[issue19847] Setting the default filesystem-encoding

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I'm closing this issue as invalid for the same reason than I closed the issue 
#19846:
http://bugs.python.org/issue19846#msg205675

--
resolution:  - invalid
status: open - closed

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



[issue19385] dbm.dumb should be consistent when the database is closed

2013-12-13 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Serhiy, what's the status for this? Should this be targeted for 3.5?

--

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



[issue19972] Leak in pickle (?)

2013-12-13 Thread Stefan Krah

Stefan Krah added the comment:

This patch fixes the leak, but needs review (I do not know the _pickle module
very well).

--
keywords: +patch
Added file: http://bugs.python.org/file33119/issue19972.patch

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



[issue19972] Leak in pickle (?)

2013-12-13 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
stage:  - patch review

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



[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which uses special converter.

--
versions: +Python 3.3
Added file: http://bugs.python.org/file33120/poll_events_mask_overflow.patch

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



[issue19972] Leak in pickle (?)

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

According to the example in the PEP 3121, issue19972.patch is not needed.

In practice, I don't see in PyImport_Cleanup() where tp_clear is called. This 
function calls:

   _PyModule_Clear(mod);
   Py_DECREF(mod);

--
nosy: +haypo

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



[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

With  poll_events_mask_overflow.patch, the following hack can maybe be removed?

/* The 0x is a workaround for AIX.  'revents'
   is a 16-bit short, and IBM assigned POLLNVAL
   to be 0x8000, so the conversion to int results
   in a negative number. See SF bug #923315. */
num = PyLong_FromLong(self-ufds[i].revents  0x);

--

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



[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

+if (uval  USHRT_MAX) {
+PyErr_SetString(PyExc_OverflowError,
+Python int too large for C unsigned int);

The message should be C unsigned short.

The unit tests don't check that USHRT_MAX value is accepted.

--

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Sworddragon

Sworddragon added the comment:

 The fact that write() uses sys.getfilesystemencoding() is either
 a defect or a bad design (I leave the decision to you).

 I have good news for you.  write() does not cal sys.getfilesystemencoding(), 
 because the encoding is set at the time the  file is opened.

Now after some researching I see I wasn't wrong at all. I should've been sayed:

The fact that write() - open() relies on sys.getfilesystemencoding() 
(respectively locale.getpreferredencoding()) at default as encoding is either a 
defect or a bad design (I leave the decision to you).

Or am I overlooking something?

--

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



[issue19972] Leak in pickle (?)

2013-12-13 Thread Stefan Krah

Stefan Krah added the comment:

See #11826 for more details where the freefunc is called.  Perhaps the.
docs or the PEP need an update.

--

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



[issue19385] dbm.dumb should be consistent when the database is closed

2013-12-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Regarding the first issue, I don't believe that the result will be as 
 readable (but I agree with you that it will be better).

Yes, perhaps performance of the dbm.dumb module is not worst this cost. Are you 
have any benchmarking results?

The patch LGTM.

 Should this be targeted for 3.5?

I think yes.

--
stage:  - commit review
versions: +Python 3.5 -Python 3.4

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



[issue19787] Fix PyThread_set_key_value() strange behaviour

2013-12-13 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue19972] Leak in pickle (?)

2013-12-13 Thread Stefan Krah

Stefan Krah added the comment:

The docs say:

inquiry m_clear

A clear function to call during GC clearing of the module object, or NULL 
if not needed.

freefunc m_free

A function to call during deallocation of the module object, or NULL if not 
needed.

So I assume that GC clearing is not happening if sys.exit() is called.  Note 
that
the leak only occurs with sys.exit().

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

New submission from Larry Hastings:

Does it make sense to finally deprecate pyio, so we can eventually delete it?

--
messages: 206060
nosy: larry
priority: normal
severity: normal
status: open
title: Deprecate pyio
versions: Python 3.5

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



[issue19973] Deprecate pyio

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I like the _pyio module! It's useful to test some new features.

For example, I'm using it to identify where a file is destroyed without being 
closed (get where the object was created):
https://bitbucket.org/haypo/misc/src/tip/python/res_warn.py

I didn't find how to implement that using the C module.

It's name is _pyio, not pyio. It is a private module.

It was also written to provide a working and well tested pure Python 
implementation for other Python virtual machines like PyPy, IronPython and 
Jython.

--
nosy: +haypo

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
nosy: +pitrou

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



[issue19969] PyBytes_FromFormatV(%c) and PyString_FromFormatV(%c) don't check for character min/max value

2013-12-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68e0dbc492de by Victor Stinner in branch '3.3':
Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if %c
http://hg.python.org/cpython/rev/68e0dbc492de

New changeset 969e38b2f336 by Victor Stinner in branch 'default':
(Merge 3.3) Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if
http://hg.python.org/cpython/rev/969e38b2f336

--
nosy: +python-dev

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



[issue19973] Deprecate pyio

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Larry, I think Brett won't like you.
(have you read PEP 399?)

--
nosy: +brett.cannon

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

I hadn't!  I guess we're signed up to maintain two implementations of a bunch 
of things for eternity, then.

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

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



[issue19974] tarfile doesn't overwrite symlink by directory

2013-12-13 Thread Antony Mayi

New submission from Antony Mayi:

tarfile.py compared to GNU tar doesn't overwrite existing symlink with 
directory of same name if such directory exists in the extracted tarball.

--
components: Library (Lib)
messages: 206066
nosy: antonymayi
priority: normal
severity: normal
status: open
title: tarfile doesn't overwrite symlink by directory
type: behavior
versions: Python 2.7, Python 3.3

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

 The fact that write() - open() relies on sys.getfilesystemencoding()
 (respectively locale.getpreferredencoding()) at default as encoding is
 either a defect or a bad design (I leave the decision to you).

 Or am I overlooking something?

First, you should probably just drop mentioning write() or print() or any of 
the functions that actually perform I/O.  The crucial decisions about decoding 
are made inside open().

Second, open() is implemented in C.  It cannot rely on 
sys.getfilesystemencoding() as it never calls it.  Internally, 
sys.getfilesystemencoding() simply returns a C global called 
Py_FileSystemDefaultEncoding.  But open() doesn't examine that, either.

Instead, open() determines the default encoding by calling the same function 
that's used to initialize Py_FileSystemDefaultEncoding: get_locale_encoding() 
in Python/pythonrun.c.  Which on POSIX systems calls the POSIX function 
nl_langinfo().

If you want to see the actual mechanisms involved, you should read the C source 
code in Modules/_io in the Python trunk.  open() is implemented as the C 
function io_open() in _iomodule.c.  When it opens a file in text mode without 
an explicit encoding, it wraps it in a TextIOWrapper object; the __init__ 
function for this class is the C function textiowrapper_init() in textio.c.

As for your assertion that this is either a defect or a bad design: I leave 
the critique of that to others.

--

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



[issue19972] Leak in pickle (?)

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yeah, it sounds logical for m_free to do the clearing too (same as tp_dealloc 
vs. tp_clear).

Note that the PEP 3121 scheme turns out to be problematic for proper resource 
management: https://mail.python.org/pipermail/python-dev/2013-August/127862.html

--
nosy: +ncoghlan, pitrou

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



[issue19974] tarfile doesn't overwrite symlink by directory

2013-12-13 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +lars.gustaebel

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Sworddragon

Sworddragon added the comment:

 Instead, open() determines the default encoding by calling the same function 
 that's used to initialize Py_FileSystemDefaultEncoding: get_locale_encoding() 
 in Python/pythonrun.c.  Which on POSIX systems calls the POSIX function 
 nl_langinfo().

open() will use at default the encoding of nl_langinfo() as 
sys.getfilesystemencoding() does on *nix. This is the part that looks dirty to 
me. As soon as LANG is set to C open() will rely on 'ascii' due to 
nl_langinfo() like sys.getfilesystemencoding() does too.

--

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



[issue19385] dbm.dumb should be consistent when the database is closed

2013-12-13 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Here's a benchmark:

- with current patch:


# ./python -S -m timeit -n 1 -s 'import dbm.dumb as dbm; 
d=dbm.open(x.dat, c);d.close()' 'try:' '  len(d)' 'except OSError:' '  pass'
1 loops, best of 3: 1.78 usec per loop


- using 
 try:
 return len(self._index)
 except TypeError:
 raise error('...')


# ./python -S -m timeit -n 1 -s 'import dbm.dumb as dbm; 
d=dbm.open(x.dat, c);d.close()' 'try:' '  len(d)' 'except OSError:' '  pass'
1 loops, best of 3: 3.27 usec per loop


Now this seems odd, maybe catching + reraising an exception has a greater 
overhead than a func call and checking if an attribute is None. Anyway, I agree 
that dbm.dumb is not performance critical.

--

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Stefan Behnel

Stefan Behnel added the comment:

I agree that this is an improvement, but isn't it a bit late for removing a 
public field from a public header file in 3.4, without any preceding 
deprecation?

--
nosy: +scoder

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Nick Coghlan

Nick Coghlan added the comment:

There's an alternative to trying to force a different encoding for the
standard streams when the OS claims ASCII as the OS encoding: we can
default to surrogateescape as the error handler, on the assumption that
whatever the *real* OS encoding is, it definitely isn't ASCII.

That means we'll still complain about displaying improperly encoded data
when the OS suggests a plausible encoding, but we won't fail entirely just
because someone enabled (deliberately or accidentally) the POSIX locale.

--

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Nick Coghlan

Nick Coghlan added the comment:

Unfortunately Stefan has a point - what's the migration path for C API
users that were relying on that struct field?

--

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



[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2

2013-12-13 Thread Reuben Garrett

Reuben Garrett added the comment:

On Sat, Dec 7, 2013 at 1:35 PM, Gregory P. Smith rep...@bugs.python.orgwrote:

 I fixed this in 3.3 and 3.4 several weeks ago.


--

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



[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2

2013-12-13 Thread Reuben Garrett

Reuben Garrett added the comment:

On Sat, Dec 7, 2013 at 1:35 PM, Gregory P. Smith rep...@bugs.python.org
wrote:
 I fixed this in 3.3 and 3.4 several weeks ago.

Sorry for the duplicate message a few moments ago … fat-fingered my send
button.

So, has the fix just not reached the Portage tree yet? I don't fully
understand how upstream commits reach Portage, and would appreciate any
direction you might have to avoid reporting something already fixed.

--

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 I agree that this is an improvement, but isn't it a bit late for removing a 
 public field from a public header file in 3.4, without any preceding 
 deprecation?

The header is not public, it is private. The structure in not
documented (in Doc/c-api/*.rst). There is only one public documented
method: PyFrame_GetLineNumber().

If you rely on such implement detail (PyFrameObject field), you have
to be prepared for breakage between Python releases (3.x).

Do you know applications relying on the field?

How don't see how you would like to deprecate the field since it's
private and not documented.

--

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

2013/12/13 Victor Stinner victor.stin...@gmail.com:
 The header is not public, it is private.

Hum, I'm not clear. frameobject.h is not included in Python.h, so the
classic #include Python.h doesn't give you access to PyFrameObject
structure. You have to add a second #include frameobject.h. All
definitions in this header are also surrounded by #ifndef
Py_LIMITED_API ... #endif, so the fields are not part of the stable
API.

--

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 278dd7eb2f2b by Victor Stinner in branch 'default':
Issue #14432: Document the removal of the PyFrameObject.f_tstate field
http://hg.python.org/cpython/rev/278dd7eb2f2b

--

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Stefan Behnel

Stefan Behnel added the comment:

 what's the migration path for C API users that were relying on that struct 
 field?

Depends on how you use it, I guess. In many cases (at least for Cython and 
likely some other low-level tools), it could be as simple as

#if PY_VERSION_HEX  0x030400B2
// set f_tstate here
#endif

My guess is that some (most?) code that sets this field only does so because 
CPython previously depended on it being set. (Stackless comes to mind, not sure 
if that's supposed to work with 3.x...)

Read access is an entirely different thing, though. No idea what other tools 
might be using it for. I'm sure there are debugging/tracing tools out there 
that make use of the frame internals. Would it be correct for them to just use 
the current thread state instead? E.g. from a signal handler that analysis the 
current threads?

On a quick look through Ohloh's code search I only found a couple of other 
occurrences outside of CPython so far.

http://code.ohloh.net/search?s=%22f_tstate%22fe=cfilterChecked=true

Disclaimer: it's easy to fix for me with the above conditional, so I won't 
argue much about keeping up compatibility here. I'm merely raising the issue 
because there is evidently code that this change breaks.

--

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 All
 definitions in this header are also surrounded by #ifndef
 Py_LIMITED_API ... #endif, so the fields are not part of the stable
 API.

Stable ABI, not API.

That said, I agree the field should have been private anyway.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-12-13 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
nosy:  -eli.bendersky

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 Depends on how you use it, I guess. In many cases (at least for Cython and 
 likely some other low-level tools), it could be as simple as

 #if PY_VERSION_HEX  0x030400B2
 // set f_tstate here
 #endif

Why would you set f_tstate field? Frame constructor (PyFrame_New) and
Generators (gen_send_ex) do it for you.

Cython does touch this field? Stackless Python supports Python 3 (3.4)?

If something relies on f_tstate, it's easy to avoid this field.

 Would it be correct for them to just use the current thread state instead? 
 E.g. from a signal handler that analysis the current threads?

The faulthandler has different low-level C signal handlers and it
doesn't use f_tstate, but PyGILState_GetThisThreadState() (or
PyThreadState_Get() if thread support is disabled).

I was surprised that it was so easy to modify ceval.c: in most cases,
you already have the thread state. So I just passed the thread state
to the function.

--

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



[issue19230] Reimplement the keyword module in C

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Two things. One, no one has shown a startup improvement using the official 
startup benchmarks (either normal or nosite). That needs to be established to 
show an actual benefit.

Second, PEP 399 requires the pure Python version stick around, else you need to 
request an exception to drop keyword.py from python-dev.

I think you have a chance of getting the exception if you can show an actual 
startup improvement.

--

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



[issue19230] Reimplement the keyword module in C

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 Second, PEP 399 requires the pure Python version stick around, else you need 
 to request an exception to drop keyword.py from python-dev.

I don't understand the purpose of providing a Python implementation of the 
keyword module. If you look at the current implementation, I don't know that 
anything other than CPython can use it. The code uses Python/graminit.c to 
regenerate the module.

But I don't want to fight if you don't care of minor speedup, so I'm closing 
the issue.

--
resolution:  - rejected
status: open - closed

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



[issue19973] Deprecate pyio

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Only if we keep the C version around do we have to care about two versions. =)

--

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



[issue19230] Reimplement the keyword module in C

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

You're right, the regeneration might be specific to CPython (although maybe it 
should work from Grammar/Grammar instead?), but that's just creating the Python 
file which we check into the stdlib, so any VM can use it, they just can't 
recreate it (which is fine since every other VM works from a CPython release).

--

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



[issue19969] PyBytes_FromFormatV(%c) and PyString_FromFormatV(%c) don't check for character min/max value

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

It was easy to fix the issue on Python 3.3 (there are already unit tests on 
PyBytes_FromFormatV).

I prefer to leave Python 2.7 with it's current behaviour because applications 
running on Python 2.7 may be old and might be rely on the integer overflow. 
PyString is the native string type, so it is usually used. Whereas in Python 
3, bytes is not the native type. I chose to fix Python 3.3 because it's a 
recent release and I believe that applications are more recent and if they rely 
on the bug, they can more easily fixed.

(Ok, I bet that in practice, nobody cares of non-ASCII characters in 
PyBytes_FromFormatV() because PyBytes_FromFormatV() is probably not used in the 
wild.)

So let close this minor issue.

--
resolution:  - fixed
status: open - closed

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



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-12-13 Thread Stefan Behnel

Stefan Behnel added the comment:

 frameobject.h is not included in Python.h, so the
 classic #include Python.h doesn't give you access to PyFrameObject
 structure. You have to add a second #include frameobject.h.

Ah, right. I keep misremembering that, because in order to do anything 
non-trivial with frames you'll eventually end up importing that header file, so 
it feels almost public.

I think it's reasonable to expect low-level tools to adapt manually to this 
kind of changes (or at least recompile for a specific CPython version), and 
it's unlikely that there's much other code that would make use of this field 
specifically.

So, no objection to keeping the change in 3.4 as it is (and I see that you 
already documented it).

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

We tried a pure python implementation of io once.  Didn't go so well.  :p

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 We tried a pure python implementation of io once.  Didn't go so well.  :p

It is _pyio.

Note: _pyio is not 100% *pure* Python, it relies on FileIO which is implemented 
in C. I always found this surprising. One day I will maybe rewrite it using 
os.read() and os.write() :-)

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Note: _pyio is not 100% *pure* Python, it relies on FileIO which is
 implemented in C. I always found this surprising. One day I will maybe
 rewrite it using os.read() and os.write() :-)

Then you need to rewrite os.read() and os.write() in pure Python!

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Key point is it didn't go so well **for us**; works fine for PyPy.

--

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



[issue19975] Remove unused imports from webbrowser

2013-12-13 Thread Claudiu.Popa

New submission from Claudiu.Popa:

The attached patch removes three unused imports in webbrowser module.

--
components: Library (Lib)
files: webbrowser_unused_imports.patch
keywords: patch
messages: 206091
nosy: Claudiu.Popa, georg.brandl
priority: normal
severity: normal
status: open
title: Remove unused imports from webbrowser
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file33121/webbrowser_unused_imports.patch

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



[issue19973] Deprecate pyio

2013-12-13 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

PyPy also has a C-translated version of the io module.
It's a bit faster I think, but more importantly it has correct behavior with 
signals and other asynchronous errors.

_pyio.py can be stopped in the middle of any function, and is not completely 
signal-safe.

--
nosy: +amaury.forgeotdarc

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Stefan Krah

New submission from Stefan Krah:

I was just reading the _pickle sources and it appears that AC does not
generate a second arg for METH_NOARGS functions:

#define _PICKLE_PICKLERMEMOPROXY_CLEAR_METHODDEF\
{clear, (PyCFunction)_pickle_PicklerMemoProxy_clear, METH_NOARGS, 
_pickle_PicklerMemoProxy_clear__doc__},

static PyObject *
_pickle_PicklerMemoProxy_clear(PicklerMemoProxyObject *self)


While this is a common occurrence in the source tree, the consensus
in #15402 was that the unused second arg should be present, e.g.:

msg166250
msg166405

--
components: Demos and Tools
messages: 206093
nosy: larry, skrah
priority: normal
severity: normal
status: open
title: Argument Clinic: generate second arg for METH_NOARGS
type: behavior
versions: Python 3.4

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



[issue19385] dbm.dumb should be consistent when the database is closed

2013-12-13 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

IMHO it is a bug fix, not a new feature, and could be applied in 3.3 and 3.4.

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I prefer to omit the unused parameter, even if NULL *is* passed to the function.

If you prefer to add the unused parameter, what do you propose to avoid 
compiler warnings if unused parameters are checked?

--
nosy: +haypo

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

Stefan is right.  I'll fix Clinic.

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Then if Jython and IronPython are not using _pyio we can probably remove the 
file.

--

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Sworddragon

Sworddragon added the comment:

By the way I have found a valid use case for LANG=C. udev and Upstart are not 
setting LANG which will result in the ascii encoding for invoked Python 
scripts. This could be a problem since these applications are commonly dealing 
with non-ascii filesystems.

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Then if Jython and IronPython are not using _pyio we can probably remove the 
 file.

_pyio can be useful for prototyping. Whether or not other
implementations use it is quite irrelevant IMO.

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

Yes, but it's a small utility.  If it costs nothing to maintain _pyio then 
okay.  But if we're spending measurable time on it but it's only a nice-to-have 
then we should drop it.

(Full disclosure: I have no idea how much work goes into maintaining _pyio.)

--

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

By the way, Java behaves as Python: with LANG=C, Java uses ASCII:

http://stackoverflow.com/questions/13415975/cant-read-utf-8-filenames-when-launched-as-an-upstart-service

 udev and Upstart are not setting LANG

So it's an issue in udev and Upstart. See for example:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/1235483
https://bugs.launchpad.net/ubuntu-translations/+bug/1208272

I found examples using LANG=$LANG ... when running a command in Upstart for 
example. I found another example using:


if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
elif [ -r /etc/environment ]; then
. /etc/environment
export LANG LANGUAGE
fi

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Stefan Krah

Stefan Krah added the comment:

STINNER Victor rep...@bugs.python.org wrote:
 If you prefer to add the unused parameter, what do you propose to avoid 
 compiler warnings if unused parameters are checked?

This works quite portably in _decimal (I don't get warnings from gcc, icc,
suncc, Visual Studio, aCC, clang):

#if defined(__GNUC__)  !defined(__INTEL_COMPILER)
  #define UNUSED __attribute__((unused))
#else
  #define UNUSED
#endif

static PyObject *
signaldict_copy(PyObject *self, PyObject *args UNUSED)
{
return flags_as_dict(SdFlags(self));
}

We could call the macro PY_UNUSED or something.

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

A quick google suggests:

http://sourcefrog.net/weblog/software/languages/C/unused.html

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

To do it properly with Clang requires a pragma:

http://stackoverflow.com/questions/3417837/what-is-the-best-way-to-supress-unused-variable-x-warning/18724213#18724213

What a mess.

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 We could call the macro PY_UNUSED or something.

I would prefer Py_UNUSED name. This sounds like a nice addition to 
Include/pymacros.h.

In C++, you can omit the parameter name, so the macro should take the parameter 
name: Py_UNUSED(name). Example:

   int foo(int Py_UNUSED(bar)) { return 1 }

In Visual Studio, you can use:

#define Py_UNUSED(NAME) __pragma(warning(suppress:4100)) NAME

For Clang, you can try:

#define Py_UNUSED(NAME) _Pragma(diagnostic ignored -Wunused) NAME

--

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Sworddragon

Sworddragon added the comment:

 https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/1235483

After opening many hundred tickets I would say: With luck this ticket will get 
a response within the next year. But in the worst case it will be simply 
refused.


 I found examples using LANG=$LANG

This Upstart script:

exec echo LANG=$LANG  /tmp/test.txt

Will result in the following:

root@ubuntu:~# start test
test stop/waiting
root@ubuntu:~# cat /tmp/test.txt
LANG=

At least in this example I'm getting on my system an empty LANG.

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Stefan Krah

Stefan Krah added the comment:

Stefan Krah rep...@bugs.python.org wrote:
 The macro I posted really works on all obscure buildbot platforms.

N.B. clang also defines __GNUC__, as does the intel compiler.

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Stefan Krah

Stefan Krah added the comment:

Larry Hastings rep...@bugs.python.org wrote:
 To do it properly with Clang requires a pragma:

Hmm. I just tested and clang warns with -Wall -W, but does not warn if
__attribute__((unused)) is present.

The macro I posted really works on all obscure buildbot platforms.

--

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Toshio Kuratomi

Toshio Kuratomi added the comment:

It's not a bug for upstart, systemd, sysvinit, cron, etc to use LANG=C.  The 
POSIX locale is the only locale guaranteed to exist on a system.  Therefore 
these low level services should be using LANG=C.  Embedded systems, thin 
clients, and other low memory or low disk devices may benefit from shipping 
without any locales.

--

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



[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-13 Thread Stefan Krah

Stefan Krah added the comment:

STINNER Victor rep...@bugs.python.org wrote:
 I would prefer Py_UNUSED name. This sounds like a nice addition to 
 Include/pymacros.h.

Yes, Py_UNUSED is nicer.

--

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



[issue19977] Use surrogateescape error handler for sys.stdout on UNIX for the C locale

2013-12-13 Thread STINNER Victor

New submission from STINNER Victor:

When LANG=C is used to get the english language (which is a mistake, LC_CTYPE=C 
should be used instead) or when Python is started with an empty environment (no 
environment variable), Python gets the POSIX locale (aka C locale) for the 
LC_CTYPE (encoding) locale.

Standard streams use the locale encoding, which is usually ASCII with POSIX 
locale on most platforms (except on AIX: ISO 8859-1). In this case, data read 
from the OS (environment variables, command line arguments, filenames, etc.) 
may contain surrogate characters because of the internal usage of the 
surrogateescape error handler (see the PEP 383 for the rationale).

The problem is that standard output uses the strict error handler, and so 
print() fails to display OS data like filenames.

Example, ls command in Python:
---
import os
for name in sorted(os.listdir()): print(name)
---

Try it with LANG=C python ls.py in a directory containing non-ASCII 
characters and you will get unicode errors.

Issues #19846 and #19847 are examples of this annoyance.

I propose to use also the surrogateescape error handler for sys.stdout if the 
POSIX locale is used for LC_CTYPE at startup. Attached patch implements this 
idea.

With the patch, LANG=C python ls.py almost works as filenames and stdout are 
byte streams, even if the Unicode type is used.

--
components: Unicode
files: c_locale_surrogateescape.patch
keywords: patch
messages: 206111
nosy: Sworddragon, a.badger, ezio.melotti, haypo, loewis, ncoghlan
priority: normal
severity: normal
status: open
title: Use surrogateescape error handler for sys.stdout on UNIX for the C 
locale
versions: Python 3.4
Added file: http://bugs.python.org/file33122/c_locale_surrogateescape.patch

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



[issue19847] Setting the default filesystem-encoding

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I created the issue #19977 as a follow up of this one: Use surrogateescape 
error handler for sys.stdout on UNIX for the C locale.

--

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I created the issue #19977 as a follow up of this one: Use surrogateescape 
error handler for sys.stdout on UNIX for the C locale.

--

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



[issue19977] Use surrogateescape error handler for sys.stdin and sys.stdout on UNIX for the C locale

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

Oh, in fact, sys.stdin is also modified by the patch (as I expected).

--
title: Use surrogateescape error handler for sys.stdout on UNIX for the C 
locale - Use surrogateescape error handler for sys.stdin and sys.stdout on 
UNIX for the C locale

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



[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Created http://bugs.python.org/issue19978 to track using runpy.run_path in 3.5.

--
resolution:  - fixed
status: open - closed

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



[issue19978] Update multiprocessing.spawn to use runpy.run_path

2013-12-13 Thread Brett Cannon

New submission from Brett Cannon:

Once the 'target' parameter for runpy.run_path lands then multiprocessing.spawn 
should be updated to use it.

--
components: Library (Lib)
messages: 206117
nosy: brett.cannon, jnoller, ncoghlan, sbt
priority: normal
severity: normal
stage: test needed
status: open
title: Update multiprocessing.spawn to use runpy.run_path
versions: Python 3.5

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I propose to modify the error handler, the encoding cannot be modified. See my 
following message explaining why it's not possible to change the encoding:
http://bugs.python.org/issue19846#msg205675

--

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



[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cea42629ddf5 by Brett Cannon in branch 'default':
Issue #19946: Raise ImportError when the main module cannot be found
http://hg.python.org/cpython/rev/cea42629ddf5

--
nosy: +python-dev

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



[issue19977] Use surrogateescape error handler for sys.stdin and sys.stdout on UNIX for the C locale

2013-12-13 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray

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



[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-13 Thread Olivier Grisel

Olivier Grisel added the comment:

Why has this issue been closed? Won't the spawn and forkserver mode work in 
Python 3.4 for Python program started by a Python script (which is probably the 
majority of programs written in Python under unix)?

Is there any reason not to use the `imp.load_source` code I put in my patch as 
a temporary workaround if the cleaner runpy.run_path solution is too tricky to 
implement for the Python 3.4 release time frame?

--

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



  1   2   >