[issue19842] selectors: refactor BaseSelector implementation

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

Charles-François Natali added the comment:

 Guido van Rossum added the comment:

 LGTM, although I wish that you had time to implement the comment TODO: 
 Subclasses can probably optimize this even further rather than just 
 shuffling the existing code around. :-)

I will look a this, but I rather take care of the API than
implementation details :-)
Also, I'm not sure that modify() is actually a performance-critical
code-path: do you have any semi-realistic asyncio-based benchmark I
could use?

--

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


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

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



[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset efcdf2a70f2a by Gregory P. Smith in branch '3.3':
Undo supposed fix for Issue #15798 until I understand why this is
http://hg.python.org/cpython/rev/efcdf2a70f2a

New changeset ddbf9632795b by Gregory P. Smith in branch 'default':
Undo supposed fix for Issue #15798 until I understand why this is
http://hg.python.org/cpython/rev/ddbf9632795b

--

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



[issue18885] handle EINTR in the stdlib

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

Charles-François Natali added the comment:

Just for the record, I was initially in favor of recomputing the
timeout and retrying upon EINTR, but Guido prefers to return empty
lists, and since that's a better compromise than the current situation
(I've seen *many* people complaining on EINTR popping-up at random
points in the code, including myself), I went ahead and implemented
it.

AFAICT, an early return for calls such as poll()/epoll() etc is
something which is definitely acceptable: if you have a look at e.g.
Tornado, Twisted  Co, they all return empty lists on EINTR.

 I've always had the implicit understanding that if I use an *infinite* 
 timeout then  the call will not timeout.

Well, I've always assumed that time.sleep(n) would sleep n seconds, but:

static int
floatsleep(double secs)
[...]
Py_BEGIN_ALLOW_THREADS
err = select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, t);
Py_END_ALLOW_THREADS
if (err != 0) {
#ifdef EINTR
if (errno == EINTR) {
if (PyErr_CheckSignals())
return -1;
}
else
#endif
{
PyErr_SetFromErrno(PyExc_IOError);
return -1;
}
}
[...]


So really, I'm like Gregory: I don't care which solution we chose, but
I just don't want to have to let the user handle EINTR.

--

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



[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2013-12-01 Thread Claudiu.Popa

Changes by Claudiu.Popa pcmantic...@gmail.com:


--
nosy: +Claudiu.Popa

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2013-12-01 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Hi. Here's a patch which adds `copy_function` parameter to `shutil.move`.

--
keywords: +patch
Added file: http://bugs.python.org/file32917/shutil.patch

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



[issue19831] tracemalloc: stop the module later at Python shutdown

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cc8953ea3c7e by Victor Stinner in branch 'default':
Closes #19831: Stop tracemalloc later at Python shutdown to be able to use
http://hg.python.org/cpython/rev/cc8953ea3c7e

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue5885] uuid.uuid1() is too slow

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Instead hexadecimals in _long_from_uuid_t you can use _PyLong_FromByteArray.

However adding new C implemented module has hight cost. I doubt that the speed 
up of UUID generation is worth this cost.

--
nosy: +serhiy.storchaka

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



[issue19834] Unpickling exceptions pickled by Python 2

2013-12-01 Thread Walter Dörwald

Walter Dörwald added the comment:

Here's an updated version of the patch, addressing most of Alexandre's comments.

--
Added file: http://bugs.python.org/file32918/python-2-exception-pickling-2.diff

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



[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread STINNER Victor

STINNER Victor added the comment:

 I think that's a cleaner design.

For common containers like Sequence or Mapping, ABC are useful. But I don't 
expect new implementations of BaseSelector. Is it just for purity? :-p

--
nosy: +haypo

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



[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread STINNER Victor

STINNER Victor added the comment:

(I'm not opposed to the change, I'm just asking.)

--

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



[issue19776] Provide expanduser() on Path objects

2013-12-01 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Hello. Here's a patch for `expanduser()`.

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

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



[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

In those protocols where client and server exchange a lot of commands and 
responses in a single session, such as FTP, modify() is going to be called many 
times.
I don't have actual numbers but I remember that using epoll.modify() was one of 
those relatively small optimizations which all put together led to current 
pyftpdlib performances. For poll() and epoll() pollers I see no reason not to 
use the specialized modify().

That aside, what actually *does* make a big difference and it is very important 
is to unregister a fd for writing (EVENT_WRITE) when there's no more data to 
send, and that's something that should be done at a higher level 
(transport.write() and anywhere else some data is sent).

--

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



[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Vajrasky Kok

New submission from Vajrasky Kok:

Steps to reproduce the bug:
1. Download cute cat picture from internet. Name it CuteCat.jpg.

 import os
 os.listdir('.')
['CuteCat.jpg']

2. Create symbolic link.

 os.symlink('CuteCat.jpg', 'Aaawww.lnk')
 os.listdir('.')
['Aaawww.lnk', 'CuteCat.jpg']

3. Do it again.

 os.symlink('CuteCat.jpg', 'Aaawww.lnk')
Traceback (most recent call last):
  File stdin, line 1, in module
FileExistsError: [Errno 17] File exists: 'CuteCat.jpg'

Amusingly, it only happens on 3.4 (both Windows and Linux). 3.3 gives correct 
error message (in Linux, I did not test it on Windows). 2.7 omits the file 
information (in Linux, I did not test it on Windows). I'll check again the 
behaviour on Windows for 2.7 and 3.3.

Do we need unit test for this? Will we change the error message again in the 
future? For now, I omit it. Let me know if we need unit test.

--
components: Extension Modules, Windows
files: fix_error_message_on_creating_already_existed_symbolic_link.patch
keywords: patch
messages: 204899
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Misleading error on creating already existed symlink
type: behavior
versions: Python 3.4
Added file: 
http://bugs.python.org/file32920/fix_error_message_on_creating_already_existed_symbolic_link.patch

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



[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Python 2.7 on Windows does not have symlink.

Python 3.3 on Windows got the same symptom as Python 3.4. Do we need to fix it?

--

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



[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f48f302f54aa by Charles-François Natali in branch 'default':
Issue #19842: Refactor BaseSelector to make it an actual usable ABC.
http://hg.python.org/cpython/rev/f48f302f54aa

--
nosy: +python-dev

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



[issue19842] selectors: refactor BaseSelector implementation

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

Charles-François Natali added the comment:

 STINNER Victor added the comment:

 I think that's a cleaner design.

 For common containers like Sequence or Mapping, ABC are useful. But I don't 
 expect new implementations of BaseSelector. Is it just for purity? :-p

There are already implementations in the test suite, but the main
reason is for documentation purposes (i.e. to document clearly which
methods are available, and which are optional).
IMO, ABC make documentation more clear, and also make it easier for
third-party implementations.

I don't have a strong opinion on this, my real concern is really just
the documentation, so if you can propose a documentation patch that
makes things clear, I'm perfectly fine with removing BaseSelector from
the API :-)

--

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



[issue19506] subprocess.communicate() should use a memoryview

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

Charles-François Natali added the comment:

Impressive speedup :-)

--

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



[issue19837] Wire protocol encoding for the JSON module

2013-12-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 The problem with adding new APIs with different names to the JSON
 module is that it breaks symmetry with other wire protocols. The
 quartet of module level load, loads, dump and dumps functions has
 become a de facto standard API for wire protocols.

Breaking symmetry is terribly less silly than having a second module
doing almost the same thing, though.

 The advantage of a separate jsonb module is that it becomes easy to
 say json is the text transform that dumps and loads from a Unicode
 string, jsonb is the wire protocol that dumps and loads a UTF encoded
 byte sequence.

This is a terribly lousy design.

--

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



[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Guido's point was that it is already a bug in code to not check the elapsed
 time after a select call returns rather than assuming the full timeout time
 has elapsed.

I don't understand how it's a bug. You're assuming select() has
unreliable timing, but it doesn't (if you are using the same clock).

--

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



[issue10803] ctypes: better support of bytearray objects

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is preliminary patch which makes bytearray support in ctypes better.

--
keywords: +patch
nosy: +amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka
stage:  - patch review
versions: +Python 3.5 -Python 3.2
Added file: http://bugs.python.org/file32921/ctype_bytearray.patch

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



[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

On dim., 2013-12-01 at 08:14 +, Charles-François Natali wrote:
 So really, I'm like Gregory: I don't care which solution we chose, but
 I just don't want to have to let the user handle EINTR.

Well this is wishing thinking, since by returning an empty list you
force the user to handle EINTR - just in a different way.

--

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



[issue17397] ttk::themes missing from ttk.py

2013-12-01 Thread klappnase

klappnase added the comment:

 Are 'unloaded but available' themes really available to use?

Yes.

 Does Style.theme_use(available_name) work?

Yes.

 If so, it seems to me that available_name should
 be reported by theme_names.

I agree, one should think so. I am not 100% certain about that, but to me it 
seems that on the tcl side ttk:themes is newer and thus preferable to theme 
names which maybe is only still there for backwards compatibility.

Since as a Tkinter user I like Tkinter methods to behave like their Tcl/Tk 
counterparts (which, if nothing else, helps a lot in reading and understanding  
tcl code/documentation (and possibly translating tcl code into Python)) I had 
rather kept theme_names() intact to avoid confusion. Maybe there could simply a 
line like Deprecated since Python-xy, use themes() instead. be added to 
theme_names' doc string ?

--

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Arfrever. Does this patch fix the test?

--
Added file: http://bugs.python.org/file32922/test_json_surrogates.patch

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



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Where ifconfig is located?

--

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



[issue16549] regression: -m json.tool module is broken

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This doesn't look related to json tests. Are there other tests failures with 
similar symptoms (_assert_python is None)?

--

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



[issue18885] handle EINTR in the stdlib

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

Charles-François Natali added the comment:

 Well this is wishing thinking, since by returning an empty list you
 force the user to handle EINTR - just in a different way.

I know that returning an empty list changes the semantics: I just
think that's better - or not as bad - than the current possibility of
having any single piece of code possibly die upon EINTR.

If you want to implement retry with timeout re-computation, I'm not
the one to who must be convinced :-)

(BTW, if we go this way, then time.sleep() should probably also be
fixed to retry upon EINTR).

--

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



[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I know that returning an empty list changes the semantics: I just
 think that's better - or not as bad - than the current possibility of
 having any single piece of code possibly die upon EINTR.
 
 If you want to implement retry with timeout re-computation, I'm not
 the one to who must be convinced :-)

Or, since we now have the selectors module, we could let select() live
with the current semantics.

By the way, it's already too late for 3.4, which is in feature freeze.

--

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



[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Selector.Select() may return an empty list when interrupted, but the doc 
doesn't say so. The reader will probably trust the statement that If timeout 
is None, the call will block until a monitored file object becomes ready.

--
assignee: docs@python
components: Documentation
messages: 204914
nosy: docs@python, neologix, pitrou
priority: normal
severity: normal
status: open
title: selectors behaviour on EINTR undocumented
type: behavior
versions: Python 3.4

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



[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

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

New submission from Charles-François Natali:

asyncio makes heavy use of SIGCHLD for subprocesses.
A consequence of this if that a lot of syscalls can fail with EINTR (see e.g. 
issue #18885).

The attached patch uses SA_RESTART (through signal.siginterrupt()) to limit 
EINTR occurrences, e.g. :

$ ./python -c import os; from signal import *; signal(SIGALRM, lambda *args: 
None); alarm(1); os.read(0, 1)
Traceback (most recent call last):
  File string, line 1, in module
InterruptedError: [Errno 4] Interrupted system call


With siginterrupt(False):

$ ./python -c import os; from signal import *; signal(SIGALRM, lambda *args: 
None); siginterrupt(SIGALRM, False); alarm(1); os.read(0, 1)
[manual interruption]
^CTraceback (most recent call last):
  File string, line 1, in module
KeyboardInterrupt


It doesn't come with test because it's hard to come up with a syscall that's 
guaranteed to be restarted on al OS (and also because I'm having a hard time 
with all those mock-based asyncio tests ;-), but at least it doesn't break the 
test suite :-)

See https://groups.google.com/d/topic/python-tulip/9T2_tGWe0Sc/discussion for 
more background.

--
components: Library (Lib)
files: asyncio_sa_restart.diff
keywords: patch
messages: 204915
nosy: gvanrossum, neologix
priority: normal
severity: normal
stage: patch review
status: open
title: asyncio: limit EINTR occurrences with SA_RESTART
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32923/asyncio_sa_restart.diff

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



[issue19849] selectors behaviour on EINTR undocumented

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

Charles-François Natali added the comment:

How about this?

--
keywords: +needs review, patch
stage:  - patch review
Added file: http://bugs.python.org/file32924/selectors_select_signal.diff

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



[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Looks good to me.

--

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



[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b0c4c7f04f05 by Charles-François Natali in branch 'default':
Issue #19849: selectors: Document the possibility of early select() wakeup upon
http://hg.python.org/cpython/rev/b0c4c7f04f05

--
nosy: +python-dev

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



[issue19849] selectors behaviour on EINTR undocumented

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

Changes by Charles-François Natali cf.nat...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 3.2 -Python 3.4

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



[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

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

Changes by Charles-François Natali cf.nat...@gmail.com:


--
status: open - pending

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



[issue1611154] os.path.exists(file/) failure on Solaris 9

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

Changes by Charles-François Natali cf.nat...@gmail.com:


--
resolution:  - rejected
stage: patch review - committed/rejected
status: pending - closed

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



[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

This is the patch for Python 3.3.

--
Added file: 
http://bugs.python.org/file32925/fix_python_33_windows_create_existed_symlink.patch

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



[issue19851] imp.reload problem with submodule

2013-12-01 Thread Ronald Oussoren

New submission from Ronald Oussoren:

To reproduce:

* create a package with the following structure:

pkg/
  __init__.py
  _sub.py

* __init__.py contains:

   from pkg._sub import *

* the contents of _sub.py is not important

* in a python shell do:

 import pkg._sub as s
 import imp
 imp.reload(s)
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imp.py, line 
297, in reload
return importlib.reload(module)
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/importlib/__init__.py,
 line 123, in reload
raise ImportError(_bootstrap._ERR_MSG.format(name), name=name)
ImportError: No module named 'pkg._sub'
 

In earlier python versions this reloaded the pkg._sub module.  Importing _sub 
from __init__ doesn't seem to be important.

--
components: Library (Lib)
keywords: 3.3regression
messages: 204920
nosy: brett.cannon, eric.snow, ncoghlan, ronaldoussoren
priority: normal
severity: normal
stage: test needed
status: open
title: imp.reload problem with submodule
type: behavior
versions: Python 3.4

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



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

/bin/ifconfig
(/bin is in ${PATH}.)

--

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



[issue19828] test_site fails with -S flag

2013-12-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Before patch:
$ ./python -S Lib/test/test_site.py 
Traceback (most recent call last):
  File Lib/test/test_site.py, line 28, in module
raise unittest.SkipTest(importation of site.py suppressed)
unittest.case.SkipTest: importation of site.py suppressed

After patch:
$ ./python -S Lib/test/test_site.py 
s
--
Ran 21 tests in 0.003s

OK (skipped=21)

With this patch, ./python -S Lib/test will report test_site as *skipped* not 
*failed*.

My grand plan is to make ./python -S Lib/test successful.

--
Added file: http://bugs.python.org/file32926/fix_test_site_with_s_flag_v2.patch

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



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

This test passes (on all branches) after adding /bin to hardcoded list in 
uuid._find_mac().

Minimal solution: Add /bin and /usr/bin to that list.
Better solution: Search ${PATH}+['/sbin/', '/usr/sbin'] for ifconfig. In 
=3.2 os.get_exec_path() can be used.

--

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



[issue19775] Provide samefile() on Path objects

2013-12-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Updated grammar according to Arfrever's review. Thanks!

Anyway, should samefile accepts only string? Or should it accept Path object as 
well?

--
Added file: http://bugs.python.org/file32927/pathlib_samefile_v2.patch

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



[issue16549] regression: -m json.tool module is broken

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

No other tests fail in this way.

--

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



[issue19852] Misplaced private API method in pathlib.py

2013-12-01 Thread Vajrasky Kok

New submission from Vajrasky Kok:

In class Path, line 942, you have this comment:

# Public API

but down there, in line 1048, you have this private method:

def _raw_open(self, flags, mode=0o777):

Open the file pointed by this path and return a file descriptor,
as os.open() does.

if self._closed:
self._raise_closed()
return self._accessor.open(self, flags, mode)

Here is the patch to move this private method to where it belongs.

--
components: Library (Lib)
files: move_private_method_to_its_place.patch
keywords: patch
messages: 204926
nosy: pitrou, vajrasky
priority: normal
severity: normal
status: open
title: Misplaced private API method in pathlib.py
versions: Python 3.4
Added file: 
http://bugs.python.org/file32928/move_private_method_to_its_place.patch

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

test_json_surrogates.patch fixes these tests.

--

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



[issue18994] Inside fcntl module, we does not check the return code of all_ins function

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 84148898a606 by Charles-François Natali in branch 'default':
Issue #18994: Add a missing check for a return value in fcntmodule. Patch by
http://hg.python.org/cpython/rev/84148898a606

--
nosy: +python-dev

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



[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue18994] Inside fcntl module, we does not check the return code of all_ins function

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

Charles-François Natali added the comment:

Vajrasky, thanks for the patch!

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

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



[issue19851] imp.reload problem with submodule

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue19853] Add support for Bitrig

2013-12-01 Thread Martin Natano

New submission from Martin Natano:

This patch adds support for Bitrig to 2.7.

--
components: Build
files: cpython2.7-bitrig.patch
keywords: patch
messages: 204930
nosy: Martin.Natano
priority: normal
severity: normal
status: open
title: Add support for Bitrig
versions: Python 2.7
Added file: http://bugs.python.org/file32929/cpython2.7-bitrig.patch

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



[issue19854] Add support for Bitrig to 3.4

2013-12-01 Thread Martin Natano

New submission from Martin Natano:

This patch adds support for Bitrig to 3.4.

--
components: Build
files: cpython3.4-bitrig.patch
keywords: patch
messages: 204931
nosy: Martin.Natano
priority: normal
severity: normal
status: open
title: Add support for Bitrig to 3.4
versions: Python 3.4
Added file: http://bugs.python.org/file32930/cpython3.4-bitrig.patch

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



[issue19853] Add support for Bitrig to 2.7

2013-12-01 Thread Martin Natano

Changes by Martin Natano natanopta...@gmail.com:


--
title: Add support for Bitrig - Add support for Bitrig to 2.7

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



[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2013-12-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The uuid._find_mac() function tests that executable file exist before run it. 
First it tries to run unmodified executable name (i.e. from $PATH) and then 
from the /sbin or /usr/sbin directories. However test for unmodified executable 
name is wrong, actually it tests that executable name exists in current 
directory rather than in $PATH.

As a result uuid._find_mac() always fails on platforms where ifconfig located 
in $PATH but not in /sbin or /usr/sbin (i.e. Gentoo). If unixdll_getnode() 
fails too, uuid.getnode() fallbacks to use of _random_getnode(). This is 
security issue.

test_uuid fails on such platforms too.

Here is a patch for 3.3+. Other Python versions requires different solution. 
For example this check can be just removed.

--
components: Library (Lib)
files: uuid_find_mac_which.patch
keywords: patch
messages: 204932
nosy: Arfrever, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: uuid._find_mac fails if an executable not in /sbin or /usr/sbin
type: security
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32931/uuid_find_mac_which.patch

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



[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Initially the issue was reported in msg204881.

--

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



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is different issue. See issue19855.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

The test currently uses:
@unittest.skipUnless(os.name == 'posix', 'requires Posix')

Maybe this test should be skipped also on posix systems with ifconfig not 
available at all?

--

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 02d186e3af09 by Serhiy Storchaka in branch '2.7':
Fixed JSON tests on wide build when ran from *.pyc files (issue #11489).
http://hg.python.org/cpython/rev/02d186e3af09

--

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



[issue10976] json.loads() raises TypeError on bytes object

2013-12-01 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Bike-shedding: instead of jsonb, make it json.bytes. Else, it may get confused 
with other protocols, such as JSONP or BSON.

--
nosy: +loewis

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue18716] Deprecate the formatter module

2013-12-01 Thread Brett Cannon

Brett Cannon added the comment:

On Sun, Dec 1, 2013 at 12:36 AM, Larry Hastings rep...@bugs.python.orgwrote:


 Larry Hastings added the comment:

 They're not on Python 3.  I think we should keep the deprecation and let
 them roll their own when they upgrade.  It's not like the module provides
 much functionality in the first place.


What Larry said. =) Plus a single user in the world is not enough to
warrant keeping a module. The code is simple enough that if they want to
keep it they can simply copy it into their own code.

--

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



[issue19837] Wire protocol encoding for the JSON module

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree that adding a new module is very bad idea.

I think that the reviving the encoding parameter is a lest wrong way. 
json.dumps() should return bytes when the encoding argument is specifiead and 
str otherwise. json.dump() should write binary data when the encoding argument 
is specifiead and a text otherwise. This is not perfect design, but it has 
precendences in XML modules.

--

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



[issue19853] Add support for Bitrig to 2.7

2013-12-01 Thread Brett Cannon

Brett Cannon added the comment:

To prevent lesser-used OSs from being poorly serviced by Python we do not 
accept patches to add support for them. We suggest alternative OSs keep their 
own set of patches external to Python for ease of updating. We have mirrors on 
both bitbucket and github if you would like to maintain your patches on either 
site based off those mirrors.

--
nosy: +brett.cannon
resolution:  - wont fix
status: open - closed

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



[issue19854] Add support for Bitrig to 3.4

2013-12-01 Thread Brett Cannon

Brett Cannon added the comment:

As I said on the similar bug for adding support in Python 2.7:

To prevent lesser-used OSs from being poorly serviced by Python we do not 
accept patches to add support for them. We suggest alternative OSs keep their 
own set of patches external to Python for ease of updating. We have mirrors on 
both bitbucket and github if you would like to maintain your patches on either 
site based off those mirrors.

--
nosy: +brett.cannon
resolution:  - wont fix
status: open - closed

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



[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are several similar issues on the tracker.

--
nosy: +serhiy.storchaka

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



[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See issue16074.

--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - bad error message in os.rename

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



[issue16074] bad error message in os.rename

2013-12-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
keywords: +3.3regression

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



[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-01 Thread Guido van Rossum

Guido van Rossum added the comment:

Do you haven an example of a program using asyncio that fails because of this?

Adding gps because he seems to agree that EINTR must die.

--
nosy: +gregory.p.smith

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



[issue19828] test_site fails with -S flag

2013-12-01 Thread R. David Murray

R. David Murray added the comment:

That's not relevant, though.  In fact, the existing error message for running 
the module directly is exactly correct: the entire test module fails to run, 
which is a more accurate reflection of the reality than showing all of the 
individual tests as skipped.  

If you run test_site under the test harness you also currently get the correct 
result:

rdmurray@hey:~/python/p34./python -S Lib/test test_site
[1/1] test_site
test_site skipped -- importation of site.py suppressed
1 test skipped:
test_site

In other words, you don't need to do anything to test_site to get it to work 
correctly for your desired goal, it already does.

--

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



[issue19839] bz2: regression wrt supporting files with trailing garbage after EOF

2013-12-01 Thread Nadeem Vawda

Nadeem Vawda added the comment:

I'll have a patch for this in the next couple of days (and a similar one
for the lzma module, which has the same issue (even though it's not a
regression in that case)).

In the meanwhile, you can work around this by feeding the compressed data
to a BZ2Decompressor yourself - it stops at the end of the bz2 stream,
with any leftover data stored in its 'unused_data' attribute.

--
assignee:  - nadeem.vawda
stage:  - needs patch

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



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

When someone will report about failures on such systems.

--

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



[issue19856] Possible bug in shutil.move() on Windows

2013-12-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Perhaps following code fails on Windows (while successes on Linux): 

import os, shutil
os.makedirs('foo')
os.makedirs('bar/boo')
shutil.move('foo/', 'bar/')

However shutil.move('foo', 'bar/') and shutil.move('foo\\', 'bar/') should work.

--
components: Library (Lib), Windows
messages: 204948
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Possible bug in shutil.move() on Windows
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

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



[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I do not consider this a feature; that EINTR is exposed as an exception from 
the API is a bug.  But Larry is the only one who can actually make that 
decision as the 3.4 release manager (+nosy'd).

 by returning an empty list you force the user to handle EINTR -
 just in a different way.

The user now only has one thing to deal with instead of two: an empty list 
being returned; something they should already have been dealing with. Gone will 
be the OSError(EINTR) exception as a rare, often never tested for, alternate 
form of the same retry needed indication.

I never see code intentionally wanting to receive and handle an OSError(EINTR) 
exception but I constantly run into code that is buggy due to some library it 
is using not getting this right... Where it isn't up to the code exhibiting the 
problem because the only place to fix it is within the library they use that is 
outside of that code's control.

We've got the opportunity to fix this nit once and for all here, lets do it.

--
nosy: +larry

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



[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-01 Thread Gregory P. Smith

Gregory P. Smith added the comment:

It sounds like doing this is fine (as Glyph suggests in the email thread) but 
it isn't magically going to solve all EINTR problems, just reduce the number of 
calls that could encounter them.

http://man7.org/linux/man-pages/man7/signal.7.html see the Interruption of 
system calls and library functions section.

Note that with this SA_RESTART flag set via siginterrupt you _may_ be making a 
trade off between being able to process python signal handlers during long 
reads or writes vs having to wait until the entire thing has finished.

given that, I'm ambivalent about this patch being worthy.

(re: Explicitly testing this, it is hard. for the broader Python test suite as 
a whole I've been pondering a regrtest mode that'll continually pester all of 
the test processes with signals to try and expose EINTR issues.  Low on my TODO 
ideas list, I haven't written code to do it.)

--

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



[issue6477] Pickling of NoneType raises PicklingError

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I thought it over. I don't think the fix is appropriate for 2.x, as it seems 
closer to being an extra feature than a bug fix.

Thanks Antoine for calling me out on this one.

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

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



[issue19100] Use backslashreplace in pprint

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Any review?

--

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



[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I do not consider this a feature; that EINTR is exposed as an
 exception from the API is a bug.

select() currently works as specified; you are proposing a
compatibility-breaking change to the API, not a bugfix.

We're left with the fact that the API is inconvenient: but we now have
the selectors module and can advocate that instead of breaking existing
code during a feature freeze period.

(or we can retry on EINTR, which has the benefit of not creating new
situations to deal with in existing code)

 The user now only has one thing to deal with instead of two: an empty
 list being returned; something they should already have been dealing
 with.

Returning an empty list when no timeout has been passed has never been a
feature of select(), which is why users are not expected to be dealing
with it.

--

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



[issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173

2013-12-01 Thread Martin Mokrejs

Martin Mokrejs added the comment:

The issue could have been caused the malfunctioning memory or CPU.
http://bugs.python.org/issue18843#msg204954

--

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



[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

2013-12-01 Thread Martin Mokrejs

Martin Mokrejs added the comment:

Hi,
  I think I should report back what I found on the hardware side. While memory 
testing tools like memtest86+ and other did not find any error, the built in 
Dell ePSA test suite likely does compute a checksum of tested memory regions. 
It reported some addresses/regions as failed, sadly nobody seems to know 
details of the failing tests. On repeated testing different memory regions were 
reported, so I never understood whether that is a bad CPU cache or something 
randomizing the issue observed. At least, only one of the two SO-DIMMs caused 
the problems so lets conclude it was partly baked up and failing randomly. At 
that time it seemed the cause was either bad CPU producing just too much heat 
or the fan. Fan was replaced, max temps went down from 92 oC to 82 oC. Two 
months later I faced more and more often that an external HDMI-connected 
display did not receive signal, so even the CPU got replaced. I got another 
drop in max temperatures, now max are about 70 oC. Cool!

Back to python, the random crashes of my apps stopped after the memory module 
being replaced, actually who pair was replaced. I started to dream about linux 
kernel making mirroring inside memory for failure resiliency but there is 
nothing like that available.

In summary, this lesson was hard and showed that there are no good tools to 
test hardware. Checksums should be used always and bits tested for fading over 
the time. The mirroring trick could have also uncovered a failing memory or 
CPU. Seems there is still way to go to a perfect computer.

Thanks to everybody for their efforts on this issue. Whether python takes 
something from this lesson is up to you.

--
status: pending - open

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



[issue18845] 2.7.5-r2: Fatal Python error: Segmentation fault

2013-12-01 Thread Martin Mokrejs

Martin Mokrejs added the comment:

The issue could have been caused the malfunctioning memory or CPU.
http://bugs.python.org/issue18843#msg204954

--

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



[issue3657] pickle can pickle the wrong function

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

This was fixed in 3.4 with the introduction of method pickling. I don't think 
it would be appropriate to backport this to 2.7. Thus, I am closing this as a 
won't fix for 2.x.

--
assignee:  - alexandre.vassalotti
resolution:  - wont fix
stage: needs patch - committed/rejected
status: open - closed
versions:  -Python 3.1, Python 3.2

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



[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

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

Charles-François Natali added the comment:

Thanks for the feedback!

--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy:  -Arfrever

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



[issue10976] json.loads() raises TypeError on bytes object

2013-12-01 Thread Nick Coghlan

Nick Coghlan added the comment:

json.bytes would also work for me. It wouldn't need to replicate the full
main module API, just combine the text transform with UTF-8 encoding and
decoding (as well as autodetected UTF-16 and UTF-32 decoding) for the main
4 functions (dump[s], load[s]).

If people want UTF-16 and UTF-32 *en*coding (which seem to be rarely used
in combination with JSON), then they can invoke the text transform version
directly, and then do a separate encoding step.

--

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



[issue19837] Wire protocol encoding for the JSON module

2013-12-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Changing return type based on argument *values* is still a bad idea in
general.

It also makes it hard to plug the API in to generic code that is designed
to work with any dump/load based serialisation protocol.

MvL suggested a json.bytes submodule (rather than a separate top level
module) in the other issue and that sounds reasonable to me, especially
since json is already implemented as a package.

--

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



[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

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

Charles-François Natali added the comment:

 It sounds like doing this is fine (as Glyph suggests in the email thread) but 
 it isn't magically going to solve all EINTR problems, just reduce the number 
 of calls that could encounter them.

Indeed, hence *limit* EINTR occurrences :-)

 Note that with this SA_RESTART flag set via siginterrupt you _may_ be making 
 a trade off between being able to process python signal handlers during long 
 reads or writes vs having to wait until the entire thing has finished.

asyncio uses a wakeup FD, registered in the main event loop: so as
soon as a signal is received, the main loop will wake up and run the
signal handler. So this would only be a problem if you were doing a
blocking syscall from the main loop thread, which would be a really
bad idea anyway.

--

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



[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Larry Hastings

Larry Hastings added the comment:

I don't want this checked in to 3.4.

(Congratulations, this is my first no as a release manager!)

--

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



[issue19837] Wire protocol encoding for the JSON module

2013-12-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 MvL suggested a json.bytes submodule (rather than a separate top level
 module) in the other issue and that sounds reasonable to me, especially
 since json is already implemented as a package.

I don't really find it reasonable to add a phantom module entirely for
the purpose of exposing an API more similar to the Python 2 one. I don't
think this design pattern has already been used.

If we add a json_bytes method, it will be simple enough for folks to add
the appropriate rules in their compat module (and/or for six to expose
it).

--

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



[issue5885] uuid.uuid1() is too slow

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I agree that there is a maintenance cost associated with C extension modules. 
However, I would certainly be glad if it allowed us to eliminate uses of ctypes 
in this module because ctypes is quite unsafe and doesn't work well across 
platforms (though it is admittedly very convenient).

--

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



[issue11480] Cannot copy a class with a metaclass other than type

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6bb6f304f75 by Alexandre Vassalotti in branch '3.3':
Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.
http://hg.python.org/cpython/rev/c6bb6f304f75

New changeset c4715c9f442f by Alexandre Vassalotti in branch 'default':
Issue #11480: Merge with 3.3.
http://hg.python.org/cpython/rev/c4715c9f442f

--
nosy: +python-dev

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



[issue11480] Cannot copy a class with a metaclass other than type

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Thank you for the patch!

--
assignee:  - alexandre.vassalotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 3.4 -Python 3.1, Python 3.2

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



[issue18885] handle EINTR in the stdlib

2013-12-01 Thread STINNER Victor

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


--
versions: +Python 3.5 -Python 3.4

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2013-12-01 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti alexan...@peadrop.com:


--
assignee:  - alexandre.vassalotti
priority: normal - high
stage:  - needs patch
type:  - behavior
versions: +Python 3.4

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



[issue19857] test_imaplib doesn't always reap SocketServer thread

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

New submission from Charles-François Natali:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/5901/steps/test/logs/stdio


[134/387/1] test_signal
Timeout (1:00:00)!
Thread 0x000801e24800 (most recent call first):
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/socketserver.py, line 
155 in _eintr_retry
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/socketserver.py, line 
237 in serve_forever
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/threading.py, 
line 869 in run
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/threading.py, 
line 921 in _bootstrap_inner
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/threading.py, 
line 889 in _bootstrap

Thread 0x000801407400 (most recent call first):
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_signal.py, 
line 529 in test_itimer_real
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/unittest/case.py, 
line 571 in run
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/unittest/case.py, 
line 610 in __call__
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/unittest/suite.py, 
line 117 in run
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/unittest/suite.py, 
line 79 in __call__
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/unittest/suite.py, 
line 117 in run
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/unittest/suite.py, 
line 79 in __call__
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/unittest/runner.py, 
line 168 in run
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/support/__init__.py,
 line 1685 in _run_suite
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/support/__init__.py,
 line 1719 in run_unittest
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_signal.py, 
line 934 in test_main
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/regrtest.py, 
line 1278 in runtest_inner
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/regrtest.py, 
line 967 in runtest
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/regrtest.py, 
line 763 in main
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/regrtest.py, 
line 1562 in main_in_temp_cwd
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/__main__.py, 
line 3 in module
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/runpy.py, line 
73 in _run_code
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/runpy.py, line 
160 in _run_module_as_main
*** Error code 1


test_signal hangs, but that's because there's a dangling socketserver thread 
running from a failed test_imaplib test earlier in the test run:

==
ERROR: test_login_cram_md5 (test.test_imaplib.ThreadedNetworkedTests)
--
Traceback (most recent call last):
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/imaplib.py, 
line 940, in _command
self.send(CRLF)
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/imaplib.py, 
line 276, in send
self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_imaplib.py, 
line 216, in reaped_pair
yield server, client
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_imaplib.py, 
line 319, in test_login_cram_md5
ret, data = client.login_cram_md5(tim, tanstaaftanstaaf)
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/imaplib.py, 
line 549, in login_cram_md5
return self.authenticate('CRAM-MD5', self._CRAM_MD5_AUTH)
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/imaplib.py, 
line 380, in authenticate
typ, dat = self._simple_command('AUTHENTICATE', mech)
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/imaplib.py, 
line 1127, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/imaplib.py, 
line 942, in _command
raise self.abort('socket error: %s' % val)
imaplib.abort: socket error: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/support/__init__.py,
 line 1831, in decorator
return func(*args)
  File 
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_imaplib.py, 
line 320, in test_login_cram_md5
self.assertEqual(ret, OK)
  File /usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/contextlib.py, 
line 

[issue11299] Allow deepcopying paused generators

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Allowing generators to be deepcopied via their code object should be fine.

--
stage: test needed - needs patch
title: Allow deepcopying and pickling paused generators - Allow deepcopying 
paused generators
versions: +Python 3.5 -Python 3.3

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



[issue3208] function annotation for builtin and C function

2013-12-01 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti alexan...@peadrop.com:


--
nosy:  -alexandre.vassalotti
stage:  - needs patch
versions: +Python 3.5 -Python 3.0

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



[issue19707] Check if unittest.mock needs updating for PEP 451

2013-12-01 Thread Michael Foord

New submission from Michael Foord:

It shouldn't do, so long as __import__ supports PEP 451. unittest.mock.patch 
uses __import__ to find modules specified by name.

--

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



[issue2295] cPickle corner case - docs or bug?

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

We can't fix this without a working test case. Feel free to re-open if you find 
one.

--
assignee: docs@python - alexandre.vassalotti
components:  -Documentation
resolution:  - works for me
status: open - closed
versions: +Python 2.7 -Python 2.6, Python 3.1

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



[issue11349] _pickle should implement the module finalisation protocol

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I have implemented PEP 3121 module finalization for _pickle in 64c6d52793be.

--
assignee:  - alexandre.vassalotti
nosy: +alexandre.vassalotti
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



  1   2   >